-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[libtest] Run the test synchronously when hitting thread limit #81546
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
(All done 🚀) |
r=me with commits squashed into one |
Squashed. |
@bors r+ rollup=iffy |
📌 Commit 114d48c95006f1f780044c22d982c03a4d7063e0 has been approved by |
⌛ Testing commit 114d48c95006f1f780044c22d982c03a4d7063e0 with merge 7c95091268bb409d5ed86b56ed29d850da16417b... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
@bors r+ |
📌 Commit 43aed74 has been approved by |
… 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
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
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()(); |
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.
So we know at this point that runtest2
has been dropped? That is subtle.
libtest currently panics if it hits the thread limit. This often results in spurious test failures (
thread 'main' panicked at 'called
...Result::unwrap()
on anErr
value: 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