[Lldb-commits] [lldb] r351779 - [Test] Fix up tests affected by the new LLVM header.

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 21 19:50:44 PST 2019


Author: jdevlieghere
Date: Mon Jan 21 19:50:44 2019
New Revision: 351779

URL: http://llvm.org/viewvc/llvm-project?rev=351779&view=rev
Log:
[Test] Fix up tests affected by the new LLVM header.

The new LLVM header is one line shorter than the old one, which lead to
some test failures. Ideally tests should rely on line numbers for
breakpoints or output, but that's a different discussion. Hopefully this
turns the bots green again.

Modified:
    lldb/trunk/lit/ExecControl/StopHook/Inputs/stop-hook-2.lldbinit
    lldb/trunk/lit/ExecControl/StopHook/Inputs/stop-hook-3.lldbinit
    lldb/trunk/lit/Reproducer/Inputs/GDBRemoteCapture.in
    lldb/trunk/lit/Reproducer/Inputs/GDBRemoteReplay.in
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py
    lldb/trunk/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py

Modified: lldb/trunk/lit/ExecControl/StopHook/Inputs/stop-hook-2.lldbinit
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/ExecControl/StopHook/Inputs/stop-hook-2.lldbinit?rev=351779&r1=351778&r2=351779&view=diff
==============================================================================
--- lldb/trunk/lit/ExecControl/StopHook/Inputs/stop-hook-2.lldbinit (original)
+++ lldb/trunk/lit/ExecControl/StopHook/Inputs/stop-hook-2.lldbinit Mon Jan 21 19:50:44 2019
@@ -1 +1 @@
-target stop-hook add -f stop-hook.c -l 30 -e 34 -o "expr ptr"
\ No newline at end of file
+target stop-hook add -f stop-hook.c -l 29 -e 34 -o "expr ptr"
\ No newline at end of file

Modified: lldb/trunk/lit/ExecControl/StopHook/Inputs/stop-hook-3.lldbinit
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/ExecControl/StopHook/Inputs/stop-hook-3.lldbinit?rev=351779&r1=351778&r2=351779&view=diff
==============================================================================
--- lldb/trunk/lit/ExecControl/StopHook/Inputs/stop-hook-3.lldbinit (original)
+++ lldb/trunk/lit/ExecControl/StopHook/Inputs/stop-hook-3.lldbinit Mon Jan 21 19:50:44 2019
@@ -1,3 +1,3 @@
-target stop-hook add -f stop-hook.c -l 30 -e 34
+target stop-hook add -f stop-hook.c -l 29 -e 34
 expr ptr
 DONE
\ No newline at end of file

Modified: lldb/trunk/lit/Reproducer/Inputs/GDBRemoteCapture.in
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Reproducer/Inputs/GDBRemoteCapture.in?rev=351779&r1=351778&r2=351779&view=diff
==============================================================================
--- lldb/trunk/lit/Reproducer/Inputs/GDBRemoteCapture.in (original)
+++ lldb/trunk/lit/Reproducer/Inputs/GDBRemoteCapture.in Mon Jan 21 19:50:44 2019
@@ -1,4 +1,4 @@
-breakpoint set -f simple.c -l 13
+breakpoint set -f simple.c -l 12
 run
 bt
 cont

Modified: lldb/trunk/lit/Reproducer/Inputs/GDBRemoteReplay.in
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Reproducer/Inputs/GDBRemoteReplay.in?rev=351779&r1=351778&r2=351779&view=diff
==============================================================================
--- lldb/trunk/lit/Reproducer/Inputs/GDBRemoteReplay.in (original)
+++ lldb/trunk/lit/Reproducer/Inputs/GDBRemoteReplay.in Mon Jan 21 19:50:44 2019
@@ -1,5 +1,5 @@
 reproducer status
