[Lldb-commits] [lldb] r323808 - Add more diagnostics to help diagnose flaky test

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 30 11:40:09 PST 2018


Author: adrian
Date: Tue Jan 30 11:40:09 2018
New Revision: 323808

URL: http://llvm.org/viewvc/llvm-project?rev=323808&view=rev
Log:
Add more diagnostics to help diagnose flaky test

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py
    lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py?rev=323808&r1=323807&r2=323808&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py Tue Jan 30 11:40:09 2018
@@ -30,11 +30,13 @@ class BadAddressBreakpointTestCase(TestB
 
     def address_breakpoints(self):
         """Test that breakpoints set on a bad address say they are bad."""
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, "Set a breakpoint here", lldb.SBFileSpec("main.c"))
+        target, process, thread, bkpt = \
+            lldbutil.run_to_source_breakpoint(self, 
+                                              "Set a breakpoint here",
+                                              lldb.SBFileSpec("main.c"))
 
-        # Now see if we can read from 0.  If I can't do that, I don't have a good way to know
-        # what an illegal address is...
+        # Now see if we can read from 0.  If I can't do that, I don't
+        # have a good way to know what an illegal address is...
         error = lldb.SBError()
 
         ptr = process.ReadPointerFromMemory(0x0, error)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py?rev=323808&r1=323807&r2=323808&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py Tue Jan 30 11:40:09 2018
@@ -766,7 +766,7 @@ def run_to_source_breakpoint(test, bkpt_
     breakpoint = target.BreakpointCreateBySourceRegex(
             bkpt_pattern, source_spec)
     test.assertTrue(breakpoint.GetNumLocations() > 0, 
-                    'No locations found for source breakpoint: "%s"'%(bkpt_pattern))
+                    'No locations found for source breakpoint: "%s", file: "%s", dir: "%s"'%(bkpt_pattern, source_spec.GetFilename(), source_spec.GetDirectory()))
 
     # Launch the process, and do not stop at the entry point.
     if not launch_info:




More information about the lldb-commits mailing list