[Lldb-commits] [lldb] [lldb][test] Don't expect an exact thread count in a Windows stop reply (PR #237038)

via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 29 18:05:07 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/237038.diff


1 Files Affected:

- (modified) lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py (+5-2) 


``````````diff
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):

``````````

</details>


https://github.com/llvm/llvm-project/pull/237038


More information about the lldb-commits mailing list