[Lldb-commits] [lldb] aad7874 - [lldb][test][NFC] TestBreakpointSetRestart.py: split up assertion to determine which check specifically fails in CI
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 3 09:06:37 PDT 2024
Author: Michael Buch
Date: 2024-06-03T17:04:16+01:00
New Revision: aad7874000faed77836e2bbd5c72af8776636f89
URL: https://github.com/llvm/llvm-project/commit/aad7874000faed77836e2bbd5c72af8776636f89
DIFF: https://github.com/llvm/llvm-project/commit/aad7874000faed77836e2bbd5c72af8776636f89.diff
LOG: [lldb][test][NFC] TestBreakpointSetRestart.py: split up assertion to determine which check specifically fails in CI
This test consistently fails on the public macOS ASAN CI (and isn't
reproducible locally):
```
FAIL: test_breakpoint_set_restart_dwarf
(TestBreakpointSetRestart.BreakpointSetRestart)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py",
line 1756, in test_method
return attrvalue(self)
File
"/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py",
line 150, in wrapper
return func(*args, **kwargs)
File
"/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/test/API/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py",
line 36, in test_breakpoint_set_restart
self.assertTrue(bp.IsValid() and bp.GetNumLocations() == 1,
VALID_BREAKPOINT)
AssertionError: False is not true : Got a valid breakpoint
```
>From this error we're not quite sure what about the breakpoint here is
the problem.
This patch splits up the assertion to narrow down the issue.
Added:
Modified:
lldb/test/API/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py
Removed:
################################################################################
diff --git a/lldb/test/API/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py b/lldb/test/API/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py
index 3347f57f32869..dac6a8f06c221 100644
--- a/lldb/test/API/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py
+++ b/lldb/test/API/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py
@@ -33,7 +33,8 @@ def test_breakpoint_set_restart(self):
bp = target.BreakpointCreateBySourceRegex(
self.BREAKPOINT_TEXT, lldb.SBFileSpec("main.cpp")
)
- self.assertTrue(bp.IsValid() and bp.GetNumLocations() == 1, VALID_BREAKPOINT)
+ self.assertTrue(bp.IsValid(), VALID_BREAKPOINT)
+ self.assertEqual(bp.GetNumLocations(), 1, VALID_BREAKPOINT)
while self.dbg.GetListener().WaitForEvent(2, event):
if lldb.SBProcess.GetStateFromEvent(
More information about the lldb-commits
mailing list