Skip to content

Commit 641b295

Browse files
fixup! Format test and rewrite its loop stop condition
1 parent 8f0546a commit 641b295

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lldb/test/API/lang/swift/async/unwind/unwind_in_all_instructions/TestSwiftAsyncUnwindAllInstructions.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
# path as the previous one. However, it is the first time an unwind plan
2626
# created from that path is used to create another unwind plan.
2727

28+
2829
class TestCase(lldbtest.TestBase):
2930

3031
mydir = lldbtest.TestBase.compute_mydir(__file__)
@@ -116,9 +117,10 @@ def test(self):
116117
# Reach most breakpoints and ensure we can unwind in that position.
117118
while True:
118119
process.Continue()
119-
thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
120-
if thread is None:
120+
if process.GetState() == lldb.eStateExited:
121121
break
122+
thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
123+
self.assertTrue(thread.IsValid())
122124
bpid = thread.GetStopReasonDataAtIndex(0)
123125
breakpoints.remove(bpid)
124126
target.FindBreakpointByID(bpid).SetEnabled(False)

0 commit comments

Comments
 (0)