diff options
author | Pavel Labath <labath@google.com> | 2015-12-07 12:36:52 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2015-12-07 12:36:52 +0000 |
commit | 19da1f16c22488ce99dea549025d069b37a267cb (patch) | |
tree | 9b62a2edbbcac14784ea775db7c80b85370897e6 /lldb/packages/Python/lldbsuite/test | |
parent | cb8ea4bd23ba93ab4bfc38ae6677b43eca3a950e (diff) | |
download | bcm5719-llvm-19da1f16c22488ce99dea549025d069b37a267cb.tar.gz bcm5719-llvm-19da1f16c22488ce99dea549025d069b37a267cb.zip |
Recommit "Fix race during process interruption"
This is a resubmit of r254403, see that commit's message for context. This fixes an issue in the
original commit, where we would incorrectly interrupt the process if the interrupt request came
just as we were about to send the stopped event to the public.
llvm-svn: 254902
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py | 4 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py b/lldb/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py index 2f16cb49a95..a602afc47ed 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py @@ -57,7 +57,7 @@ class ExprCommandWithTimeoutsTestCase(TestBase): frame = thread.GetFrameAtIndex(0) - value = frame.EvaluateExpression ("wait_a_while (50000)", options) + value = frame.EvaluateExpression ("wait_a_while (200000)", options) self.assertTrue (value.IsValid()) self.assertFalse (value.GetError().Success()) @@ -65,7 +65,7 @@ class ExprCommandWithTimeoutsTestCase(TestBase): interp = self.dbg.GetCommandInterpreter() result = lldb.SBCommandReturnObject() - return_value = interp.HandleCommand ("expr -t 100 -u true -- wait_a_while(50000)", result) + return_value = interp.HandleCommand ("expr -t 100 -u true -- wait_a_while(200000)", result) self.assertTrue (return_value == lldb.eReturnStatusFailed) # Okay, now do it again with long enough time outs: diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py b/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py index 87b5cffac6e..693c0a70fd6 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py @@ -20,7 +20,6 @@ class AttachResumeTestCase(TestBase): @skipIfRemote @expectedFailureFreeBSD('llvm.org/pr19310') @expectedFailureWindows("llvm.org/pr24778") - @expectedFlakeyLinux('llvm.org/pr19310') def test_attach_continue_interrupt_detach(self): """Test attach/continue/interrupt/detach""" self.build() @@ -52,6 +51,9 @@ class AttachResumeTestCase(TestBase): self.runCmd("process interrupt") lldbutil.expect_state_changes(self, listener, [lldb.eStateStopped]) + # Second interrupt should have no effect. + self.expect("process interrupt", patterns=["Process is not running"], error=True) + # check that this breakpoint is auto-cleared on detach (r204752) self.runCmd("br set -f main.cpp -l %u" % (line_number('main.cpp', '// Set breakpoint here'))) |