[Lldb-commits] [lldb] [lldb] Fix TestBreakpointLocations (PR #131890)

Dave Lee via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 18 12:24:32 PDT 2025


https://github.com/kastiglione updated https://github.com/llvm/llvm-project/pull/131890

>From dc99a05203deef893db75dd2f32a5a6453aaae9a Mon Sep 17 00:00:00 2001
From: Dave Lee <davelee.com at gmail.com>
Date: Tue, 18 Mar 2025 11:33:46 -0700
Subject: [PATCH 1/2] [lldb] Fix TestBreakpointLocations

---
 .../breakpoint_locations/TestBreakpointLocations.py           | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py b/lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
index e0c93e3c18581..779dc16567dfd 100644
--- a/lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
+++ b/lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
@@ -47,9 +47,9 @@ def set_breakpoint(self):
         self.expect(
             "breakpoint list -f",
             "Breakpoint locations shown correctly",
+            ordered=False,
             substrs=[
-                "1: file = 'main.c', line = %d, exact_match = 0, locations = 3"
-                % self.line
+                f"1: file = 'main.c', line = {self.line}, exact_match = 0, locations = 3"
             ],
             patterns=[
                 "where = a.out`func_inlined .+unresolved, hit count = 0",

>From 4df451ad46408b715a4f427c158aae30272b4d83 Mon Sep 17 00:00:00 2001
From: Dave Lee <davelee.com at gmail.com>
Date: Tue, 18 Mar 2025 12:23:25 -0700
Subject: [PATCH 2/2] Use non-greedy quantifiers in regex

---
 .../breakpoint_locations/TestBreakpointLocations.py           | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py b/lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
index 779dc16567dfd..6ed3c902f79e3 100644
--- a/lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
+++ b/lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
@@ -52,8 +52,8 @@ def set_breakpoint(self):
                 f"1: file = 'main.c', line = {self.line}, exact_match = 0, locations = 3"
             ],
             patterns=[
-                "where = a.out`func_inlined .+unresolved, hit count = 0",
-                r"where = a.out`main .+\[inlined\].+unresolved, hit count = 0",
+                "where = a.out`func_inlined .+?unresolved, hit count = 0",
+                r"where = a.out`main .+?\[inlined\].+?unresolved, hit count = 0",
             ],
         )
 



More information about the lldb-commits mailing list