Author: Charles Zablit Date: 2026-08-11T12:38:59+02:00 New Revision: 00b921e865b91a7c49322e12d38d4b3c6e441533
URL: https://github.com/llvm/llvm-project/commit/00b921e865b91a7c49322e12d38d4b3c6e441533 DIFF: https://github.com/llvm/llvm-project/commit/00b921e865b91a7c49322e12d38d4b3c6e441533.diff LOG: [lldb] Convert commands tests to use require decorator (#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. Added: Modified: lldb/test/API/commands/add-dsym/uuid/TestAddDsymCommand.py lldb/test/API/commands/command/language/TestFrameLanguageCommands.py lldb/test/API/commands/dwim-print/TestDWIMPrint.py lldb/test/API/commands/dwim-print/objc/TestDWIMPrintObjC.py lldb/test/API/commands/expression/anonymous-struct/TestCallUserAnonTypedef.py lldb/test/API/commands/expression/argument_passing_restrictions/TestArgumentPassingRestrictions.py lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py lldb/test/API/commands/expression/call-function/TestCallStopAndContinue.py lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py lldb/test/API/commands/expression/class_template_specialization_empty_pack/TestClassTemplateSpecializationParametersHandling.py lldb/test/API/commands/expression/context-object/TestContextObject.py lldb/test/API/commands/expression/expr-with-fork/TestExprWithFork.py lldb/test/API/commands/expression/expr_inside_lambda/TestExprInsideLambdas.py lldb/test/API/commands/expression/formatters/TestFormatters.py lldb/test/API/commands/expression/inline-namespace/TestInlineNamespace.py lldb/test/API/commands/expression/namespace-alias/TestInlineNamespaceAlias.py lldb/test/API/commands/expression/persistent_types/TestNestedPersistentTypes.py lldb/test/API/commands/expression/persistent_types/TestPersistentTypes.py lldb/test/API/commands/expression/po_persistent_result/TestPoPersistentResult.py lldb/test/API/commands/expression/pr35310/TestExprsBug35310.py lldb/test/API/commands/expression/radar_9531204/TestPrintfAfterUp.py lldb/test/API/commands/expression/radar_9673664/TestExprHelpExamples.py lldb/test/API/commands/expression/result_numbering/TestResultNumbering.py lldb/test/API/commands/expression/test/TestExprs.py lldb/test/API/commands/expression/timeout/TestCallWithTimeout.py lldb/test/API/commands/expression/unwind_expression/TestUnwindExpression.py lldb/test/API/commands/expression/weak_symbols/TestWeakSymbols.py lldb/test/API/commands/expression/xvalue/TestXValuePrinting.py lldb/test/API/commands/frame/recognizer/TestFrameRecognizer.py lldb/test/API/commands/frame/var/TestFrameVar.py lldb/test/API/commands/frame/var/direct-ivar/objc/TestFrameVarDirectIvarObjC.py lldb/test/API/commands/frame/var/direct-ivar/objcpp/TestFrameVarDirectIvarObjCPlusPlus.py lldb/test/API/commands/platform/basic/TestPlatformPython.py lldb/test/API/commands/platform/connect/TestPlatformConnect.py lldb/test/API/commands/platform/launchgdbserver/TestPlatformLaunchGDBServer.py lldb/test/API/commands/platform/process/list/TestProcessList.py lldb/test/API/commands/platform/sdk/TestPlatformSDK.py lldb/test/API/commands/process/attach/TestProcessAttach.py lldb/test/API/commands/process/attach/attach_denied/TestAttachDenied.py lldb/test/API/commands/process/handle/TestProcessHandle.py lldb/test/API/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py lldb/test/API/commands/process/reverse-continue/TestReverseContinue.py lldb/test/API/commands/protocol/TestMCPUnixSocket.py lldb/test/API/commands/register/register_command/TestRegisters.py lldb/test/API/commands/statistics/basic/TestStats.py lldb/test/API/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py lldb/test/API/commands/target/dump-pcm-info/TestDumpPCMInfo.py lldb/test/API/commands/target/dump-separate-debug-info/oso/TestDumpOso.py lldb/test/API/commands/target/stop-hooks/TestStopHooks.py Removed: ################################################################################ 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..d50c707f33de9 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 +@requireExpressionEvaluation 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..76735fe62d5cd 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 +@requireExpressionEvaluation 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..55bccb4f84e7a 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 +@requireExpressionEvaluation 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..174306ec8e66a 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 +@requireExpressionEvaluation 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..0034c4d948799 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 +@requireExpressionEvaluation 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..0172c120065e9 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 +@requireExpressionEvaluation 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..05e1744b15a49 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 +@requireExpressionEvaluation 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..ebbb42418ae19 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 +@requireExpressionEvaluation 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..01451c32b0a33 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 +@requireExpressionEvaluation 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..fa48027bb64bf 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 +@requireExpressionEvaluation 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..c13eb13072849 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 +@requireExpressionEvaluation 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..cb876997e6480 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 +@requireExpressionEvaluation 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..0c81d202f053f 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 +@requireExpressionEvaluation 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..473937ab6e412 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 +@requireExpressionEvaluation 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..7c0c73ad1fd1c 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 +@requireExpressionEvaluation 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..f869e4736e01b 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 +@requireExpressionEvaluation 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..ada647b59eaf7 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 +@requireExpressionEvaluation 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..11f6d74e0ad0b 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 +@requireExpressionEvaluation 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..65e1e7b9b3e2a 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 +@requireExpressionEvaluation 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..877a421e67bf1 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 +@requireExpressionEvaluation 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..05c3e33499737 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 +@requireExpressionEvaluation 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..3541e9eccccc3 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 +@requireExpressionEvaluation 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 08f5bc4a4db69..caa4bbba49540 100644 --- a/lldb/test/API/commands/frame/recognizer/TestFrameRecognizer.py +++ b/lldb/test/API/commands/frame/recognizer/TestFrameRecognizer.py @@ -374,7 +374,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 964345bd52878..abe94843497f0 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 8c924b942a8bd..ea89c5dffb156 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 97421a928308c..56bf61ccb4a53 100644 --- a/lldb/test/API/commands/statistics/basic/TestStats.py +++ b/lldb/test/API/commands/statistics/basic/TestStats.py @@ -757,7 +757,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): """ @@ -801,7 +801,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): """ @@ -860,7 +860,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..896f21e8a901b 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 +@requireExpressionEvaluation class TestStopHooks(TestBase): NO_DEBUG_INFO_TESTCASE = True _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
