-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Use the correct stderr when testing libstd #58464
Conversation
r? @dtolnay (rust_highfive has picked a reviewer for you, use r? to override) |
0576512
to
8e9ff92
Compare
Seems okay to me but let me get a review from someone who may be more familiar with the std/realstd situation. |
Could the |
Which location do you have in mind? Next to |
I'm also going to re-export |
Something like |
8e9ff92
to
39b6766
Compare
Pushed changes. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
39b6766
to
7f66d10
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
ef0b1f9
to
78602ff
Compare
@bors: r+ |
📌 Commit 78602ffff806d8f0d218e870db10d016852bfec8 has been approved by |
☔ The latest upstream changes (presumably #58644) made this pull request unmergeable. Please resolve the merge conflicts. |
Ping from triage, @jethrogb seems like this needs some rebasing. |
Rebased |
78602ff
to
3fa7c49
Compare
@bors: r+ |
📌 Commit 3fa7c49304aab5170c9a6f77f330f00a3bbf2043 has been approved by |
☔ The latest upstream changes (presumably #58208) made this pull request unmergeable. Please resolve the merge conflicts. |
3fa7c49
to
23fefe8
Compare
Rebased |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
23fefe8
to
c0e8cf9
Compare
@bors: r+ |
📌 Commit c0e8cf9 has been approved by |
Use the correct stderr when testing libstd When compiling the unit tests for libstd, there are two copies of `std` in existence, see [lib.rs](https://github.com/rust-lang/rust/blob/919cf42/src/libstd/lib.rs#L335-L341). This means there are two copies of everything, including thread local variable definitions. Before this PR, it's possible that libtest would configure a stderr sink in one of those copies, whereas the panic logic would inspect the sink in the other copy, resulting in libtest missing the relevant panic message. This PR makes sure that when testing, the panic logic always accesses the stderr sink from “realstd”, using the same logic that libtest uses.
☀️ Test successful - checks-travis, status-appveyor |
When compiling the unit tests for libstd, there are two copies of
std
in existence, see lib.rs. This means there are two copies of everything, including thread local variable definitions. Before this PR, it's possible that libtest would configure a stderr sink in one of those copies, whereas the panic logic would inspect the sink in the other copy, resulting in libtest missing the relevant panic message. This PR makes sure that when testing, the panic logic always accesses the stderr sink from “realstd”, using the same logic that libtest uses.