llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb

@llvm/pr-subscribers-testing-tools

Author: Charles Zablit (charles-zablit)

<details>
<summary>Changes</summary>

Currently, it is unclear if a test that is skipped is either:
- Unsupported because it will never run (macosx tests should not run on 
Windows).
- Skipped because it's supposed to work but does not yet. `@<!-- 
-->expectedFailure` is not always an option because a test might be timing out 
and waiting 600s for it to fail is not acceptable.

This patch introduces 2 new decorators to differentiate those tests:
- `@<!-- -->requireX` meaning the tests require X to run (e.g `@<!-- 
-->requireDarwin`).
- `@<!-- -->requireNotX` meaning the tests requires anything but `X` to run 
(e.g `@<!-- -->requireNotDarwin`).

In the tests results summary, this introduces a new category: `skipped` tests:
- `@<!-- -->requireX` -&gt; `UNSUPPORTED`
- `@<!-- -->skipIfX` -&gt; `SKIPPED`

Here is how they can and cannot be stacked:

This will never run:
```py3
@<!-- -->requireDarwin
@<!-- -->requireWindows
def test():
    ...
```

This will not run on Linux, because `@<!-- -->requireWindows` is not satisfied.
```py3
@<!-- -->requireNotDarwin
@<!-- -->requireWindows
def test():
    ...
```

For "require Darwin or Windows", you need:
```py3
@<!-- -->requirePlatform(["darwin", "windows"])
def test():
    ...
```

For "require Darwin on ARM64 or Windows on ARM64", you need:
```py3
@<!-- -->requireARM64
@<!-- -->requirePlatform(["darwin", "windows"])
def test():
    ...
