elf/simple_cases: deepcopy is unnecessary, call dict.copy 1169-elf-support
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 1 Dec 2023 20:57:34 +0000 (12:57 -0800)
committerJacob Lifshay <programmerjake@gmail.com>
Fri, 1 Dec 2023 20:57:34 +0000 (12:57 -0800)
src/openpower/test/elf/simple_cases.py

index 77a1c3c9cb97956f652dfa80d0bd2dbb1d972c0d..01bea29345e9667ef187a813c8ccc51b93f8f621 100644 (file)
@@ -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 <sys/syscall.h>
@@ -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)