-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Capture output from threads spawned in tests #75172
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
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.
Looks good!
Er, CI failed though: --- [ui] ui/panic-while-printing.rs stdout ----
error: test compilation failed although it shouldn't!
status: exit code: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/panic-while-printing.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panic-while-printing/a" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panic-while-printing/auxiliary"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
error[E0277]: the trait bound `std::vec::Vec<_>: std::io::LocalOutput` is not satisfied
--> /checkout/src/test/ui/panic-while-printing.rs:19:20
|
LL | set_panic(Some(Box::new(Vec::new())));
| ^^^^^^^^^^^^^^^^^^^^ the trait `std::io::LocalOutput` is not implemented for `std::vec::Vec<_>`
|
= note: required for the cast to the object type `dyn std::io::LocalOutput`
--- [ui] ui/threads-sendsync/task-stderr.rs stdout ----
error: test compilation failed although it shouldn't!
status: exit code: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/threads-sendsync/task-stderr.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/threads-sendsync/task-stderr/a" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/threads-sendsync/task-stderr/auxiliary"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
error[E0277]: the trait bound `Sink: std::io::LocalOutput` is not satisfied
--> /checkout/src/test/ui/threads-sendsync/task-stderr.rs:24:28
|
LL | io::set_panic(Some(Box::new(sink)));
| ^^^^^^^^^^^^^^ the trait `std::io::LocalOutput` is not implemented for `Sink`
|
= note: required for the cast to the object type `dyn std::io::LocalOutput` |
d266a8c
to
4cd8de6
Compare
Tests fixed! |
error[E0277]: the trait bound `dyn realstd::io::LocalOutput: io::Write` is not satisfied
--> library/std/src/panicking.rs:216:15
|
216 | write(&mut local);
| ^^^^^^^^^^ the trait `io::Write` is not implemented for `dyn realstd::io::LocalOutput`
|
= note: required because of the requirements on the impl of `io::Write` for `realstd::boxed::Box<dyn realstd::io::LocalOutput>`
= note: required for the cast to the object type `dyn io::Write` |
Yep, working on this now. Sorry for the noise. |
4cd8de6
to
0d6fb9b
Compare
0d6fb9b
to
38b920d
Compare
CI passed. |
@bors r+ |
📌 Commit 38b920d has been approved by |
Capture output from threads spawned in tests Fixes rust-lang#42474. r? @dtolnay since you expressed interest in this, but feel free to redirect if you aren't the right person anymore.
Capture output from threads spawned in tests Fixes rust-lang#42474. r? @dtolnay since you expressed interest in this, but feel free to redirect if you aren't the right person anymore.
@bors rollup=iffy I'm trying to track down the cause of #75684 (comment) and while I don't think this can cause it (nor can I reproduce locally), nothing else in that change seems related. |
⌛ Testing commit 38b920d with merge 7b86e1eeec51cc8ce5e8edf130f2df638605da97... |
@bors retry |
⌛ Testing commit 38b920d with merge 049ea2e42ed0a109e27a83fa7636690d19e3bfc8... |
@bors retry |
⌛ Testing commit 38b920d with merge ea7c21aedf7c1bbab87df466b39bb79968f6804f... |
💔 Test failed - checks-actions |
Same failure. Seems to only happen on the |
☔ The latest upstream changes (presumably #74862) made this pull request unmergeable. Please resolve the merge conflicts. |
Triage: There's merge conflicts now. |
This PR partially breaks the effect of rust/library/std/src/io/stdio.rs Lines 33 to 37 in 981346f
|
Closing in favor of #78227 which includes a rebase of this commit. |
…, r=m-ou-se Capture output from threads spawned in tests This is revival of rust-lang#75172. Original text: > Fixes rust-lang#42474. > > r? `@dtolnay` since you expressed interest in this, but feel free to redirect if you aren't the right person anymore. --- Closes rust-lang#75172.
…, r=m-ou-se Capture output from threads spawned in tests This is revival of rust-lang#75172. Original text: > Fixes rust-lang#42474. > > r? `@dtolnay` since you expressed interest in this, but feel free to redirect if you aren't the right person anymore. --- Closes rust-lang#75172.
…, r=m-ou-se Capture output from threads spawned in tests This is revival of rust-lang#75172. Original text: > Fixes rust-lang#42474. > > r? `@dtolnay` since you expressed interest in this, but feel free to redirect if you aren't the right person anymore. --- Closes rust-lang#75172.
…, r=m-ou-se Capture output from threads spawned in tests This is revival of rust-lang#75172. Original text: > Fixes rust-lang#42474. > > r? `@dtolnay` since you expressed interest in this, but feel free to redirect if you aren't the right person anymore. --- Closes rust-lang#75172.
…r=m-ou-se Capture output from threads spawned in tests This is revival of rust-lang#75172. Original text: > Fixes rust-lang#42474. > > r? `@dtolnay` since you expressed interest in this, but feel free to redirect if you aren't the right person anymore. --- Closes rust-lang#75172.
Fixes #42474.
r? @dtolnay since you expressed interest in this, but feel free to redirect if you aren't the right person anymore.