```

This patch also converts the tests in `lldb/tests/API/{macosx,linux,windows}` 
to use these decorators. Patches to convert the rest of the tests will follow.

---

Patch is 73.36 KiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/212753.diff


89 Files Affected:

- (modified) lldb/docs/resources/test.md (+29) 
- (modified) lldb/packages/Python/lldbsuite/test/decorators.py (+122) 
- (modified) lldb/packages/Python/lldbsuite/test/dotest.py (+6) 
- (added) lldb/packages/Python/lldbsuite/test/skip_reason.py (+17) 
- (modified) lldb/packages/Python/lldbsuite/test/test_result.py (+16-3) 
- (modified) lldb/test/API/attach/TestWindowsAttachBreakpoint.py (+1-1) 
- (modified) 
lldb/test/API/linux/aarch64/aarch32_compat/TestAArch64LinuxAArch32Compat.py 
(+1-1) 
- (modified) lldb/test/API/linux/aarch64/fpmr/TestAArch64LinuxFPMR.py (+1-1) 
- (modified) lldb/test/API/linux/aarch64/gcs/TestAArch64LinuxGCS.py (+6-6) 
- (modified) 
lldb/test/API/linux/aarch64/mte_memory_region/TestAArch64LinuxMTEMemoryRegion.py
 (+1-1) 
- (modified) 
lldb/test/API/linux/aarch64/mte_tag_access/TestAArch64LinuxMTEMemoryTagAccess.py
 (+5-5) 
- (modified) 
lldb/test/API/linux/aarch64/mte_tag_faults/TestAArch64LinuxMTEMemoryTagFaults.py
 (+2-2) 
- (modified) 
lldb/test/API/linux/aarch64/non_address_bit_code_break/TestAArch64LinuxNonAddressBitCodeBreak.py
 (+2-2) 
- (modified) 
lldb/test/API/linux/aarch64/non_address_bit_memory_access/TestAArch64LinuxNonAddressBitMemoryAccess.py
 (+4-4) 
- (modified) 
lldb/test/API/linux/aarch64/permission_overlay/TestAArch64LinuxPOE.py (+1-1) 
- (modified) 
lldb/test/API/linux/aarch64/tagged_memory_access/TestAArch64LinuxTaggedMemoryAccess.py
 (+2-2) 
- (modified) 
lldb/test/API/linux/aarch64/tagged_memory_region/TestAArch64LinuxTaggedMemoryRegion.py
 (+1-1) 
- (modified) 
lldb/test/API/linux/aarch64/tls_registers/TestAArch64LinuxTLSRegisters.py 
(+3-3) 
- (modified) lldb/test/API/linux/aarch64/unwind_signal/TestUnwindSignal.py 
(+1-1) 
- (modified) lldb/test/API/linux/add-symbols/TestTargetSymbolsAddCommand.py 
(+1-1) 
- (modified) lldb/test/API/linux/arm/tls_register/TestArmLinuxTLSRegister.py 
(+1-1) 
- (modified) lldb/test/API/linux/linker-symbols/TestLinkerSymbols.py (+1-1) 
- (modified) 
lldb/test/API/linux/loongarch64/simd_registers/TestLoongArch64LinuxSIMDRegisters.py
 (+2-2) 
- (modified) 
lldb/test/API/linux/mix-dwo-and-regular-objects/TestMixedDwarfBinary.py (+1-1) 
- (modified) 
lldb/test/API/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py (+1-1) 
- (modified) 
lldb/test/API/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py
 (+1-1) 
- (modified) lldb/test/API/lldbtest.py (+10-1) 
- (modified) lldb/test/API/macosx/add-dsym/TestAddDsymDownload.py (+1-1) 
- (modified) lldb/test/API/macosx/add-dsym/TestAddDsymMidExecutionCommand.py 
(+1-1) 
- (modified) 
lldb/test/API/macosx/arm-pointer-metadata-cfa-dwarf-expr/TestArmPointerMetadataCFADwarfExpr.py
 (+1-1) 
- (modified) 
lldb/test/API/macosx/bss-only-data-section-sliding/TestBSSOnlyDataSectionSliding.py
 (+1-1) 
- (modified) 
lldb/test/API/macosx/corefile-exception-reason/TestCorefileExceptionReason.py 
(+1-1) 
- (modified) lldb/test/API/macosx/ctf/TestCTF.py (+2-2) 
- (modified) 
lldb/test/API/macosx/debugserver-exit-code/TestDebugServerExitCode.py (+1-1) 
- (modified) 
lldb/test/API/macosx/debugserver-multimemread/TestDebugserverMultiMemRead.py 
(+1-1) 
- (modified) 
lldb/test/API/macosx/delay-init-dependency/TestDelayInitDependency.py (+1-1) 
- (modified) lldb/test/API/macosx/deny-attach/TestDenyAttach.py (+1-1) 
- (modified) lldb/test/API/macosx/dsym_codesign/TestdSYMCodesign.py (+1-1) 
- (modified) lldb/test/API/macosx/dsym_modules/TestdSYMModuleInit.py (+1-1) 
- (modified) lldb/test/API/macosx/dyld-trie-symbols/TestDyldTrieSymbols.py 
(+1-1) 
- (modified) 
lldb/test/API/macosx/early-process-launch/TestEarlyProcessLaunch.py (+1-1) 
- (modified) 
lldb/test/API/macosx/expedited-stack-memory/TestExpeditedStackMemory.py (+4-4) 
- (modified) 
lldb/test/API/macosx/expedited-thread-pcs/TestExpeditedThreadPCs.py (+1-1) 
- (modified) 
lldb/test/API/macosx/extended-backtrace-api/TestExtendedBacktraceAPI.py (+1-1) 
- (modified) lldb/test/API/macosx/find-app-in-bundle/TestFindAppInBundle.py 
(+1-1) 
- (modified) 
lldb/test/API/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py
 (+1-1) 
- (modified) lldb/test/API/macosx/find-dsym/deep-bundle/TestDeepBundle.py 
(+1-1) 
- (modified) lldb/test/API/macosx/format/TestFunctionNameWithoutArgs.py (+1-1) 
- (modified) lldb/test/API/macosx/function-starts/TestFunctionStarts.py (+2-2) 
- (modified) lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py 
(+1-1) 
- (modified) lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py (+1-1) 
- (modified) 
lldb/test/API/macosx/lc-note/additional-registers/TestMetadataRegisters.py 
(+1-1) 
- (modified) 
lldb/test/API/macosx/lc-note/addrable-bits/TestAddrableBitsCorefile.py (+1-1) 
- (modified) 
lldb/test/API/macosx/lc-note/firmware-corefile/TestFirmwareCorefiles.py (+3-3) 
- (modified) lldb/test/API/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py 
(+1-1) 
- (modified) 
lldb/test/API/macosx/lc-note/multiple-binary-corefile/TestMultipleBinaryCorefile.py
 (+2-2) 
- (modified) lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py (+1-1) 
- (modified) 
lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py
 (+1-1) 
- (modified) lldb/test/API/macosx/mte/TestDarwinMTE.py (+1-1) 
- (modified) lldb/test/API/macosx/no-nlist-memory-module/TestNoNlistsDylib.py 
(+1-1) 
- (modified) lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py (+2-2) 
- (modified) 
lldb/test/API/macosx/objc_exception_recognizer/TestObjCRecognizer.py (+2-2) 
- (modified) lldb/test/API/macosx/order/TestOrderFile.py (+1-1) 
- (modified) lldb/test/API/macosx/posix_spawn/TestLaunchProcessPosixSpawn.py 
(+2-2) 
- (modified) lldb/test/API/macosx/profile_vrs_detach/TestDetachVrsProfile.py 
(+1-1) 
- (modified) lldb/test/API/macosx/queues/TestQueues.py (+3-3) 
- (modified) lldb/test/API/macosx/safe-to-func-call/TestSafeFuncCalls.py (+1-1) 
- (modified) lldb/test/API/macosx/save_crashlog/TestSaveCrashlog.py (+1-1) 
- (modified) 
lldb/test/API/macosx/shared-cache-host-memory/TestSharedCacheHostMemory.py 
(+1-1) 
- (modified) 
lldb/test/API/macosx/shared-cache-vm-range/TestSharedCacheVMRange.py (+1-1) 
- (modified) lldb/test/API/macosx/simulator/TestSimulatorPlatform.py (+2-2) 
- (modified) lldb/test/API/macosx/skinny-corefile/TestSkinnyCorefile.py (+1-1) 
- (modified) lldb/test/API/macosx/sme-registers/TestSMERegistersDarwin.py 
(+1-1) 
- (modified) lldb/test/API/macosx/stack-corefile/TestStackCorefile.py (+1-1) 
- (modified) 
lldb/test/API/macosx/stop-reason-exception/TestMachExceptionData.py (+1-1) 
- (modified) lldb/test/API/macosx/tbi-honored/TestTBIHonored.py (+1-1) 
- (modified) lldb/test/API/macosx/thread-names/TestInterruptThreadNames.py 
(+1-1) 
- (modified) lldb/test/API/macosx/thread_start_bps/TestBreakpointsThreadInit.py 
(+2-2) 
- (modified) 
lldb/test/API/macosx/thread_suspend/TestInternalThreadSuspension.py (+1-1) 
- (modified) lldb/test/API/macosx/universal/TestUniversal.py (+3-3) 
- (modified) lldb/test/API/macosx/universal64/TestUniversal64.py (+2-2) 
- (modified) lldb/test/API/macosx/unregistered-macho/TestUnregisteredMacho.py 
(+1-1) 
- (modified) lldb/test/API/windows/conpty/TestConPTY.py (+4-4) 
- (modified) lldb/test/API/windows/debug-heap/TestWindowsDebugHeap.py (+1-1) 
- (modified) lldb/test/API/windows/launch/missing-dll/TestMissingDll.py (+1-1) 
- (modified) lldb/test/API/windows/launch/replace-dll/TestReplaceDLL.py (+1-1) 
- (modified) lldb/test/API/windows/msvcrt/TestMSVCRTCException.py (+1-1) 
- (modified) lldb/test/API/windows/thread/TestThreadName.py (+1-1) 
- (modified) llvm/utils/lit/lit/reports.py (+1-1) 


``````````diff
diff --git a/lldb/docs/resources/test.md b/lldb/docs/resources/test.md
index e3c02c25553f0..1277a7a5abb8c 100644
--- a/lldb/docs/resources/test.md
+++ b/lldb/docs/resources/test.md
@@ -137,6 +137,35 @@ the test should be run or not.
 @skipTestIfFn(checking_function_name)
 ```
 
