diff options
| author | David Spickett <david.spickett@linaro.org> | 2025-09-19 16:00:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-19 16:00:33 +0100 |
| commit | b21dd44dbc00a60b787dcfa90ca0e8b677c5211f (patch) | |
| tree | ac9912eb2396aca1fa4b59c5777f5dd8829511f7 | |
| parent | 50ef746a12a77e2e9f0c61f3ad92dfe0d8019194 (diff) | |
[lldb][test] Enable non-address bit WritePointerToMemory test on Linux (#157435)
First added in #153585 for Darwin only. All Linux AArch64 systems also
have Top Byte Ignore enabled in userspace so the test "just works"
there.
FreeBSD has very recently gained Top Byte Ignore support:
https://github.com/freebsd/freebsd-src/commit/4c6c27d3fb4ad15931aae2eaf8e624aed99a3fd9
However it's so recent, I don't want to assume it'll be available on any
random FreeBSD system out there.
There isn't really a good place to put this test, so I put it in the top
level of API, next to the other non-address bit test that didn't have a
good home either.
| -rw-r--r-- | lldb/test/API/pointer-nonaddressable-bits/Makefile (renamed from lldb/test/API/macosx/arm-pointer-metadata-stripping/Makefile) | 0 | ||||
| -rw-r--r-- | lldb/test/API/pointer-nonaddressable-bits/TestArmPointerMetadataStripping.py (renamed from lldb/test/API/macosx/arm-pointer-metadata-stripping/TestArmPointerMetadataStripping.py) | 7 | ||||
| -rw-r--r-- | lldb/test/API/pointer-nonaddressable-bits/extra_symbols.json (renamed from lldb/test/API/macosx/arm-pointer-metadata-stripping/extra_symbols.json) | 0 | ||||
| -rw-r--r-- | lldb/test/API/pointer-nonaddressable-bits/main.c (renamed from lldb/test/API/macosx/arm-pointer-metadata-stripping/main.c) | 0 |
4 files changed, 5 insertions, 2 deletions
diff --git a/lldb/test/API/macosx/arm-pointer-metadata-stripping/Makefile b/lldb/test/API/pointer-nonaddressable-bits/Makefile index c9319d6e6888..c9319d6e6888 100644 --- a/lldb/test/API/macosx/arm-pointer-metadata-stripping/Makefile +++ b/lldb/test/API/pointer-nonaddressable-bits/Makefile diff --git a/lldb/test/API/macosx/arm-pointer-metadata-stripping/TestArmPointerMetadataStripping.py b/lldb/test/API/pointer-nonaddressable-bits/TestArmPointerMetadataStripping.py index f61945b3eb4c..059fd9cf4ba7 100644 --- a/lldb/test/API/macosx/arm-pointer-metadata-stripping/TestArmPointerMetadataStripping.py +++ b/lldb/test/API/pointer-nonaddressable-bits/TestArmPointerMetadataStripping.py @@ -6,8 +6,11 @@ from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil -@skipUnlessDarwin -@skipIf(archs=no_match(["arm64", "arm64e"])) +# On AArch64 systems, unused top bits of pointers can be used for other things. +@skipIf(archs=no_match(["aarch64", "arm64", "arm64e"])) +# Only run this test on systems where Top Byte Ignore is known to be enabled +# and widely available (FreeBSD has support but only since recently). +@skipUnlessPlatform(["linux"] + lldbplatformutil.getDarwinOSTriples()) class TestArmPointerMetadataStripping(TestBase): # Use extra_symbols.json as a template to add a new symbol whose address # contains non-zero high order bits set. diff --git a/lldb/test/API/macosx/arm-pointer-metadata-stripping/extra_symbols.json b/lldb/test/API/pointer-nonaddressable-bits/extra_symbols.json index 5c2503d508b4..5c2503d508b4 100644 --- a/lldb/test/API/macosx/arm-pointer-metadata-stripping/extra_symbols.json +++ b/lldb/test/API/pointer-nonaddressable-bits/extra_symbols.json diff --git a/lldb/test/API/macosx/arm-pointer-metadata-stripping/main.c b/lldb/test/API/pointer-nonaddressable-bits/main.c index 05a85133caf7..05a85133caf7 100644 --- a/lldb/test/API/macosx/arm-pointer-metadata-stripping/main.c +++ b/lldb/test/API/pointer-nonaddressable-bits/main.c |
