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

TestThreadStates::test_process_state expects a signal stop reason after 
"process interrupt", but the trap from the single step used to step off the 
breakpoint is reported as a trace stop. It is already skipped on Linux and 
Darwin for the same reason.

TestBuiltinDebugTrap expects to continue past __builtin_debugtrap, but on 
WebAssembly that lowers to the unreachable instruction, a fatal trap that 
cannot be resumed.

>From ebd5ea78ac8ed7d5f785b01d2b926ab1d5260b66 Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <[email protected]>
Date: Wed, 22 Jul 2026 06:51:45 -0700
Subject: [PATCH] [lldb][test] Skip stop-reason tests unsupported on
 WebAssembly

TestThreadStates::test_process_state expects a signal stop reason after
"process interrupt", but the trap from the single step used to step off
the breakpoint is reported as a trace stop. It is already skipped on
Linux and Darwin for the same reason.

TestBuiltinDebugTrap expects to continue past __builtin_debugtrap, but
on WebAssembly that lowers to the unreachable instruction, a fatal trap
that cannot be resumed.
---
 .../functionalities/builtin-debugtrap/TestBuiltinDebugTrap.py  | 3 +++
 lldb/test/API/functionalities/thread/state/TestThreadStates.py | 1 +
 2 files changed, 4 insertions(+)

diff --git 
a/lldb/test/API/functionalities/builtin-debugtrap/TestBuiltinDebugTrap.py 
b/lldb/test/API/functionalities/builtin-debugtrap/TestBuiltinDebugTrap.py
index 159325d2d488f..fc90e8a7ab588 100644
--- a/lldb/test/API/functionalities/builtin-debugtrap/TestBuiltinDebugTrap.py
+++ b/lldb/test/API/functionalities/builtin-debugtrap/TestBuiltinDebugTrap.py
@@ -11,6 +11,9 @@
 class BuiltinDebugTrapTestCase(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
 
+    # __builtin_debugtrap lowers to the WebAssembly `unreachable` instruction, 
a
+    # fatal trap that cannot be resumed as this test expects.
+    @skipIfWasm
     def test(self):
         platform_stop_reason = lldb.eStopReasonSignal
         platform = self.getPlatform()
diff --git a/lldb/test/API/functionalities/thread/state/TestThreadStates.py 
b/lldb/test/API/functionalities/thread/state/TestThreadStates.py
index 6198e0baf1c29..e46795debd502 100644
--- a/lldb/test/API/functionalities/thread/state/TestThreadStates.py
+++ b/lldb/test/API/functionalities/thread/state/TestThreadStates.py
@@ -37,6 +37,7 @@ def test_state_after_expression(self):
 
     @skipIfDarwin  # rdar://28557237
     @skipIfLinux  # llvm.org/pr15824 process interrupt stop reason is trace 
instead of signal sometimes
+    @skipIfWasm  # llvm.org/pr15824 the interrupting single-step's trap is 
reported as trace, not signal
     @expectedFailureAll(
         oslist=["windows"],
         bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly",

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

Reply via email to