mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 17:53:56 +00:00
ExitStatus stop signal display test: Make it Linux only
MacOS uses a different representation. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
This commit is contained in:
parent
4bb8425af6
commit
67cfc22ee2
@ -11,8 +11,13 @@ fn exitstatus_display_tests() {
|
||||
t(0x0008b, "signal: 11 (core dumped)");
|
||||
t(0x00000, "exit code: 0");
|
||||
t(0x0ff00, "exit code: 255");
|
||||
t(0x0137f, "stopped (not terminated) by signal: 19");
|
||||
t(0x0ffff, "continued (WIFCONTINUED)");
|
||||
|
||||
// On MacOS, 0x0137f is WIFCONTINUED, not WIFSTOPPED. Probably *BSD is similar.
|
||||
// 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")] 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
|
||||
|
Loading…
Reference in New Issue
Block a user