[Lldb-commits] [lldb] 1ff367d - Fix Linux error in TestBreakInLoadedDylib.py.

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 18 11:30:39 PDT 2021


Author: Jim Ingham
Date: 2021-10-18T11:30:31-07:00
New Revision: 1ff367dbb02d90b3ef1c2de36b60b658aeeeac7e

URL: https://github.com/llvm/llvm-project/commit/1ff367dbb02d90b3ef1c2de36b60b658aeeeac7e
DIFF: https://github.com/llvm/llvm-project/commit/1ff367dbb02d90b3ef1c2de36b60b658aeeeac7e.diff

LOG: Fix Linux error in TestBreakInLoadedDylib.py.

Adding the to be loaded dylib to the extra images causes the breakpoint
to be found in the image added to the target on Linux (though not on
Darwin).  So adjust the test for this difference.

Added: 
    

Modified: 
    lldb/test/API/functionalities/breakpoint/break_in_loaded_dylib/TestBreakInLoadedDylib.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/functionalities/breakpoint/break_in_loaded_dylib/TestBreakInLoadedDylib.py b/lldb/test/API/functionalities/breakpoint/break_in_loaded_dylib/TestBreakInLoadedDylib.py
index 88fcfc4a3353c..e203511cd49c7 100644
--- a/lldb/test/API/functionalities/breakpoint/break_in_loaded_dylib/TestBreakInLoadedDylib.py
+++ b/lldb/test/API/functionalities/breakpoint/break_in_loaded_dylib/TestBreakInLoadedDylib.py
@@ -37,7 +37,7 @@ def test_break_in_dlopen_dylib_using_target(self):
         # Now set some breakpoints that won't take till the library is loaded:
         # This one is currently how lldbutils does it but test here in case that changes:
         bkpt1 = target.BreakpointCreateBySourceRegex("Break here in dylib", self.b_spec, self.lib_fullname)
-        self.assertEqual(bkpt1.GetNumLocations(), 0, "Library isn't loaded yet.")
+
         # Try the file list API as well.  Put in some bogus entries too, to make sure those
         # don't trip us up:
                                                
@@ -51,7 +51,6 @@ def test_break_in_dlopen_dylib_using_target(self):
         modules_list.Append(lldb.SBFileSpec("libI_bet_not_this_one_either.dylib"))
 
         bkpt2 = target.BreakpointCreateBySourceRegex("Break here in dylib", modules_list, files_list)
-        self.assertEqual(bkpt2.GetNumLocations(), 0, "Library isn't loaded yet")
 
         lldbutil.continue_to_breakpoint(process, bkpt1)
         self.assertEqual(bkpt1.GetHitCount(), 1, "Hit breakpoint 1")


        


More information about the lldb-commits mailing list