From 2a97b955d50d1e9da9b0fb44a7de5e529e0bfb3e Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Fri, 1 Dec 2023 12:57:34 -0800 Subject: [PATCH] elf/simple_cases: deepcopy is unnecessary, call dict.copy --- src/openpower/test/elf/simple_cases.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/openpower/test/elf/simple_cases.py b/src/openpower/test/elf/simple_cases.py index 77a1c3c9..01bea293 100644 --- a/src/openpower/test/elf/simple_cases.py +++ b/src/openpower/test/elf/simple_cases.py @@ -12,7 +12,6 @@ from openpower.test.common import TestAccumulatorBase, skip_case from openpower.test.state import ExpectedState from openpower.test.elf import compile_elf from openpower.consts import MSR, DEFAULT_MSR -from copy import deepcopy SYSCALL_DEF = r""" #include @@ -74,15 +73,15 @@ DEFAULT_USER_MSR = DEFAULT_MSR | (1 << MSR.PR) # needs problem state class SimpleCases(TestAccumulatorBase): def case_hello_world(self): prog = compile_elf(SYSCALL_DEF + hello_world) - self.add_case(prog, initial_sprs=deepcopy(initial_sprs), + self.add_case(prog, initial_sprs=initial_sprs.copy(), initial_msr=DEFAULT_USER_MSR) def case_hello_world_with_data_and_bss(self): prog = compile_elf(SYSCALL_DEF + hello_word_data_bss) - self.add_case(prog, initial_sprs=deepcopy(initial_sprs), + self.add_case(prog, initial_sprs=initial_sprs.copy(), initial_msr=DEFAULT_USER_MSR) def case_just_exit(self): prog = compile_elf(SYSCALL_DEF + just_exit) - self.add_case(prog, initial_sprs=deepcopy(initial_sprs), + self.add_case(prog, initial_sprs=initial_sprs.copy(), initial_msr=DEFAULT_USER_MSR) -- 2.30.2