[Lldb-commits] [lldb] [lldb][test] Don't expect an exact thread count in a Windows stop reply (PR #237038)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 29 18:04:30 PDT 2026
https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/237038
On Windows the process can have thread pool threads besides the 5 threads the test creates, so this test was marked as an expected failure on Windows. When no extra thread exists at the stop, the test passes and the run fails as an unexpected pass: 102 out of 2000 runs on a loaded machine.
This patch checks for at least 5 threads on Windows and keeps the exact count elsewhere.
With this patch, 2000 out of 2000 runs pass.
>From 1bc4c63c9b6901a75f4fe5af8f7ef03f4022fbfd Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Thu, 29 Oct 2026 22:15:26 +0000
Subject: [PATCH] [lldb][test] Don't expect an exact thread count in a Windows
stop reply
---
.../tools/lldb-server/TestGdbRemoteThreadsInStopReply.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
index dc0c62bd375028..39fbf027f6e919 100644
--- a/lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
+++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
@@ -133,7 +133,6 @@ def test_QListThreadsInStopReply_supported(self):
self.assertIsNotNone(context)
@skipIfNetBSD
- @expectedFailureAll(oslist=["windows"]) # Extra threads present
def test_stop_reply_reports_multiple_threads(self):
self.build()
self.set_inferior_startup_launch()
@@ -143,7 +142,11 @@ def test_stop_reply_reports_multiple_threads(self):
self.ENABLE_THREADS_IN_STOP_REPLY_ENTRIES, True
)
stop_reply_threads = self.gather_stop_reply_threads(5)
- self.assertEqual(len(stop_reply_threads), 5)
+ if self.getPlatform() == "windows":
+ # The process can also have thread pool threads started by Windows.
+ self.assertGreaterEqual(len(stop_reply_threads), 5)
+ else:
+ self.assertEqual(len(stop_reply_threads), 5)
@skipIfNetBSD
def test_no_QListThreadsInStopReply_supplies_no_threads(self):
More information about the lldb-commits
mailing list