[Lldb-commits] [lldb] [lldb] Decorate tests that use shared libraries (PR #193118)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Sat Apr 25 13:17:00 PDT 2026
https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/193118
>From ba5aa728328b31cebd45301ef5f5fa43a748b75a Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <jonas at devlieghere.com>
Date: Mon, 20 Apr 2026 16:30:30 -0700
Subject: [PATCH 1/2] [lldb] Decorate tests that use shared libraries
`wasip1` does not support shared libraries in the traditional POSIX
sense. It was designed primarily as a monolithic system interface for
standalone modules where everything is statically linked. `wasip2`
introduced a "component model" where components achieve the goals of
shared libraries.
---
lldb/packages/Python/lldbsuite/test/decorators.py | 9 +++++++++
.../commands/target/create-deps/TestTargetCreateDeps.py | 1 +
.../break_in_loaded_dylib/TestBreakInLoadedDylib.py | 1 +
.../TestBreakpointInGlobalConstructor.py | 1 +
.../breakpoint/move_nearest/TestMoveNearest.py | 2 ++
.../API/functionalities/completion/TestCompletion.py | 1 +
.../dyld-launch-linux/TestDyldLaunchLinux.py | 1 +
.../dyld-multiple-rdebug/TestDyldWithMultupleRDebug.py | 1 +
.../executable_first/TestExecutableFirst.py | 1 +
.../limit-debug-info/TestLimitDebugInfo.py | 1 +
.../load_after_attach/TestLoadAfterAttach.py | 1 +
.../functionalities/load_lazy/TestLoadUsingLazyBind.py | 1 +
.../API/functionalities/load_unload/TestLoadUnload.py | 1 +
.../load_using_paths/TestLoadUsingPaths.py | 1 +
.../plugins/command_plugin/TestPluginCommands.py | 1 +
.../functionalities/pre_run_dylibs/TestPreRunDylibs.py | 1 +
.../TestStopOnSharedlibraryEvents.py | 1 +
.../TestModuleLoadedNotifys.py | 1 +
.../API/lang/c/global_variables/TestGlobalVariables.py | 1 +
lldb/test/API/lang/c/shared_lib/TestSharedLib.py | 1 +
.../TestSharedLibStrippedSymbols.py | 1 +
lldb/test/API/lang/c/tls_globals/TestTlsGlobals.py | 1 +
.../TestExprDefinitionInDylib.py | 1 +
.../API/lang/cpp/forward/TestCPPForwardDeclaration.py | 1 +
.../namespace_definitions/TestNamespaceDefinitions.py | 1 +
.../odr-handling-with-dylib/TestOdrHandlingWithDylib.py | 1 +
.../step-through-trampoline/TestStepThroughTrampoline.py | 2 ++
.../conflicting-definition/TestConflictingDefinition.py | 1 +
lldb/test/API/lang/objc/forward-decl/TestForwardDecl.py | 1 +
lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py | 1 +
lldb/test/API/python_api/block/TestFrameBlocks.py | 1 +
.../shared_library/TestSharedLibOnDemand.py | 1 +
.../breakpoint-events/TestDAP_breakpointEvents.py | 1 +
.../lldb-dap/breakpoint/TestDAP_breakpointLocations.py | 1 +
.../API/tools/lldb-dap/breakpoint/TestDAP_logpoints.py | 1 +
.../tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py | 1 +
.../breakpoint/TestDAP_setExceptionBreakpoints.py | 1 +
.../breakpoint/TestDAP_setFunctionBreakpoints.py | 1 +
.../lldb-dap/eventStatistic/TestVSCode_eventStatistic.py | 1 +
.../tools/lldb-dap/module-event/TestDAP_module_event.py | 1 +
.../lldb-dap/terminated-event/TestDAP_terminatedEvent.py | 1 +
.../API/windows/launch/missing-dll/TestMissingDll.py | 1 +
42 files changed, 52 insertions(+)
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py
index 32c68d7c5f08d..01395abe3fcac 100644
--- a/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -995,6 +995,15 @@ def skipIfTargetDoesNotSupportThreads():
)
+def skipIfTargetDoesNotSupportSharedLibraries():
+ """Skip tests that require shared library (dylib/so) support."""
+ platform = lldbplatformutil.getPlatform()
+ return unittest.skipIf(
+ platform.startswith("wasi"),
+ "shared libraries are not supported on %s" % platform,
+ )
+
+
def skipUnlessArch(arch):
"""Decorate the item to skip tests unless running on the specified architecture."""
diff --git a/lldb/test/API/commands/target/create-deps/TestTargetCreateDeps.py b/lldb/test/API/commands/target/create-deps/TestTargetCreateDeps.py
index 06a28cc459d66..e57a1654a46ef 100644
--- a/lldb/test/API/commands/target/create-deps/TestTargetCreateDeps.py
+++ b/lldb/test/API/commands/target/create-deps/TestTargetCreateDeps.py
@@ -10,6 +10,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
@skipIfWindows # Windows deals differently with shared libs.
class TargetDependentsTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
diff --git a/lldb/test/API/functionalities/breakpoint/break_in_loaded_dylib/TestBreakInLoadedDylib.py b/lldb/test/API/functionalities/breakpoint/break_in_loaded_dylib/TestBreakInLoadedDylib.py
index 4ff2262b39102..d52ef10ef93e9 100644
--- a/lldb/test/API/functionalities/breakpoint/break_in_loaded_dylib/TestBreakInLoadedDylib.py
+++ b/lldb/test/API/functionalities/breakpoint/break_in_loaded_dylib/TestBreakInLoadedDylib.py
@@ -4,6 +4,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestBreakInLoadedDylib(TestBase):
"""Test that we can set a source regex breakpoint that will take in
a dlopened library that hasn't loaded when we set the breakpoint."""
diff --git a/lldb/test/API/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py b/lldb/test/API/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
index fe74f1b0557bf..fb7b58cd9c441 100644
--- a/lldb/test/API/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
+++ b/lldb/test/API/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
@@ -9,6 +9,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestBreakpointInGlobalConstructors(TestBase):
NO_DEBUG_INFO_TESTCASE = True
diff --git a/lldb/test/API/functionalities/breakpoint/move_nearest/TestMoveNearest.py b/lldb/test/API/functionalities/breakpoint/move_nearest/TestMoveNearest.py
index 8a0b1f5e30943..5fd3017c5e7f8 100644
--- a/lldb/test/API/functionalities/breakpoint/move_nearest/TestMoveNearest.py
+++ b/lldb/test/API/functionalities/breakpoint/move_nearest/TestMoveNearest.py
@@ -1,8 +1,10 @@
import lldb
from lldbsuite.test.lldbtest import *
import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestMoveNearest(TestBase):
NO_DEBUG_INFO_TESTCASE = True
diff --git a/lldb/test/API/functionalities/completion/TestCompletion.py b/lldb/test/API/functionalities/completion/TestCompletion.py
index 555838775db8a..6437362002449 100644
--- a/lldb/test/API/functionalities/completion/TestCompletion.py
+++ b/lldb/test/API/functionalities/completion/TestCompletion.py
@@ -12,6 +12,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class CommandLineCompletionTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
diff --git a/lldb/test/API/functionalities/dyld-launch-linux/TestDyldLaunchLinux.py b/lldb/test/API/functionalities/dyld-launch-linux/TestDyldLaunchLinux.py
index 5d7ce9a6ab702..8321dde32caa9 100644
--- a/lldb/test/API/functionalities/dyld-launch-linux/TestDyldLaunchLinux.py
+++ b/lldb/test/API/functionalities/dyld-launch-linux/TestDyldLaunchLinux.py
@@ -10,6 +10,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestLinux64LaunchingViaDynamicLoader(TestBase):
@skipIf(oslist=no_match(["linux"]))
@no_debug_info_test
diff --git a/lldb/test/API/functionalities/dyld-multiple-rdebug/TestDyldWithMultupleRDebug.py b/lldb/test/API/functionalities/dyld-multiple-rdebug/TestDyldWithMultupleRDebug.py
index 72c1e6a842368..e3e07118910db 100644
--- a/lldb/test/API/functionalities/dyld-multiple-rdebug/TestDyldWithMultupleRDebug.py
+++ b/lldb/test/API/functionalities/dyld-multiple-rdebug/TestDyldWithMultupleRDebug.py
@@ -17,6 +17,7 @@
from lldbsuite.test.lldbtest import *
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestDyldWithMultipleRDebug(TestBase):
@skipIf(oslist=no_match(["linux"]))
@no_debug_info_test
diff --git a/lldb/test/API/functionalities/executable_first/TestExecutableFirst.py b/lldb/test/API/functionalities/executable_first/TestExecutableFirst.py
index c39d2083a21da..633d9125051a7 100644
--- a/lldb/test/API/functionalities/executable_first/TestExecutableFirst.py
+++ b/lldb/test/API/functionalities/executable_first/TestExecutableFirst.py
@@ -7,6 +7,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestExecutableIsFirst(TestBase):
NO_DEBUG_INFO_TESTCASE = True
diff --git a/lldb/test/API/functionalities/limit-debug-info/TestLimitDebugInfo.py b/lldb/test/API/functionalities/limit-debug-info/TestLimitDebugInfo.py
index 668d31d8a5acd..97d18996aac5c 100644
--- a/lldb/test/API/functionalities/limit-debug-info/TestLimitDebugInfo.py
+++ b/lldb/test/API/functionalities/limit-debug-info/TestLimitDebugInfo.py
@@ -9,6 +9,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class LimitDebugInfoTestCase(TestBase):
SHARED_BUILD_TESTCASE = False
diff --git a/lldb/test/API/functionalities/load_after_attach/TestLoadAfterAttach.py b/lldb/test/API/functionalities/load_after_attach/TestLoadAfterAttach.py
index ffb4d3e01ea1f..b30753b7bbc84 100644
--- a/lldb/test/API/functionalities/load_after_attach/TestLoadAfterAttach.py
+++ b/lldb/test/API/functionalities/load_after_attach/TestLoadAfterAttach.py
@@ -4,6 +4,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
diff --git a/lldb/test/API/functionalities/load_lazy/TestLoadUsingLazyBind.py b/lldb/test/API/functionalities/load_lazy/TestLoadUsingLazyBind.py
index 036c4a45f58f5..bd8df9256a177 100644
--- a/lldb/test/API/functionalities/load_lazy/TestLoadUsingLazyBind.py
+++ b/lldb/test/API/functionalities/load_lazy/TestLoadUsingLazyBind.py
@@ -11,6 +11,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class LoadUsingLazyBind(TestBase):
NO_DEBUG_INFO_TESTCASE = True
diff --git a/lldb/test/API/functionalities/load_unload/TestLoadUnload.py b/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
index 310e8f9d09fd8..97ca9f84b203d 100644
--- a/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
+++ b/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
@@ -10,6 +10,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class LoadUnloadTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
diff --git a/lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py b/lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py
index 6afd95de6ee99..6a97e81ef1f67 100644
--- a/lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py
+++ b/lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py
@@ -10,6 +10,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
@skipIfWindows # The Windows platform doesn't implement DoLoadImage.
class LoadUsingPathsTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
diff --git a/lldb/test/API/functionalities/plugins/command_plugin/TestPluginCommands.py b/lldb/test/API/functionalities/plugins/command_plugin/TestPluginCommands.py
index 263b0da079c3c..3b8ac1bc557bf 100644
--- a/lldb/test/API/functionalities/plugins/command_plugin/TestPluginCommands.py
+++ b/lldb/test/API/functionalities/plugins/command_plugin/TestPluginCommands.py
@@ -8,6 +8,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class PluginCommandTestCase(TestBase):
SHARED_BUILD_TESTCASE = False
diff --git a/lldb/test/API/functionalities/pre_run_dylibs/TestPreRunDylibs.py b/lldb/test/API/functionalities/pre_run_dylibs/TestPreRunDylibs.py
index a21ec1eb69f9c..b67e42c913de3 100644
--- a/lldb/test/API/functionalities/pre_run_dylibs/TestPreRunDylibs.py
+++ b/lldb/test/API/functionalities/pre_run_dylibs/TestPreRunDylibs.py
@@ -4,6 +4,7 @@
from lldbsuite.test.decorators import *
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestPreRunLibraries(TestBase):
NO_DEBUG_INFO_TESTCASE = True
diff --git a/lldb/test/API/functionalities/stop-on-sharedlibrary-load/TestStopOnSharedlibraryEvents.py b/lldb/test/API/functionalities/stop-on-sharedlibrary-load/TestStopOnSharedlibraryEvents.py
index 74ad3b2070e10..50cbdda759766 100644
--- a/lldb/test/API/functionalities/stop-on-sharedlibrary-load/TestStopOnSharedlibraryEvents.py
+++ b/lldb/test/API/functionalities/stop-on-sharedlibrary-load/TestStopOnSharedlibraryEvents.py
@@ -5,6 +5,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestStopOnSharedlibraryEvents(TestBase):
@skipIfRemote
@skipIfWindows
diff --git a/lldb/test/API/functionalities/target-new-solib-notifications/TestModuleLoadedNotifys.py b/lldb/test/API/functionalities/target-new-solib-notifications/TestModuleLoadedNotifys.py
index 47af6909b728c..4a6601baeefc0 100644
--- a/lldb/test/API/functionalities/target-new-solib-notifications/TestModuleLoadedNotifys.py
+++ b/lldb/test/API/functionalities/target-new-solib-notifications/TestModuleLoadedNotifys.py
@@ -9,6 +9,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
@skipUnlessPlatform(["linux"] + lldbplatformutil.getDarwinOSTriples())
class ModuleLoadedNotifysTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
diff --git a/lldb/test/API/lang/c/global_variables/TestGlobalVariables.py b/lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
index cfed00b9327c1..de0a12cd487c2 100644
--- a/lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
+++ b/lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
@@ -6,6 +6,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class GlobalVariablesTestCase(TestBase):
def setUp(self):
# Call super's setUp().
diff --git a/lldb/test/API/lang/c/shared_lib/TestSharedLib.py b/lldb/test/API/lang/c/shared_lib/TestSharedLib.py
index e0994aae76169..e9c979c1a2ec5 100644
--- a/lldb/test/API/lang/c/shared_lib/TestSharedLib.py
+++ b/lldb/test/API/lang/c/shared_lib/TestSharedLib.py
@@ -8,6 +8,7 @@
import lldbsuite.test.lldbutil as lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class SharedLibTestCase(TestBase):
def common_test_expr(self, preload_symbols):
if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion():
diff --git a/lldb/test/API/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py b/lldb/test/API/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
index 173ebc769b922..8a3f3824d5b45 100644
--- a/lldb/test/API/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
+++ b/lldb/test/API/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
@@ -8,6 +8,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class SharedLibStrippedTestCase(TestBase):
SHARED_BUILD_TESTCASE = False
diff --git a/lldb/test/API/lang/c/tls_globals/TestTlsGlobals.py b/lldb/test/API/lang/c/tls_globals/TestTlsGlobals.py
index 189f57b94ab4e..f2e206c4f1ca8 100644
--- a/lldb/test/API/lang/c/tls_globals/TestTlsGlobals.py
+++ b/lldb/test/API/lang/c/tls_globals/TestTlsGlobals.py
@@ -9,6 +9,7 @@
@skipIfTargetDoesNotSupportThreads()
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TlsGlobalTestCase(TestBase):
def setUp(self):
TestBase.setUp(self)
diff --git a/lldb/test/API/lang/cpp/expr-definition-in-dylib/TestExprDefinitionInDylib.py b/lldb/test/API/lang/cpp/expr-definition-in-dylib/TestExprDefinitionInDylib.py
index b0781c8d442e5..0695102efbdf0 100644
--- a/lldb/test/API/lang/cpp/expr-definition-in-dylib/TestExprDefinitionInDylib.py
+++ b/lldb/test/API/lang/cpp/expr-definition-in-dylib/TestExprDefinitionInDylib.py
@@ -4,6 +4,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class ExprDefinitionInDylibTestCase(TestBase):
SHARED_BUILD_TESTCASE = False
diff --git a/lldb/test/API/lang/cpp/forward/TestCPPForwardDeclaration.py b/lldb/test/API/lang/cpp/forward/TestCPPForwardDeclaration.py
index 3c78fb38ff0f5..acee0e6b90eff 100644
--- a/lldb/test/API/lang/cpp/forward/TestCPPForwardDeclaration.py
+++ b/lldb/test/API/lang/cpp/forward/TestCPPForwardDeclaration.py
@@ -6,6 +6,7 @@
import lldbsuite.test.lldbutil as lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class ForwardDeclarationTestCase(TestBase):
SHARED_BUILD_TESTCASE = False
diff --git a/lldb/test/API/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py b/lldb/test/API/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
index f9eb5979f368b..7d7f2dc62de46 100644
--- a/lldb/test/API/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
+++ b/lldb/test/API/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
@@ -7,6 +7,7 @@
import lldbsuite.test.lldbutil as lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class NamespaceDefinitionsTestCase(TestBase):
# See also llvm.org/pr28948
@expectedFailureAll(bugnumber="llvm.org/pr50814", compiler="gcc")
diff --git a/lldb/test/API/lang/cpp/odr-handling-with-dylib/TestOdrHandlingWithDylib.py b/lldb/test/API/lang/cpp/odr-handling-with-dylib/TestOdrHandlingWithDylib.py
index f67d933f6ae51..cf5a7095b2bd7 100644
--- a/lldb/test/API/lang/cpp/odr-handling-with-dylib/TestOdrHandlingWithDylib.py
+++ b/lldb/test/API/lang/cpp/odr-handling-with-dylib/TestOdrHandlingWithDylib.py
@@ -4,6 +4,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class OdrHandlingWithDylibTestCase(TestBase):
@skipIf(
bugnumber="https://github.com/llvm/llvm-project/issues/50375, rdar://135551810"
diff --git a/lldb/test/API/lang/cpp/step-through-trampoline/TestStepThroughTrampoline.py b/lldb/test/API/lang/cpp/step-through-trampoline/TestStepThroughTrampoline.py
index ff12645488d16..732c3660b6bfd 100644
--- a/lldb/test/API/lang/cpp/step-through-trampoline/TestStepThroughTrampoline.py
+++ b/lldb/test/API/lang/cpp/step-through-trampoline/TestStepThroughTrampoline.py
@@ -1,8 +1,10 @@
import lldb
from lldbsuite.test.lldbtest import *
import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
+ at skipIfTargetDoesNotSupportSharedLibraries()
class StepThroughTrampoline(TestBase):
def test(self):
self.build()
diff --git a/lldb/test/API/lang/objc/conflicting-definition/TestConflictingDefinition.py b/lldb/test/API/lang/objc/conflicting-definition/TestConflictingDefinition.py
index 9d438cc3ee0ca..247b3e0b2598e 100644
--- a/lldb/test/API/lang/objc/conflicting-definition/TestConflictingDefinition.py
+++ b/lldb/test/API/lang/objc/conflicting-definition/TestConflictingDefinition.py
@@ -7,6 +7,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestRealDefinition(TestBase):
def test_frame_var_after_stop_at_implementation(self):
"""Test that we can find the implementation for an objective C type"""
diff --git a/lldb/test/API/lang/objc/forward-decl/TestForwardDecl.py b/lldb/test/API/lang/objc/forward-decl/TestForwardDecl.py
index 05374c6134bce..cfd261e53d7a4 100644
--- a/lldb/test/API/lang/objc/forward-decl/TestForwardDecl.py
+++ b/lldb/test/API/lang/objc/forward-decl/TestForwardDecl.py
@@ -7,6 +7,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class ForwardDeclTestCase(TestBase):
SHARED_BUILD_TESTCASE = False
diff --git a/lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py b/lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py
index 50ce8edb8d09c..d21b427c54ffc 100644
--- a/lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py
+++ b/lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py
@@ -9,6 +9,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class HiddenIvarsTestCase(TestBase):
SHARED_BUILD_TESTCASE = False
diff --git a/lldb/test/API/python_api/block/TestFrameBlocks.py b/lldb/test/API/python_api/block/TestFrameBlocks.py
index b7b2f5e9747fe..2b36cd26e7bbd 100644
--- a/lldb/test/API/python_api/block/TestFrameBlocks.py
+++ b/lldb/test/API/python_api/block/TestFrameBlocks.py
@@ -8,6 +8,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class FrameBlocksTestCase(TestBase):
@skipIfWindows
def test_block_equality(self):
diff --git a/lldb/test/API/symbol_ondemand/shared_library/TestSharedLibOnDemand.py b/lldb/test/API/symbol_ondemand/shared_library/TestSharedLibOnDemand.py
index 43b7f946a44a5..2623f700f930d 100644
--- a/lldb/test/API/symbol_ondemand/shared_library/TestSharedLibOnDemand.py
+++ b/lldb/test/API/symbol_ondemand/shared_library/TestSharedLibOnDemand.py
@@ -7,6 +7,7 @@
import lldbsuite.test.lldbutil as lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class SharedLibTestCase(TestBase):
def setUp(self):
# Call super's setUp().
diff --git a/lldb/test/API/tools/lldb-dap/breakpoint-events/TestDAP_breakpointEvents.py b/lldb/test/API/tools/lldb-dap/breakpoint-events/TestDAP_breakpointEvents.py
index 0286d8b014177..dff3b9e76e748 100644
--- a/lldb/test/API/tools/lldb-dap/breakpoint-events/TestDAP_breakpointEvents.py
+++ b/lldb/test/API/tools/lldb-dap/breakpoint-events/TestDAP_breakpointEvents.py
@@ -10,6 +10,7 @@
import os
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestDAP_breakpointEvents(lldbdap_testcase.DAPTestCaseBase):
@skipIfWindows
def test_breakpoint_events(self):
diff --git a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py
index 1058157e2c668..1df5923b18b70 100644
--- a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py
+++ b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py
@@ -12,6 +12,7 @@
import os
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestDAP_breakpointLocations(lldbdap_testcase.DAPTestCaseBase):
def setUp(self):
lldbdap_testcase.DAPTestCaseBase.setUp(self)
diff --git a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_logpoints.py b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_logpoints.py
index 78ceb7971112e..d633f0b9ffde4 100644
--- a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_logpoints.py
+++ b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_logpoints.py
@@ -12,6 +12,7 @@
import os
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestDAP_logpoints(lldbdap_testcase.DAPTestCaseBase):
def setUp(self):
lldbdap_testcase.DAPTestCaseBase.setUp(self)
diff --git a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py
index 7f9d4325ce4f8..27b9bbb26fe7b 100644
--- a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py
+++ b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py
@@ -11,6 +11,7 @@
import os
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestDAP_setBreakpoints(lldbdap_testcase.DAPTestCaseBase):
SHARED_BUILD_TESTCASE = False
diff --git a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setExceptionBreakpoints.py b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setExceptionBreakpoints.py
index 2aac9310cb133..aec028b44e29a 100644
--- a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setExceptionBreakpoints.py
+++ b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setExceptionBreakpoints.py
@@ -7,6 +7,7 @@
import lldbdap_testcase
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestDAP_setExceptionBreakpoints(lldbdap_testcase.DAPTestCaseBase):
@skipIfWindows
def test_functionality(self):
diff --git a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setFunctionBreakpoints.py b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setFunctionBreakpoints.py
index 946595f639edc..d99f18ccb2000 100644
--- a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setFunctionBreakpoints.py
+++ b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setFunctionBreakpoints.py
@@ -10,6 +10,7 @@
import lldbdap_testcase
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestDAP_setFunctionBreakpoints(lldbdap_testcase.DAPTestCaseBase):
@skipIfWindows
def test_set_and_clear(self):
diff --git a/lldb/test/API/tools/lldb-dap/eventStatistic/TestVSCode_eventStatistic.py b/lldb/test/API/tools/lldb-dap/eventStatistic/TestVSCode_eventStatistic.py
index 59a0bbcb5370e..f9d7a90d481a7 100644
--- a/lldb/test/API/tools/lldb-dap/eventStatistic/TestVSCode_eventStatistic.py
+++ b/lldb/test/API/tools/lldb-dap/eventStatistic/TestVSCode_eventStatistic.py
@@ -12,6 +12,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestDAP_eventStatistic(lldbdap_testcase.DAPTestCaseBase):
"""
diff --git a/lldb/test/API/tools/lldb-dap/module-event/TestDAP_module_event.py b/lldb/test/API/tools/lldb-dap/module-event/TestDAP_module_event.py
index 6884cb0983e08..bf64f7f822ea2 100644
--- a/lldb/test/API/tools/lldb-dap/module-event/TestDAP_module_event.py
+++ b/lldb/test/API/tools/lldb-dap/module-event/TestDAP_module_event.py
@@ -6,6 +6,7 @@
import re
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestDAP_module_event(lldbdap_testcase.DAPTestCaseBase):
@skipIfWindows
def test_module_event(self):
diff --git a/lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py b/lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py
index 733927757709b..6af19416e4987 100644
--- a/lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py
+++ b/lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py
@@ -11,6 +11,7 @@
import json
+ at skipIfTargetDoesNotSupportSharedLibraries()
class TestDAP_terminatedEvent(lldbdap_testcase.DAPTestCaseBase):
@skipIfWindows
def test_terminated_event(self):
diff --git a/lldb/test/API/windows/launch/missing-dll/TestMissingDll.py b/lldb/test/API/windows/launch/missing-dll/TestMissingDll.py
index b8a9d77db648c..32fc266c0fde6 100644
--- a/lldb/test/API/windows/launch/missing-dll/TestMissingDll.py
+++ b/lldb/test/API/windows/launch/missing-dll/TestMissingDll.py
@@ -4,6 +4,7 @@
from lldbsuite.test import lldbutil
+ at skipIfTargetDoesNotSupportSharedLibraries()
class MissingDllTestCase(TestBase):
@skipUnlessWindows
def test(self):
>From 0048c7d4237b807b8e29360e614302a5ccf5839a Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <jonas at devlieghere.com>
Date: Thu, 23 Apr 2026 08:36:55 -0700
Subject: [PATCH 2/2] Address David's feedback
---
.../API/commands/target/create-deps/TestTargetCreateDeps.py | 6 +++++-
lldb/test/API/functionalities/completion/TestCompletion.py | 3 ++-
.../API/tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/lldb/test/API/commands/target/create-deps/TestTargetCreateDeps.py b/lldb/test/API/commands/target/create-deps/TestTargetCreateDeps.py
index e57a1654a46ef..00ed78f1fdd5a 100644
--- a/lldb/test/API/commands/target/create-deps/TestTargetCreateDeps.py
+++ b/lldb/test/API/commands/target/create-deps/TestTargetCreateDeps.py
@@ -10,7 +10,6 @@
from lldbsuite.test import lldbutil
- at skipIfTargetDoesNotSupportSharedLibraries()
@skipIfWindows # Windows deals differently with shared libs.
class TargetDependentsTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
@@ -73,6 +72,7 @@ def test_dependents_implicit_false_exe(self):
self.runCmd("target create -d " + exe, CURRENT_EXECUTABLE_SET)
self.has_exactly_one_image(True)
+ @skipIfTargetDoesNotSupportSharedLibraries()
@expectedFailureAndroid # android will return mutiple images
def test_dependents_implicit_default_lib(self):
dylibName = self.platformContext.getFullLibName("load_a")
@@ -80,18 +80,21 @@ def test_dependents_implicit_default_lib(self):
self.runCmd("target create " + lib, CURRENT_EXECUTABLE_SET)
self.has_exactly_one_image(True)
+ @skipIfTargetDoesNotSupportSharedLibraries()
def test_dependents_explicit_default_lib(self):
dylibName = self.platformContext.getFullLibName("load_a")
lib = self.getBuildArtifact(dylibName)
self.runCmd("target create -ddefault " + lib, CURRENT_EXECUTABLE_SET)
self.has_exactly_one_image(True)
+ @skipIfTargetDoesNotSupportSharedLibraries()
def test_dependents_explicit_true_lib(self):
dylibName = self.platformContext.getFullLibName("load_a")
lib = self.getBuildArtifact(dylibName)
self.runCmd("target create -dtrue " + lib, CURRENT_EXECUTABLE_SET)
self.has_exactly_one_image(True)
+ @skipIfTargetDoesNotSupportSharedLibraries()
@expectedFailureAll(
oslist=["freebsd", "linux", "netbsd"],
bugnumber="llvm.org/pr48372",
@@ -103,6 +106,7 @@ def test_dependents_explicit_false_lib(self):
self.runCmd("target create -dfalse " + lib, CURRENT_EXECUTABLE_SET)
self.has_exactly_one_image(False)
+ @skipIfTargetDoesNotSupportSharedLibraries()
def test_dependents_implicit_false_lib(self):
dylibName = self.platformContext.getFullLibName("load_a")
lib = self.getBuildArtifact(dylibName)
diff --git a/lldb/test/API/functionalities/completion/TestCompletion.py b/lldb/test/API/functionalities/completion/TestCompletion.py
index 6437362002449..8a972da9cc902 100644
--- a/lldb/test/API/functionalities/completion/TestCompletion.py
+++ b/lldb/test/API/functionalities/completion/TestCompletion.py
@@ -12,7 +12,6 @@
from lldbsuite.test import lldbutil
- at skipIfTargetDoesNotSupportSharedLibraries()
class CommandLineCompletionTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
@@ -97,6 +96,7 @@ def test_process_load(self):
)
self.complete_from_to("process load Makef", "process load Makefile")
+ @skipIfTargetDoesNotSupportSharedLibraries()
@skipUnlessPlatform(["linux"])
def test_process_unload(self):
"""Test the completion for "process unload <index>" """
@@ -917,6 +917,7 @@ def test_ambiguous_subcommand(self):
"""Test completing a subcommand of an ambiguous command"""
self.complete_from_to("settings s ta", [])
+ @skipIfTargetDoesNotSupportSharedLibraries()
def test_shlib_name(self):
self.build()
error = lldb.SBError()
diff --git a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py
index 27b9bbb26fe7b..544b1dbc06da3 100644
--- a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py
+++ b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py
@@ -11,7 +11,6 @@
import os
- at skipIfTargetDoesNotSupportSharedLibraries()
class TestDAP_setBreakpoints(lldbdap_testcase.DAPTestCaseBase):
SHARED_BUILD_TESTCASE = False
@@ -21,6 +20,7 @@ def setUp(self):
self.main_basename = "main-copy.cpp"
self.main_path = os.path.realpath(self.getBuildArtifact(self.main_basename))
+ @skipIfTargetDoesNotSupportSharedLibraries()
@skipIfWindows
def test_source_map(self):
"""
More information about the lldb-commits
mailing list