[Lldb-commits] [PATCH] D129012: [lldb] [test] Improve stability of llgs vCont-threads tests
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 7 02:21:36 PDT 2022
mgorny updated this revision to Diff 442823.
mgorny edited the summary of this revision.
mgorny added a comment.
Ok, so the previous version was fundamentally botched wrt synchronization.
Here's a new that:
1. Uses a barrier to ensure that all threads actually start before we `SIGSTOP`. Otherwise, the debugger would sometimes not get all threads on FreeBSD.
2. Uses a `std::atomic<bool>` to ensure that threads don't start printing until we're past `SIGSTOP`. Originally, I wanted to abuse `print_mutex` for that but this caused deadlocks on FreeBSD (I guess a suspended thread got in line for the mutex and blocked others from getting it).
3. Marks `can_exit_now` as a `thread_local` variable.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129012/new/
https://reviews.llvm.org/D129012
Files:
lldb/test/API/tools/lldb-server/vCont-threads/TestGdbRemote_vContThreads.py
lldb/test/API/tools/lldb-server/vCont-threads/TestPartialResume.py
lldb/test/API/tools/lldb-server/vCont-threads/TestSignal.py
lldb/test/API/tools/lldb-server/vCont-threads/main.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129012.442823.patch
Type: text/x-patch
Size: 13177 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220707/3fdfda85/attachment-0001.bin>
More information about the lldb-commits
mailing list