TestRecursiveInferior fixed on Linux
Summary: Updated test to reflect that Linux and Darwin behave the same now. Removed @expectedFailureLinux for passing tests. Test Plan: run tests Reviewers: clayborg, sivachandra Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8678 llvm-svn: 233989
This commit is contained in:
parent
2974e27682
commit
20952ccf90
|
@ -67,7 +67,6 @@ class CrashingRecursiveInferiorTestCase(TestBase):
|
||||||
self.recursive_inferior_crashing_step_after_break()
|
self.recursive_inferior_crashing_step_after_break()
|
||||||
|
|
||||||
@skipIfFreeBSD # llvm.org/pr16684
|
@skipIfFreeBSD # llvm.org/pr16684
|
||||||
@expectedFailureLinux('llvm.org/pr16684')
|
|
||||||
def test_recursive_inferior_crashing_step_after_break_dwarf(self):
|
def test_recursive_inferior_crashing_step_after_break_dwarf(self):
|
||||||
"""Test that lldb functions correctly after stepping through a crash."""
|
"""Test that lldb functions correctly after stepping through a crash."""
|
||||||
self.buildDwarf()
|
self.buildDwarf()
|
||||||
|
@ -80,7 +79,6 @@ class CrashingRecursiveInferiorTestCase(TestBase):
|
||||||
self.recursive_inferior_crashing_expr_step_expr()
|
self.recursive_inferior_crashing_expr_step_expr()
|
||||||
|
|
||||||
@expectedFailureFreeBSD('llvm.org/pr15989') # Couldn't allocate space for the stack frame
|
@expectedFailureFreeBSD('llvm.org/pr15989') # Couldn't allocate space for the stack frame
|
||||||
@expectedFailureLinux('llvm.org/pr15989') # Couldn't allocate space for the stack frame
|
|
||||||
def test_recursive_inferior_crashing_expr_step_and_expr_dwarf(self):
|
def test_recursive_inferior_crashing_expr_step_and_expr_dwarf(self):
|
||||||
"""Test that lldb expressions work before and after stepping after a crash."""
|
"""Test that lldb expressions work before and after stepping after a crash."""
|
||||||
self.buildDwarf()
|
self.buildDwarf()
|
||||||
|
@ -207,14 +205,16 @@ class CrashingRecursiveInferiorTestCase(TestBase):
|
||||||
self.check_stop_reason()
|
self.check_stop_reason()
|
||||||
|
|
||||||
expected_state = 'exited' # Provide the exit code.
|
expected_state = 'exited' # Provide the exit code.
|
||||||
if self.platformIsDarwin():
|
if self.platformIsDarwin() or self.platformIsLinux():
|
||||||
expected_state = 'stopped' # TODO: Determine why 'next' and 'continue' have no effect after a crash.
|
expected_state = 'stopped' # TODO: Determine why 'next' and 'continue' have no effect after a crash.
|
||||||
|
|
||||||
self.expect("next",
|
self.expect("next",
|
||||||
substrs = ['Process', expected_state])
|
substrs = ['Process', expected_state])
|
||||||
|
|
||||||
if not self.platformIsDarwin(): # if stopped, we will have a process around
|
if expected_state == 'exited':
|
||||||
self.expect("thread list", error=True,substrs = ['Process must be launched'])
|
self.expect("thread list", error=True,substrs = ['Process must be launched'])
|
||||||
|
else:
|
||||||
|
self.check_stop_reason()
|
||||||
|
|
||||||
def recursive_inferior_crashing_expr_step_expr(self):
|
def recursive_inferior_crashing_expr_step_expr(self):
|
||||||
"""Test that lldb expressions work before and after stepping after a crash."""
|
"""Test that lldb expressions work before and after stepping after a crash."""
|
||||||
|
|
|
@ -1395,6 +1395,11 @@ class Base(unittest2.TestCase):
|
||||||
platform_name = self.getPlatform()
|
platform_name = self.getPlatform()
|
||||||
return platform_name in getDarwinOSTriples()
|
return platform_name in getDarwinOSTriples()
|
||||||
|
|
||||||
|
def platformIsLinux(self):
|
||||||
|
"""Returns true if the OS triple for the selected platform is any valid apple OS"""
|
||||||
|
platform_name = self.getPlatform()
|
||||||
|
return platform_name == "linux"
|
||||||
|
|
||||||
def getPlatform(self):
|
def getPlatform(self):
|
||||||
"""Returns the platform the test suite is running on."""
|
"""Returns the platform the test suite is running on."""
|
||||||
platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]
|
platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]
|
||||||
|
|
Loading…
Reference in New Issue