Skip to content
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

[lldb] Improve determinism of TestSwiftActorUnprioritisedJobs #10417

Open
wants to merge 1 commit into
base: stable/20240723
Choose a base branch
from

Conversation

kastiglione
Copy link

Change TestSwiftActorUnprioritisedJobs to prevent non-deterministic failures.

  1. Removes the sleep, replacing it with an indefinite read from stdin
  2. Makes the test not dependent on Foundation
  3. Delays the breakpoint by inserting a stalling Task.sleep

The last one needs explanation. The failures happen when the queue (used to serially
execute actor work) has not finished preparing by the time the breakpoint is hit. The
sleep delays the breakpoint from being hit, and that delay should give the queue the
time needed to be in a state needed by this test.

Change TestSwiftActorUnprioritisedJobs to prevent non-deterministic failures.

1. Removes the sleep, replacing it with an indefinite read from stdin
2. Makes the test not dependent on Foundation
3. Delays the breakpoint by inserting a stalling Task.sleep

The last one needs explanation. The failures happen when the queue (used to serially
execute actor work) has not finished preparing by the time the breakpoint is hit. The
sleep delays the breakpoint from being hit, and that delay should give the queue the
time needed to be in a state needed by this test.
@kastiglione kastiglione requested a review from a team as a code owner April 3, 2025 21:10
@kastiglione
Copy link
Author

@swift-ci test macOS

2 similar comments
@kastiglione
Copy link
Author

@swift-ci test macOS

@kastiglione
Copy link
Author

@swift-ci test macOS

@kastiglione
Copy link
Author

I'll be running CI a number of times to make sure this test passes.

@kastiglione
Copy link
Author

The failure happened in https://ci.swift.org/job/apple-llvm-project-pr-macos/7069/

back to the drawing board 🫤

@kastiglione
Copy link
Author

gonna try another run or two, to get a rough rate of pass/fail.

@kastiglione
Copy link
Author

@swift-ci test macOS

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.

1 participant