[all-commits] [llvm/llvm-project] 86e472: [lldb] [test] Improve stability of llgs vCont-thre...
Michał Górny via All-commits
all-commits at lists.llvm.org
Thu Jul 7 07:35:20 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 86e472317c8fd9309b76c32ca55fcdeaf63f853b
https://github.com/llvm/llvm-project/commit/86e472317c8fd9309b76c32ca55fcdeaf63f853b
Author: Michał Górny <mgorny at moritz.systems>
Date: 2022-07-07 (Thu, 07 Jul 2022)
Changed paths:
R lldb/test/API/tools/lldb-server/vCont-threads/TestGdbRemote_vContThreads.py
A lldb/test/API/tools/lldb-server/vCont-threads/TestPartialResume.py
A lldb/test/API/tools/lldb-server/vCont-threads/TestSignal.py
M lldb/test/API/tools/lldb-server/vCont-threads/main.cpp
Log Message:
-----------
[lldb] [test] Improve stability of llgs vCont-threads tests
Perform a major refactoring of vCont-threads tests in order to attempt
to improve their stability and performance.
Split test_vCont_run_subset_of_threads() into smaller test cases,
and split the whole suite into two files: one for signal-related tests,
the running-subset-of tests.
Eliminate output_match checks entirely, as they are fragile to
fragmentation of output. Instead, for the initial thread list capture
raise an explicit SIGSTOP from inside the test program, and for
the remaining output let the test program run until exit, and check all
the captured output afterwards.
For resume tests, capture the LLDB's thread view before and after
starting new threads in order to determine the IDs corresponding
to subthreads rather than relying on program output for that.
Add a mutex for output to guarantee serialization. A barrier is used
to guarantee that all threads start before SIGSTOP, and an atomic bool
is used to delay prints from happening until after SIGSTOP.
Call std::this_thread::yield() to reduce the risk of one of the threads
not being run.
This fixes the test hangs on FreeBSD. Hopefully, it will also fix all
the flakiness on buildbots.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.llvm.org/D129012
More information about the All-commits
mailing list