[Lldb-commits] [PATCH] D91030: [lldb] [test] Extend watchpoint test to wait for thread to start
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 9 02:37:10 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7e2ef84fe723: [lldb] [test] Extend watchpoint test to wait for thread to start (authored by mgorny).
Herald added a project: LLDB.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91030/new/
https://reviews.llvm.org/D91030
Files:
lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
lldb/test/API/commands/watchpoints/multiple_threads/main.cpp
Index: lldb/test/API/commands/watchpoints/multiple_threads/main.cpp
===================================================================
--- lldb/test/API/commands/watchpoints/multiple_threads/main.cpp
+++ lldb/test/API/commands/watchpoints/multiple_threads/main.cpp
@@ -3,10 +3,11 @@
#include <thread>
volatile uint32_t g_val = 0;
-pseudo_barrier_t g_barrier;
+pseudo_barrier_t g_barrier, g_barrier2;
void thread_func() {
pseudo_barrier_wait(g_barrier);
+ pseudo_barrier_wait(g_barrier2);
printf("%s starting...\n", __FUNCTION__);
for (uint32_t i = 0; i < 10; ++i)
g_val = i;
@@ -15,11 +16,15 @@
int main(int argc, char const *argv[]) {
printf("Before running the thread\n");
pseudo_barrier_init(g_barrier, 2);
+ pseudo_barrier_init(g_barrier2, 2);
std::thread thread(thread_func);
- printf("After running the thread\n");
+ printf("After launching the thread\n");
pseudo_barrier_wait(g_barrier);
+ printf("After running the thread\n");
+ pseudo_barrier_wait(g_barrier2);
+
thread.join();
return 0;
Index: lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
===================================================================
--- lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
+++ lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
@@ -23,8 +23,12 @@
self.do_watchpoint_test("Before running the thread")
@expectedFailureAll(oslist=["freebsd"])
+ def test_watchpoint_after_thread_launch(self):
+ """Test that we can hit a watchpoint we set after launching another thread"""
+ self.do_watchpoint_test("After launching the thread")
+
def test_watchpoint_after_thread_start(self):
- """Test that we can hit a watchpoint we set after starting another thread"""
+ """Test that we can hit a watchpoint we set after another thread starts"""
self.do_watchpoint_test("After running the thread")
def do_watchpoint_test(self, line):
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91030.303797.patch
Type: text/x-patch
Size: 2045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201109/eab3d28f/attachment.bin>
More information about the lldb-commits
mailing list