https://github.com/JDevlieghere created 
https://github.com/llvm/llvm-project/pull/204625

WebAssembly inferiors are built with -fno-exceptions and run on a wasip1 
runtime with no exec/fork/setpgid, no setjmp/longjmp (needs the 
exception-handling proposal), no memory-protection faults/signals, and no 
_Float16/__bf16 support. Mark the corresponding API tests as skipped on wasm so 
they report unsupported instead of failing to build or run.

>From 45e3d4cd256cfe3e02b1a0ba5a533f69112f44b6 Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <[email protected]>
Date: Thu, 18 Jun 2026 08:38:25 -0700
Subject: [PATCH] [lldb][test] Skip wasm-unsupported API tests

WebAssembly inferiors are built with -fno-exceptions and run on a
wasip1 runtime with no exec/fork/setpgid, no setjmp/longjmp (needs the
exception-handling proposal), no memory-protection faults/signals, and
no _Float16/__bf16 support. Mark the corresponding API tests as skipped
on wasm so they report unsupported instead of failing to build or run.
---
 .../breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py       | 1 +
 lldb/test/API/functionalities/exec/TestExec.py                   | 1 +
 .../functionalities/fork/resumes-child/TestForkResumesChild.py   | 1 +
 .../API/functionalities/inferior-changed/TestInferiorChanged.py  | 1 +
 .../functionalities/inferior-crashing/TestInferiorCrashing.py    | 1 +
 .../inferior-crashing/TestInferiorCrashingStep.py                | 1 +
 .../recursive-inferior/TestRecursiveInferior.py                  | 1 +
 .../recursive-inferior/TestRecursiveInferiorStep.py              | 1 +
 lldb/test/API/functionalities/longjmp/TestLongjmp.py             | 1 +
 .../API/functionalities/process_group/TestChangeProcessGroup.py  | 1 +
 lldb/test/API/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py | 1 +
 .../TestCppFloatingTypesSpecialization.py                        | 1 +
 .../API/tools/lldb-dap/exception/cpp/TestDAP_exception_cpp.py    | 1 +
 13 files changed, 13 insertions(+)

diff --git 
a/lldb/test/API/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py
 
b/lldb/test/API/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py
index eef2ee3bd8aa4..1baa2be8d0b1f 100644
--- 
a/lldb/test/API/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py
+++ 
b/lldb/test/API/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py
@@ -9,6 +9,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfWasm  # wasm inferiors are built with -fno-exceptions
 class TestCPPExceptionBreakpoint(TestBase):
     my_var = 10
 
diff --git a/lldb/test/API/functionalities/exec/TestExec.py 
b/lldb/test/API/functionalities/exec/TestExec.py
index 968b879c4cd44..2332eccf40875 100644
--- a/lldb/test/API/functionalities/exec/TestExec.py
+++ b/lldb/test/API/functionalities/exec/TestExec.py
@@ -8,6 +8,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfWasm  # no exec() on WebAssembly
 class ExecTestCase(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
 
diff --git 
a/lldb/test/API/functionalities/fork/resumes-child/TestForkResumesChild.py 
b/lldb/test/API/functionalities/fork/resumes-child/TestForkResumesChild.py
index 7fce259f9c1a6..acb46ea239b8a 100644
--- a/lldb/test/API/functionalities/fork/resumes-child/TestForkResumesChild.py
+++ b/lldb/test/API/functionalities/fork/resumes-child/TestForkResumesChild.py
@@ -9,6 +9,7 @@
 from lldbsuite.test.decorators import *
 
 
+@skipIfWasm  # no fork() on WebAssembly
 class TestForkResumesChild(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
 
diff --git 
a/lldb/test/API/functionalities/inferior-changed/TestInferiorChanged.py 
b/lldb/test/API/functionalities/inferior-changed/TestInferiorChanged.py
index c8114ab78d9e0..b1b593d32b748 100644
--- a/lldb/test/API/functionalities/inferior-changed/TestInferiorChanged.py
+++ b/lldb/test/API/functionalities/inferior-changed/TestInferiorChanged.py
@@ -9,6 +9,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfWasm  # wasm has no memory-protection faults/signals
 class ChangedInferiorTestCase(TestBase):
     SHARED_BUILD_TESTCASE = False
 
diff --git 
a/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py 
b/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py
index 348b1a618c649..09e81425c9535 100644
--- a/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py
+++ b/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py
@@ -8,6 +8,7 @@
 from lldbsuite.test.lldbtest import *
 
 
+@skipIfWasm  # wasm has no memory-protection faults/signals
 class CrashingInferiorTestCase(TestBase):
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
     @expectedFailureNetBSD
diff --git 
a/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py 
b/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py
index 15bef0153ed0c..5f7517ed833ac 100644
--- 
a/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py
+++ 
b/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py
@@ -8,6 +8,7 @@
 from lldbsuite.test.lldbtest import *
 
 
+@skipIfWasm  # wasm has no memory-protection faults/signals
 class CrashingInferiorStepTestCase(TestBase):
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
     @expectedFailureNetBSD
diff --git 
a/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
 
b/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
index 4fe3183875795..1192445102b16 100644
--- 
a/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
+++ 
b/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
@@ -8,6 +8,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfWasm  # wasm has no memory-protection faults/signals
 class CrashingRecursiveInferiorTestCase(TestBase):
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
     @expectedFailureNetBSD
diff --git 
a/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
 
b/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
index 1ad4c7902494b..9eb181c2e8827 100644
--- 
a/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
+++ 
b/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
@@ -8,6 +8,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfWasm  # wasm has no memory-protection faults/signals
 class CrashingRecursiveInferiorStepTestCase(TestBase):
     def test_recursive_inferior_crashing_step(self):
         """Test that stepping after a crash behaves correctly."""
diff --git a/lldb/test/API/functionalities/longjmp/TestLongjmp.py 
b/lldb/test/API/functionalities/longjmp/TestLongjmp.py
index 8a856f34a004f..9ac4b667b3afc 100644
--- a/lldb/test/API/functionalities/longjmp/TestLongjmp.py
+++ b/lldb/test/API/functionalities/longjmp/TestLongjmp.py
@@ -9,6 +9,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfWasm  # setjmp/longjmp on wasm requires exception-handling support
 class LongjmpTestCase(TestBase):
     @skipIfDarwin  # llvm.org/pr16769: LLDB on Mac OS X dies in function 
ReadRegisterBytes in GDBRemoteRegisterContext.cpp
     @skipIfWindows # Test is flaky on Windows
diff --git 
a/lldb/test/API/functionalities/process_group/TestChangeProcessGroup.py 
b/lldb/test/API/functionalities/process_group/TestChangeProcessGroup.py
index 00459cd6008a5..54dc4fe935285 100644
--- a/lldb/test/API/functionalities/process_group/TestChangeProcessGroup.py
+++ b/lldb/test/API/functionalities/process_group/TestChangeProcessGroup.py
@@ -8,6 +8,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfWasm  # no fork()/setpgid() on WebAssembly
 class ChangeProcessGroupTestCase(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
 
diff --git a/lldb/test/API/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py 
b/lldb/test/API/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
index e19af5617439d..22db417e862ea 100644
--- a/lldb/test/API/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
+++ b/lldb/test/API/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
@@ -9,6 +9,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfWasm  # wasm inferiors are built with -fno-exceptions
 class CPPBreakpointTestCase(TestBase):
     def setUp(self):
         # Call super's setUp().
diff --git 
a/lldb/test/API/lang/cpp/floating-types-specialization/TestCppFloatingTypesSpecialization.py
 
b/lldb/test/API/lang/cpp/floating-types-specialization/TestCppFloatingTypesSpecialization.py
index 979391f3681fb..9d7c9e072c81c 100644
--- 
a/lldb/test/API/lang/cpp/floating-types-specialization/TestCppFloatingTypesSpecialization.py
+++ 
b/lldb/test/API/lang/cpp/floating-types-specialization/TestCppFloatingTypesSpecialization.py
@@ -5,6 +5,7 @@
 from lldbsuite.test import lldbutil
 
 
+@skipIfWasm  # _Float16/__bf16 are unsupported on the wasm target
 class TestCase(TestBase):
     @skipIf(compiler="clang", compiler_version=["<", "17.0"])
     def test(self):
diff --git 
a/lldb/test/API/tools/lldb-dap/exception/cpp/TestDAP_exception_cpp.py 
b/lldb/test/API/tools/lldb-dap/exception/cpp/TestDAP_exception_cpp.py
index 4729cbef00c11..9fcc1d4a0a8e7 100644
--- a/lldb/test/API/tools/lldb-dap/exception/cpp/TestDAP_exception_cpp.py
+++ b/lldb/test/API/tools/lldb-dap/exception/cpp/TestDAP_exception_cpp.py
@@ -7,6 +7,7 @@
 import lldbdap_testcase
 
 
+@skipIfWasm  # wasm inferiors are built with -fno-exceptions
 class TestDAP_exception_cpp(lldbdap_testcase.DAPTestCaseBase):
     @skipIfWindows
     def test_stopped_description(self):

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

Reply via email to