This revision was not accepted when it landed; it landed in state "Needs
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG773d9c360432: [lldb] Add more asserts to TestExec (authored
by kastiglione).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148588/new/
https://reviews.llvm.org/D148588
Files:
lldb/test/API/functionalities/exec/TestExec.py
Index: lldb/test/API/functionalities/exec/TestExec.py
===================================================================
--- lldb/test/API/functionalities/exec/TestExec.py
+++ lldb/test/API/functionalities/exec/TestExec.py
@@ -102,13 +102,18 @@
# Run and we should stop at breakpoint in main after exec
process.Continue()
+ self.assertState(process.GetState(), lldb.eStateStopped)
+ for t in process.threads:
+ if t.stop_reason != lldb.eStopReasonNone:
+ self.assertStopReason(t.stop_reason,
lldb.eStopReasonBreakpoint,
+ "Unexpected stop reason")
+ if self.TraceOn():
+ print(t)
+ if t.stop_reason != lldb.eStopReasonBreakpoint:
+ self.runCmd("bt")
+
threads = lldbutil.get_threads_stopped_at_breakpoint(
process, breakpoint2)
- if self.TraceOn():
- for t in process.threads:
- print(t)
- if t.GetStopReason() != lldb.eStopReasonBreakpoint:
- self.runCmd("bt")
self.assertEqual(len(threads), 1,
"Stopped at breakpoint in exec'ed process.")
Index: lldb/test/API/functionalities/exec/TestExec.py
===================================================================
--- lldb/test/API/functionalities/exec/TestExec.py
+++ lldb/test/API/functionalities/exec/TestExec.py
@@ -102,13 +102,18 @@
# Run and we should stop at breakpoint in main after exec
process.Continue()
+ self.assertState(process.GetState(), lldb.eStateStopped)
+ for t in process.threads:
+ if t.stop_reason != lldb.eStopReasonNone:
+ self.assertStopReason(t.stop_reason, lldb.eStopReasonBreakpoint,
+ "Unexpected stop reason")
+ if self.TraceOn():
+ print(t)
+ if t.stop_reason != lldb.eStopReasonBreakpoint:
+ self.runCmd("bt")
+
threads = lldbutil.get_threads_stopped_at_breakpoint(
process, breakpoint2)
- if self.TraceOn():
- for t in process.threads:
- print(t)
- if t.GetStopReason() != lldb.eStopReasonBreakpoint:
- self.runCmd("bt")
self.assertEqual(len(threads), 1,
"Stopped at breakpoint in exec'ed process.")
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits