[libtest] Run the test synchronously when hitting thread limit#81546
Conversation
Contributor
|
(rust-highfive has picked a reviewer for you, use r? to override) |
ghost
commented
Jan 30, 2021
Author
|
(All done 🚀) |
Member
|
r=me with commits squashed into one |
Author
|
Squashed. |
Member
|
@bors r+ rollup=iffy |
Collaborator
|
📌 Commit 114d48c95006f1f780044c22d982c03a4d7063e0 has been approved by |
Collaborator
|
⌛ Testing commit 114d48c95006f1f780044c22d982c03a4d7063e0 with merge 7c95091268bb409d5ed86b56ed29d850da16417b... |
This comment has been minimized.
This comment has been minimized.
Collaborator
|
💔 Test failed - checks-actions |
Member
|
@bors r+ |
Collaborator
|
📌 Commit 43aed74 has been approved by |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Feb 18, 2021
… r=Mark-Simulacrum
[libtest] Run the test synchronously when hitting thread limit
libtest currently panics if it hits the thread limit. This often results in spurious test failures (<code>thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }'</code> ... `error: test failed, to rerun pass '--lib'`). This PR makes it continue to run the test synchronously if it runs out of threads.
Closes rust-lang#78165.
`@rustbot` label: A-libtest T-libs
This was referenced Feb 18, 2021
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 18, 2021
Rollup of 10 pull requests Successful merges: - rust-lang#81546 ([libtest] Run the test synchronously when hitting thread limit) - rust-lang#82066 (Ensure valid TraitRefs are created for GATs) - rust-lang#82112 (const_generics: Dont evaluate array length const when handling yet another error ) - rust-lang#82194 (In some limited cases, suggest `where` bounds for non-type params) - rust-lang#82215 (Replace if-let and while-let with `if let` and `while let`) - rust-lang#82218 (Make sure pdbs are copied along with exe and dlls when bootstrapping) - rust-lang#82236 (avoid converting types into themselves (clippy::useless_conversion)) - rust-lang#82246 (Add long explanation for E0549) - rust-lang#82248 (Optimize counting digits in line numbers during error reporting) - rust-lang#82256 (Print -Ztime-passes (and misc stats/logs) on stderr, not stdout.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
RalfJung
reviewed
Oct 22, 2021
| Err(e) if e.kind() == io::ErrorKind::WouldBlock => { | ||
| // `ErrorKind::WouldBlock` means hitting the thread limit on some | ||
| // platforms, so run the test synchronously here instead. | ||
| Arc::get_mut(&mut runtest).unwrap().get_mut().unwrap().take().unwrap()(); |
Member
There was a problem hiding this comment.
So we know at this point that runtest2 has been dropped? That is subtle.
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.
libtest currently panics if it hits the thread limit. This often results in spurious test failures (
thread 'main' panicked at 'called...Result::unwrap()on anErrvalue: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }'error: test failed, to rerun pass '--lib'). This PR makes it continue to run the test synchronously if it runs out of threads.Closes #78165.
@rustbot label: A-libtest T-libs