From: Jim Ingham Date: Mon, 18 Oct 2021 18:29:04 +0000 (-0700) Subject: Fix Linux error in TestBreakInLoadedDylib.py. X-Git-Tag: upstream/15.0.7~28312 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ff367dbb02d90b3ef1c2de36b60b658aeeeac7e;p=platform%2Fupstream%2Fllvm.git 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. --- 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 88fcfc4..e203511 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 @@ class TestBreakInLoadedDylib(TestBase): # 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 @@ class TestBreakInLoadedDylib(TestBase): 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")