Skip to content

[lldb] Fix regex in TestSwiftTaskSyntheticProvider #10307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kastiglione
Copy link

No description provided.

@kastiglione kastiglione requested a review from a team as a code owner March 20, 2025 20:01
@kastiglione
Copy link
Author

@swift-ci test

@kastiglione
Copy link
Author

@swift-ci test

@@ -21,7 +21,7 @@ def test_top_level_task(self):
patterns=[
textwrap.dedent(
r"""
\(Task<\(\), Error>\) task = id:(\d+) flags:(?:running\|)?enqueued\|future \{
\(Task<\(\), Error>\) task = id:(\d+) flags:(?:running\|)?(?:enqueued\|)?future \{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I'm still confused by this regex.
Why is the | part of the group?
What if enqueued is the last attribute?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. the flags are in a fixed order, enqueued will be after running (by design)
  2. the flags are | separated, and if enqueued is present, then it will be followed by the |

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan to revisit these tests. This change (llvm#131475) is one of the pieces I'm working on in spare time be able to structure these tests with more easy to read regex.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah.. because future is always there. Makes sense.

@kastiglione
Copy link
Author

@swift-ci test windows

1 similar comment
@kastiglione
Copy link
Author

@swift-ci test windows

@kastiglione kastiglione merged commit 2ec15cf into stable/20240723 Mar 21, 2025
3 checks passed
@kastiglione kastiglione deleted the dl/lldb-Fix-regex-in-TestSwiftTaskSyntheticProvider branch March 21, 2025 15:01
kastiglione added a commit that referenced this pull request Mar 24, 2025
kastiglione added a commit that referenced this pull request Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants