diff options
Diffstat (limited to 'packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py')
| -rw-r--r-- | packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py | 22 | 
1 files changed, 12 insertions, 10 deletions
| diff --git a/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py b/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py index 693c0a70fd62..54463c56827a 100644 --- a/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py +++ b/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py @@ -8,8 +8,9 @@ from __future__ import print_function  import os, time  import lldb +from lldbsuite.test.decorators import *  from lldbsuite.test.lldbtest import * -import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test import lldbutil  exe_name = "AttachResume"  # Must match Makefile @@ -18,8 +19,8 @@ class AttachResumeTestCase(TestBase):      mydir = TestBase.compute_mydir(__file__)      @skipIfRemote -    @expectedFailureFreeBSD('llvm.org/pr19310') -    @expectedFailureWindows("llvm.org/pr24778") +    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr19310') +    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")      def test_attach_continue_interrupt_detach(self):          """Test attach/continue/interrupt/detach"""          self.build() @@ -37,19 +38,20 @@ class AttachResumeTestCase(TestBase):          self.setAsync(True)          listener = self.dbg.GetListener() +        process = self.dbg.GetSelectedTarget().GetProcess()          self.runCmd("c") -        lldbutil.expect_state_changes(self, listener, [lldb.eStateRunning]) +        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateRunning])          self.runCmd("process interrupt") -        lldbutil.expect_state_changes(self, listener, [lldb.eStateStopped]) +        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateStopped])          # be sure to continue/interrupt/continue (r204504)          self.runCmd("c") -        lldbutil.expect_state_changes(self, listener, [lldb.eStateRunning]) +        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateRunning])          self.runCmd("process interrupt") -        lldbutil.expect_state_changes(self, listener, [lldb.eStateStopped]) +        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateStopped])          # Second interrupt should have no effect.          self.expect("process interrupt", patterns=["Process is not running"], error=True) @@ -58,7 +60,7 @@ class AttachResumeTestCase(TestBase):          self.runCmd("br set -f main.cpp -l %u" % (line_number('main.cpp', '// Set breakpoint here')))          self.runCmd("c") -        lldbutil.expect_state_changes(self, listener, [lldb.eStateRunning, lldb.eStateStopped]) +        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateRunning, lldb.eStateStopped])          self.expect('br list', 'Breakpoint not hit',              substrs = ['hit count = 1']) @@ -66,8 +68,8 @@ class AttachResumeTestCase(TestBase):          self.expect("expr debugger_flag = false", substrs=[" = false"]);          self.runCmd("c") -        lldbutil.expect_state_changes(self, listener, [lldb.eStateRunning]) +        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateRunning])          # make sure to detach while in running state (r204759)          self.runCmd("detach") -        lldbutil.expect_state_changes(self, listener, [lldb.eStateDetached]) +        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateDetached]) | 
