Skip to content

Commit

Permalink
Fix flakyness in TestWatchLocationWithWatchSet
Browse files Browse the repository at this point in the history
Two threads in the test can hit the watchpoint simultaneously. Fix the test to account for that.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@251954 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
labath committed Nov 3, 2015
1 parent e5be1c2 commit 9e74281
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ def test_watchlocation_using_watchpoint_set(self):
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")

0 comments on commit 9e74281

Please sign in to comment.