stream_send_recv_stress tests: wait for threads to finish#156365
Open
RalfJung wants to merge 1 commit intorust-lang:mainfrom
Open
stream_send_recv_stress tests: wait for threads to finish#156365RalfJung wants to merge 1 commit intorust-lang:mainfrom
RalfJung wants to merge 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
r? @nia-e rustbot has assigned @nia-e. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Member
|
@bors r+ rollup |
Contributor
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
May 10, 2026
…r=nia-e stream_send_recv_stress tests: wait for threads to finish These tests currently fail in Miri (when run with nextest) because all they do is spawn a lot of threads that will do stuff, but they don't wait for the threads to actually finish. Miri by default errors when there are background threads lingering when `main` is done (since that can indicate a leak, and since it makes it impossible to check for memory leaks). Miri gives background threads a bit of time to finish when `main` is done, but for these tests that's nowhere near enough since basically the entire test runs after `main` is done. Outside Miri, this could also still mean that the test doesn't actually run to completion, it might get abort when `main` finishes. So let's use `thread::scope` to ensure all threads are done before the test is considered done.
rust-bors Bot
pushed a commit
that referenced
this pull request
May 10, 2026
Rollup of 6 pull requests Successful merges: - #153975 (remove forever-deprecated and hidden `f64` methods) - #155679 (rustdoc: Reify emission types) - #155982 (Fix closure HIR span context mismatch) - #156323 (Handle --print=backend-has-mnemonic in cg_clif) - #156129 (compiletest: Migrate from `PassMode`/`FailMode` to `PassFailMode`) - #156365 (stream_send_recv_stress tests: wait for threads to finish)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
May 10, 2026
…r=nia-e stream_send_recv_stress tests: wait for threads to finish These tests currently fail in Miri (when run with nextest) because all they do is spawn a lot of threads that will do stuff, but they don't wait for the threads to actually finish. Miri by default errors when there are background threads lingering when `main` is done (since that can indicate a leak, and since it makes it impossible to check for memory leaks). Miri gives background threads a bit of time to finish when `main` is done, but for these tests that's nowhere near enough since basically the entire test runs after `main` is done. Outside Miri, this could also still mean that the test doesn't actually run to completion, it might get abort when `main` finishes. So let's use `thread::scope` to ensure all threads are done before the test is considered done.
rust-bors Bot
pushed a commit
that referenced
this pull request
May 10, 2026
…uwer Rollup of 6 pull requests Successful merges: - #155679 (rustdoc: Reify emission types) - #155982 (Fix closure HIR span context mismatch) - #156323 (Handle --print=backend-has-mnemonic in cg_clif) - #156129 (compiletest: Migrate from `PassMode`/`FailMode` to `PassFailMode`) - #156365 (stream_send_recv_stress tests: wait for threads to finish) - #156368 (Fix invalid unreachable in is_known_valid_scrutinee for Reborrow)
rust-bors Bot
pushed a commit
that referenced
this pull request
May 10, 2026
…uwer Rollup of 6 pull requests Successful merges: - #155679 (rustdoc: Reify emission types) - #155982 (Fix closure HIR span context mismatch) - #156323 (Handle --print=backend-has-mnemonic in cg_clif) - #156129 (compiletest: Migrate from `PassMode`/`FailMode` to `PassFailMode`) - #156365 (stream_send_recv_stress tests: wait for threads to finish) - #156368 (Fix invalid unreachable in is_known_valid_scrutinee for Reborrow)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
May 10, 2026
…r=nia-e stream_send_recv_stress tests: wait for threads to finish These tests currently fail in Miri (when run with nextest) because all they do is spawn a lot of threads that will do stuff, but they don't wait for the threads to actually finish. Miri by default errors when there are background threads lingering when `main` is done (since that can indicate a leak, and since it makes it impossible to check for memory leaks). Miri gives background threads a bit of time to finish when `main` is done, but for these tests that's nowhere near enough since basically the entire test runs after `main` is done. Outside Miri, this could also still mean that the test doesn't actually run to completion, it might get abort when `main` finishes. So let's use `thread::scope` to ensure all threads are done before the test is considered done.
rust-bors Bot
pushed a commit
that referenced
this pull request
May 10, 2026
…uwer Rollup of 10 pull requests Successful merges: - #156394 (miri subtree update) - #154972 (Implement `core::arch::return_address` and tests) - #155679 (rustdoc: Reify emission types) - #155982 (Fix closure HIR span context mismatch) - #156323 (Handle --print=backend-has-mnemonic in cg_clif) - #156387 (std fs tests: avoid matching on OS-provided error string) - #156129 (compiletest: Migrate from `PassMode`/`FailMode` to `PassFailMode`) - #156192 (core: Replace `ptr::slice_from_raw_parts` with `slice::from_raw_parts`) - #156365 (stream_send_recv_stress tests: wait for threads to finish) - #156368 (Fix invalid unreachable in is_known_valid_scrutinee for Reborrow)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
These tests currently fail in Miri (when run with nextest) because all they do is spawn a lot of threads that will do stuff, but they don't wait for the threads to actually finish. Miri by default errors when there are background threads lingering when
mainis done (since that can indicate a leak, and since it makes it impossible to check for memory leaks). Miri gives background threads a bit of time to finish whenmainis done, but for these tests that's nowhere near enough since basically the entire test runs aftermainis done.Outside Miri, this could also still mean that the test doesn't actually run to completion, it might get abort when
mainfinishes.So let's use
thread::scopeto ensure all threads are done before the test is considered done.