+### Skipped versus unsupported
+
+A test that doesn't run does so for one of two very different reasons, and the
+decorator you pick says which:
+
+* The test **can never** run in this configuration. A test for Mach-O debug
+  maps has nothing to say on Linux; a test that calls `fork()` has nothing to
+  say on Windows. Use the `require*` family. These are reported as
+  **UNSUPPORTED**.
+
+* The test **ought to** run in this configuration but doesn't work yet. Use the
+  `skipIf*` / `skipUnless*` family. These are reported as **SKIPPED**, which
+  keeps them visible as work still to be done.
+
+```python
+@requireDarwin      # inherently Darwin-only: reported UNSUPPORTED elsewhere
+@skipIfWindows      # ought to work on Windows, currently broken: reported 
SKIPPED
+```
+
+The `require*` decorators mirror the `skip*` ones one-for-one:
+`requireDarwin` / `requireNotDarwin`, `requireLinux` / `requireNotLinux`,
+`requireWindows` / `requireNotWindows`, plus `requirePOSIX`, `requireSignals`,
+`requireNotWasm`, `requireDarwinHost`, and the general
+`requirePlatform(oslist)` / `requireNotPlatform(oslist)`.
+
+Reach for `require*` when the test is tied to a platform-specific file format,
+API, or OS feature. If the test is merely untested or broken somewhere, keep
+`skipIf*` so nobody mistakes a bug for a design decision.
+
 In addition to providing a lot more flexibility when it comes to writing the
 test, the API test also allow for much more complex scenarios when it comes to
 building inferiors. Every test has its own `Makefile`, most of them only a
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py 
b/lldb/packages/Python/lldbsuite/test/decorators.py
index 50eec24120c4c..906ade7d63fa3 100644
--- a/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -30,6 +30,7 @@
 from lldbsuite.test import lldbplatform
 from lldbsuite.test import lldbplatformutil
 from lldbsuite.test.cpu_feature import CPUFeature
