diff options
6 files changed, 50 insertions, 4 deletions
diff --git a/lldb/test/expression_command/test/TestExprs2.py b/lldb/test/expression_command/test/TestExprs2.py index 441cb109426..c3de5c0d18c 100644 --- a/lldb/test/expression_command/test/TestExprs2.py +++ b/lldb/test/expression_command/test/TestExprs2.py @@ -19,7 +19,6 @@ class ExprCommands2TestCase(TestBase): self.line = line_number('main.cpp', '// Please test many expressions while stopped at this line:') - @expectedFailurei386 def test_more_expr_commands(self): """Test some more expression commands.""" self.buildDefault() diff --git a/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py b/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py index b011ec91be4..a5d2eae7846 100644 --- a/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py +++ b/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py @@ -15,6 +15,7 @@ class AssertingInferiorTestCase(TestBase): self.buildDsym() self.inferior_asserting() + @expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly def test_inferior_asserting_dwarf(self): """Test that lldb reliably catches the inferior asserting (command).""" self.buildDwarf() @@ -32,6 +33,7 @@ class AssertingInferiorTestCase(TestBase): self.buildDwarf() self.inferior_asserting_registers() + @expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly def test_inferior_asserting_disassemble(self): """Test that lldb reliably disassembles frames after asserting (command).""" self.buildDefault() @@ -49,6 +51,7 @@ class AssertingInferiorTestCase(TestBase): self.buildDsym() self.inferior_asserting_expr() + @expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly def test_inferior_asserting_expr(self): """Test that the lldb expression interpreter can read from the inferior after asserting (command).""" self.buildDwarf() @@ -60,6 +63,7 @@ class AssertingInferiorTestCase(TestBase): self.buildDsym() self.inferior_asserting_step() + @expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly def test_inferior_asserting_step(self): """Test that lldb functions correctly after stepping through a call to assert().""" self.buildDwarf() diff --git a/lldb/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py b/lldb/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py index 81a1e0b88c7..497ce1cdb12 100644 --- a/lldb/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py +++ b/lldb/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py @@ -20,15 +20,17 @@ class WatchedVariableHitWhenInScopeTestCase(TestBase): # clearer API to express this. # - @unittest2.expectedFailure @dsym_test + @unittest2.expectedFailure def test_watched_var_should_only_hit_when_in_scope_with_dsym(self): """Test that a variable watchpoint should only hit when in scope.""" self.buildDsym(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) self.watched_var() - @unittest2.expectedFailure + @expectedFailureDarwin + @expectedFailureFreeBSD + @expectedFailurex86_64 @dwarf_test def test_watched_var_should_only_hit_when_in_scope_with_dwarf(self): """Test that a variable watchpoint should only hit when in scope.""" diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py index b45b6de8afa..1e9ba5462f6 100644 --- a/lldb/test/lldbtest.py +++ b/lldb/test/lldbtest.py @@ -535,6 +535,42 @@ def expectedFailurei386(bugnumber=None): return wrapper return expectedFailurei386_impl +def expectedFailurex86_64(bugnumber=None): + if callable(bugnumber): + @wraps(bugnumber) + def expectedFailurex86_64_easy_wrapper(*args, **kwargs): + from unittest2 import case + self = args[0] + arch = self.getArchitecture() + try: + bugnumber(*args, **kwargs) + except Exception: + if "x86_64" in arch: + raise case._ExpectedFailure(sys.exc_info(),None) + else: + raise + if "x86_64" in arch: + raise case._UnexpectedSuccess(sys.exc_info(),None) + return expectedFailurex86_64_easy_wrapper + else: + def expectedFailurex86_64_impl(func): + @wraps(func) + def wrapper(*args, **kwargs): + from unittest2 import case + self = args[0] + arch = self.getArchitecture() + try: + func(*args, **kwargs) + except Exception: + if "x86_64" in arch: + raise case._ExpectedFailure(sys.exc_info(),bugnumber) + else: + raise + if "x86_64" in arch: + raise case._UnexpectedSuccess(sys.exc_info(),bugnumber) + return wrapper + return expectedFailurex86_64_impl + def expectedFailureFreeBSD(bugnumber=None, compilers=None): if callable(bugnumber): @wraps(bugnumber) diff --git a/lldb/test/python_api/frame/TestFrames.py b/lldb/test/python_api/frame/TestFrames.py index e09bf1ba0c6..a13ecc32f06 100644 --- a/lldb/test/python_api/frame/TestFrames.py +++ b/lldb/test/python_api/frame/TestFrames.py @@ -21,6 +21,7 @@ class FrameAPITestCase(TestBase): self.buildDsym() self.do_get_arg_vals() + @expectedFailurei386 # llvm.org/pr17385: registers are unavailable above frame 0 in the inferior including pc @python_api_test @dwarf_test def test_get_arg_vals_for_call_stack_with_dwarf(self): @@ -100,7 +101,9 @@ class FrameAPITestCase(TestBase): gpr_reg_set = lldbutil.get_GPRs(frame) pc_value = gpr_reg_set.GetChildMemberWithName("pc") self.assertTrue (pc_value, "We should have a valid PC.") - self.assertTrue (int(pc_value.GetValue(), 0) == frame.GetPC(), "PC gotten as a value should equal frame's GetPC") + pc_value_str = pc_value.GetValue() + self.assertTrue (pc_value_str, "We should have a valid PC string.") + self.assertTrue (int(pc_value_str, 0) == frame.GetPC(), "PC gotten as a value should equal frame's GetPC") sp_value = gpr_reg_set.GetChildMemberWithName("sp") self.assertTrue (sp_value, "We should have a valid Stack Pointer.") self.assertTrue (int(sp_value.GetValue(), 0) == frame.GetSP(), "SP gotten as a value should equal frame's GetSP") diff --git a/lldb/test/python_api/hello_world/TestHelloWorld.py b/lldb/test/python_api/hello_world/TestHelloWorld.py index af71dab9572..bfaeaded2ac 100644 --- a/lldb/test/python_api/hello_world/TestHelloWorld.py +++ b/lldb/test/python_api/hello_world/TestHelloWorld.py @@ -49,6 +49,7 @@ class HelloWorldTestCase(TestBase): @not_remote_testsuite_ready @python_api_test @dwarf_test + @expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly def test_with_dwarf_and_attach_to_process_with_id_api(self): """Create target, spawn a process, and attach to it with process id. @@ -74,6 +75,7 @@ class HelloWorldTestCase(TestBase): @not_remote_testsuite_ready @python_api_test @dwarf_test + @expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly def test_with_dwarf_and_attach_to_process_with_name_api(self): """Create target, spawn a process, and attach to it with process name. |