-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Regression test println!()
panic message on ErrorKind::BrokenPipe
#108980
Conversation
r? @jackh726 (rustbot has picked a reviewer for you, use r? to override) |
I'm pretty sure T-libs is more appropriate for this PR than T-compiler. @rustbot label -T-compiler r? T-libs |
Failed to set assignee to
|
r? libs |
678aa27
to
4dc5e61
Compare
@joshtriplett Friendly 7-week review ping. There is no urgency to review this; I just want to double-check that this PR has not gone under your radar :) Elevator pitch for this PR: I want to make the |
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.
LGTM, thorough test
@bors r+ rollup=always |
or: looks good to me. |
…=workingjubilee Regression test `println!()` panic message on `ErrorKind::BrokenPipe` No existing test (that I could find) failed if the `panic!()` of the `println!()` family of functions was removed, or if its message was changed: https://github.com/rust-lang/rust/blob/104f4300cfddbd956e32820ef202a732f06ec848/library/std/src/io/stdio.rs#L1007-L1009 So add such a test. This is in preparation of adding a hint about the existence of [`unix_sigpipe`](rust-lang#97889) if that is the reason for the panic. Even if we don't end up adding a hint, this is still a sensible test to have, I think. `@rustbot` label +A-testsuite +A-io +T-libs +O-unix
No existing test failed if the [`panic!()`][1] of the `println!()` family of functions was removed, or if its message was changed. So add such a test. [1] https://github.com/rust-lang/rust/blob/104f4300cfddbd956e32820ef202a732f06ec848/library/std/src/io/stdio.rs#L1007-L1009
4dc5e61
to
075a6bb
Compare
@workingjubilee I pushed a fix for the CI failure. I had to add |
Thank you for being so quick to look into that! I am going to give this a slightly closer look to verify before r+ing again. |
let mut args = env::args(); | ||
let me = args.next().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.
...cute.
|
||
// Set up a pipeline with a short-lived consumer and wait for it to finish. | ||
// This will produce the `println!()` panic message on stderr. | ||
let mut producer = Command::new(&me) |
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.
Extremely cute.
@bors r+ |
I feel confident this will pass CI this time, however, |
☀️ Test successful - checks-actions |
Finished benchmarking commit (6cacb52): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 654.841s -> 652.994s (-0.28%) |
No existing test (that I could find) failed if the
panic!()
of theprintln!()
family of functions was removed, or if its message was changed:rust/library/std/src/io/stdio.rs
Lines 1007 to 1009 in 104f430
So add such a test.
This is in preparation of adding a hint about the existence of
unix_sigpipe
if that is the reason for the panic.Even if we don't end up adding a hint, this is still a sensible test to have, I think.
@rustbot label +A-testsuite +A-io +T-libs +O-unix