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

Fix a race condition in some tests #1821

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

alexcrichton
Copy link
Member

Some tests were modeled as "do a thing piped into another thing" but the second command didn't actually take any input. That meant that writing the stdout of the previous command into the next command might sometimes fail if the second command finishes before the write finishes. This commit fixes the various affected tests with the now-added ability to run multiple separate commands in a single file. These failures were detected by inserting a sleep before writing stdin and then fixing all tests.

Closes #1820

Some tests were modeled as "do a thing piped into another thing" but the
second command didn't actually take any input. That meant that writing
the stdout of the previous command into the next command might sometimes
fail if the second command finishes before the write finishes. This
commit fixes the various affected tests with the now-added ability to
run multiple separate commands in a single file. These failures were
detected by inserting a `sleep` before writing stdin and then fixing all
tests.

Closes bytecodealliance#1820
@ereslibre
Copy link

I can confirm I have not been able to reproduce any issue reported in #1820 with this PR. Thanks!

@abrown abrown added this pull request to the merge queue Sep 25, 2024
Merged via the queue into bytecodealliance:main with commit cc4c95c Sep 25, 2024
30 checks passed
@alexcrichton alexcrichton deleted the fix-tests branch September 25, 2024 16:01
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.

cargo test sometimes fails with Broken pipe (os error 32) under aarch64
4 participants