Author: Pavel Labath Date: 2022-02-15T08:58:39+01:00 New Revision: f8d42c55ec6e9c8778533d0b45bfa39753d0e63d
URL: https://github.com/llvm/llvm-project/commit/f8d42c55ec6e9c8778533d0b45bfa39753d0e63d DIFF: https://github.com/llvm/llvm-project/commit/f8d42c55ec6e9c8778533d0b45bfa39753d0e63d.diff LOG: [lldb] Fix thread syncrhonization TestThreadBacktraceRepeat lldb reports (and lldbutil.continue_to_breakpoint returns) a stop reason even for suspended threads. Fix the test to expect that. This was making the test flaky, as most of the time, the two threads stop simultaneously, and the synchronization code is not executed. Added: Modified: lldb/test/API/commands/thread/backtrace/TestThreadBacktraceRepeat.py Removed: ################################################################################ diff --git a/lldb/test/API/commands/thread/backtrace/TestThreadBacktraceRepeat.py b/lldb/test/API/commands/thread/backtrace/TestThreadBacktraceRepeat.py index 998ade04985ab..da5ea215bc236 100644 --- a/lldb/test/API/commands/thread/backtrace/TestThreadBacktraceRepeat.py +++ b/lldb/test/API/commands/thread/backtrace/TestThreadBacktraceRepeat.py @@ -119,10 +119,9 @@ def test_thread_backtrace_two_threads(self): if len(breakpoint_threads) == 1: success = thread.Suspend() self.assertTrue(success, "Couldn't suspend a thread") - bkpt_threads = lldbutil.continue_to_breakpoint(self.process, + breakpoint_threads = lldbutil.continue_to_breakpoint(self.process, bkpt) - self.assertEqual(len(bkpt_threads), 1, "Second thread stopped") - breakpoint_threads.append(bkpt_threads[0]) + self.assertEqual(len(breakpoint_threads), 2, "Second thread stopped") # Figure out which thread is which: thread_id_1 = breakpoint_threads[0].idx _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits