Author: David Spickett Date: 2026-10-13T12:58:28+01:00 New Revision: ab634b96f93081392335be9790995d4fca83919a
URL: https://github.com/llvm/llvm-project/commit/ab634b96f93081392335be9790995d4fca83919a DIFF: https://github.com/llvm/llvm-project/commit/ab634b96f93081392335be9790995d4fca83919a.diff LOG: Revert "[lldb][minidump][test] Enable more minidump tests on AArch64 (#231448)" This reverts commit 0b96173e7a41f50dda6ecc416715ceced30509ac. Added: Modified: lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump64b.py lldb/test/API/functionalities/process_save_core_minidump_size_of_image/TestMinidumpSizeOfImage.py lldb/test/API/tools/lldb-dap/save-core/TestDAP_save_core.py Removed: ################################################################################ diff --git a/lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py b/lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py index 772b5cced05a1..49d262a73c1f4 100644 --- a/lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py +++ b/lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py @@ -68,21 +68,19 @@ def verify_core_file( self.assertIn(thread_id, stacks_to_registers_map) register_val_list = stacks_to_registers_map[thread_id] frame_register_list = frame.GetRegisters() - - if self.getArchitecture() == "x86_64": - # explicitly verify we collected fs and gs base for x86_64 - general_purpose_registers = frame_register_list.GetValueAtIndex(0) - explicit_registers = ["fs_base", "gs_base"] - for reg in explicit_registers: - register = general_purpose_registers.GetChildMemberWithName(reg) - self.assertTrue(register.IsValid(), f"{reg} is not valid.") - self.assertEqual( - register.GetValueAsUnsigned(), - stacks_to_registers_map[thread_id] - .GetValueAtIndex(0) - .GetChildMemberWithName(reg) - .GetValueAsUnsigned(), - ) + # explicitly verify we collected fs and gs base for x86_64 + general_purpose_registers = frame_register_list.GetValueAtIndex(0) + explicit_registers = ["fs_base", "gs_base"] + for reg in explicit_registers: + register = general_purpose_registers.GetChildMemberWithName(reg) + self.assertTrue(register.IsValid()) + self.assertEqual( + register.GetValueAsUnsigned(), + stacks_to_registers_map[thread_id] + .GetValueAtIndex(0) + .GetChildMemberWithName(reg) + .GetValueAsUnsigned(), + ) # The live process may have had register sets that are not saved to # the minidump. Even when a set is saved, it may not be complete. @@ -93,7 +91,7 @@ def verify_core_file( self.assertTrue(register_val_regset.IsValid()) for reg in frame_regset: reg_name = reg.GetName() - if self.getArchitecture() == "x86_64" and reg_name == "sp": + if reg_name == "sp": # No way to get "sp" because it always gets redirected to # "rsp". https://github.com/llvm/llvm-project/issues/212778 continue @@ -108,33 +106,17 @@ def verify_core_file( self.assertEqual(reg.IsValid(), register_val_reg.IsValid()) - if self.getArchitecture() == "x86_64": - known_mismatches = [ - "xmm13", - "fctrl", - "ftag", - "mxcsr", - "mxcsrmask", - ] - elif self.getArchitecture() == "aarch64": - known_mismatches = [ - *[f"d{n}" for n in range(32)], - *[f"s{n}" for n in range(32)], - ] - - if reg_name in known_mismatches: + if reg_name in ["xmm13", "fctrl", "ftag", "mxcsr", "mxcsrmask"]: # These values are "valid", but diff erent from the live process. continue self.assertEqual( - reg.GetValueAsUnsigned(), - register_val_reg.GetValueAsUnsigned(), - f"Values for register {reg_name} did not match.", + reg.GetValueAsUnsigned(), register_val_reg.GetValueAsUnsigned() ) self.dbg.DeleteTarget(target) - @skipIf(archs=no_match(["x86_64", "aarch64"])) + @skipUnlessArch("x86_64") @skipUnlessPlatform(["linux"]) def test_save_linux_mini_dump(self): """Test that we can save a Linux mini dump.""" @@ -279,7 +261,7 @@ def test_save_linux_mini_dump(self): if os.path.isfile(core_sb_full): os.unlink(core_sb_full) - @skipIf(archs=no_match(["x86_64", "aarch64"])) + @skipUnlessArch("x86_64") @skipUnlessPlatform(["linux"]) def test_save_linux_mini_dump_thread_options(self): """Test that we can save a Linux mini dump @@ -334,7 +316,7 @@ def test_save_linux_mini_dump_thread_options(self): if os.path.isfile(thread_subset_dmp): os.unlink(thread_subset_dmp) - @skipIf(archs=no_match(["x86_64", "aarch64"])) + @skipUnlessArch("x86_64") @skipUnlessPlatform(["linux"]) def test_save_linux_mini_dump_default_options(self): """Test that we can save a Linux mini dump with default SBSaveCoreOptions""" @@ -390,7 +372,7 @@ def test_save_linux_mini_dump_default_options(self): if os.path.isfile(default_value_file): os.unlink(default_value_file) - @skipIf(archs=no_match(["x86_64", "aarch64"])) + @skipUnlessArch("x86_64") @skipUnlessPlatform(["linux"]) def test_save_linux_minidump_one_region(self): """Test that we can save a Linux mini dump with one region in sbsavecore regions""" @@ -448,7 +430,7 @@ def test_save_linux_minidump_one_region(self): if os.path.isfile(one_region_file): os.unlink(one_region_file) - @skipIf(archs=no_match(["x86_64", "aarch64"])) + @skipUnlessArch("x86_64") @skipUnlessPlatform(["linux"]) def test_save_minidump_custom_save_style(self): """Test that verifies a custom and unspecified save style fails for @@ -515,7 +497,7 @@ def save_core_with_region(self, process, region_index): if os.path.isfile(custom_file): os.unlink(custom_file) - @skipIf(archs=no_match(["x86_64", "aarch64"])) + @skipUnlessArch("x86_64") @skipUnlessPlatform(["linux"]) def test_save_minidump_custom_save_style_duplicated_regions(self): """Test that verifies a custom and unspecified save style fails for @@ -684,8 +666,8 @@ def test_minidump_saves_tls(self): if os.path.isfile(tls_file): os.unlink(tls_file) - @skipIf(archs=no_match(["x86_64", "aarch64"])) @skipUnlessPlatform(["linux"]) + @skipUnlessArch("x86_64") def test_invalid_custom_regions_not_included(self): options = lldb.SBSaveCoreOptions() self.build() diff --git a/lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump64b.py b/lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump64b.py index b59fd0391cb05..22cc578d2d6ce 100644 --- a/lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump64b.py +++ b/lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump64b.py @@ -72,7 +72,7 @@ def verify_minidump( if core_target is not None: self.assertTrue(self.dbg.DeleteTarget(core_target)) - @skipIf(archs=no_match(["x86_64", "aarch64"])) + @skipUnlessArch("x86_64") @skipUnlessPlatform(["linux"]) def test_minidump_save_style_full(self): """Test that a full minidump is the same byte for byte.""" @@ -87,7 +87,7 @@ def test_minidump_save_style_full(self): if os.path.isfile(minidump_path): os.unlink(minidump_path) - @skipIf(archs=no_match(["x86_64", "aarch64"])) + @skipUnlessArch("x86_64") @skipUnlessPlatform(["linux"]) def test_minidump_save_style_mixed_memory(self): """Test that a mixed memory minidump is the same byte for byte.""" diff --git a/lldb/test/API/functionalities/process_save_core_minidump_size_of_image/TestMinidumpSizeOfImage.py b/lldb/test/API/functionalities/process_save_core_minidump_size_of_image/TestMinidumpSizeOfImage.py index 064e257d84492..c029f4ad36aaf 100644 --- a/lldb/test/API/functionalities/process_save_core_minidump_size_of_image/TestMinidumpSizeOfImage.py +++ b/lldb/test/API/functionalities/process_save_core_minidump_size_of_image/TestMinidumpSizeOfImage.py @@ -118,7 +118,7 @@ def get_expected_size(self, target, module): return total - @skipIf(archs=no_match(["x86_64", "aarch64"])) + @skipUnlessArch("x86_64") @skipUnlessPlatform(["linux"]) def test_size_of_image_with_contiguous_segments(self): """Test SizeOfImage is correct for a module with contiguous segments.""" diff --git a/lldb/test/API/tools/lldb-dap/save-core/TestDAP_save_core.py b/lldb/test/API/tools/lldb-dap/save-core/TestDAP_save_core.py index 556b358b192fd..5bee8300a6ec8 100644 --- a/lldb/test/API/tools/lldb-dap/save-core/TestDAP_save_core.py +++ b/lldb/test/API/tools/lldb-dap/save-core/TestDAP_save_core.py @@ -13,7 +13,7 @@ class TestDAP_save_core(DAPTestCaseBase): SHARED_BUILD_TESTCASE = False - @skipIf(archs=no_match(["x86_64", "aarch64"])) + @skipUnlessArch("x86_64") @requireLinux def test_save_and_reload_core(self): """Save minidump cores in every supported `--style` from a single _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
