[Lldb-commits] [lldb] r191470 - Mark 32/64-bit tests as expected fail after root causing and referencing bugzilla.

Matt Kopec Matt.Kopec at intel.com
Thu Sep 26 16:30:59 PDT 2013


Author: mkopec
Date: Thu Sep 26 18:30:59 2013
New Revision: 191470

URL: http://llvm.org/viewvc/llvm-project?rev=191470&view=rev
Log:
Mark 32/64-bit tests as expected fail after root causing and referencing bugzilla.
Fix TestFrames.py error to check against a None pc value.

Modified:
    lldb/trunk/test/expression_command/test/TestExprs2.py
    lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py
    lldb/trunk/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
    lldb/trunk/test/lldbtest.py
    lldb/trunk/test/python_api/frame/TestFrames.py
    lldb/trunk/test/python_api/hello_world/TestHelloWorld.py

Modified: lldb/trunk/test/expression_command/test/TestExprs2.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/test/TestExprs2.py?rev=191470&r1=191469&r2=191470&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/test/TestExprs2.py (original)
+++ lldb/trunk/test/expression_command/test/TestExprs2.py Thu Sep 26 18:30:59 2013
@@ -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()

Modified: lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py?rev=191470&r1=191469&r2=191470&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py (original)
+++ lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py Thu Sep 26 18:30:59 2013
@@ -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()

Modified: lldb/trunk/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py?rev=191470&r1=191469&r2=191470&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py Thu Sep 26 18:30:59 2013
@@ -20,15 +20,17 @@ class WatchedVariableHitWhenInScopeTestC
     # 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."""

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=191470&r1=191469&r2=191470&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Thu Sep 26 18:30:59 2013
@@ -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)

Modified: lldb/trunk/test/python_api/frame/TestFrames.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/frame/TestFrames.py?rev=191470&r1=191469&r2=191470&view=diff
==============================================================================
--- lldb/trunk/test/python_api/frame/TestFrames.py (original)
+++ lldb/trunk/test/python_api/frame/TestFrames.py Thu Sep 26 18:30:59 2013
@@ -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")

Modified: lldb/trunk/test/python_api/hello_world/TestHelloWorld.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/hello_world/TestHelloWorld.py?rev=191470&r1=191469&r2=191470&view=diff
==============================================================================
--- lldb/trunk/test/python_api/hello_world/TestHelloWorld.py (original)
+++ lldb/trunk/test/python_api/hello_world/TestHelloWorld.py Thu Sep 26 18:30:59 2013
@@ -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.
 





More information about the lldb-commits mailing list