From: Pádraig Brady Date: Thu, 30 Mar 2023 14:49:26 +0000 (+0100) Subject: tests: tee: avoid false failure due to fifo usage X-Git-Tag: v9.3~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17c31a73f13ad320746e5b7e81a5883d7295d278;p=thirdparty%2Fcoreutils.git tests: tee: avoid false failure due to fifo usage * tests/misc/tee.sh: Call cleanup_ in all cases to ensure there are no overlapping interactions on the fifo that might impact later parts of the test. This was seen to cause issue with dash on musl libc. Addresses https://bugs.gnu.org/62542 --- diff --git a/tests/misc/tee.sh b/tests/misc/tee.sh index 0b97a9ea3d..444cb688a1 100755 --- a/tests/misc/tee.sh +++ b/tests/misc/tee.sh @@ -99,7 +99,7 @@ dd count=20 bs=100K if=/dev/zero status=none | dd count=0 oflag=nonblock status=none tee || { cleanup_; touch tee.fail; } } >fifo -test -f tee.fail && fail=1 +test -f tee.fail && fail=1 || cleanup_ # Ensure tee honors --output-error modes read_fifo() { timeout 10 dd count=1 if=fifo of=/dev/null status=none & }