[Lldb-commits] [lldb] r251954 - Fix flakyness in TestWatchLocationWithWatchSet
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 3 10:17:22 PST 2015
Author: labath
Date: Tue Nov 3 12:17:21 2015
New Revision: 251954
URL: http://llvm.org/viewvc/llvm-project?rev=251954&view=rev
Log:
Fix flakyness in TestWatchLocationWithWatchSet
Two threads in the test can hit the watchpoint simultaneously. Fix the test to account for that.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py?rev=251954&r1=251953&r2=251954&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py Tue Nov 3 12:17:21 2015
@@ -80,8 +80,10 @@ class WatchLocationUsingWatchpointSetTes
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")
More information about the lldb-commits
mailing list