diff options
author | Pavel Labath <labath@google.com> | 2015-11-03 18:17:21 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2015-11-03 18:17:21 +0000 |
commit | 63103c92797e8dfb9d879d71a17c7a60c0ab3d90 (patch) | |
tree | 2f394ae607e2f5ab708f215463a6ab89871f1696 /lldb/packages/Python | |
parent | 33e3ed17dad3b35f396f13da94ebe8fc30fb78d1 (diff) | |
download | bcm5719-llvm-63103c92797e8dfb9d879d71a17c7a60c0ab3d90.tar.gz bcm5719-llvm-63103c92797e8dfb9d879d71a17c7a60c0ab3d90.zip |
Fix flakyness in TestWatchLocationWithWatchSet
Two threads in the test can hit the watchpoint simultaneously. Fix the test to account for that.
llvm-svn: 251954
Diffstat (limited to 'lldb/packages/Python')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py index 8edef498664..e310ba63814 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py @@ -80,8 +80,10 @@ class WatchLocationUsingWatchpointSetTestCase(TestBase): endstr = ' = 99') # Use the '-v' option to do verbose listing of the watchpoint. - # The hit count should now be 1. + # The hit count should now be the same as the number of threads that + # stopped on a watchpoint. + threads = lldbutil.get_stopped_threads(self.process(), lldb.eStopReasonWatchpoint) self.expect("watchpoint list -v", - substrs = ['hit_count = 1']) + substrs = ['hit_count = %d' % len(threads)]) self.runCmd("thread backtrace all") |