summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2023-03-30 15:49:26 +0100
committerPádraig Brady <P@draigBrady.com>2023-03-31 11:58:53 +0100
commit17c31a73f13ad320746e5b7e81a5883d7295d278 (patch)
treedddfa2b1f399bfc9b6670da9ff609d5f31ccfbe0
parent5e170ff0b842df5c40fac9095e7c72ddc1517e2a (diff)
downloadcoreutils-17c31a73f13ad320746e5b7e81a5883d7295d278.tar.gz
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
-rwxr-xr-xtests/misc/tee.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/misc/tee.sh b/tests/misc/tee.sh
index 0b97a9ea3..444cb688a 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 & }