https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/213465
This is a follow up to https://github.com/llvm/llvm-project/pull/212753 to convert the `commands` tests to use the `@require` decorator. >From 3bec5acfb8c6febdfb597f5b598abf89dce17e85 Mon Sep 17 00:00:00 2001 From: Charles Zablit <[email protected]> Date: Sat, 1 Aug 2026 18:11:36 +0200 Subject: [PATCH] [lldb] Convert commands tests to use require decorator --- .../add-dsym/uuid/TestAddDsymCommand.py | 2 +- .../language/TestFrameLanguageCommands.py | 2 +- .../API/commands/dwim-print/TestDWIMPrint.py | 2 +- .../dwim-print/objc/TestDWIMPrintObjC.py | 4 +-- .../TestCallUserAnonTypedef.py | 2 +- .../TestArgumentPassingRestrictions.py | 2 +- .../TestCallStdStringFunction.py | 2 +- .../call-function/TestCallStopAndContinue.py | 2 +- .../TestCallUserDefinedFunction.py | 2 +- .../call-restarts/TestCallThatRestarts.py | 4 +-- ...emplateSpecializationParametersHandling.py | 2 +- .../context-object/TestContextObject.py | 2 +- .../expr-with-fork/TestExprWithFork.py | 32 +++++++++---------- .../TestExprInsideLambdas.py | 2 +- .../expression/formatters/TestFormatters.py | 2 +- .../inline-namespace/TestInlineNamespace.py | 2 +- .../TestInlineNamespaceAlias.py | 2 +- .../TestNestedPersistentTypes.py | 2 +- .../persistent_types/TestPersistentTypes.py | 2 +- .../TestPoPersistentResult.py | 6 ++-- .../expression/pr35310/TestExprsBug35310.py | 2 +- .../radar_9531204/TestPrintfAfterUp.py | 2 +- .../radar_9673664/TestExprHelpExamples.py | 2 +- .../result_numbering/TestResultNumbering.py | 2 +- .../API/commands/expression/test/TestExprs.py | 2 +- .../expression/timeout/TestCallWithTimeout.py | 2 +- .../unwind_expression/TestUnwindExpression.py | 2 +- .../weak_symbols/TestWeakSymbols.py | 2 +- .../expression/xvalue/TestXValuePrinting.py | 2 +- .../frame/recognizer/TestFrameRecognizer.py | 2 +- .../API/commands/frame/var/TestFrameVar.py | 4 +-- .../objc/TestFrameVarDirectIvarObjC.py | 4 +-- .../TestFrameVarDirectIvarObjCPlusPlus.py | 6 ++-- .../platform/basic/TestPlatformPython.py | 2 +- .../platform/connect/TestPlatformConnect.py | 2 +- .../TestPlatformLaunchGDBServer.py | 2 +- .../platform/process/list/TestProcessList.py | 2 +- .../commands/platform/sdk/TestPlatformSDK.py | 2 +- .../process/attach/TestProcessAttach.py | 2 +- .../attach/attach_denied/TestAttachDenied.py | 4 +-- .../process/handle/TestProcessHandle.py | 2 +- .../TestLaunchWithShellExpand.py | 2 +- .../reverse-continue/TestReverseContinue.py | 2 +- .../commands/protocol/TestMCPUnixSocket.py | 2 +- .../register_command/TestRegisters.py | 2 +- .../commands/statistics/basic/TestStats.py | 6 ++-- .../TestAutoInstallMainExecutable.py | 2 +- .../target/dump-pcm-info/TestDumpPCMInfo.py | 2 +- .../oso/TestDumpOso.py | 10 +++--- .../target/stop-hooks/TestStopHooks.py | 2 +- 50 files changed, 80 insertions(+), 80 deletions(-) diff --git a/lldb/test/API/commands/add-dsym/uuid/TestAddDsymCommand.py b/lldb/test/API/commands/add-dsym/uuid/TestAddDsymCommand.py index ba03f397277fc..f9490e40298a2 100644 --- a/lldb/test/API/commands/add-dsym/uuid/TestAddDsymCommand.py +++ b/lldb/test/API/commands/add-dsym/uuid/TestAddDsymCommand.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -@skipUnlessDarwin +@requireDarwin class AddDsymCommandCase(TestBase): SHARED_BUILD_TESTCASE = False diff --git a/lldb/test/API/commands/command/language/TestFrameLanguageCommands.py b/lldb/test/API/commands/command/language/TestFrameLanguageCommands.py index b02ffd079ebd2..f8e6c17ae34d7 100644 --- a/lldb/test/API/commands/command/language/TestFrameLanguageCommands.py +++ b/lldb/test/API/commands/command/language/TestFrameLanguageCommands.py @@ -5,7 +5,7 @@ class TestCase(TestBase): - @skipUnlessDarwin + @requireDarwin def test(self): self.build() _, _, thread, _ = lldbutil.run_to_source_breakpoint( diff --git a/lldb/test/API/commands/dwim-print/TestDWIMPrint.py b/lldb/test/API/commands/dwim-print/TestDWIMPrint.py index 68b93d4a445ab..a5b051ef517f1 100644 --- a/lldb/test/API/commands/dwim-print/TestDWIMPrint.py +++ b/lldb/test/API/commands/dwim-print/TestDWIMPrint.py @@ -9,7 +9,7 @@ import lldbsuite.test.lldbutil as lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class TestCase(TestBase): def _run_cmd(self, cmd: str) -> str: """Run the given lldb command and return its output.""" diff --git a/lldb/test/API/commands/dwim-print/objc/TestDWIMPrintObjC.py b/lldb/test/API/commands/dwim-print/objc/TestDWIMPrintObjC.py index 616d049459ab9..a25a192527293 100644 --- a/lldb/test/API/commands/dwim-print/objc/TestDWIMPrintObjC.py +++ b/lldb/test/API/commands/dwim-print/objc/TestDWIMPrintObjC.py @@ -9,7 +9,7 @@ class TestCase(TestBase): - @skipUnlessDarwin + @requireDarwin def test(self): self.build() lldbutil.run_to_source_breakpoint(self, "break here", lldb.SBFileSpec("main.m")) @@ -18,7 +18,7 @@ def test(self): "dwim-print parent.child", patterns=[r'_name = 0x[0-9a-f]+ @"Seven"'] ) - @skipUnlessDarwin + @requireDarwin def test_with_summary(self): self.build() lldbutil.run_to_source_breakpoint(self, "break here", lldb.SBFileSpec("main.m")) diff --git a/lldb/test/API/commands/expression/anonymous-struct/TestCallUserAnonTypedef.py b/lldb/test/API/commands/expression/anonymous-struct/TestCallUserAnonTypedef.py index fd2c1c50a08d9..a2b2134a32330 100644 --- a/lldb/test/API/commands/expression/anonymous-struct/TestCallUserAnonTypedef.py +++ b/lldb/test/API/commands/expression/anonymous-struct/TestCallUserAnonTypedef.py @@ -13,7 +13,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class TestExprLookupAnonStructTypedef(TestBase): def test(self): """Test typedeffed untagged struct arguments for function call expressions""" diff --git a/lldb/test/API/commands/expression/argument_passing_restrictions/TestArgumentPassingRestrictions.py b/lldb/test/API/commands/expression/argument_passing_restrictions/TestArgumentPassingRestrictions.py index 526bfb27ce8ac..38115a76e4b91 100644 --- a/lldb/test/API/commands/expression/argument_passing_restrictions/TestArgumentPassingRestrictions.py +++ b/lldb/test/API/commands/expression/argument_passing_restrictions/TestArgumentPassingRestrictions.py @@ -15,7 +15,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class TestArgumentPassingRestrictions(TestBase): @skipIf(compiler="clang", compiler_version=["<", "7.0"]) def test_argument_passing_restrictions(self): diff --git a/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py b/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py index 847839aec0be1..24da3287d99dd 100644 --- a/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py +++ b/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py @@ -8,7 +8,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class ExprCommandCallFunctionTestCase(TestBase): @expectedFailureAll( compiler="icc", bugnumber="llvm.org/pr14437, fails with ICC 13.1" diff --git a/lldb/test/API/commands/expression/call-function/TestCallStopAndContinue.py b/lldb/test/API/commands/expression/call-function/TestCallStopAndContinue.py index 24529d02132ba..a71de3dd7d9b7 100644 --- a/lldb/test/API/commands/expression/call-function/TestCallStopAndContinue.py +++ b/lldb/test/API/commands/expression/call-function/TestCallStopAndContinue.py @@ -8,7 +8,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class ExprCommandCallStopContinueTestCase(TestBase): def setUp(self): # Call super's setUp(). diff --git a/lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py b/lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py index 0ce0585953541..10687557cc017 100644 --- a/lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py +++ b/lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py @@ -13,7 +13,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class ExprCommandCallUserDefinedFunction(TestBase): def test(self): """Test return values of user defined function calls.""" diff --git a/lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py b/lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py index 54b0ba9c191d4..2597d310c59d1 100644 --- a/lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py +++ b/lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -@skipIfNoSignals +@requireSignals class ExprCommandThatRestartsTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True @@ -21,7 +21,7 @@ def setUp(self): self.main_source_spec = lldb.SBFileSpec(self.main_source) @skipIfDarwin # llvm.org/pr19246: intermittent failure - @skipIfWindows # Test relies on signals, unsupported on Windows + @requireNotWindows # Test relies on signals, unsupported on Windows @expectedFlakeyAndroid(bugnumber="llvm.org/pr19246") @expectedFlakeyNetBSD def test(self): diff --git a/lldb/test/API/commands/expression/class_template_specialization_empty_pack/TestClassTemplateSpecializationParametersHandling.py b/lldb/test/API/commands/expression/class_template_specialization_empty_pack/TestClassTemplateSpecializationParametersHandling.py index b378e9829869b..0ccd832bd5991 100644 --- a/lldb/test/API/commands/expression/class_template_specialization_empty_pack/TestClassTemplateSpecializationParametersHandling.py +++ b/lldb/test/API/commands/expression/class_template_specialization_empty_pack/TestClassTemplateSpecializationParametersHandling.py @@ -11,7 +11,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class TestClassTemplateSpecializationParametersHandling(TestBase): def test_class_template_specialization(self): self.build() diff --git a/lldb/test/API/commands/expression/context-object/TestContextObject.py b/lldb/test/API/commands/expression/context-object/TestContextObject.py index 0d9b1161f33a5..34a2686c102fb 100644 --- a/lldb/test/API/commands/expression/context-object/TestContextObject.py +++ b/lldb/test/API/commands/expression/context-object/TestContextObject.py @@ -8,7 +8,7 @@ from lldbsuite.test.lldbtest import * -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class ContextObjectTestCase(TestBase): def test_context_object(self): """Tests expression evaluation in context of an object.""" diff --git a/lldb/test/API/commands/expression/expr-with-fork/TestExprWithFork.py b/lldb/test/API/commands/expression/expr-with-fork/TestExprWithFork.py index 478bfe491125a..411132370eb45 100644 --- a/lldb/test/API/commands/expression/expr-with-fork/TestExprWithFork.py +++ b/lldb/test/API/commands/expression/expr-with-fork/TestExprWithFork.py @@ -18,7 +18,7 @@ class ExprWithForkTestCase(TestBase): # --- Basic expression evaluation across fork/vfork --- - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_with_fork(self): """Test that expression evaluation succeeds when the expression calls fork().""" @@ -31,7 +31,7 @@ def test_expr_with_fork(self): "fork_and_return(42, false)", result_type="int", result_value="42" ) - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_with_vfork(self): """Test that expression evaluation succeeds when the expression calls vfork().""" @@ -44,7 +44,7 @@ def test_expr_with_vfork(self): "fork_and_return(42, true)", result_type="int", result_value="42" ) - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_with_fork_trap(self): """Test that expression evaluation handles a child process that triggers a SIGTRAP.""" @@ -66,7 +66,7 @@ def test_expr_with_fork_trap(self): # --- follow-fork-mode child override during expression evaluation --- - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_with_fork_follow_child(self): """Test that expression evaluation succeeds with follow-fork-mode child.""" @@ -87,7 +87,7 @@ def test_expr_with_fork_follow_child(self): # Verify we are still debugging the original process. self.assertEqual(process.GetProcessID(), original_pid) - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_with_vfork_follow_child(self): """Test that expression evaluation succeeds with vfork and follow-fork-mode child.""" @@ -107,7 +107,7 @@ def test_expr_with_vfork_follow_child(self): # --- stop-on-fork: fork interrupts expression immediately --- - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_with_fork_stop_on_fork(self): """Test that stop-on-fork interrupts expression evaluation on fork.""" @@ -126,7 +126,7 @@ def test_expr_with_fork_stop_on_fork(self): # The expression should be interrupted due to the fork. self.assertTrue(value.GetError().Fail()) - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_with_fork_stop_on_fork_process_state(self): """Test that process state is valid after stop-on-fork interrupts on fork.""" @@ -150,7 +150,7 @@ def test_expr_with_fork_stop_on_fork_process_state(self): # --- stop-on-fork with vfork: deferred to vforkdone --- - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_with_vfork_stop_on_fork(self): """Test that stop-on-fork with vfork defers to vforkdone and interrupts.""" @@ -170,7 +170,7 @@ def test_expr_with_vfork_stop_on_fork(self): # vfork) because stop-on-fork is set. self.assertTrue(value.GetError().Fail()) - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_with_vfork_stop_on_fork_process_state(self): """Test that process state is clean after vfork stop-on-fork interruption. @@ -196,7 +196,7 @@ def test_expr_with_vfork_stop_on_fork_process_state(self): self.assertEqual(process.GetProcessID(), original_pid) self.assertEqual(process.GetState(), lldb.eStateStopped) - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_with_vfork_stop_on_fork_breakpoints_work(self): """Test that breakpoints are functional after vfork stop-on-fork. @@ -226,7 +226,7 @@ def test_expr_with_vfork_stop_on_fork_breakpoints_work(self): # --- stop-on-fork=false (default): no interruption --- - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_with_fork_stop_on_fork_false(self): """Test that stop-on-fork=false allows fork expression to complete.""" @@ -246,7 +246,7 @@ def test_expr_with_fork_stop_on_fork_false(self): self.assertSuccess(value.GetError()) self.assertEqual(value.GetValueAsSigned(), 42) - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_with_vfork_stop_on_fork_false(self): """Test that stop-on-fork=false allows vfork expression to complete.""" @@ -285,7 +285,7 @@ def test_stop_on_fork_set_get(self): # --- stop-on-fork with follow-fork-mode child --- - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_with_fork_stop_on_fork_follow_child(self): """Test stop-on-fork + follow-child: expression interrupted, still on parent.""" @@ -309,7 +309,7 @@ def test_expr_with_fork_stop_on_fork_follow_child(self): self.assertTrue(value.GetError().Fail()) self.assertEqual(process.GetProcessID(), original_pid) - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_with_vfork_stop_on_fork_follow_child(self): """Test stop-on-fork + vfork + follow-child: interrupted at vforkdone, still on parent.""" @@ -335,7 +335,7 @@ def test_expr_with_vfork_stop_on_fork_follow_child(self): # --- concurrent fork on another thread during expression --- - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_concurrent_fork_other_thread(self): """Test that a fork on another thread during expression is handled correctly. @@ -373,7 +373,7 @@ def test_expr_concurrent_fork_other_thread(self): # Breakpoints should still be functional. self.expect_expr("x", result_type="int", result_value="42") - @skipIfWindows + @requirePOSIX @add_test_categories(["fork"]) def test_expr_concurrent_fork_other_thread_follow_child(self): """Test that follow-fork-mode child is overridden during expression evaluation. diff --git a/lldb/test/API/commands/expression/expr_inside_lambda/TestExprInsideLambdas.py b/lldb/test/API/commands/expression/expr_inside_lambda/TestExprInsideLambdas.py index f284dbc206b65..85a76c856800a 100644 --- a/lldb/test/API/commands/expression/expr_inside_lambda/TestExprInsideLambdas.py +++ b/lldb/test/API/commands/expression/expr_inside_lambda/TestExprInsideLambdas.py @@ -10,7 +10,7 @@ from lldbsuite.test.lldbtest import * -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class ExprInsideLambdaTestCase(TestBase): TEST_WITH_PDB_DEBUG_INFO = True SHARED_BUILD_TESTCASE = False diff --git a/lldb/test/API/commands/expression/formatters/TestFormatters.py b/lldb/test/API/commands/expression/formatters/TestFormatters.py index f520c408af171..e2744564fb647 100644 --- a/lldb/test/API/commands/expression/formatters/TestFormatters.py +++ b/lldb/test/API/commands/expression/formatters/TestFormatters.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class ExprFormattersTestCase(TestBase): def setUp(self): # Call super's setUp(). diff --git a/lldb/test/API/commands/expression/inline-namespace/TestInlineNamespace.py b/lldb/test/API/commands/expression/inline-namespace/TestInlineNamespace.py index a2d6eef63c1a5..eee218faa6b8c 100644 --- a/lldb/test/API/commands/expression/inline-namespace/TestInlineNamespace.py +++ b/lldb/test/API/commands/expression/inline-namespace/TestInlineNamespace.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class TestInlineNamespace(TestBase): def test(self): self.build() diff --git a/lldb/test/API/commands/expression/namespace-alias/TestInlineNamespaceAlias.py b/lldb/test/API/commands/expression/namespace-alias/TestInlineNamespaceAlias.py index eede597a57fca..765fe918d4241 100644 --- a/lldb/test/API/commands/expression/namespace-alias/TestInlineNamespaceAlias.py +++ b/lldb/test/API/commands/expression/namespace-alias/TestInlineNamespaceAlias.py @@ -11,7 +11,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class TestInlineNamespace(TestBase): @skipIf(compiler="clang", compiler_version=["<", "16.0"]) def test(self): diff --git a/lldb/test/API/commands/expression/persistent_types/TestNestedPersistentTypes.py b/lldb/test/API/commands/expression/persistent_types/TestNestedPersistentTypes.py index fc85305ff32cf..39d01f4925e4b 100644 --- a/lldb/test/API/commands/expression/persistent_types/TestNestedPersistentTypes.py +++ b/lldb/test/API/commands/expression/persistent_types/TestNestedPersistentTypes.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class NestedPersistentTypesTestCase(TestBase): def test_persistent_types(self): """Test that nested persistent types work.""" diff --git a/lldb/test/API/commands/expression/persistent_types/TestPersistentTypes.py b/lldb/test/API/commands/expression/persistent_types/TestPersistentTypes.py index 7defad224fab8..463ddbe8b5bcb 100644 --- a/lldb/test/API/commands/expression/persistent_types/TestPersistentTypes.py +++ b/lldb/test/API/commands/expression/persistent_types/TestPersistentTypes.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class PersistenttypesTestCase(TestBase): def test_persistent_types(self): """Test that lldb persistent types works correctly.""" diff --git a/lldb/test/API/commands/expression/po_persistent_result/TestPoPersistentResult.py b/lldb/test/API/commands/expression/po_persistent_result/TestPoPersistentResult.py index a5b48a1bf3972..8f4bba421579d 100644 --- a/lldb/test/API/commands/expression/po_persistent_result/TestPoPersistentResult.py +++ b/lldb/test/API/commands/expression/po_persistent_result/TestPoPersistentResult.py @@ -14,12 +14,12 @@ def setUp(self): self.build() lldbutil.run_to_source_breakpoint(self, "break here", lldb.SBFileSpec("main.m")) - @skipUnlessDarwin + @requireDarwin def test_po_does_not_print_persistent_result(self): """Test `po` doesn't advertise a persistent result variable.""" self.expect("po obj", matching=False, substrs=["$0 = "]) - @skipUnlessDarwin + @requireDarwin def test_po_does_not_keep_persistent_result(self): """Test `po` doesn't leak a persistent result variable.""" self.expect("po obj") @@ -28,7 +28,7 @@ def test_po_does_not_keep_persistent_result(self): self.expect("expression $0", error=True) self.expect("expression obj", substrs=["$0 = "]) - @skipUnlessDarwin + @requireDarwin def test_expression_description_verbosity(self): """Test printing object description _and_ opt-in to persistent results.""" self.expect("expression -O -vfull -- obj", substrs=["$0 = "]) diff --git a/lldb/test/API/commands/expression/pr35310/TestExprsBug35310.py b/lldb/test/API/commands/expression/pr35310/TestExprsBug35310.py index 2bf1b866c22f7..76a7ada8eb8aa 100644 --- a/lldb/test/API/commands/expression/pr35310/TestExprsBug35310.py +++ b/lldb/test/API/commands/expression/pr35310/TestExprsBug35310.py @@ -4,7 +4,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class ExprBug35310(TestBase): def setUp(self): # Call super's setUp(). diff --git a/lldb/test/API/commands/expression/radar_9531204/TestPrintfAfterUp.py b/lldb/test/API/commands/expression/radar_9531204/TestPrintfAfterUp.py index 57d2eeec19a0b..1e982da903793 100644 --- a/lldb/test/API/commands/expression/radar_9531204/TestPrintfAfterUp.py +++ b/lldb/test/API/commands/expression/radar_9531204/TestPrintfAfterUp.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class Radar9531204TestCase(TestBase): # rdar://problem/9531204 def test_expr_commands(self): diff --git a/lldb/test/API/commands/expression/radar_9673664/TestExprHelpExamples.py b/lldb/test/API/commands/expression/radar_9673664/TestExprHelpExamples.py index a2467ecc3d7a7..e7d2bee862bbd 100644 --- a/lldb/test/API/commands/expression/radar_9673664/TestExprHelpExamples.py +++ b/lldb/test/API/commands/expression/radar_9673664/TestExprHelpExamples.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class Radar9673644TestCase(TestBase): def setUp(self): # Call super's setUp(). diff --git a/lldb/test/API/commands/expression/result_numbering/TestResultNumbering.py b/lldb/test/API/commands/expression/result_numbering/TestResultNumbering.py index 928461c5c2fc0..7582224de9b02 100644 --- a/lldb/test/API/commands/expression/result_numbering/TestResultNumbering.py +++ b/lldb/test/API/commands/expression/result_numbering/TestResultNumbering.py @@ -10,7 +10,7 @@ from lldbsuite.test.lldbtest import * -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class TestExpressionResultNumbering(TestBase): NO_DEBUG_INFO_TESTCASE = True diff --git a/lldb/test/API/commands/expression/test/TestExprs.py b/lldb/test/API/commands/expression/test/TestExprs.py index e76457a1f9bbe..da2ac97e9baaa 100644 --- a/lldb/test/API/commands/expression/test/TestExprs.py +++ b/lldb/test/API/commands/expression/test/TestExprs.py @@ -19,7 +19,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class BasicExprCommandsTestCase(TestBase): def setUp(self): # Call super's setUp(). diff --git a/lldb/test/API/commands/expression/timeout/TestCallWithTimeout.py b/lldb/test/API/commands/expression/timeout/TestCallWithTimeout.py index 900f06756f1bb..0c7795497bb40 100644 --- a/lldb/test/API/commands/expression/timeout/TestCallWithTimeout.py +++ b/lldb/test/API/commands/expression/timeout/TestCallWithTimeout.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class ExprCommandWithTimeoutsTestCase(TestBase): def setUp(self): # Call super's setUp(). diff --git a/lldb/test/API/commands/expression/unwind_expression/TestUnwindExpression.py b/lldb/test/API/commands/expression/unwind_expression/TestUnwindExpression.py index dfaad8cf6c281..c5793542c6f98 100644 --- a/lldb/test/API/commands/expression/unwind_expression/TestUnwindExpression.py +++ b/lldb/test/API/commands/expression/unwind_expression/TestUnwindExpression.py @@ -8,7 +8,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class UnwindFromExpressionTest(TestBase): main_spec = lldb.SBFileSpec("main.cpp", False) diff --git a/lldb/test/API/commands/expression/weak_symbols/TestWeakSymbols.py b/lldb/test/API/commands/expression/weak_symbols/TestWeakSymbols.py index 4783dd98aa829..ce6d8064ae45e 100644 --- a/lldb/test/API/commands/expression/weak_symbols/TestWeakSymbols.py +++ b/lldb/test/API/commands/expression/weak_symbols/TestWeakSymbols.py @@ -15,7 +15,7 @@ class TestWeakSymbolsInExpressions(TestBase): SHARED_BUILD_TESTCASE = False NO_DEBUG_INFO_TESTCASE = True - @skipUnlessDarwin + @requireDarwin @skipIf(compiler="clang", compiler_version=["<", "19.0"]) def test_weak_symbol_in_expr(self): """Tests that we can refer to weak symbols in expressions.""" diff --git a/lldb/test/API/commands/expression/xvalue/TestXValuePrinting.py b/lldb/test/API/commands/expression/xvalue/TestXValuePrinting.py index fd8246feb91cc..ba9a3863546d5 100644 --- a/lldb/test/API/commands/expression/xvalue/TestXValuePrinting.py +++ b/lldb/test/API/commands/expression/xvalue/TestXValuePrinting.py @@ -4,7 +4,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class ExprXValuePrintingTestCase(TestBase): def test(self): """Printing an xvalue should work.""" diff --git a/lldb/test/API/commands/frame/recognizer/TestFrameRecognizer.py b/lldb/test/API/commands/frame/recognizer/TestFrameRecognizer.py index 1f943c634df6d..dc7a52ce3646c 100644 --- a/lldb/test/API/commands/frame/recognizer/TestFrameRecognizer.py +++ b/lldb/test/API/commands/frame/recognizer/TestFrameRecognizer.py @@ -372,7 +372,7 @@ def test_frame_recognizer_target_specific(self): substrs=["frame 0 is recognized by recognizer.MyFrameRecognizer"], ) - @skipIfWasm # $arg1/$arg2 need argument registers, unsupported on WebAssembly. + @requireNotWasm # $arg1/$arg2 need argument registers, unsupported on WebAssembly. def test_frame_recognizer_not_only_first_instruction(self): self.build() exe = self.getBuildArtifact("a.out") diff --git a/lldb/test/API/commands/frame/var/TestFrameVar.py b/lldb/test/API/commands/frame/var/TestFrameVar.py index 18c67b291c77a..bf8cea9e74542 100644 --- a/lldb/test/API/commands/frame/var/TestFrameVar.py +++ b/lldb/test/API/commands/frame/var/TestFrameVar.py @@ -112,7 +112,7 @@ def check_frame_variable_errors(self, thread, error_strings): self.assertIn(s, message) @skipIfRemote - @skipUnlessDarwin + @requireDarwin def test_darwin_dwarf_missing_obj(self): """ Test that if we build a binary with DWARF in .o files and we remove @@ -136,7 +136,7 @@ def test_darwin_dwarf_missing_obj(self): self.check_frame_variable_errors(thread, error_strings) @skipIfRemote - @skipUnlessDarwin + @requireDarwin def test_darwin_dwarf_obj_mod_time_mismatch(self): """ Test that if we build a binary with DWARF in .o files and we update diff --git a/lldb/test/API/commands/frame/var/direct-ivar/objc/TestFrameVarDirectIvarObjC.py b/lldb/test/API/commands/frame/var/direct-ivar/objc/TestFrameVarDirectIvarObjC.py index 5ef1cb43cccfb..a6dc7cbf777e3 100644 --- a/lldb/test/API/commands/frame/var/direct-ivar/objc/TestFrameVarDirectIvarObjC.py +++ b/lldb/test/API/commands/frame/var/direct-ivar/objc/TestFrameVarDirectIvarObjC.py @@ -5,7 +5,7 @@ class TestCase(TestBase): - @skipUnlessDarwin + @requireDarwin def test_objc_self(self): self.build() lldbutil.run_to_source_breakpoint( @@ -13,7 +13,7 @@ def test_objc_self(self): ) self.expect("frame variable _ivar", startstr="(int) _ivar = 30") - @skipUnlessDarwin + @requireDarwin def test_objc_self_capture_idiom(self): self.build() lldbutil.run_to_source_breakpoint( diff --git a/lldb/test/API/commands/frame/var/direct-ivar/objcpp/TestFrameVarDirectIvarObjCPlusPlus.py b/lldb/test/API/commands/frame/var/direct-ivar/objcpp/TestFrameVarDirectIvarObjCPlusPlus.py index 63076f082ad22..efc95144fba8e 100644 --- a/lldb/test/API/commands/frame/var/direct-ivar/objcpp/TestFrameVarDirectIvarObjCPlusPlus.py +++ b/lldb/test/API/commands/frame/var/direct-ivar/objcpp/TestFrameVarDirectIvarObjCPlusPlus.py @@ -5,7 +5,7 @@ class TestCase(TestBase): - @skipUnlessDarwin + @requireDarwin def test_objc_self(self): self.build() lldbutil.run_to_source_breakpoint( @@ -13,7 +13,7 @@ def test_objc_self(self): ) self.expect("frame variable _ivar", startstr="(int) _ivar = 30") - @skipUnlessDarwin + @requireDarwin def test_objc_explicit_self(self): self.build() lldbutil.run_to_source_breakpoint( @@ -21,7 +21,7 @@ def test_objc_explicit_self(self): ) self.expect("frame variable _ivar", startstr="(int) _ivar = 30") - @skipUnlessDarwin + @requireDarwin def test_cpp_this(self): self.build() lldbutil.run_to_source_breakpoint( diff --git a/lldb/test/API/commands/platform/basic/TestPlatformPython.py b/lldb/test/API/commands/platform/basic/TestPlatformPython.py index 56397e330d083..24a95211597a9 100644 --- a/lldb/test/API/commands/platform/basic/TestPlatformPython.py +++ b/lldb/test/API/commands/platform/basic/TestPlatformPython.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # platform shell needs a connected remote +@requireNotWasm # platform shell needs a connected remote class PlatformPythonTestCase(TestBase): @add_test_categories(["pyapi"]) @no_debug_info_test diff --git a/lldb/test/API/commands/platform/connect/TestPlatformConnect.py b/lldb/test/API/commands/platform/connect/TestPlatformConnect.py index e3cf03ef45f44..2b1f62824d714 100644 --- a/lldb/test/API/commands/platform/connect/TestPlatformConnect.py +++ b/lldb/test/API/commands/platform/connect/TestPlatformConnect.py @@ -5,7 +5,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no remote platform to connect to +@requireNotWasm # no remote platform to connect to class TestPlatformProcessConnect(TestBase): NO_DEBUG_INFO_TESTCASE = True SHARED_BUILD_TESTCASE = False diff --git a/lldb/test/API/commands/platform/launchgdbserver/TestPlatformLaunchGDBServer.py b/lldb/test/API/commands/platform/launchgdbserver/TestPlatformLaunchGDBServer.py index 93f9d9a4f6948..150c22f8b6070 100644 --- a/lldb/test/API/commands/platform/launchgdbserver/TestPlatformLaunchGDBServer.py +++ b/lldb/test/API/commands/platform/launchgdbserver/TestPlatformLaunchGDBServer.py @@ -6,7 +6,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # cannot launch a gdbserver +@requireNotWasm # cannot launch a gdbserver class TestPlatformProcessLaunchGDBServer(TestBase): NO_DEBUG_INFO_TESTCASE = True SHARED_BUILD_TESTCASE = False diff --git a/lldb/test/API/commands/platform/process/list/TestProcessList.py b/lldb/test/API/commands/platform/process/list/TestProcessList.py index 5c73cc4e4fe19..af21f1e348346 100644 --- a/lldb/test/API/commands/platform/process/list/TestProcessList.py +++ b/lldb/test/API/commands/platform/process/list/TestProcessList.py @@ -11,7 +11,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # attaching requires launching the inferior as a host process +@requireNotWasm # attaching requires launching the inferior as a host process class ProcessListTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True diff --git a/lldb/test/API/commands/platform/sdk/TestPlatformSDK.py b/lldb/test/API/commands/platform/sdk/TestPlatformSDK.py index 6af5767e26d3e..3bffdd5e35836 100644 --- a/lldb/test/API/commands/platform/sdk/TestPlatformSDK.py +++ b/lldb/test/API/commands/platform/sdk/TestPlatformSDK.py @@ -38,7 +38,7 @@ def port_not_available(self): return None @no_debug_info_test - @skipUnlessDarwin + @requireDarwin @skipTestIfFn(no_debugserver) @skipTestIfFn(port_not_available) @skipIfRemote diff --git a/lldb/test/API/commands/process/attach/TestProcessAttach.py b/lldb/test/API/commands/process/attach/TestProcessAttach.py index f0fa9af4e4d0d..5be6a3f6cf077 100644 --- a/lldb/test/API/commands/process/attach/TestProcessAttach.py +++ b/lldb/test/API/commands/process/attach/TestProcessAttach.py @@ -13,7 +13,7 @@ exe_name = "ProcessAttach" # Must match Makefile -@skipIfWasm # attaching requires launching the inferior as a host process +@requireNotWasm # attaching requires launching the inferior as a host process class ProcessAttachTestCase(TestBase): SHARED_BUILD_TESTCASE = False NO_DEBUG_INFO_TESTCASE = True diff --git a/lldb/test/API/commands/process/attach/attach_denied/TestAttachDenied.py b/lldb/test/API/commands/process/attach/attach_denied/TestAttachDenied.py index 2fbd5c710cd27..f22bcac38bee6 100644 --- a/lldb/test/API/commands/process/attach/attach_denied/TestAttachDenied.py +++ b/lldb/test/API/commands/process/attach/attach_denied/TestAttachDenied.py @@ -12,11 +12,11 @@ exe_name = "AttachDenied" # Must match Makefile -@skipIfNoSignals +@requireSignals class AttachDeniedTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True - @skipIfWindows + @requirePOSIX @skipIfiOSSimulator @skipIfDarwinEmbedded # ptrace(ATTACH_REQUEST...) won't work on ios/tvos/etc @skipIfAsan # Times out inconsistently under asan diff --git a/lldb/test/API/commands/process/handle/TestProcessHandle.py b/lldb/test/API/commands/process/handle/TestProcessHandle.py index 9dc73b9d6b5c3..87d2cc9ed1f0a 100644 --- a/lldb/test/API/commands/process/handle/TestProcessHandle.py +++ b/lldb/test/API/commands/process/handle/TestProcessHandle.py @@ -6,7 +6,7 @@ class TestProcessHandle(TestBase): @no_debug_info_test - @skipIfWindows + @requireNotWindows def test_process_handle(self): """Test that calling process handle before we have a target, and before we have a process will affect the process. Also that the signal settings diff --git a/lldb/test/API/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py b/lldb/test/API/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py index 8362945ee6c80..750970d3275c3 100644 --- a/lldb/test/API/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py +++ b/lldb/test/API/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py @@ -10,7 +10,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no host shell to expand arguments +@requireNotWasm # no host shell to expand arguments class LaunchWithShellExpandTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True diff --git a/lldb/test/API/commands/process/reverse-continue/TestReverseContinue.py b/lldb/test/API/commands/process/reverse-continue/TestReverseContinue.py index aba0ac7e6a765..0bd8b99205d6d 100644 --- a/lldb/test/API/commands/process/reverse-continue/TestReverseContinue.py +++ b/lldb/test/API/commands/process/reverse-continue/TestReverseContinue.py @@ -11,7 +11,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no reverse execution +@requireNotWasm # no reverse execution class TestReverseContinue(ReverseTestBase): @skipIfRemote def test_reverse_continue(self): diff --git a/lldb/test/API/commands/protocol/TestMCPUnixSocket.py b/lldb/test/API/commands/protocol/TestMCPUnixSocket.py index 9edb97eb791b9..b0d7981a4751a 100644 --- a/lldb/test/API/commands/protocol/TestMCPUnixSocket.py +++ b/lldb/test/API/commands/protocol/TestMCPUnixSocket.py @@ -11,7 +11,7 @@ class MCPUnixSocketCommandTestCase(TestBase): - @skipIfWindows + @requirePOSIX @skipIfRemote @no_debug_info_test def test_unix_socket(self): diff --git a/lldb/test/API/commands/register/register_command/TestRegisters.py b/lldb/test/API/commands/register/register_command/TestRegisters.py index d476728f33381..415829222d06a 100644 --- a/lldb/test/API/commands/register/register_command/TestRegisters.py +++ b/lldb/test/API/commands/register/register_command/TestRegisters.py @@ -702,7 +702,7 @@ def test_fs_gs_base(self): "fs_base does not equal to pthread_self() value.", ) - @skipIfWasm # attaching requires launching the inferior as a host process + @requireNotWasm # attaching requires launching the inferior as a host process def test_process_must_be_stopped(self): """Check that all register commands error when the process is not stopped.""" self.build() diff --git a/lldb/test/API/commands/statistics/basic/TestStats.py b/lldb/test/API/commands/statistics/basic/TestStats.py index a32b8feecc5cf..20a41d50c3899 100644 --- a/lldb/test/API/commands/statistics/basic/TestStats.py +++ b/lldb/test/API/commands/statistics/basic/TestStats.py @@ -756,7 +756,7 @@ def test_dwo_id_mismatch_error_stats(self): self.assertIn("dwoErrorCount", debug_stats["modules"][0]) self.assertEqual(debug_stats["modules"][0]["dwoErrorCount"], 1) - @skipUnlessDarwin + @requireDarwin @no_debug_info_test def test_dsym_binary_has_symfile_in_stats(self): """ @@ -800,7 +800,7 @@ def test_dsym_binary_has_symfile_in_stats(self): # statistics. self.assertNotIn("symbolFileModuleIdentifiers", exe_stats) - @skipUnlessDarwin + @requireDarwin @no_debug_info_test def test_no_dsym_binary_has_symfile_identifiers_in_stats(self): """ @@ -859,7 +859,7 @@ def test_no_dsym_binary_has_symfile_identifiers_in_stats(self): # Make sure each .o file has some debug info bytes. self.assertGreater(o_module["debugInfoByteSize"], 0) - @skipUnlessDarwin + @requireDarwin @no_debug_info_test def test_had_frame_variable_errors(self): """ diff --git a/lldb/test/API/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py b/lldb/test/API/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py index 72143837f711f..c994c24481e52 100644 --- a/lldb/test/API/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py +++ b/lldb/test/API/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py @@ -10,7 +10,7 @@ from lldbsuite.test import lldbutil -@skipIfWasm # no remote platform to auto-install onto +@requireNotWasm # no remote platform to auto-install onto class TestAutoInstallMainExecutable(TestBase): NO_DEBUG_INFO_TESTCASE = True SHARED_BUILD_TESTCASE = False diff --git a/lldb/test/API/commands/target/dump-pcm-info/TestDumpPCMInfo.py b/lldb/test/API/commands/target/dump-pcm-info/TestDumpPCMInfo.py index e00ed4aa90ff1..7e35d719e46f8 100644 --- a/lldb/test/API/commands/target/dump-pcm-info/TestDumpPCMInfo.py +++ b/lldb/test/API/commands/target/dump-pcm-info/TestDumpPCMInfo.py @@ -13,7 +13,7 @@ class TestCase(TestBase): @no_debug_info_test - @skipUnlessDarwin + @requireDarwin def test(self): self.build() diff --git a/lldb/test/API/commands/target/dump-separate-debug-info/oso/TestDumpOso.py b/lldb/test/API/commands/target/dump-separate-debug-info/oso/TestDumpOso.py index 9be36f9811f47..b0af84cc53a31 100644 --- a/lldb/test/API/commands/target/dump-separate-debug-info/oso/TestDumpOso.py +++ b/lldb/test/API/commands/target/dump-separate-debug-info/oso/TestDumpOso.py @@ -25,7 +25,7 @@ def get_osos_from_json_output(self): return result @skipIfRemote - @skipUnlessDarwin + @requireDarwin def test_shows_oso_loaded_json_output(self): self.build(debug_info="dwarf") exe = self.getBuildArtifact("a.out") @@ -47,7 +47,7 @@ def test_shows_oso_loaded_json_output(self): self.assertTrue(osos[exe][foo_o]["loaded"]) @skipIfRemote - @skipUnlessDarwin + @requireDarwin def test_shows_oso_not_loaded_json_output(self): self.build(debug_info="dwarf") exe = self.getBuildArtifact("a.out") @@ -77,7 +77,7 @@ def test_shows_oso_not_loaded_json_output(self): self.assertNotIn(foo_o, output[exe]) @skipIfRemote - @skipUnlessDarwin + @requireDarwin def test_shows_oso_loaded_table_output(self): self.build(debug_info="dwarf") exe = self.getBuildArtifact("a.out") @@ -103,7 +103,7 @@ def test_shows_oso_loaded_table_output(self): ) @skipIfRemote - @skipUnlessDarwin + @requireDarwin def test_shows_oso_not_loaded_table_output(self): self.build(debug_info="dwarf") exe = self.getBuildArtifact("a.out") @@ -129,7 +129,7 @@ def test_shows_oso_not_loaded_table_output(self): ) @skipIfRemote - @skipUnlessDarwin + @requireDarwin def test_osos_loaded_symbols_on_demand(self): self.build(debug_info="dwarf") exe = self.getBuildArtifact("a.out") diff --git a/lldb/test/API/commands/target/stop-hooks/TestStopHooks.py b/lldb/test/API/commands/target/stop-hooks/TestStopHooks.py index 466aefa904014..2daa065d1d4b5 100644 --- a/lldb/test/API/commands/target/stop-hooks/TestStopHooks.py +++ b/lldb/test/API/commands/target/stop-hooks/TestStopHooks.py @@ -9,7 +9,7 @@ from lldbsuite.test.lldbtest import * -@skipIfWasm # no expression evaluation +@requireNotWasm # no expression evaluation class TestStopHooks(TestBase): NO_DEBUG_INFO_TESTCASE = True _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
