diff --git a/lldb/docs/resources/test.md b/lldb/docs/resources/test.md index e3c02c25553f..1277a7a5abb8 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 50eec24120c4..6524d73e4a34 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -30,6 +30,7 @@ from lldbsuite.support import temp_file 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,126 @@ 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 604fb98b1e2e..2bd1d085f6ce 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 000000000000..b1aece572f4f --- /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 383135d5f67c..ddd4d2ab3aae 100644 --- a/lldb/packages/Python/lldbsuite/test/test_result.py +++ b/lldb/packages/Python/lldbsuite/test/test_result.py @@ -16,6 +16,7 @@ import unittest # LLDB Modules from . import configuration +from .skip_reason import UnsupportedReason, is_unsupported from lldbsuite.test_event import build_exception @@ -162,10 +163,18 @@ class LLDBTestResult(unittest.TextTestResult): 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 @@ class LLDBTestResult(unittest.TextTestResult): 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/linux/aarch64/aarch32_compat/TestAArch64LinuxAArch32Compat.py b/lldb/test/API/linux/aarch64/aarch32_compat/TestAArch64LinuxAArch32Compat.py index b9a83b06cb59..f104b8b7ed2a 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 7f8dc811c5df..ba547ab70f98 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 f5a2ca356bbe..c413278742af 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 @@ class AArch64LinuxGCSTestCase(TestBase): # 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 @@ class AArch64LinuxGCSTestCase(TestBase): 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 @@ class AArch64LinuxGCSTestCase(TestBase): ], ) - @skipUnlessPlatform(["linux"]) + @requireLinux def test_gcs_expression_simple(self): if not self.isAArch64GCS(): self.skipTest("Target must support GCS.") @@ -303,7 +303,7 @@ class AArch64LinuxGCSTestCase(TestBase): 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 @@ class AArch64LinuxGCSTestCase(TestBase): 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 efc473490055..fb55f8aab54a 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 f5c49ec0dd38..a5908bf22457 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 @@ class AArch64LinuxMTEMemoryTagAccessTestCase(TestBase): ) @skipUnlessArch("aarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux @skipUnlessAArch64MTELinuxCompiler def test_mte_tag_read(self): self.setup_mte_test() @@ -209,7 +209,7 @@ class AArch64LinuxMTEMemoryTagAccessTestCase(TestBase): ) @skipUnlessArch("aarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux @skipUnlessAArch64MTELinuxCompiler def test_mte_tag_write(self): self.setup_mte_test() @@ -431,7 +431,7 @@ class AArch64LinuxMTEMemoryTagAccessTestCase(TestBase): ) @skipUnlessArch("aarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux @skipUnlessAArch64MTELinuxCompiler def test_mte_memory_read_tag_display(self): self.setup_mte_test() @@ -588,7 +588,7 @@ class AArch64LinuxMTEMemoryTagAccessTestCase(TestBase): ) @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 @@ class AArch64LinuxMTEMemoryTagAccessTestCase(TestBase): ) @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 331c32749e32..55c1de50dfc9 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 @@ class AArch64LinuxMTEMemoryTagFaultsTestCase(TestBase): ) @skipUnlessArch("aarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux @skipUnlessAArch64MTELinuxCompiler def test_mte_tag_fault_sync(self): self.setup_mte_test("sync") @@ -57,7 +57,7 @@ class AArch64LinuxMTEMemoryTagFaultsTestCase(TestBase): ) @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 e6baa5d8f59d..252fdaa22b2e 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 @@ class AArch64LinuxNonAddressBitCodeBreak(TestBase): # 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 f27780358570..67b1bae282ec 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 @@ class AArch64LinuxNonAddressBitMemoryAccessTestCase(TestBase): 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 @@ class AArch64LinuxNonAddressBitMemoryAccessTestCase(TestBase): 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 @@ class AArch64LinuxNonAddressBitMemoryAccessTestCase(TestBase): self.assertEqual(0x5634120042444C4C, ptr) @skipUnlessArch("aarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux def test_non_address_bit_memory_read_write_api_target(self): self.setup_test() buf, buf_with_non_address = self.get_ptr_values() @@ -147,7 +147,7 @@ class AArch64LinuxNonAddressBitMemoryAccessTestCase(TestBase): # ReadFromMemory are in Target but not SBTarget so no tests for those. @skipUnlessArch("aarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux def test_non_address_bit_memory_caching(self): # The read/write tests above do exercise the cache but this test # only cares that the cache sees buf and buf_with_non_address diff --git a/lldb/test/API/linux/aarch64/permission_overlay/TestAArch64LinuxPOE.py b/lldb/test/API/linux/aarch64/permission_overlay/TestAArch64LinuxPOE.py index 9832b30ed008..90383e0b898b 100644 --- a/lldb/test/API/linux/aarch64/permission_overlay/TestAArch64LinuxPOE.py +++ b/lldb/test/API/linux/aarch64/permission_overlay/TestAArch64LinuxPOE.py @@ -35,7 +35,7 @@ class AArch64LinuxPOE(TestBase): ) @skipUnlessArch("aarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux def test_poe_live(self): if not self.isAArch64POE(): self.skipTest("POE must be present.") diff --git a/lldb/test/API/linux/aarch64/tagged_memory_access/TestAArch64LinuxTaggedMemoryAccess.py b/lldb/test/API/linux/aarch64/tagged_memory_access/TestAArch64LinuxTaggedMemoryAccess.py index 1b52cd4b9c48..5d364b51c0ac 100644 --- a/lldb/test/API/linux/aarch64/tagged_memory_access/TestAArch64LinuxTaggedMemoryAccess.py +++ b/lldb/test/API/linux/aarch64/tagged_memory_access/TestAArch64LinuxTaggedMemoryAccess.py @@ -38,7 +38,7 @@ class AArch64LinuxTaggedMemoryReadTestCase(TestBase): ) @skipUnlessArch("aarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux def test_tagged_memory_read(self): self.setup_test() @@ -64,7 +64,7 @@ class AArch64LinuxTaggedMemoryReadTestCase(TestBase): self.expect("memory read", patterns=[tagged_addr_pattern], matching=False) @skipUnlessArch("aarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux def test_tagged_memory_find(self): self.setup_test() diff --git a/lldb/test/API/linux/aarch64/tagged_memory_region/TestAArch64LinuxTaggedMemoryRegion.py b/lldb/test/API/linux/aarch64/tagged_memory_region/TestAArch64LinuxTaggedMemoryRegion.py index 509dae3aed85..509b50151b30 100644 --- a/lldb/test/API/linux/aarch64/tagged_memory_region/TestAArch64LinuxTaggedMemoryRegion.py +++ b/lldb/test/API/linux/aarch64/tagged_memory_region/TestAArch64LinuxTaggedMemoryRegion.py @@ -14,7 +14,7 @@ class AArch64LinuxTaggedMemoryRegionTestCase(TestBase): # AArch64 Linux always enables the top byte ignore feature @skipUnlessArch("aarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux def test_mte_regions(self): self.build() self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) diff --git a/lldb/test/API/linux/aarch64/tls_registers/TestAArch64LinuxTLSRegisters.py b/lldb/test/API/linux/aarch64/tls_registers/TestAArch64LinuxTLSRegisters.py index 2fa963efcc8f..4369110699b2 100644 --- a/lldb/test/API/linux/aarch64/tls_registers/TestAArch64LinuxTLSRegisters.py +++ b/lldb/test/API/linux/aarch64/tls_registers/TestAArch64LinuxTLSRegisters.py @@ -96,7 +96,7 @@ class AArch64LinuxTLSRegisters(TestBase): self.expect("p {}_was_set".format(register), substrs=["true"]) @skipUnlessArch("aarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux def test_tls_no_sme(self): if self.isAArch64SME(): self.skipTest("SME must not be present.") @@ -104,7 +104,7 @@ class AArch64LinuxTLSRegisters(TestBase): self.check_tls_reg(["tpidr"]) @skipUnlessArch("aarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux def test_tls_sme(self): if not self.isAArch64SME(): self.skipTest("SME must be present.") @@ -112,7 +112,7 @@ class AArch64LinuxTLSRegisters(TestBase): self.check_tls_reg(["tpidr", "tpidr2"]) @skipUnlessArch("aarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux def test_tpidr2_no_sme(self): if self.isAArch64SME(): self.skipTest("SME must not be present.") diff --git a/lldb/test/API/linux/aarch64/unwind_signal/TestUnwindSignal.py b/lldb/test/API/linux/aarch64/unwind_signal/TestUnwindSignal.py index 46f05b8285a5..893cea72d05c 100644 --- a/lldb/test/API/linux/aarch64/unwind_signal/TestUnwindSignal.py +++ b/lldb/test/API/linux/aarch64/unwind_signal/TestUnwindSignal.py @@ -12,7 +12,7 @@ class UnwindSignalTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True @skipUnlessArch("aarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux def test_unwind_signal(self): """Inferior calls sigill() and handles the resultant SIGILL. Stopped at a breakpoint in the handler, check that we can unwind diff --git a/lldb/test/API/linux/add-symbols/TestTargetSymbolsAddCommand.py b/lldb/test/API/linux/add-symbols/TestTargetSymbolsAddCommand.py index 318846afda41..57ecc0843929 100644 --- a/lldb/test/API/linux/add-symbols/TestTargetSymbolsAddCommand.py +++ b/lldb/test/API/linux/add-symbols/TestTargetSymbolsAddCommand.py @@ -11,7 +11,7 @@ class TargetSymbolsAddCommand(TestBase): self.source = "main.c" @no_debug_info_test # Prevent the genaration of the dwarf version of this test - @skipUnlessPlatform(["linux"]) + @requireLinux def test_target_symbols_add(self): """Test that 'target symbols add' can load the symbols even if gnu.build-id and gnu_debuglink are not present in the module. diff --git a/lldb/test/API/linux/arm/tls_register/TestArmLinuxTLSRegister.py b/lldb/test/API/linux/arm/tls_register/TestArmLinuxTLSRegister.py index a37c64353bc9..4d88e37c0fdb 100644 --- a/lldb/test/API/linux/arm/tls_register/TestArmLinuxTLSRegister.py +++ b/lldb/test/API/linux/arm/tls_register/TestArmLinuxTLSRegister.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil @skipUnlessArch("arm") -@skipUnlessPlatform(["linux"]) +@requireLinux class ArmLinuxTLSRegister(TestBase): NO_DEBUG_INFO_TESTCASE = True diff --git a/lldb/test/API/linux/linker-symbols/TestLinkerSymbols.py b/lldb/test/API/linux/linker-symbols/TestLinkerSymbols.py index a15ea75cd2a7..d1fe3de46267 100644 --- a/lldb/test/API/linux/linker-symbols/TestLinkerSymbols.py +++ b/lldb/test/API/linux/linker-symbols/TestLinkerSymbols.py @@ -15,7 +15,7 @@ class TestLinkerSymbols(TestBase): NO_DEBUG_INFO_TESTCASE = True SHARED_BUILD_TESTCASE = False - @skipUnlessPlatform(["linux"]) + @requireLinux def test_linker_symbols(self): build_dict = dict(LD_EXTRAS="-Wl,-T," + self.getSourcePath("linker.script")) self.build(dictionary=build_dict) diff --git a/lldb/test/API/linux/loongarch64/simd_registers/TestLoongArch64LinuxSIMDRegisters.py b/lldb/test/API/linux/loongarch64/simd_registers/TestLoongArch64LinuxSIMDRegisters.py index 16b903dbbfc2..a7e94c7862f0 100644 --- a/lldb/test/API/linux/loongarch64/simd_registers/TestLoongArch64LinuxSIMDRegisters.py +++ b/lldb/test/API/linux/loongarch64/simd_registers/TestLoongArch64LinuxSIMDRegisters.py @@ -78,7 +78,7 @@ class LoongArch64LinuxRegisters(TestBase): self.expect("continue", substrs=["exited with status = 0"]) @skipUnlessArch("loongarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux def test_lsx(self): """Test read/write of LSX registers.""" if not self.isLoongArchLSX(): @@ -86,7 +86,7 @@ class LoongArch64LinuxRegisters(TestBase): self.simd_registers_impl(Mode.LSX) @skipUnlessArch("loongarch64") - @skipUnlessPlatform(["linux"]) + @requireLinux def test_lasx(self): """Test read/write of LASX registers.""" if not self.isLoongArchLASX(): diff --git a/lldb/test/API/linux/mix-dwo-and-regular-objects/TestMixedDwarfBinary.py b/lldb/test/API/linux/mix-dwo-and-regular-objects/TestMixedDwarfBinary.py index bef43d9422f1..18e2f3f5839b 100644 --- a/lldb/test/API/linux/mix-dwo-and-regular-objects/TestMixedDwarfBinary.py +++ b/lldb/test/API/linux/mix-dwo-and-regular-objects/TestMixedDwarfBinary.py @@ -8,7 +8,7 @@ from lldbsuite.test import lldbutil class TestMixedDwarfBinary(TestBase): @no_debug_info_test # Prevent the genaration of the dwarf version of this test @add_test_categories(["dwo"]) - @skipUnlessPlatform(["linux"]) + @requireLinux def test_mixed_dwarf(self): """Test that 'frame variable' works for the executable built from two source files compiled diff --git a/lldb/test/API/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py b/lldb/test/API/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py index 745d8d8025b6..afa8a0b558d8 100644 --- a/lldb/test/API/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py +++ b/lldb/test/API/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py @@ -7,7 +7,7 @@ from lldbsuite.test import lldbutil class TestTargetSymbolsSepDebugSymlink(TestBase): @no_debug_info_test # Prevent the genaration of the dwarf version of this test - @skipUnlessPlatform(["linux"]) + @requireLinux @skipIf(hostoslist=["windows"]) @skipIfRemote # llvm.org/pr36237 def test_target_symbols_sepdebug_symlink_case(self): diff --git a/lldb/test/API/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py b/lldb/test/API/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py index 129a26976009..3816ba9164d6 100644 --- a/lldb/test/API/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py +++ b/lldb/test/API/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py @@ -14,7 +14,7 @@ from lldbsuite.test import lldbutil class CreateDuringInstructionStepTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessPlatform(["linux"]) + @requireLinux @expectedFailureAndroid("llvm.org/pr24737", archs=["arm$"]) @skipIf(oslist=["linux"], archs=["arm$", "aarch64"], bugnumber="llvm.org/pr24737") def test_step_inst(self): diff --git a/lldb/test/API/lldbtest.py b/lldb/test/API/lldbtest.py index 6dad5a412a5a..62952b67bb64 100644 --- a/lldb/test/API/lldbtest.py +++ b/lldb/test/API/lldbtest.py @@ -127,6 +127,15 @@ class LLDBTest(TestFormat): expected_failures = parsed_details["expected failures"] unexpected_successes = parsed_details["unexpected successes"] + only_skipped = 0 + breakdown = re.search( + r"^Skip breakdown \(unsupported=(\d+), skipped=(\d+)\)\r?$", + err, + re.MULTILINE, + ) + if breakdown: + only_skipped = int(breakdown.group(2)) + non_pass = ( failures + errors + skipped + expected_failures + unexpected_successes ) @@ -142,9 +151,11 @@ class LLDBTest(TestFormat): return lit.Test.XPASS, output else: # Aggregate the tests results with the following precedence: - # PASS > XFAIL > UNSUPPORTED + # PASS > XFAIL > SKIPPED > UNSUPPORTED if passes > 0: return lit.Test.PASS, output if expected_failures > 0: return lit.Test.XFAIL, output + if only_skipped > 0: + return lit.Test.SKIPPED, output return lit.Test.UNSUPPORTED, output diff --git a/lldb/test/API/macosx/add-dsym/TestAddDsymDownload.py b/lldb/test/API/macosx/add-dsym/TestAddDsymDownload.py index 278ba4816071..253b26ff84a7 100644 --- a/lldb/test/API/macosx/add-dsym/TestAddDsymDownload.py +++ b/lldb/test/API/macosx/add-dsym/TestAddDsymDownload.py @@ -4,7 +4,7 @@ from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil -@skipUnlessDarwin +@requireDarwin class AddDsymDownload(TestBase): SHARED_BUILD_TESTCASE = False diff --git a/lldb/test/API/macosx/add-dsym/TestAddDsymMidExecutionCommand.py b/lldb/test/API/macosx/add-dsym/TestAddDsymMidExecutionCommand.py index 030e12afdc58..8faef87650de 100644 --- a/lldb/test/API/macosx/add-dsym/TestAddDsymMidExecutionCommand.py +++ b/lldb/test/API/macosx/add-dsym/TestAddDsymMidExecutionCommand.py @@ -7,7 +7,7 @@ from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil -@skipUnlessDarwin +@requireDarwin class AddDsymMidExecutionCommandCase(TestBase): SHARED_BUILD_TESTCASE = False diff --git a/lldb/test/API/macosx/arm-pointer-metadata-cfa-dwarf-expr/TestArmPointerMetadataCFADwarfExpr.py b/lldb/test/API/macosx/arm-pointer-metadata-cfa-dwarf-expr/TestArmPointerMetadataCFADwarfExpr.py index 839e0e1a4fc4..7e08b98d87f7 100644 --- a/lldb/test/API/macosx/arm-pointer-metadata-cfa-dwarf-expr/TestArmPointerMetadataCFADwarfExpr.py +++ b/lldb/test/API/macosx/arm-pointer-metadata-cfa-dwarf-expr/TestArmPointerMetadataCFADwarfExpr.py @@ -4,7 +4,7 @@ from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil -@skipUnlessDarwin +@requireDarwin @skipIf(archs=no_match(["arm64"])) class TestArmPointerMetadataStripping(TestBase): def test(self): diff --git a/lldb/test/API/macosx/bss-only-data-section-sliding/TestBSSOnlyDataSectionSliding.py b/lldb/test/API/macosx/bss-only-data-section-sliding/TestBSSOnlyDataSectionSliding.py index bc7d69a592e3..1547ac7aebc8 100644 --- a/lldb/test/API/macosx/bss-only-data-section-sliding/TestBSSOnlyDataSectionSliding.py +++ b/lldb/test/API/macosx/bss-only-data-section-sliding/TestBSSOnlyDataSectionSliding.py @@ -7,7 +7,7 @@ from lldbsuite.test import lldbutil class TestBSSOnlyDataSectionSliding(TestBase): - @skipUnlessDarwin + @requireDarwin def test_with_python_api(self): """Test that we get thread names when interrupting a process.""" self.build() diff --git a/lldb/test/API/macosx/corefile-exception-reason/TestCorefileExceptionReason.py b/lldb/test/API/macosx/corefile-exception-reason/TestCorefileExceptionReason.py index e452bb564ea4..90082e827307 100644 --- a/lldb/test/API/macosx/corefile-exception-reason/TestCorefileExceptionReason.py +++ b/lldb/test/API/macosx/corefile-exception-reason/TestCorefileExceptionReason.py @@ -12,7 +12,7 @@ from lldbsuite.test import lldbutil class TestCorefileExceptionReason(TestBase): @no_debug_info_test - @skipUnlessDarwin + @requireDarwin @skipIf(archs=no_match(["arm64", "arm64e"])) @skipIfRemote def test(self): diff --git a/lldb/test/API/macosx/ctf/TestCTF.py b/lldb/test/API/macosx/ctf/TestCTF.py index c7c479b057d6..6f1f4354ecc7 100644 --- a/lldb/test/API/macosx/ctf/TestCTF.py +++ b/lldb/test/API/macosx/ctf/TestCTF.py @@ -21,14 +21,14 @@ class TestCTF(TestBase): @skipTestIfFn(no_ctf_convert) @skipTestIfFn(no_objcopy) - @skipUnlessDarwin + @requireDarwin def test(self): self.build() self.do_test() @skipTestIfFn(no_ctf_convert) @skipTestIfFn(no_objcopy) - @skipUnlessDarwin + @requireDarwin def test_compressed(self): self.build(dictionary={"COMPRESS_CTF": "YES"}) self.do_test() diff --git a/lldb/test/API/macosx/debugserver-exit-code/TestDebugServerExitCode.py b/lldb/test/API/macosx/debugserver-exit-code/TestDebugServerExitCode.py index 2d9c0f5f9777..56f653dab656 100644 --- a/lldb/test/API/macosx/debugserver-exit-code/TestDebugServerExitCode.py +++ b/lldb/test/API/macosx/debugserver-exit-code/TestDebugServerExitCode.py @@ -10,7 +10,7 @@ from lldbsuite.test import lldbutil class TestCase(TestBase): @no_debug_info_test - @skipUnlessDarwin + @requireDarwin def test_abort(self): self.build() target = self.dbg.CreateTarget(self.getBuildArtifact("a.out")) diff --git a/lldb/test/API/macosx/debugserver-multimemread/TestDebugserverMultiMemRead.py b/lldb/test/API/macosx/debugserver-multimemread/TestDebugserverMultiMemRead.py index ab6e952fb7dd..09dfbfe63216 100644 --- a/lldb/test/API/macosx/debugserver-multimemread/TestDebugserverMultiMemRead.py +++ b/lldb/test/API/macosx/debugserver-multimemread/TestDebugserverMultiMemRead.py @@ -8,7 +8,7 @@ from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil -@skipUnlessDarwin +@requireDarwin @skipIfOutOfTreeDebugserver class TestCase(TestBase): def check_invalid_packet(self, packet_str): diff --git a/lldb/test/API/macosx/delay-init-dependency/TestDelayInitDependency.py b/lldb/test/API/macosx/delay-init-dependency/TestDelayInitDependency.py index 74459999187f..6c91ee48d2e5 100644 --- a/lldb/test/API/macosx/delay-init-dependency/TestDelayInitDependency.py +++ b/lldb/test/API/macosx/delay-init-dependency/TestDelayInitDependency.py @@ -10,7 +10,7 @@ from lldbsuite.test import lldbutil class TestDelayInitDependencies(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin @skipIf(macos_version=["<", "15.0"]) @skipIfRemote def test_delay_init_dependency(self): diff --git a/lldb/test/API/macosx/deny-attach/TestDenyAttach.py b/lldb/test/API/macosx/deny-attach/TestDenyAttach.py index f061bee51c31..1abf5cb67837 100644 --- a/lldb/test/API/macosx/deny-attach/TestDenyAttach.py +++ b/lldb/test/API/macosx/deny-attach/TestDenyAttach.py @@ -8,7 +8,7 @@ from lldbsuite.test import lldbutil class DenyAttachTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin @skipIfDarwinEmbedded # PT_DENY_ATTACH attach behavior differs on ios/tvos/etc @skipIfAsan # Attach tests time out inconsistently under asan. def test_attach_to_deny_attach_process(self): diff --git a/lldb/test/API/macosx/dsym_codesign/TestdSYMCodesign.py b/lldb/test/API/macosx/dsym_codesign/TestdSYMCodesign.py index bceef9ee27ea..971a6f006d47 100644 --- a/lldb/test/API/macosx/dsym_codesign/TestdSYMCodesign.py +++ b/lldb/test/API/macosx/dsym_codesign/TestdSYMCodesign.py @@ -28,7 +28,7 @@ def has_lldb_codesign(): return False -@skipUnlessDarwin +@requireDarwin class TestdSYMCodesign(TestBase): NO_DEBUG_INFO_TESTCASE = True SHARED_BUILD_TESTCASE = False diff --git a/lldb/test/API/macosx/dsym_modules/TestdSYMModuleInit.py b/lldb/test/API/macosx/dsym_modules/TestdSYMModuleInit.py index 77625356eb37..c3ced18dcf04 100644 --- a/lldb/test/API/macosx/dsym_modules/TestdSYMModuleInit.py +++ b/lldb/test/API/macosx/dsym_modules/TestdSYMModuleInit.py @@ -11,7 +11,7 @@ from lldbsuite.test.lldbtest import * from lldbsuite.test.decorators import * -@skipUnlessDarwin +@requireDarwin class TestdSYMModuleInit(TestBase): SHARED_BUILD_TESTCASE = False diff --git a/lldb/test/API/macosx/dyld-trie-symbols/TestDyldTrieSymbols.py b/lldb/test/API/macosx/dyld-trie-symbols/TestDyldTrieSymbols.py index 788cff92bdba..369d9dabbe24 100644 --- a/lldb/test/API/macosx/dyld-trie-symbols/TestDyldTrieSymbols.py +++ b/lldb/test/API/macosx/dyld-trie-symbols/TestDyldTrieSymbols.py @@ -12,7 +12,7 @@ class DyldTrieSymbolsTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True @skipIfRemote - @skipUnlessDarwin + @requireDarwin def test_dyld_trie_symbols(self): """Test that we make create symbol table entries from the dyld trie data structure.""" self.build() diff --git a/lldb/test/API/macosx/early-process-launch/TestEarlyProcessLaunch.py b/lldb/test/API/macosx/early-process-launch/TestEarlyProcessLaunch.py index 4c1bbe749001..63a77b89c85d 100644 --- a/lldb/test/API/macosx/early-process-launch/TestEarlyProcessLaunch.py +++ b/lldb/test/API/macosx/early-process-launch/TestEarlyProcessLaunch.py @@ -10,7 +10,7 @@ from lldbsuite.test import lldbutil class TestEarlyProcessLaunch(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin @skipIfAsan # rdar://103359354 # until this feature is included in the system # debugserver. diff --git a/lldb/test/API/macosx/expedited-stack-memory/TestExpeditedStackMemory.py b/lldb/test/API/macosx/expedited-stack-memory/TestExpeditedStackMemory.py index e8c8076699af..9dc9455625f2 100644 --- a/lldb/test/API/macosx/expedited-stack-memory/TestExpeditedStackMemory.py +++ b/lldb/test/API/macosx/expedited-stack-memory/TestExpeditedStackMemory.py @@ -34,18 +34,18 @@ from lldbsuite.test.gdbclientutils import ( class TestExpeditedStackMemory(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin def test_no_packets_during_backtrace(self): """With the memory cache on, the backtrace sends no packets at all.""" self.check_packets_during_backtrace(disable_memory_cache=False) - @skipUnlessDarwin + @requireDarwin def test_memory_reads_during_backtrace_without_cache(self): """With the memory cache off, the backtrace reads the backchain from the stub, producing memory-read packets.""" self.check_packets_during_backtrace(disable_memory_cache=True) - @skipUnlessDarwin + @requireDarwin def test_memory_reads_when_examining_frame0_locals(self): """Model an IDE stop: walk the whole stack (a backtrace / debug navigator) but examine the locals of only the selected frame 0. @@ -54,7 +54,7 @@ class TestExpeditedStackMemory(TestBase): heap memory.""" self.check_memory_reads_when_examining_locals(examine_all_frames=False) - @skipUnlessDarwin + @requireDarwin def test_memory_reads_when_examining_all_frames_locals(self): """Model "view all frames": walk the whole stack and examine every frame's locals. This reads the same variety of memory across several diff --git a/lldb/test/API/macosx/expedited-thread-pcs/TestExpeditedThreadPCs.py b/lldb/test/API/macosx/expedited-thread-pcs/TestExpeditedThreadPCs.py index 741626880546..c1871d094983 100644 --- a/lldb/test/API/macosx/expedited-thread-pcs/TestExpeditedThreadPCs.py +++ b/lldb/test/API/macosx/expedited-thread-pcs/TestExpeditedThreadPCs.py @@ -12,7 +12,7 @@ file_index = 0 class TestExpeditedThreadPCs(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin def test_expedited_thread_pcs(self): TestBase.setUp(self) diff --git a/lldb/test/API/macosx/extended-backtrace-api/TestExtendedBacktraceAPI.py b/lldb/test/API/macosx/extended-backtrace-api/TestExtendedBacktraceAPI.py index fb52ae2499a6..4f649ac43c91 100644 --- a/lldb/test/API/macosx/extended-backtrace-api/TestExtendedBacktraceAPI.py +++ b/lldb/test/API/macosx/extended-backtrace-api/TestExtendedBacktraceAPI.py @@ -15,7 +15,7 @@ class TestExtendedBacktraceAPI(TestBase): TestBase.setUp(self) self.main_source = "main.m" - @skipUnlessDarwin + @requireDarwin @add_test_categories(["objc", "pyapi"]) def test_extended_backtrace_thread_api(self): """Test GetExtendedBacktraceThread with queue debugging.""" diff --git a/lldb/test/API/macosx/find-app-in-bundle/TestFindAppInBundle.py b/lldb/test/API/macosx/find-app-in-bundle/TestFindAppInBundle.py index 5b666797373b..af2a67e3332d 100644 --- a/lldb/test/API/macosx/find-app-in-bundle/TestFindAppInBundle.py +++ b/lldb/test/API/macosx/find-app-in-bundle/TestFindAppInBundle.py @@ -9,7 +9,7 @@ import lldbsuite.test.lldbplatformutil as lldbplatformutil from lldbsuite.test.lldbtest import * -@decorators.skipUnlessDarwin +@decorators.requireDarwin class FindAppInMacOSAppBundle(TestBase): NO_DEBUG_INFO_TESTCASE = True diff --git a/lldb/test/API/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py b/lldb/test/API/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py index cecdfd2673e3..bbc1c42c69a5 100644 --- a/lldb/test/API/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py +++ b/lldb/test/API/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py @@ -26,7 +26,7 @@ class BundleWithDotInFilenameTestCase(TestBase): TestBase.tearDown(self) @skipIfRemote - @skipUnlessDarwin + @requireDarwin # This test is explicitly a dSYM test, it doesn't need to run for any other config. @skipIf(debug_info=no_match(["dsym"])) def test_attach_and_check_dsyms(self): diff --git a/lldb/test/API/macosx/find-dsym/deep-bundle/TestDeepBundle.py b/lldb/test/API/macosx/find-dsym/deep-bundle/TestDeepBundle.py index b7df2845c0d1..669421184678 100644 --- a/lldb/test/API/macosx/find-dsym/deep-bundle/TestDeepBundle.py +++ b/lldb/test/API/macosx/find-dsym/deep-bundle/TestDeepBundle.py @@ -25,7 +25,7 @@ class DeepBundleTestCase(TestBase): TestBase.tearDown(self) @skipIfRemote - @skipUnlessDarwin + @requireDarwin # This test is explicitly a dSYM test, it doesn't need to run for any other config. @skipIf(debug_info=no_match(["dsym"])) def test_attach_and_check_dsyms(self): diff --git a/lldb/test/API/macosx/format/TestFunctionNameWithoutArgs.py b/lldb/test/API/macosx/format/TestFunctionNameWithoutArgs.py index 88d2e210bccf..5ccc422563bf 100644 --- a/lldb/test/API/macosx/format/TestFunctionNameWithoutArgs.py +++ b/lldb/test/API/macosx/format/TestFunctionNameWithoutArgs.py @@ -4,7 +4,7 @@ from lldbsuite.test.lldbtest import * class TestFunctionNameWithoutArgs(TestBase): - @skipUnlessDarwin + @requireDarwin @no_debug_info_test def test_function_name_without_args(self): self.build() diff --git a/lldb/test/API/macosx/function-starts/TestFunctionStarts.py b/lldb/test/API/macosx/function-starts/TestFunctionStarts.py index 9a3e6a6a9aad..964df524c6be 100644 --- a/lldb/test/API/macosx/function-starts/TestFunctionStarts.py +++ b/lldb/test/API/macosx/function-starts/TestFunctionStarts.py @@ -16,7 +16,7 @@ class FunctionStartsTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True @skipIfRemote - @skipUnlessDarwin + @requireDarwin @skipIf(compiler="clang", compiler_version=["<", "13.0"]) def test_function_starts_binary(self): """Test that we make synthetic symbols when we have the binary.""" @@ -24,7 +24,7 @@ class FunctionStartsTestCase(TestBase): self.do_function_starts(False) @skipIfRemote - @skipUnlessDarwin + @requireDarwin @skipIf(compiler="clang", compiler_version=["<", "13.0"]) def test_function_starts_no_binary(self): """Test that we make synthetic symbols when we don't have the binary""" diff --git a/lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py b/lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py index 8d2674f7bad3..a3c3c6f80b63 100644 --- a/lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py +++ b/lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py @@ -12,7 +12,7 @@ from lldbsuite.test.lldbtest import * class TestDarwinSignalHandlers(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin def test_ignored_thread(self): """It isn't possible to convert an EXC_BAD_ACCESS to a signal when running under the debugger, which makes debugging SIGBUS handlers diff --git a/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py b/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py index c4bbedc92891..087c90a18b5a 100644 --- a/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py +++ b/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py @@ -14,7 +14,7 @@ class TestIndirectFunctions(TestBase): # Find the line numbers that we will step to in main: self.main_source = "main.c" - @skipUnlessDarwin + @requireDarwin @add_test_categories(["pyapi"]) @skipIf(bugnumber="rdar://120796553") def test_with_python_api(self): diff --git a/lldb/test/API/macosx/lc-note/additional-registers/TestMetadataRegisters.py b/lldb/test/API/macosx/lc-note/additional-registers/TestMetadataRegisters.py index cf9f055bd78f..78046125860b 100644 --- a/lldb/test/API/macosx/lc-note/additional-registers/TestMetadataRegisters.py +++ b/lldb/test/API/macosx/lc-note/additional-registers/TestMetadataRegisters.py @@ -13,7 +13,7 @@ from lldbsuite.test import lldbutil class TestMetadataRegisters(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin @skipIfRemote def test_add_registers_via_metadata(self): self.build() diff --git a/lldb/test/API/macosx/lc-note/addrable-bits/TestAddrableBitsCorefile.py b/lldb/test/API/macosx/lc-note/addrable-bits/TestAddrableBitsCorefile.py index e56ecfcb14d4..7e1312a407dc 100644 --- a/lldb/test/API/macosx/lc-note/addrable-bits/TestAddrableBitsCorefile.py +++ b/lldb/test/API/macosx/lc-note/addrable-bits/TestAddrableBitsCorefile.py @@ -20,7 +20,7 @@ class TestAddrableBitsCorefile(TestBase): self.corefile = self.getBuildArtifact("corefile") @skipIf(archs=no_match(["arm64e"])) - @skipUnlessDarwin + @requireDarwin def test_lc_note_addrable_bits(self): self.initial_setup() diff --git a/lldb/test/API/macosx/lc-note/firmware-corefile/TestFirmwareCorefiles.py b/lldb/test/API/macosx/lc-note/firmware-corefile/TestFirmwareCorefiles.py index c941d7a61da0..14735a005254 100644 --- a/lldb/test/API/macosx/lc-note/firmware-corefile/TestFirmwareCorefiles.py +++ b/lldb/test/API/macosx/lc-note/firmware-corefile/TestFirmwareCorefiles.py @@ -20,7 +20,7 @@ class TestFirmwareCorefiles(TestBase): ) @skipIf(archs=no_match(["x86_64", "arm64", "arm64e", "aarch64"])) @skipIfRemote - @skipUnlessDarwin + @requireDarwin def test_lc_note_version_string(self): self.build() aout_exe_basename = "a.out" @@ -120,7 +120,7 @@ class TestFirmwareCorefiles(TestBase): ) @skipIf(archs=no_match(["x86_64", "arm64", "arm64e", "aarch64"])) @skipIfRemote - @skipUnlessDarwin + @requireDarwin def test_lc_note_main_bin_spec(self): self.build() aout_exe_basename = "a.out" @@ -233,7 +233,7 @@ class TestFirmwareCorefiles(TestBase): ) @skipIf(archs=no_match(["x86_64", "arm64", "arm64e", "aarch64"])) @skipIfRemote - @skipUnlessDarwin + @requireDarwin def test_lc_note_main_bin_spec_os_plugin(self): self.build() aout_exe = self.getBuildArtifact("a.out") diff --git a/lldb/test/API/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py b/lldb/test/API/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py index a3f9144572da..b2d5dfe3e3b3 100644 --- a/lldb/test/API/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py +++ b/lldb/test/API/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py @@ -17,7 +17,7 @@ class TestKernVerStrLCNOTE(TestBase): bugnumber="This test is looking explicitly for a dSYM", ) @skipIf(archs=no_match(["x86_64"])) - @skipUnlessDarwin + @requireDarwin def test_lc_note(self): self.build() self.test_exe = self.getBuildArtifact("a.out") diff --git a/lldb/test/API/macosx/lc-note/multiple-binary-corefile/TestMultipleBinaryCorefile.py b/lldb/test/API/macosx/lc-note/multiple-binary-corefile/TestMultipleBinaryCorefile.py index 28472cb787d4..8a35536b2730 100644 --- a/lldb/test/API/macosx/lc-note/multiple-binary-corefile/TestMultipleBinaryCorefile.py +++ b/lldb/test/API/macosx/lc-note/multiple-binary-corefile/TestMultipleBinaryCorefile.py @@ -82,7 +82,7 @@ class TestMultipleBinaryCorefile(TestBase): @skipIf(archs=no_match(["x86_64", "arm64", "arm64e", "aarch64"])) @skipIfRemote - @skipUnlessDarwin + @requireDarwin def test_corefile_binaries_dsymforuuid(self): self.initial_setup() @@ -198,7 +198,7 @@ class TestMultipleBinaryCorefile(TestBase): @skipIf(archs=no_match(["x86_64", "arm64", "arm64e", "aarch64"])) @skipIfRemote - @skipUnlessDarwin + @requireDarwin def test_corefile_binaries_preloaded(self): self.initial_setup() diff --git a/lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py b/lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py index 1013976ef1b8..54a2596e8583 100644 --- a/lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py +++ b/lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py @@ -10,7 +10,7 @@ class TestMacCatalyst(TestBase): SHARED_BUILD_TESTCASE = False @skipIf(macos_version=["<", "10.15"]) - @skipUnlessDarwin + @requireDarwin @skipIfDarwinEmbedded def test_macabi(self): """Test the x86_64-apple-ios-macabi target linked against a macos dylib""" diff --git a/lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py b/lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py index 26b5c4354322..3238d316d1ab 100644 --- a/lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py +++ b/lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py @@ -7,7 +7,7 @@ import os class TestMacCatalystAppWithMacOSFramework(TestBase): @skipIf(macos_version=["<", "10.15"]) - @skipUnlessDarwin + @requireDarwin @skipIfDarwinEmbedded # There is a Clang driver change missing on llvm.org. @expectedFailureAll(bugnumber="rdar://problem/54986190>") diff --git a/lldb/test/API/macosx/mte/TestDarwinMTE.py b/lldb/test/API/macosx/mte/TestDarwinMTE.py index d51c400922ab..812d563b88f5 100644 --- a/lldb/test/API/macosx/mte/TestDarwinMTE.py +++ b/lldb/test/API/macosx/mte/TestDarwinMTE.py @@ -11,7 +11,7 @@ import lldbsuite.test.cpu_feature as cpu_feature exe_name = "uaf" # Must match Makefile -@skipIfWasm # memory tagging is a Darwin AArch64 feature +@requireNotWasm # memory tagging is a Darwin AArch64 feature class TestDarwinMTE(TestBase): SHARED_BUILD_TESTCASE = False NO_DEBUG_INFO_TESTCASE = True diff --git a/lldb/test/API/macosx/no-nlist-memory-module/TestNoNlistsDylib.py b/lldb/test/API/macosx/no-nlist-memory-module/TestNoNlistsDylib.py index 9216cf2eab16..670722e91fb5 100644 --- a/lldb/test/API/macosx/no-nlist-memory-module/TestNoNlistsDylib.py +++ b/lldb/test/API/macosx/no-nlist-memory-module/TestNoNlistsDylib.py @@ -15,7 +15,7 @@ class NoNlistsTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True @skipIfRemote - @skipUnlessDarwin + @requireDarwin def test_no_nlist_symbols(self): self.build() diff --git a/lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py b/lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py index 8ade2beee8de..7e947935ffd5 100644 --- a/lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py +++ b/lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py @@ -120,7 +120,7 @@ class DarwinNSLogOutputTestCase(TestBase): @skipIfAsan # avoid dealing with pexpect timeout flakyness on bots @skipIf(oslist=["linux"], archs=["arm$", "aarch64"]) - @skipUnlessDarwin + @requireDarwin @skipIfRemote # this test is currently written using lldb commands & assumes running on local system def test_nslog_output_is_displayed(self): """Test that NSLog() output shows up in the command-line debugger.""" @@ -136,7 +136,7 @@ class DarwinNSLogOutputTestCase(TestBase): @skipIfAsan # avoid dealing with pexpect timeout flakyness on bots @skipIf(oslist=["linux"], archs=["arm$", "aarch64"]) - @skipUnlessDarwin + @requireDarwin @skipIfRemote # this test is currently written using lldb commands & assumes running on local system def test_nslog_output_is_suppressed_with_env_var(self): """Test that NSLog() output does not show up with the ignore env var.""" diff --git a/lldb/test/API/macosx/objc_exception_recognizer/TestObjCRecognizer.py b/lldb/test/API/macosx/objc_exception_recognizer/TestObjCRecognizer.py index f49e7ca0837b..f973b7b9c09f 100644 --- a/lldb/test/API/macosx/objc_exception_recognizer/TestObjCRecognizer.py +++ b/lldb/test/API/macosx/objc_exception_recognizer/TestObjCRecognizer.py @@ -11,14 +11,14 @@ from lldbsuite.test.lldbtest import * class TestObjCRecognizer(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin def test_exception_recognizer_sub_class(self): """There can be many tests in a test case - describe this test here.""" self.build() self.main_source_file = lldb.SBFileSpec("main.m") self.objc_recognizer_test(True) - @skipUnlessDarwin + @requireDarwin def test_exception_recognizer_plain(self): """There can be many tests in a test case - describe this test here.""" self.build() diff --git a/lldb/test/API/macosx/order/TestOrderFile.py b/lldb/test/API/macosx/order/TestOrderFile.py index 77a7e7e2d604..2f6f0e8f2d62 100644 --- a/lldb/test/API/macosx/order/TestOrderFile.py +++ b/lldb/test/API/macosx/order/TestOrderFile.py @@ -11,7 +11,7 @@ from lldbsuite.test import lldbutil class OrderFileTestCase(TestBase): - @skipUnlessDarwin + @requireDarwin def test(self): """Test debug symbols follow the correct order by the order file.""" self.build() diff --git a/lldb/test/API/macosx/posix_spawn/TestLaunchProcessPosixSpawn.py b/lldb/test/API/macosx/posix_spawn/TestLaunchProcessPosixSpawn.py index c5d1574adabf..a74f34154bf9 100644 --- a/lldb/test/API/macosx/posix_spawn/TestLaunchProcessPosixSpawn.py +++ b/lldb/test/API/macosx/posix_spawn/TestLaunchProcessPosixSpawn.py @@ -49,7 +49,7 @@ class TestLaunchProcessPosixSpawn(TestBase): self.assertState(process.GetState(), lldb.eStateExited) self.assertIn("slice: {}".format(arch), process.GetSTDOUT(1000)) - @skipUnlessDarwin + @requireDarwin @skipIfDarwinEmbedded @skipIfLLVMTargetMissing("AArch64") @skipIfLLVMTargetMissing("X86") @@ -60,7 +60,7 @@ class TestLaunchProcessPosixSpawn(TestBase): self.run_arch(exe, "x86_64") self.run_arch(exe, "x86_64h") - @skipUnlessDarwin + @requireDarwin @skipIf(bugnumber="rdar://170040996") @skipIfDarwinEmbedded @skipIfLLVMTargetMissing("AArch64") diff --git a/lldb/test/API/macosx/profile_vrs_detach/TestDetachVrsProfile.py b/lldb/test/API/macosx/profile_vrs_detach/TestDetachVrsProfile.py index b558b6215ced..ca740a1771cd 100644 --- a/lldb/test/API/macosx/profile_vrs_detach/TestDetachVrsProfile.py +++ b/lldb/test/API/macosx/profile_vrs_detach/TestDetachVrsProfile.py @@ -18,7 +18,7 @@ import signal class TestDetachVrsProfile(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin @skipIfRemote def test_profile_and_detach(self): """There can be many tests in a test case - describe this test here.""" diff --git a/lldb/test/API/macosx/queues/TestQueues.py b/lldb/test/API/macosx/queues/TestQueues.py index a1e1aae4f45c..91f9c5b15146 100644 --- a/lldb/test/API/macosx/queues/TestQueues.py +++ b/lldb/test/API/macosx/queues/TestQueues.py @@ -9,20 +9,20 @@ from lldbsuite.test import lldbutil class TestQueues(TestBase): - @skipUnlessDarwin + @requireDarwin @add_test_categories(["pyapi"]) def test_with_python_api_queues(self): """Test queues inspection SB APIs.""" self.build() self.queues() - @skipUnlessDarwin + @requireDarwin @add_test_categories(["pyapi"]) def test_queue_specific_breakpoints(self): self.build() self.queue_specific_breakpoints() - @skipUnlessDarwin + @requireDarwin @add_test_categories(["pyapi"]) def test_with_python_api_queues_with_backtrace(self): """Test queues inspection SB APIs.""" diff --git a/lldb/test/API/macosx/safe-to-func-call/TestSafeFuncCalls.py b/lldb/test/API/macosx/safe-to-func-call/TestSafeFuncCalls.py index 551cab1269c5..789bb4bc11bd 100644 --- a/lldb/test/API/macosx/safe-to-func-call/TestSafeFuncCalls.py +++ b/lldb/test/API/macosx/safe-to-func-call/TestSafeFuncCalls.py @@ -8,7 +8,7 @@ from lldbsuite.test import lldbutil class TestSafeFuncCalls(TestBase): - @skipUnlessDarwin + @requireDarwin @add_test_categories(["pyapi"]) def test_with_python_api(self): """Test function call thread safety.""" diff --git a/lldb/test/API/macosx/save_crashlog/TestSaveCrashlog.py b/lldb/test/API/macosx/save_crashlog/TestSaveCrashlog.py index 5d9a46efc290..7c4a94b495ca 100644 --- a/lldb/test/API/macosx/save_crashlog/TestSaveCrashlog.py +++ b/lldb/test/API/macosx/save_crashlog/TestSaveCrashlog.py @@ -16,7 +16,7 @@ class TestSaveCrashlog(TestBase): # each debug info format. NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin def test_save_crashlog(self): """There can be many tests in a test case - describe this test here.""" self.build() diff --git a/lldb/test/API/macosx/shared-cache-host-memory/TestSharedCacheHostMemory.py b/lldb/test/API/macosx/shared-cache-host-memory/TestSharedCacheHostMemory.py index f45bf89b9944..87d632bff64c 100644 --- a/lldb/test/API/macosx/shared-cache-host-memory/TestSharedCacheHostMemory.py +++ b/lldb/test/API/macosx/shared-cache-host-memory/TestSharedCacheHostMemory.py @@ -7,7 +7,7 @@ from lldbsuite.test import lldbutil class SharedCacheHostMemoryTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin @skipIfRemote def test_host_lldb_memory(self): """Stop in a shared cache binary loaded from lldb's own memory and diff --git a/lldb/test/API/macosx/shared-cache-vm-range/TestSharedCacheVMRange.py b/lldb/test/API/macosx/shared-cache-vm-range/TestSharedCacheVMRange.py index c196d3042e4e..f823ef6b24e1 100644 --- a/lldb/test/API/macosx/shared-cache-vm-range/TestSharedCacheVMRange.py +++ b/lldb/test/API/macosx/shared-cache-vm-range/TestSharedCacheVMRange.py @@ -14,7 +14,7 @@ class SharedCacheVMRangeTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True @skipIfRemote - @skipUnlessDarwin + @requireDarwin @skipIfOutOfTreeDebugserver # debugserver returns shared_cache_size def test_shared_cache_vm_range(self): """Test that the shared cache VM range contains a known libc function""" diff --git a/lldb/test/API/macosx/simulator/TestSimulatorPlatform.py b/lldb/test/API/macosx/simulator/TestSimulatorPlatform.py index 7a87db0940e3..14d3f0ba511d 100644 --- a/lldb/test/API/macosx/simulator/TestSimulatorPlatform.py +++ b/lldb/test/API/macosx/simulator/TestSimulatorPlatform.py @@ -99,7 +99,7 @@ class TestSimulatorPlatformLaunching(TestBase): ) @skipIfAsan - @skipUnlessDarwin + @requireDarwin @skipIfDarwinEmbedded @apple_simulator_test("iphone") @skipIf(archs=["x86_64"]) @@ -114,7 +114,7 @@ class TestSimulatorPlatformLaunching(TestBase): ) @skipIfAsan - @skipUnlessDarwin + @requireDarwin @skipIfDarwinEmbedded @apple_simulator_test("appletv") @skipIf(archs=["x86_64"]) diff --git a/lldb/test/API/macosx/skinny-corefile/TestSkinnyCorefile.py b/lldb/test/API/macosx/skinny-corefile/TestSkinnyCorefile.py index 66a3cba83ff4..2a4654c66e4c 100644 --- a/lldb/test/API/macosx/skinny-corefile/TestSkinnyCorefile.py +++ b/lldb/test/API/macosx/skinny-corefile/TestSkinnyCorefile.py @@ -18,7 +18,7 @@ class TestSkinnyCorefile(TestBase): debug_info=no_match(["dsym"]), bugnumber="This test is looking explicitly for a dSYM", ) - @skipUnlessDarwin + @requireDarwin @skipIfRemote def test_lc_note(self): self.build() diff --git a/lldb/test/API/macosx/sme-registers/TestSMERegistersDarwin.py b/lldb/test/API/macosx/sme-registers/TestSMERegistersDarwin.py index c762c8da78ca..14588478300c 100644 --- a/lldb/test/API/macosx/sme-registers/TestSMERegistersDarwin.py +++ b/lldb/test/API/macosx/sme-registers/TestSMERegistersDarwin.py @@ -10,7 +10,7 @@ class TestSMERegistersDarwin(TestBase): NO_DEBUG_INFO_TESTCASE = True mydir = TestBase.compute_mydir(__file__) - @skipUnlessDarwin + @requireDarwin @skipUnlessFeature(cpu_feature.AArch64.SME) @skipUnlessFeature(cpu_feature.AArch64.SME2) # thread_set_state/thread_get_state only avail in macOS 15.4+ diff --git a/lldb/test/API/macosx/stack-corefile/TestStackCorefile.py b/lldb/test/API/macosx/stack-corefile/TestStackCorefile.py index b96bfe87ad48..de79e4a79b19 100644 --- a/lldb/test/API/macosx/stack-corefile/TestStackCorefile.py +++ b/lldb/test/API/macosx/stack-corefile/TestStackCorefile.py @@ -12,7 +12,7 @@ from lldbsuite.test import lldbutil class TestStackCorefile(TestBase): @no_debug_info_test - @skipUnlessDarwin + @requireDarwin @skipIfRemote def test(self): corefile = self.getBuildArtifact("process.core") diff --git a/lldb/test/API/macosx/stop-reason-exception/TestMachExceptionData.py b/lldb/test/API/macosx/stop-reason-exception/TestMachExceptionData.py index 36b1c21feefe..a069cf35f889 100644 --- a/lldb/test/API/macosx/stop-reason-exception/TestMachExceptionData.py +++ b/lldb/test/API/macosx/stop-reason-exception/TestMachExceptionData.py @@ -12,7 +12,7 @@ from lldbsuite.test.decorators import * class TestMachExceptionData(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin def test_exc_bad_access(self): """Test that we get type 1, code 1 and the right address for a EXC_BAD_ACCESS mach exception.""" diff --git a/lldb/test/API/macosx/tbi-honored/TestTBIHonored.py b/lldb/test/API/macosx/tbi-honored/TestTBIHonored.py index a5c0abd70e5a..f7d33ed5c8c6 100644 --- a/lldb/test/API/macosx/tbi-honored/TestTBIHonored.py +++ b/lldb/test/API/macosx/tbi-honored/TestTBIHonored.py @@ -27,7 +27,7 @@ class TestTBIHonored(TestBase): # This test is valid on AArch64 systems with TBI mode enabled, # and an address mask that clears the top byte before reading # from memory. - @skipUnlessDarwin + @requireDarwin @skipIf(archs=no_match(["arm64", "arm64e"])) @skipIfRemote def test(self): diff --git a/lldb/test/API/macosx/thread-names/TestInterruptThreadNames.py b/lldb/test/API/macosx/thread-names/TestInterruptThreadNames.py index 9b99aae8214a..053e8ca8ac39 100644 --- a/lldb/test/API/macosx/thread-names/TestInterruptThreadNames.py +++ b/lldb/test/API/macosx/thread-names/TestInterruptThreadNames.py @@ -11,7 +11,7 @@ from lldbsuite.test import lldbutil class TestInterruptThreadNames(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin @add_test_categories(["pyapi"]) def test_with_python_api(self): """Test that we get thread names when interrupting a process.""" diff --git a/lldb/test/API/macosx/thread_start_bps/TestBreakpointsThreadInit.py b/lldb/test/API/macosx/thread_start_bps/TestBreakpointsThreadInit.py index bf667f6f7d33..17880ff92631 100644 --- a/lldb/test/API/macosx/thread_start_bps/TestBreakpointsThreadInit.py +++ b/lldb/test/API/macosx/thread_start_bps/TestBreakpointsThreadInit.py @@ -8,7 +8,7 @@ from lldbsuite.test import lldbutil class TestInterruptThreadNames(TestBase): - @skipUnlessDarwin + @requireDarwin def test_internal_bps_resolved(self): self.build() @@ -36,7 +36,7 @@ class TestInterruptThreadNames(TestBase): num_resolved += bp.GetNumResolvedLocations() self.assertGreater(num_resolved, 0) - @skipUnlessDarwin + @requireDarwin def test_internal_bps_deleted_on_relaunch(self): self.build() diff --git a/lldb/test/API/macosx/thread_suspend/TestInternalThreadSuspension.py b/lldb/test/API/macosx/thread_suspend/TestInternalThreadSuspension.py index b41c2ae0976a..cbc70150862d 100644 --- a/lldb/test/API/macosx/thread_suspend/TestInternalThreadSuspension.py +++ b/lldb/test/API/macosx/thread_suspend/TestInternalThreadSuspension.py @@ -12,7 +12,7 @@ from lldbsuite.test.lldbtest import * class TestSuspendedThreadHandling(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin def test_suspended_threads(self): """Test that debugserver doesn't disturb the suspend count of a thread that has been suspended from within a program, when navigating breakpoints diff --git a/lldb/test/API/macosx/universal/TestUniversal.py b/lldb/test/API/macosx/universal/TestUniversal.py index 3c043df64197..2fe3ec115759 100644 --- a/lldb/test/API/macosx/universal/TestUniversal.py +++ b/lldb/test/API/macosx/universal/TestUniversal.py @@ -23,7 +23,7 @@ class UniversalTestCase(TestBase): self.line = line_number("main.c", "// Set break point at this line.") @add_test_categories(["pyapi"]) - @skipUnlessDarwin + @requireDarwin @unittest.skipUnless( hasattr(os, "uname") and os.uname()[4] in ["x86_64"], "requires x86_64" ) @@ -49,7 +49,7 @@ class UniversalTestCase(TestBase): process = target.LaunchSimple(None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) - @skipUnlessDarwin + @requireDarwin @unittest.skipUnless( hasattr(os, "uname") and os.uname()[4] in ["x86_64"], "requires x86_64" ) @@ -112,7 +112,7 @@ class UniversalTestCase(TestBase): self.expect("image list -A -b", substrs=["x86_64h testit"]) self.runCmd("continue") - @skipUnlessDarwin + @requireDarwin @unittest.skipUnless( hasattr(os, "uname") and os.uname()[4] in ["x86_64"], "requires x86_64" ) diff --git a/lldb/test/API/macosx/universal64/TestUniversal64.py b/lldb/test/API/macosx/universal64/TestUniversal64.py index 3467aa1754e4..f5a6a4cef962 100644 --- a/lldb/test/API/macosx/universal64/TestUniversal64.py +++ b/lldb/test/API/macosx/universal64/TestUniversal64.py @@ -20,7 +20,7 @@ class Universal64TestCase(TestBase): # The Makefile manually invokes clang. @skipIfLLVMTargetMissing("X86") @skipIfAsan - @skipUnlessDarwin + @requireDarwin @skipIfDarwinEmbedded def test_universal64_executable(self): """Test fat64 universal executable""" @@ -30,7 +30,7 @@ class Universal64TestCase(TestBase): # The Makefile manually invokes clang. @skipIfLLVMTargetMissing("X86") @skipIfAsan - @skipUnlessDarwin + @requireDarwin @skipIfDarwinEmbedded def test_universal64_dsym(self): """Test fat64 universal dSYM""" diff --git a/lldb/test/API/macosx/unregistered-macho/TestUnregisteredMacho.py b/lldb/test/API/macosx/unregistered-macho/TestUnregisteredMacho.py index d887d55f1161..11ff1d4e1efa 100644 --- a/lldb/test/API/macosx/unregistered-macho/TestUnregisteredMacho.py +++ b/lldb/test/API/macosx/unregistered-macho/TestUnregisteredMacho.py @@ -14,7 +14,7 @@ class TestUnregisteredMacho(TestBase): # newer debugserver required for jGetLoadedDynamicLibrariesInfos # to support this @no_debug_info_test - @skipUnlessDarwin + @requireDarwin def test(self): self.build() target, process, thread, bkpt = lldbutil.run_to_source_breakpoint( diff --git a/lldb/test/API/windows/conpty/TestConPTY.py b/lldb/test/API/windows/conpty/TestConPTY.py index f192367a801f..455263eb0d96 100644 --- a/lldb/test/API/windows/conpty/TestConPTY.py +++ b/lldb/test/API/windows/conpty/TestConPTY.py @@ -61,7 +61,7 @@ class ConPTYTestCase(TestBase): return process.GetSTDOUT(1 << 20) - @skipUnlessWindows + @requireWindows @skipUnlessWindowsConPTY2022 @skipIf(oslist=["windows"], archs=["aarch64"], bugnumber="#194069") def test_stdout_delivery(self): @@ -72,7 +72,7 @@ class ConPTYTestCase(TestBase): output = self._strip_output(output) self.assertIn("Hello from ConPTY\r\n", output) - @skipUnlessWindows + @requireWindows @skipUnlessWindowsConPTY2022 @skipIf(oslist=["windows"], archs=["aarch64"], bugnumber="#194069") def test_large_output(self): @@ -90,7 +90,7 @@ class ConPTYTestCase(TestBase): for i, line in enumerate(output_lines): self.assertEqual("line %04d" % i, line) - @skipUnlessWindows + @requireWindows @skipUnlessWindowsConPTY @skipIf(oslist=["windows"], archs=["aarch64"], bugnumber="#194069") def test_basic_output_without_vt_check(self): @@ -107,7 +107,7 @@ class ConPTYTestCase(TestBase): stripped = re.sub(r"\x1b\[[0-9;?]*[A-Za-z]", "", output) self.assertIn("Hello from ConPTY", stripped) - @skipUnlessWindows + @requireWindows @skipUnlessWindowsConPTY2022 @skipIf(oslist=["windows"], archs=["aarch64"], bugnumber="#194069") def test_no_screen_clear_on_init(self): diff --git a/lldb/test/API/windows/debug-heap/TestWindowsDebugHeap.py b/lldb/test/API/windows/debug-heap/TestWindowsDebugHeap.py index 0d5ba5dc40f1..69bb22da366e 100644 --- a/lldb/test/API/windows/debug-heap/TestWindowsDebugHeap.py +++ b/lldb/test/API/windows/debug-heap/TestWindowsDebugHeap.py @@ -8,7 +8,7 @@ from lldbsuite.test.lldbtest import * from typing import List -@skipUnlessWindows +@requireWindows class DebugHeapTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True diff --git a/lldb/test/API/windows/launch/missing-dll/TestMissingDll.py b/lldb/test/API/windows/launch/missing-dll/TestMissingDll.py index d1e972c7f0bc..5d51e0bd6b1e 100644 --- a/lldb/test/API/windows/launch/missing-dll/TestMissingDll.py +++ b/lldb/test/API/windows/launch/missing-dll/TestMissingDll.py @@ -6,7 +6,7 @@ from lldbsuite.test import lldbutil @skipIfTargetDoesNotSupportSharedLibraries() class MissingDllTestCase(TestBase): - @skipUnlessWindows + @requireWindows def test(self): """ Test that lldb reports the application's exit code (STATUS_DLL_NOT_FOUND), diff --git a/lldb/test/API/windows/launch/replace-dll/TestReplaceDLL.py b/lldb/test/API/windows/launch/replace-dll/TestReplaceDLL.py index 91111702169a..83250f170066 100644 --- a/lldb/test/API/windows/launch/replace-dll/TestReplaceDLL.py +++ b/lldb/test/API/windows/launch/replace-dll/TestReplaceDLL.py @@ -10,7 +10,7 @@ import os class ReplaceDllTestCase(TestBase): SHARED_BUILD_TESTCASE = False - @skipUnlessWindows + @requireWindows def test(self): """ Test that LLDB unlocks module files once all references are released. diff --git a/lldb/test/API/windows/msvcrt/TestMSVCRTCException.py b/lldb/test/API/windows/msvcrt/TestMSVCRTCException.py index 63727c37b1ae..b379e50d48cb 100644 --- a/lldb/test/API/windows/msvcrt/TestMSVCRTCException.py +++ b/lldb/test/API/windows/msvcrt/TestMSVCRTCException.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil class TestMSVCRTCException(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipUnlessPlatform(["windows"]) + @requireWindows @skipUnlessMSVC def test_msvc_runtime_checks(self): """Test that lldb prints MSVC's runtime checks exceptions as stop reasons.""" diff --git a/lldb/test/API/windows/thread/TestThreadName.py b/lldb/test/API/windows/thread/TestThreadName.py index 590b936191a2..7680790a6d49 100644 --- a/lldb/test/API/windows/thread/TestThreadName.py +++ b/lldb/test/API/windows/thread/TestThreadName.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil class TestThreadName(TestBase): - @skipUnlessWindows + @requireWindows @skipIfWindows(windows_version=["<", "10.0.14393"]) def test_with_thread_description(self): """SBThread.GetName() reflects SetThreadDescription on Windows.""" diff --git a/llvm/utils/lit/lit/reports.py b/llvm/utils/lit/lit/reports.py index c5b09fe81bb2..4a166e16c500 100755 --- a/llvm/utils/lit/lit/reports.py +++ b/llvm/utils/lit/lit/reports.py @@ -183,7 +183,7 @@ class XunitReport(Report): if code == lit.Test.EXCLUDED: return "Test not selected (--filter, --max-tests)" if code == lit.Test.SKIPPED: - return "User interrupt" + return "Skipped" assert code == lit.Test.UNSUPPORTED features = test.getMissingRequiredFeatures()