Skip to content

Commit 04bbbba

Browse files
committed
Skip TestAddressMasks API tests on 32-bit arm
TestAddressMasks failed on the lldb-arm-buntu bot with the Code address mask test, mask = process.GetAddressMask(lldb.eAddressMaskTypeAny) process.SetAddressMask(lldb.eAddressMaskTypeCode, mask | 0x3) self.assertEqual( 0x000002950001F694, process.FixAddress(0x00265E950001F697, lldb.eAddressMaskTypeCode), ) The API returned 0x000002950001f694 instead of the expected 0x00265e950001f696. The low bits differ because ABISysV_arm hardcodes the Code address mask to clear the 0th bit, it doesn't use the Process code mask. I didn't debug why some of the high bytes were dropped. The address mask APIs are only important on 64-bit targets, where many of the bits are not used for addressing and are used for metadata instead, so I'm going to skip these tests on 32-bit arm instead of debugging.
1 parent 8bdddcf commit 04bbbba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lldb/test/API/python_api/process/address-masks/TestAddressMasks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def reset_all_masks(self, process):
1919
self.runCmd("settings set target.process.virtual-addressable-bits 0")
2020
self.runCmd("settings set target.process.highmem-virtual-addressable-bits 0")
2121

22+
@skipIf(archs=["arm"]) # 32-bit arm ABI hardcodes Code mask, is 32-bit
2223
def test_address_masks(self):
2324
self.build()
2425
(target, process, t, bp) = lldbutil.run_to_source_breakpoint(
@@ -79,6 +80,7 @@ def test_address_masks(self):
7980
# AArch64 can have different address masks for high and low memory, when different
8081
# page tables are set up.
8182
@skipIf(archs=no_match(["arm64", "arm64e", "aarch64"]))
83+
@skipIf(archs=["arm"]) # 32-bit arm ABI hardcodes Code mask, is 32-bit
8284
def test_address_masks_target_supports_highmem_tests(self):
8385
self.build()
8486
(target, process, t, bp) = lldbutil.run_to_source_breakpoint(
@@ -111,6 +113,7 @@ def test_address_masks_target_supports_highmem_tests(self):
111113
# On most targets where we have a single mask for all address range, confirm
112114
# that the high memory masks are ignored.
113115
@skipIf(archs=["arm64", "arm64e", "aarch64"])
116+
@skipIf(archs=["arm"]) # 32-bit arm ABI hardcodes Code mask, is 32-bit
114117
def test_address_masks_target_no_highmem(self):
115118
self.build()
116119
(target, process, t, bp) = lldbutil.run_to_source_breakpoint(

0 commit comments

Comments
 (0)