[Lldb-commits] [lldb] 6d916f0 - [lldb][test] Use thread index IDs in TestNumThreads.test_unique_stacks (#231491)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 14 04:14:52 PDT 2026
Author: Charles Zablit
Date: 2026-10-14T12:14:46+01:00
New Revision: 6d916f02ec007edc0dac7ee77d4662bd1b9122d2
URL: https://github.com/llvm/llvm-project/commit/6d916f02ec007edc0dac7ee77d4662bd1b9122d2
DIFF: https://github.com/llvm/llvm-project/commit/6d916f02ec007edc0dac7ee77d4662bd1b9122d2.diff
LOG: [lldb][test] Use thread index IDs in TestNumThreads.test_unique_stacks (#231491)
The test assumes the thread at index `i` has index ID `i + 1`, which
doesn't hold when thread IDs aren't contiguous.
Use `GetIndexID()` instead.
Added:
Modified:
lldb/test/API/functionalities/thread/num_threads/TestNumThreads.py
Removed:
################################################################################
diff --git a/lldb/test/API/functionalities/thread/num_threads/TestNumThreads.py b/lldb/test/API/functionalities/thread/num_threads/TestNumThreads.py
index e6a8647f6b9cf6..93ca5c88fa35b1 100644
--- a/lldb/test/API/functionalities/thread/num_threads/TestNumThreads.py
+++ b/lldb/test/API/functionalities/thread/num_threads/TestNumThreads.py
@@ -124,11 +124,12 @@ def is_thread3(thread):
continue
# If we aren't stopped out the thread breakpoint try to resume.
+ index_id = thread.GetIndexID()
if thread.GetStopReason() != lldb.eStopReasonBreakpoint:
- self.runCmd("thread continue %d" % (i + 1))
+ self.runCmd("thread continue %d" % index_id)
self.assertStopReason(thread.GetStopReason(), lldb.eStopReasonBreakpoint)
- expect_threads += " #%d" % (i + 1)
+ expect_threads += " #%d" % index_id
# Construct our expected back trace string
expect_string = "10 thread(s)%s" % (expect_threads)
More information about the lldb-commits
mailing list