+from lldbsuite.test.skip_reason import UnsupportedReason
 
 
 class DecorateMode:
@@ -1123,6 +1124,127 @@ def skipUnlessPlatform(oslist):
     )
 
 
+##############################################################################
+# Platform *requirement* decorators.
+#
+# These express "this test can only ever run here", as opposed to the skipIf /
+# skipUnless family which means "this test ought to run here but is broken".
+# Tests turned off by a `require*` decorator are reported as UNSUPPORTED; tests
+# turned off by a `skip*` decorator are reported as SKIPPED. See
+# `lldbsuite.test.skip_reason` for how the distinction is carried.
+#
+# Reach for these when the test is inherently tied to a platform: it debugs a
+# platform-specific file format, drives a platform-specific API, or exercises
+# an OS feature that simply doesn't exist elsewhere. If the test is merely
+# untested or broken somewhere, keep using skipIf / skipUnless so it stays
+# visible as work to be done.
+##############################################################################
+
+
+def requirePlatform(oslist):
+    """Mark the item as runnable only on the listed target platforms.
+
+    Unlike `skipUnlessPlatform`, other platforms are reported as UNSUPPORTED
+    rather than SKIPPED.
+    """
+    return unittest.skipUnless(
+        lldbplatformutil.getPlatform() in oslist,
+        UnsupportedReason("requires one of %s" % (", ".join(oslist))),
+    )
+
+
+def requireNotPlatform(oslist):
+    """Mark the item as inherently inapplicable to the listed target platforms.
+
+    Unlike `skipIfPlatform`, the listed platforms are reported as UNSUPPORTED
+    rather than SKIPPED.
+    """
+    return unittest.skipIf(
+        lldbplatformutil.getPlatform() in oslist,
+        UnsupportedReason("unsupported on %s" % (", ".join(oslist))),
+    )
+
+
+def requireDarwin(func):
+    """Mark the item as inherently Darwin-only (Mach-O, debug maps, Darwin
+    kernel/runtime APIs, ...). Non-Darwin targets report UNSUPPORTED."""
+    return 
requirePlatform(lldbplatform.translate(lldbplatform.darwin_all))(func)
+
+
+def requireNotDarwin(func):
+    """Mark the item as inherently inapplicable to Darwin targets."""
+    return 
requireNotPlatform(lldbplatform.translate(lldbplatform.darwin_all))(func)
+
+
+def requireLinux(func):
+    """Mark the item as inherently Linux-only (procfs, Linux-specific syscalls,
+    ...). Other targets report UNSUPPORTED."""
+    return requirePlatform(["linux"])(func)
+
+
+def requireNotLinux(func):
+    """Mark the item as inherently inapplicable to Linux targets."""
+    return requireNotPlatform(["linux"])(func)
+
+
+def requireWindows(func):
+    """Mark the item as inherently Windows-only (PE/COFF, Win32 APIs, ...).
+    Other targets report UNSUPPORTED."""
+    return requirePlatform(["windows"])(func)
+
+
+def requireNotWindows(func):
+    """Mark the item as inherently inapplicable to Windows targets.
+
+    Use this for tests built on POSIX-only concepts: fork/exec semantics,
+    POSIX signals, ptrace, ELF/Mach-O specifics, shell pipelines, and so on.
+    """
+    return requireNotPlatform(["windows"])(func)
+
+
+def requirePOSIX(func):
+    """Mark the item as requiring a POSIX target.
+
+    A shorthand for `requireNotWindows` that reads better on tests whose
+    dependency is POSIX semantics generally rather than anything about
+    Windows specifically.
+    """
+    return requireNotPlatform(["windows"])(func)
+
+
+def requireSignals(func):
+    """Mark the item as requiring POSIX signal support on the target."""
+    return requireNotPlatform(["windows", "wasip1", "wasi"])(func)
+
+
+def requireNotWasm(func):
+    """Mark the item as inherently inapplicable to WebAssembly targets.
+
+    WebAssembly has no processes, no signals, no shared libraries and no
+    ptrace-style debugging, so a large amount of the test suite can never
+    apply to it.
+    """
+    return requireNotPlatform(["wasip1", "wasi"])(func)
+
+
+def requireHostPlatform(oslist):
+    """Mark the item as runnable only on the listed *host* platforms."""
+    return unittest.skipUnless(
+        lldbplatformutil.getHostPlatform() in oslist,
+        UnsupportedReason("requires one of %s as host" % (", ".join(oslist))),
+    )
+
+
+def requireDarwinHost(func):
+    """Mark the item as requiring a Darwin host, regardless of target.
+
+    Use for tests that drive host-side Darwin facilities: `xcrun`, the
+    simulator runtimes, dsymutil, the LLDB.framework layout, and so on.
+    """
+    return 
requireHostPlatform(lldbplatform.translate(lldbplatform.darwin_all))(func)
+
+
+
 def skipIfTargetDoesNotSupportThreads():
     """Skip tests that require thread support (e.g. pthreads)."""
     platform = lldbplatformutil.getPlatform()
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py 
b/lldb/packages/Python/lldbsuite/test/dotest.py
index caa5c81b82cbb..7f440654811ed 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -1255,6 +1255,12 @@ def run_suite():
 
     configuration.failed = not result.wasSuccessful()
 
