2023-03-30 07:58:50 -05:00
|
|
|
include ../tools.mk
|
2023-03-28 04:13:42 -05:00
|
|
|
|
|
|
|
# only-linux
|
2023-07-15 10:48:09 -05:00
|
|
|
# ignore-cross-compile
|
2023-03-28 04:13:42 -05:00
|
|
|
|
2023-07-15 10:48:09 -05:00
|
|
|
# Test compiler behavior in case environment specifies wrong jobserver.
|
2023-05-19 15:03:35 -05:00
|
|
|
# Note that by default, the compiler uses file descriptors 0 (stdin), 1 (stdout), 2 (stderr),
|
|
|
|
# but also 3 and 4 for either end of the ctrl-c signal handler self-pipe.
|
2023-03-28 04:13:42 -05:00
|
|
|
|
|
|
|
all:
|
2023-05-19 15:03:35 -05:00
|
|
|
bash -c 'echo "fn main() {}" | MAKEFLAGS="--jobserver-auth=5,5" $(RUSTC)' 2>&1 | diff cannot_open_fd.stderr -
|
2023-07-15 10:48:09 -05:00
|
|
|
bash -c 'echo "fn main() {}" | MAKEFLAGS="--jobserver-auth=3,3" $(RUSTC) - 3</dev/null' 2>&1 | diff not_a_pipe.stderr -
|
|
|
|
|
|
|
|
# This test randomly fails, see https://github.com/rust-lang/rust/issues/110321
|
|
|
|
disabled:
|
|
|
|
bash -c 'echo "fn main() {}" | MAKEFLAGS="--jobserver-auth=3,3" $(RUSTC) - 3< <(cat /dev/null)' 2>&1 | diff poisoned_pipe.stderr -
|
|
|
|
|