Skip to content

Commit 4ab6819

Browse files
[lldb] Re-enable swift step-in test
With [1], stepping should work reliably even in the multithreaded case. With [2], the issue of multiple breakpoints on the same should no longer affect this test. [1]: swiftlang#9839 [2]: swiftlang#9112
1 parent caa2710 commit 4ab6819

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

lldb/test/API/lang/swift/async/stepping/step-in/TestSwiftStepInAsync.py

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class TestCase(lldbtest.TestBase):
1010

1111
@swiftTest
1212
@skipIf(oslist=['windows', 'linux'])
13-
@skipIf(bugnumber="rdar://116529018")
1413
def test(self):
1514
"""Test step-in to async functions"""
1615
self.build()
@@ -34,31 +33,9 @@ def test(self):
3433
process.Continue()
3534
elif stop_reason == lldb.eStopReasonBreakpoint:
3635
caller_before = thread().frames[0].function.GetDisplayName()
37-
line_before = thread().frames[0].line_entry.line
3836
thread().StepInto()
3937
caller_after = thread().frames[1].function.GetDisplayName()
40-
line_after = thread().frames[0].line_entry.line
41-
42-
# Breakpoints on lines with an `await` may result in more than
43-
# one breakpoint location. Specifically a location before an
44-
# async function is called, and then a location on the resume
45-
# function. In this case, running `step` on these lines will
46-
# move execution forward within the same function, _not_ step
47-
# into a new function.
48-
#
49-
# As this test is for stepping into async functions, when the
50-
# step-in keeps execution on the same or next line -- not a
51-
# different function, then it can be ignored. rdar://76116620
52-
if line_after in (line_before, line_before + 1):
53-
# When stepping stops at breakpoint, don't continue.
54-
if thread().stop_reason != lldb.eStopReasonBreakpoint:
55-
process.Continue()
56-
continue
57-
58-
# The entry function is missing this prefix dedicating resume functions.
59-
prefix = re.compile(r'^\([0-9]+\) await resume partial function for ')
60-
self.assertEqual(prefix.sub('', caller_after),
61-
prefix.sub('', caller_before))
38+
self.assertEqual(caller_after, caller_before)
6239
num_async_steps += 1
6340

6441
self.assertGreater(num_async_steps, 0)

0 commit comments

Comments
 (0)