+    if getattr(result, "skipped", None):
+        sys.stderr.write(
+            "Skip breakdown (unsupported=%d, skipped=%d)\n"
+            % (result.countUnsupported(), result.countSkipped())
+        )
+
     if configuration.sdir_has_content and configuration.verbose:
         sys.stderr.write(
             "Session logs for test failures/errors/unexpected successes"
diff --git a/lldb/packages/Python/lldbsuite/test/skip_reason.py 
b/lldb/packages/Python/lldbsuite/test/skip_reason.py
new file mode 100644
index 0000000000000..b1aece572f4f3
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/skip_reason.py
@@ -0,0 +1,17 @@
+"""
+Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+See https://llvm.org/LICENSE.txt for license information.
+SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+Distinguishes the two reasons a test can end up not running.
+"""
+
+
+class UnsupportedReason(str):
+    """A skip reason meaning "this test can never run here", not "this test is
+    broken here". Reported as UNSUPPORTED rather than SKIPPED."""
+
+
+def is_unsupported(reason):
+    """Return True if *reason* marks a test as unsupported rather than 
skipped."""
+    return isinstance(reason, UnsupportedReason)
diff --git a/lldb/packages/Python/lldbsuite/test/test_result.py 
b/lldb/packages/Python/lldbsuite/test/test_result.py
index 383135d5f67c9..ddd4d2ab3aaef 100644
--- a/lldb/packages/Python/lldbsuite/test/test_result.py
+++ b/lldb/packages/Python/lldbsuite/test/test_result.py
@@ -16,6 +16,7 @@
 
 # LLDB Modules
 from . import configuration
+from .skip_reason import UnsupportedReason, is_unsupported
 from lldbsuite.test_event import build_exception
 
 
@@ -162,10 +163,18 @@ def hardMarkAsSkipped(self, test):
         getattr(test, test._testMethodName).__func__.__unittest_skip__ = True
         getattr(
             test, test._testMethodName
-        ).__func__.__unittest_skip_why__ = (
+        ).__func__.__unittest_skip_why__ = UnsupportedReason(
             "test case does not fall in any category of interest for this run"
         )
 
+    def countUnsupported(self):
+        """Number of skipped tests that can never run in this configuration."""
+        return sum(1 for _, reason in self.skipped if is_unsupported(reason))
+
+    def countSkipped(self):
+        """Number of skipped tests that ought to run here but don't work 
yet."""
+        return len(self.skipped) - self.countUnsupported()
+
     def checkExclusion(self, exclusion_list, name):
         if exclusion_list:
             import re
@@ -282,9 +291,13 @@ def addSkip(self, test, reason):
         method = getattr(test, "markSkippedTest", None)
         if method:
             method()
+        # A test turned off by a `require*` decorator can never run in this
+        # configuration, so report it as UNSUPPORTED. Anything else is a test
+        # that ought to run here but doesn't work yet: report it as SKIPPED.
+        status = "UNSUPPORTED" if is_unsupported(reason) else "SKIPPED"
         self.stream.write(
-            "UNSUPPORTED: LLDB (%s) :: %s (%s) \n"
-            % (self._config_string(test), str(test), reason)
+            "%s: LLDB (%s) :: %s (%s) \n"
+            % (status, self._config_string(test), str(test), reason)
         )
 
     def addUnexpectedSuccess(self, test):
diff --git a/lldb/test/API/attach/TestWindowsAttachBreakpoint.py 
b/lldb/test/API/attach/TestWindowsAttachBreakpoint.py
index e40745c54bebf..83bc28e5f40c0 100644
--- a/lldb/test/API/attach/TestWindowsAttachBreakpoint.py
+++ b/lldb/test/API/attach/TestWindowsAttachBreakpoint.py
@@ -98,7 +98,7 @@ class PROCESS_INFORMATION(ctypes.Structure):
             process_information.hThread,
         )
 
