From 63103c92797e8dfb9d879d71a17c7a60c0ab3d90 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 3 Nov 2015 18:17:21 +0000 Subject: Fix flakyness in TestWatchLocationWithWatchSet Two threads in the test can hit the watchpoint simultaneously. Fix the test to account for that. llvm-svn: 251954 --- .../watchpoint_set_command/TestWatchLocationWithWatchSet.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/functionalities') 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") -- cgit v1.2.3