From ee2d2bfbcd90158abac4f8f20cd4883269392176 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 30 Jan 2018 19:40:09 +0000 Subject: Add more diagnostics to help diagnose flaky test llvm-svn: 323808 --- .../address_breakpoints/TestBadAddressBreakpoints.py | 10 ++++++---- lldb/packages/Python/lldbsuite/test/lldbutil.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test') diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py index f3b9a637360..5014c1cd4a2 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py @@ -30,11 +30,13 @@ class BadAddressBreakpointTestCase(TestBase): 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) diff --git a/lldb/packages/Python/lldbsuite/test/lldbutil.py b/lldb/packages/Python/lldbsuite/test/lldbutil.py index 00b65ab8a55..45f23b565dd 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbutil.py +++ b/lldb/packages/Python/lldbsuite/test/lldbutil.py @@ -766,7 +766,7 @@ def run_to_source_breakpoint(test, bkpt_pattern, source_spec, 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: -- cgit v1.2.3