mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Always compile the fragile wait status test cases, just run them conditionally
Co-authored-by: David Tolnay <dtolnay@gmail.com>
This commit is contained in:
parent
8e4433ab3e
commit
11ca64401a
@ -16,14 +16,15 @@ fn exitstatus_display_tests() {
|
||||
// https://github.com/rust-lang/rust/pull/82749#issuecomment-790525956
|
||||
// The purpose of this test is to test our string formatting, not our understanding of the wait
|
||||
// status magic numbers. So restrict these to Linux.
|
||||
#[cfg(target_os = "linux")]
|
||||
if cfg!(target_os = "linux") {
|
||||
t(0x0137f, "stopped (not terminated) by signal: 19");
|
||||
#[cfg(target_os = "linux")]
|
||||
t(0x0ffff, "continued (WIFCONTINUED)");
|
||||
}
|
||||
|
||||
// Testing "unrecognised wait status" is hard because the wait.h macros typically
|
||||
// assume that the value came from wait and isn't mad. With the glibc I have here
|
||||
// this works:
|
||||
#[cfg(all(target_os = "linux", target_env = "gnu"))]
|
||||
if cfg!(all(target_os = "linux", target_env = "gnu")) {
|
||||
t(0x000ff, "unrecognised wait status: 255 0xff");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user