diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
2 files changed, 2 insertions, 7 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py index 85bdfe430df..ce30d269bbf 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py @@ -54,9 +54,6 @@ class HelloWatchLocationTestCase(TestBase): 'stop reason = breakpoint']) # Now let's set a write-type watchpoint pointed to by 'g_char_ptr'. - # The main.cpp, by design, misbehaves by not following the agreed upon - # protocol of using a mutex while accessing the global pool and by not - # incrmenting the global pool by 2. self.expect("watchpoint set expression -w write -s 1 -- g_char_ptr", WATCHPOINT_CREATED, substrs = ['Watchpoint created', 'size = 1', 'type = w']) # Get a hold of the watchpoint id just created, it is used later on to diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/main.cpp index 59b0afc6d5f..e20a6d988c8 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/main.cpp +++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/main.cpp @@ -43,15 +43,13 @@ uint32_t access_pool (bool flag = false) { static std::mutex g_access_mutex; - if (!flag) - g_access_mutex.lock(); + g_access_mutex.lock(); char old_val = *g_char_ptr; if (flag) do_bad_thing_with_location(g_char_ptr, old_val + 1); - if (!flag) - g_access_mutex.unlock(); + g_access_mutex.unlock(); return *g_char_ptr; } |