Author: Jonas Devlieghere
Date: 2026-06-16T14:50:07-07:00
New Revision: 0b0e0b4a3c02f7217cec22776868e8e0a5ed9f3f

URL: 
https://github.com/llvm/llvm-project/commit/0b0e0b4a3c02f7217cec22776868e8e0a5ed9f3f
DIFF: 
https://github.com/llvm/llvm-project/commit/0b0e0b4a3c02f7217cec22776868e8e0a5ed9f3f.diff

LOG: [lldb][test] Skip unsupported tests on WebAssembly (#204245)

Mark more tests that rely on features unavailable on wasm32-wasip1 (or
in LLDB's Wasm support): expression evaluation (skipIfWasm), shared
libraries (skipIfTargetDoesNotSupportSharedLibraries), threads
(skipIfTargetDoesNotSupportThreads), and llvm-strip --keep-symbol, which
the Wasm object format doesn't support. Where a test also has supported,
passing cases, the decorator is applied per method.

The "expression" category is already skipped for Wasm, but that only
covers commands/expression/*, where the category is set by a
"categories" file. The tests in this PR live elsewhere and merely use
expression evaluation incidentally, so they aren't in that category and
need skipIfWasm directly.

Added: 
    

Modified: 
    lldb/test/API/commands/target/create-deps/TestTargetCreateDeps.py
    lldb/test/API/functionalities/always-run-threads/TestAlwaysRunThreadNames.py
    
lldb/test/API/functionalities/tail_call_frames/cross_dso/TestCrossDSOTailCalls.py
    lldb/test/API/lang/c/anonymous/TestAnonymous.py
    lldb/test/API/lang/c/blocks/TestBlocks.py
    lldb/test/API/lang/c/calling-conventions/TestCCallingConventions.py
    lldb/test/API/lang/c/conflicting-symbol/TestConflictingSymbol.py
    lldb/test/API/lang/c/enum_types/TestEnumTypes.py
    lldb/test/API/lang/c/fpeval/TestFPEval.py
    lldb/test/API/lang/c/function_types/TestFunctionTypes.py
    lldb/test/API/lang/c/modules/TestCModules.py
    lldb/test/API/lang/c/register_variables/test.c
    lldb/test/API/lang/c/sizeof/TestCSizeof.py
    lldb/test/API/lang/c/struct_types/TestStructTypes.py
    lldb/test/API/python_api/unnamed_symbol_lookup/TestUnnamedSymbolLookup.py
    lldb/test/API/tools/lldb-dap/module/TestDAP_module.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/commands/target/create-deps/TestTargetCreateDeps.py 
b/lldb/test/API/commands/target/create-deps/TestTargetCreateDeps.py
index 00ed78f1fdd5a..653caad1acbd7 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
 
 
+@skipIfTargetDoesNotSupportSharedLibraries()
 @skipIfWindows  # Windows deals 
diff erently with shared libs.
 class TargetDependentsTestCase(TestBase):
     NO_DEBUG_INFO_TESTCASE = True

diff  --git 
a/lldb/test/API/functionalities/always-run-threads/TestAlwaysRunThreadNames.py 
b/lldb/test/API/functionalities/always-run-threads/TestAlwaysRunThreadNames.py
index 043612d1a6f9e..278ddfe0d13d7 100644
--- 
a/lldb/test/API/functionalities/always-run-threads/TestAlwaysRunThreadNames.py
+++ 
b/lldb/test/API/functionalities/always-run-threads/TestAlwaysRunThreadNames.py
@@ -4,6 +4,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfTargetDoesNotSupportThreads()
 class AlwaysRunThreadNamesTestCase(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
 

diff  --git 
a/lldb/test/API/functionalities/tail_call_frames/cross_dso/TestCrossDSOTailCalls.py
 
b/lldb/test/API/functionalities/tail_call_frames/cross_dso/TestCrossDSOTailCalls.py
index 41cb185051829..1519b32c85780 100644
--- 
a/lldb/test/API/functionalities/tail_call_frames/cross_dso/TestCrossDSOTailCalls.py
+++ 
b/lldb/test/API/functionalities/tail_call_frames/cross_dso/TestCrossDSOTailCalls.py
@@ -7,6 +7,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfTargetDoesNotSupportSharedLibraries()
 class TestCrossDSOTailCalls(TestBase):
     @skipIf(compiler="clang", compiler_version=["<", "22.0"])
     @skipIf(dwarf_version=["<", "4"])

diff  --git a/lldb/test/API/lang/c/anonymous/TestAnonymous.py 
b/lldb/test/API/lang/c/anonymous/TestAnonymous.py
index dc2aa4fba6223..8e74a72326bdb 100644
--- a/lldb/test/API/lang/c/anonymous/TestAnonymous.py
+++ b/lldb/test/API/lang/c/anonymous/TestAnonymous.py
@@ -74,6 +74,7 @@ def test_expr_parent(self):
             substrs=["(type_y) $", "dummy = 2"],
         )
 
+    @skipIfWasm  # no expression evaluation
     def test_expr_null(self):
         self.build()
         self.common_setup(self.line2)

diff  --git a/lldb/test/API/lang/c/blocks/TestBlocks.py 
b/lldb/test/API/lang/c/blocks/TestBlocks.py
index 57a890adb27f4..00714d003c10c 100644
--- a/lldb/test/API/lang/c/blocks/TestBlocks.py
+++ b/lldb/test/API/lang/c/blocks/TestBlocks.py
@@ -7,6 +7,7 @@
 import lldbsuite.test.lldbutil as lldbutil
 
 
+@skipIfWasm  # no expression evaluation
 class BlocksTestCase(TestBase):
     lines = []
 

diff  --git 
a/lldb/test/API/lang/c/calling-conventions/TestCCallingConventions.py 
b/lldb/test/API/lang/c/calling-conventions/TestCCallingConventions.py
index a8cb87063f50a..00917c5230e20 100644
--- a/lldb/test/API/lang/c/calling-conventions/TestCCallingConventions.py
+++ b/lldb/test/API/lang/c/calling-conventions/TestCCallingConventions.py
@@ -87,6 +87,7 @@ def test_pascal(self):
             return
         self.expect_expr("func(1, 2, 3, 4)", result_type="int", 
result_value="10")
 
+    @skipIfWasm  # no expression evaluation
     def test_sysv_abi(self):
         if not self.build_and_run("sysv_abi.c"):
             return

diff  --git a/lldb/test/API/lang/c/conflicting-symbol/TestConflictingSymbol.py 
b/lldb/test/API/lang/c/conflicting-symbol/TestConflictingSymbol.py
index 130874c979480..f6e49f51649b4 100644
--- a/lldb/test/API/lang/c/conflicting-symbol/TestConflictingSymbol.py
+++ b/lldb/test/API/lang/c/conflicting-symbol/TestConflictingSymbol.py
@@ -7,6 +7,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfTargetDoesNotSupportSharedLibraries()
 class TestConflictingSymbols(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
 

diff  --git a/lldb/test/API/lang/c/enum_types/TestEnumTypes.py 
b/lldb/test/API/lang/c/enum_types/TestEnumTypes.py
index d4bbe9bcfac81..e8d29d23cdaa2 100644
--- a/lldb/test/API/lang/c/enum_types/TestEnumTypes.py
+++ b/lldb/test/API/lang/c/enum_types/TestEnumTypes.py
@@ -14,6 +14,7 @@ def setUp(self):
         # Find the line number to break inside main().
         self.line = line_number("main.c", "// Set break point at this line.")
 
+    @skipIfWasm  # no expression evaluation
     def test_command_line(self):
         """Test 'image lookup -t enum_test_days' and check for correct display 
and enum value printing."""
         self.build()

diff  --git a/lldb/test/API/lang/c/fpeval/TestFPEval.py 
b/lldb/test/API/lang/c/fpeval/TestFPEval.py
index bd57df87f6f17..1b5f4e7199a07 100644
--- a/lldb/test/API/lang/c/fpeval/TestFPEval.py
+++ b/lldb/test/API/lang/c/fpeval/TestFPEval.py
@@ -6,6 +6,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfWasm  # no expression evaluation
 class FPEvalTestCase(TestBase):
     def setUp(self):
         # Call super's setUp().

diff  --git a/lldb/test/API/lang/c/function_types/TestFunctionTypes.py 
b/lldb/test/API/lang/c/function_types/TestFunctionTypes.py
index 0504b6d4e524e..ad47504e00b88 100644
--- a/lldb/test/API/lang/c/function_types/TestFunctionTypes.py
+++ b/lldb/test/API/lang/c/function_types/TestFunctionTypes.py
@@ -7,6 +7,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfWasm  # no expression evaluation
 class FunctionTypesTestCase(TestBase):
     def setUp(self):
         # Call super's setUp().

diff  --git a/lldb/test/API/lang/c/modules/TestCModules.py 
b/lldb/test/API/lang/c/modules/TestCModules.py
index ec78eb6fb27f4..152ace6abb12f 100644
--- a/lldb/test/API/lang/c/modules/TestCModules.py
+++ b/lldb/test/API/lang/c/modules/TestCModules.py
@@ -9,6 +9,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfWasm  # no expression evaluation
 class CModulesTestCase(TestBase):
     @expectedFailureAll(
         oslist=["freebsd", "linux"],

diff  --git a/lldb/test/API/lang/c/register_variables/test.c 
b/lldb/test/API/lang/c/register_variables/test.c
index 2c69039d40a26..e2197e4479a38 100644
--- a/lldb/test/API/lang/c/register_variables/test.c
+++ b/lldb/test/API/lang/c/register_variables/test.c
@@ -1,6 +1,7 @@
 #include <stdio.h>
 
-#if defined(__arm__) || defined(__aarch64__) || defined (__mips__) || 
defined(__powerpc64__)
+#if defined(__arm__) || defined(__aarch64__) || defined(__mips__) ||           
\
+    defined(__powerpc64__) || defined(__wasm__)
 // Clang does not accept regparm attribute on these platforms.
 // Fortunately, the default calling convention passes arguments in registers
 // anyway.

diff  --git a/lldb/test/API/lang/c/sizeof/TestCSizeof.py 
b/lldb/test/API/lang/c/sizeof/TestCSizeof.py
index fcd155ea11c98..acb1872cf32b0 100644
--- a/lldb/test/API/lang/c/sizeof/TestCSizeof.py
+++ b/lldb/test/API/lang/c/sizeof/TestCSizeof.py
@@ -4,6 +4,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfWasm  # no expression evaluation
 class TestCase(TestBase):
     def test(self):
         self.build()

diff  --git a/lldb/test/API/lang/c/struct_types/TestStructTypes.py 
b/lldb/test/API/lang/c/struct_types/TestStructTypes.py
index c8308c16011e0..0dcbd0979d5a3 100644
--- a/lldb/test/API/lang/c/struct_types/TestStructTypes.py
+++ b/lldb/test/API/lang/c/struct_types/TestStructTypes.py
@@ -1,4 +1,4 @@
 from lldbsuite.test import lldbinline
 from lldbsuite.test import decorators
 
-lldbinline.MakeInlineTest(__file__, globals())
+lldbinline.MakeInlineTest(__file__, globals(), [decorators.skipIfWasm])

diff  --git 
a/lldb/test/API/python_api/unnamed_symbol_lookup/TestUnnamedSymbolLookup.py 
b/lldb/test/API/python_api/unnamed_symbol_lookup/TestUnnamedSymbolLookup.py
index 290ba7853cdc3..3810210c3a16f 100644
--- a/lldb/test/API/python_api/unnamed_symbol_lookup/TestUnnamedSymbolLookup.py
+++ b/lldb/test/API/python_api/unnamed_symbol_lookup/TestUnnamedSymbolLookup.py
@@ -10,6 +10,8 @@
 
 # --keep-symbol causes error on Windows: llvm-strip.exe: error: option is not 
supported for COFF
 @skipIfWindows
+# llvm-strip doesn't support --keep-symbol for the Wasm object format.
+@skipIfWasm
 # Unnamed symbols don't get into the .eh_frame section on ARM, so LLDB can't 
find them.
 @skipIf(archs=["arm$"])
 class TestUnnamedSymbolLookup(TestBase):

diff  --git a/lldb/test/API/tools/lldb-dap/module/TestDAP_module.py 
b/lldb/test/API/tools/lldb-dap/module/TestDAP_module.py
index 0678f1ffb6d6c..629427a4e138d 100644
--- a/lldb/test/API/tools/lldb-dap/module/TestDAP_module.py
+++ b/lldb/test/API/tools/lldb-dap/module/TestDAP_module.py
@@ -8,6 +8,7 @@
 import re
 
 
+@skipIfTargetDoesNotSupportSharedLibraries()
 class TestDAP_module(lldbdap_testcase.DAPTestCaseBase):
     def run_test(self, symbol_basename, expect_debug_info_size):
         program_basename = "a.out.stripped"


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

Reply via email to