[Lldb-commits] [lldb] [lldb][test] Don't hardcode line numbers in DAP_breakpointLocations (PR #201820)

via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 5 05:02:25 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Raphael Isemann (Teemperor)

<details>
<summary>Changes</summary>

Otherwise the test needs to be adjusted for every minor format change.

---
Full diff: https://github.com/llvm/llvm-project/pull/201820.diff


1 Files Affected:

- (modified) lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py (+7-7) 


``````````diff
diff --git a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py
index 37e7d2ad907f0..1fe5f8b9e2adc 100644
--- a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py
+++ b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py
@@ -76,14 +76,14 @@ def test_column_breakpoints(self):
         self.maxDiff = None
         self.assertTrue(response["success"])
         # On some systems, there is an additional breakpoint available
-        # at line 41, column 3, i.e. at the end of the loop. To make this
-        # test more portable, only check that all expected breakpoints are
-        # presented, but also accept additional breakpoints.
+        # at loop_line + 1, column 3, i.e. at the end of the loop. To make
+        # this test more portable, only check that all expected breakpoints
+        # are presented, but also accept additional breakpoints.
         expected_breakpoints = [
-            {"column": 39, "line": 41},
-            {"column": 51, "line": 41},
-            {"column": 3, "line": 43},
-            {"column": 18, "line": 43},
+            {"column": 39, "line": loop_line},
+            {"column": 51, "line": loop_line},
+            {"column": 3, "line": loop_line + 2},
+            {"column": 18, "line": loop_line + 2},
         ]
         for bp in expected_breakpoints:
             self.assertIn(bp, response["body"]["breakpoints"])

``````````

</details>


https://github.com/llvm/llvm-project/pull/201820


More information about the lldb-commits mailing list