-    @skipUnlessWindows
+    @requireWindows
     def test_attach_ignores_loader_breakpoint(self):
         """
         lldb must not report the loader's int3 (raised in a system module while
diff --git 
a/lldb/test/API/linux/aarch64/aarch32_compat/TestAArch64LinuxAArch32Compat.py 
b/lldb/test/API/linux/aarch64/aarch32_compat/TestAArch64LinuxAArch32Compat.py
index b9a83b06cb59d..f104b8b7ed2af 100644
--- 
a/lldb/test/API/linux/aarch64/aarch32_compat/TestAArch64LinuxAArch32Compat.py
+++ 
b/lldb/test/API/linux/aarch64/aarch32_compat/TestAArch64LinuxAArch32Compat.py
@@ -16,7 +16,7 @@ class AArch64LinuxAArch32Compat(TestBase):
     @skipIfRemote
     @skipUnlessArch("aarch64")
     @skipIfLLVMTargetMissing("ARM")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     def test_aarch32_compat(self):
         self.build()
         test_program = self.getBuildArtifact("a.out")
diff --git a/lldb/test/API/linux/aarch64/fpmr/TestAArch64LinuxFPMR.py 
b/lldb/test/API/linux/aarch64/fpmr/TestAArch64LinuxFPMR.py
index 7f8dc811c5df3..ba547ab70f984 100644
--- a/lldb/test/API/linux/aarch64/fpmr/TestAArch64LinuxFPMR.py
+++ b/lldb/test/API/linux/aarch64/fpmr/TestAArch64LinuxFPMR.py
@@ -16,7 +16,7 @@ class AArch64LinuxFPMR(TestBase):
     EXPECTED_FPMR_FIELDS = ["LSCALE2 = 42", "F8S1 = FP8_E4M3 | 0x4"]
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     def test_fpmr_register_live(self):
         if not self.isAArch64FPMR():
             self.skipTest("FPMR must be present.")
diff --git a/lldb/test/API/linux/aarch64/gcs/TestAArch64LinuxGCS.py 
b/lldb/test/API/linux/aarch64/gcs/TestAArch64LinuxGCS.py
index f5a2ca356bbe8..c413278742afc 100644
--- a/lldb/test/API/linux/aarch64/gcs/TestAArch64LinuxGCS.py
+++ b/lldb/test/API/linux/aarch64/gcs/TestAArch64LinuxGCS.py
@@ -13,7 +13,7 @@ class AArch64LinuxGCSTestCase(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     def test_gcs_region(self):
         if not self.isAArch64GCS():
             self.skipTest("Target must support GCS.")
@@ -62,7 +62,7 @@ def test_gcs_region(self):
         # cleanly if GCS was manually enabled.
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     def test_gcs_fault(self):
         if not self.isAArch64GCS():
             self.skipTest("Target must support GCS.")
@@ -118,7 +118,7 @@ def check_gcs_registers(
         return gcs_features_enabled, gcs_features_locked, gcspr_el0
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     def test_gcs_registers(self):
         if not self.isAArch64GCS():
             self.skipTest("Target must support GCS.")
@@ -239,7 +239,7 @@ def test_gcs_registers(self):
             ],
         )
 
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     def test_gcs_expression_simple(self):
         if not self.isAArch64GCS():
             self.skipTest("Target must support GCS.")
@@ -303,7 +303,7 @@ def test_gcs_expression_simple(self):
         self.expect(expr_cmd, substrs=["(unsigned long) 1"])
         self.check_gcs_registers(*before)
 
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     def test_gcs_expression_disable_gcs(self):
         if not self.isAArch64GCS():
             self.skipTest("Target must support GCS.")
@@ -343,7 +343,7 @@ def test_gcs_expression_disable_gcs(self):
         enabled &= ~1
         self.check_gcs_registers(enabled, locked, spr_el0)
 
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     def test_gcs_expression_enable_gcs(self):
         if not self.isAArch64GCS():
             self.skipTest("Target must support GCS.")
diff --git 
a/lldb/test/API/linux/aarch64/mte_memory_region/TestAArch64LinuxMTEMemoryRegion.py
 
b/lldb/test/API/linux/aarch64/mte_memory_region/TestAArch64LinuxMTEMemoryRegion.py
index efc4734900551..fb55f8aab54ae 100644
--- 
a/lldb/test/API/linux/aarch64/mte_memory_region/TestAArch64LinuxMTEMemoryRegion.py
+++ 
b/lldb/test/API/linux/aarch64/mte_memory_region/TestAArch64LinuxMTEMemoryRegion.py
@@ -14,7 +14,7 @@ class AArch64LinuxMTEMemoryRegionTestCase(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     @skipUnlessAArch64MTELinuxCompiler
     def test_mte_regions(self):
         if not self.isAArch64MTE():
diff --git 
a/lldb/test/API/linux/aarch64/mte_tag_access/TestAArch64LinuxMTEMemoryTagAccess.py
 
b/lldb/test/API/linux/aarch64/mte_tag_access/TestAArch64LinuxMTEMemoryTagAccess.py
index f5c49ec0dd38b..a5908bf224573 100644
--- 
a/lldb/test/API/linux/aarch64/mte_tag_access/TestAArch64LinuxMTEMemoryTagAccess.py
+++ 
b/lldb/test/API/linux/aarch64/mte_tag_access/TestAArch64LinuxMTEMemoryTagAccess.py
@@ -44,7 +44,7 @@ def setup_mte_test(self):
         )
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     @skipUnlessAArch64MTELinuxCompiler
     def test_mte_tag_read(self):
         self.setup_mte_test()
@@ -209,7 +209,7 @@ def test_mte_tag_read(self):
         )
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     @skipUnlessAArch64MTELinuxCompiler
     def test_mte_tag_write(self):
         self.setup_mte_test()
@@ -431,7 +431,7 @@ def test_mte_tag_write(self):
         )
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     @skipUnlessAArch64MTELinuxCompiler
     def test_mte_memory_read_tag_display(self):
         self.setup_mte_test()
@@ -588,7 +588,7 @@ def test_mte_memory_read_tag_display(self):
         )
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     @skipUnlessAArch64MTELinuxCompiler
     # Repeating options currently does not work, see
     # https://github.com/llvm/llvm-project/issues/192057.
@@ -631,7 +631,7 @@ def test_mte_memory_read_tag_display_repeated(self):
         )
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     @skipUnlessAArch64MTELinuxCompiler
     def test_mte_memory_find(self):
         """Test the --show-tags option with memory find."""
diff --git 
a/lldb/test/API/linux/aarch64/mte_tag_faults/TestAArch64LinuxMTEMemoryTagFaults.py
 
b/lldb/test/API/linux/aarch64/mte_tag_faults/TestAArch64LinuxMTEMemoryTagFaults.py
index 331c32749e32c..55c1de50dfc92 100644
--- 
a/lldb/test/API/linux/aarch64/mte_tag_faults/TestAArch64LinuxMTEMemoryTagFaults.py
+++ 
b/lldb/test/API/linux/aarch64/mte_tag_faults/TestAArch64LinuxMTEMemoryTagFaults.py
@@ -38,7 +38,7 @@ def setup_mte_test(self, fault_type):
         )
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     @skipUnlessAArch64MTELinuxCompiler
     def test_mte_tag_fault_sync(self):
         self.setup_mte_test("sync")
@@ -57,7 +57,7 @@ def test_mte_tag_fault_sync(self):
         )
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     @skipUnlessAArch64MTELinuxCompiler
     def test_mte_tag_fault_async(self):
         self.setup_mte_test("async")
diff --git 
a/lldb/test/API/linux/aarch64/non_address_bit_code_break/TestAArch64LinuxNonAddressBitCodeBreak.py
 
b/lldb/test/API/linux/aarch64/non_address_bit_code_break/TestAArch64LinuxNonAddressBitCodeBreak.py
index e6baa5d8f59d7..252fdaa22b2ea 100644
--- 
a/lldb/test/API/linux/aarch64/non_address_bit_code_break/TestAArch64LinuxNonAddressBitCodeBreak.py
+++ 
b/lldb/test/API/linux/aarch64/non_address_bit_code_break/TestAArch64LinuxNonAddressBitCodeBreak.py
@@ -54,11 +54,11 @@ def do_tagged_break(self, hardware):
 
     # AArch64 Linux always enables the top byte ignore feature
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     def test_software_break(self):
         self.do_tagged_break(False)
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     def test_hardware_break(self):
         self.do_tagged_break(True)
diff --git 
a/lldb/test/API/linux/aarch64/non_address_bit_memory_access/TestAArch64LinuxNonAddressBitMemoryAccess.py
 
b/lldb/test/API/linux/aarch64/non_address_bit_memory_access/TestAArch64LinuxNonAddressBitMemoryAccess.py
index f27780358570b..67b1bae282ec2 100644
--- 
a/lldb/test/API/linux/aarch64/non_address_bit_memory_access/TestAArch64LinuxNonAddressBitMemoryAccess.py
+++ 
b/lldb/test/API/linux/aarch64/non_address_bit_memory_access/TestAArch64LinuxNonAddressBitMemoryAccess.py
@@ -45,7 +45,7 @@ def check_cmd_read_write(self, write_to, read_from, data):
         self.expect("memory read {}".format(read_from), substrs=[data])
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     def test_non_address_bit_memory_read_write_cmds(self):
         self.setup_test()
 
@@ -82,7 +82,7 @@ def check_api_read_write(self, write_to, read_from, data):
         self.assertEqual(data, buf_content)
 
     @skipUnlessArch("aarch64")
-    @skipUnlessPlatform(["linux"])
+    @requireLinux
     def test_non_address_bit_memory_read_write_api_process(self):
         self.setup_test()
         buf, buf_with_non_address = self.get_ptr_values()
@@ -121,7 +121,7 @@ def 
test_non_address_bit_memory_read_write_api_process(self):
         self.a...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/212753
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to