summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2018-12-18 15:15:02 +0000
committerPavel Labath <pavel@labath.sk>2018-12-18 15:15:02 +0000
commitef4d4f543a659b3ea02f7686aebd3486fb6fd1b8 (patch)
treef7e8933fedd054e8855a53bc52c92d56857d72fe /lldb/packages/Python/lldbsuite/test
parent1164dab2bc605abd3240da5ded8fff66de53fa6e (diff)
downloadbcm5719-llvm-ef4d4f543a659b3ea02f7686aebd3486fb6fd1b8.tar.gz
bcm5719-llvm-ef4d4f543a659b3ea02f7686aebd3486fb6fd1b8.zip
de-flake TestThreadStates.test_process_interrupt
the "self.assertEqual(thread.GetStopReason(), lldb.eStopReasonSignal)" was occasionally failing because the stop reason would come out as "trace" this happened if we issued the interrupt just as the processed stopped due to single-stepping over the breakpoint (i.e., the it was not necessary to send any signal). Fix this by removing the breakpoint before resuming the process. This ensures the process can run unobstructed. After this, the test passed 200 consecutive runs successfully for me, even while the system was under heavy load. llvm-svn: 349491
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py b/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py
index f1005aed00b..4b1247316e1 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py
@@ -199,7 +199,7 @@ class ThreadStateTestCase(TestBase):
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
# This should create a breakpoint in the main thread.
- lldbutil.run_break_set_by_file_and_line(
+ bpno = lldbutil.run_break_set_by_file_and_line(
self, "main.cpp", self.break_1, num_expected_locations=1)
# Run the program.
@@ -213,6 +213,10 @@ class ThreadStateTestCase(TestBase):
process, lldb.eStopReasonBreakpoint)
self.assertIsNotNone(thread)
+ # Remove the breakpoint to avoid the single-step-over-bkpt dance in the
+ # "continue" below
+ self.assertTrue(target.BreakpointDelete(bpno))
+
# Continue, the inferior will go into an infinite loop waiting for
# 'g_test' to change.
self.dbg.SetAsync(True)
OpenPOWER on IntegriCloud