-breakpoint set -f simple.c -l 13
+breakpoint set -f simple.c -l 12
 run
 bt
 cont

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py?rev=351779&r1=351778&r2=351779&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py Mon Jan 21 19:50:44 2019
@@ -24,12 +24,12 @@ class BreakpointByLineAndColumnTestCase(
         self.build()
         main_c = lldb.SBFileSpec("main.c")
         _, _, _, breakpoint = lldbutil.run_to_line_breakpoint(self,
-                                                              main_c, 20, 50)
+                                                              main_c, 19, 50)
         self.expect("fr v did_call", substrs='1')
         in_then = False
         for i in range(breakpoint.GetNumLocations()):
             b_loc = breakpoint.GetLocationAtIndex(i).GetAddress().GetLineEntry()
-            self.assertEqual(b_loc.GetLine(), 20)
+            self.assertEqual(b_loc.GetLine(), 19)
             in_then |= b_loc.GetColumn() == 50
         self.assertTrue(in_then)
 
@@ -38,11 +38,11 @@ class BreakpointByLineAndColumnTestCase(
     def testBreakpointByLine(self):
         self.build()
         main_c = lldb.SBFileSpec("main.c")
-        _, _, _, breakpoint = lldbutil.run_to_line_breakpoint(self, main_c, 20)
+        _, _, _, breakpoint = lldbutil.run_to_line_breakpoint(self, main_c, 19)
         self.expect("fr v did_call", substrs='0')
         in_condition = False
         for i in range(breakpoint.GetNumLocations()):
             b_loc = breakpoint.GetLocationAtIndex(i).GetAddress().GetLineEntry()
-            self.assertEqual(b_loc.GetLine(), 20)
+            self.assertEqual(b_loc.GetLine(), 19)
             in_condition |= b_loc.GetColumn() < 30
         self.assertTrue(in_condition)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py?rev=351779&r1=351778&r2=351779&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py Mon Jan 21 19:50:44 2019
@@ -44,13 +44,13 @@ class LibCxxFunctionTestCase(TestBase):
                     substrs=['f1 =  Function = foo(int, int)'])
 
         self.expect("frame variable f2",
-                    substrs=['f2 =  Lambda in File main.cpp at Line 27'])
+                    substrs=['f2 =  Lambda in File main.cpp at Line 26'])
 
         self.expect("frame variable f3",
-                    substrs=['f3 =  Lambda in File main.cpp at Line 31'])
+                    substrs=['f3 =  Lambda in File main.cpp at Line 30'])
 
         self.expect("frame variable f4",
-                    substrs=['f4 =  Function in File main.cpp at Line 17'])
+                    substrs=['f4 =  Function in File main.cpp at Line 16'])
 
         self.expect("frame variable f5",
                     substrs=['f5 =  Function = Bar::add_num(int) const'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py?rev=351779&r1=351778&r2=351779&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py Mon Jan 21 19:50:44 2019
@@ -37,7 +37,7 @@ class ObjCExceptionsTestCase(TestBase):
         target = self.dbg.GetSelectedTarget()
         thread = target.GetProcess().GetSelectedThread()
         frame = thread.GetSelectedFrame()
-        
+
         opts = lldb.SBVariablesOptions()
         opts.SetIncludeRecognizedArguments(True)
         variables = frame.GetVariables(opts)
@@ -142,8 +142,8 @@ class ObjCExceptionsTestCase(TestBase):
                 '(NSException *) exception = ',
                 'name: "ThrownException" - reason: "SomeReason"',
                 'libobjc.A.dylib`objc_exception_throw',
-                'a.out`foo', 'at main.mm:25',
-                'a.out`rethrow', 'at main.mm:36',
+                'a.out`foo', 'at main.mm:24',
+                'a.out`rethrow', 'at main.mm:35',
                 'a.out`main',
             ])
 
@@ -169,8 +169,8 @@ class ObjCExceptionsTestCase(TestBase):
         self.expect('thread exception', substrs=[
                 '(MyCustomException *) exception = ',
                 'libobjc.A.dylib`objc_exception_throw',
-                'a.out`foo', 'at main.mm:27',
-                'a.out`rethrow', 'at main.mm:36',
+                'a.out`foo', 'at main.mm:26',
+                'a.out`rethrow', 'at main.mm:35',
                 'a.out`main',
             ])
 




More information about the lldb-commits mailing list