Repository navigation
test: ✅ Update flakey tests #1763
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6d9dd4f
:white_check_mark: Update flaky tests
evaline-ju 30bd207
:white_check_mark: Test updates
evaline-ju fe95e1d
Merge branch 'main' into fix-flakes-new
evaline-ju 547a677
:recycle: Minimize source code changes
evaline-ju 046e328
:art: Address review comments
evaline-ju a4cfe22
:white_check_mark: Check probe ending
evaline-ju File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle a hung shell that never writes to the
startedFIFO.The goroutine blocks on
startedR.Readuntil the shell writes. If the shell fails to start, the goroutine never callscancel. ThenloginPath()runs with a context that has no deadline, and the test hangs until the globalgo testtimeout. Thehungshell body also ends withread _ < "$HOLD", so the hung path depends fully on this signal.Add a safety deadline to the injected context, such as
context.WithTimeoutwith a generous bound (for example 30 seconds). The test then fails with a clear error instead of hanging. The bound stays far above any slow-runner delay.Proposed fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm keeping this one event-driven. The shell writes to
startedbefore it blocks, so the probe ends exactly when the shell is hung, which is the state under test. A shell that never starts makesloginPathreturn "" at once and fails the assertion. Only a shell that starts and never signals would hang, andgo test -timeoutreports that with the stuck goroutine.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evaline-ju Understood. I was wrong to say that a shell start failure necessarily causes a hang.
One correction: the
hungcase expects"", so an immediate empty result would pass that assertion. I understand the choice to rely ongo test -timeoutfor a missing signal and won’t insist on a separate deadline.You are interacting with an AI system.