mirror of
https://https.git.savannah.gnu.org/git/coreutils.git
synced 2026-01-26 15:29:07 +00:00
tests: avoid infinite loop in dd failure edge case
* tests/tee/tee.sh: If dd failed, then tee would spin writing to the fifo forever, so add a timeout protection. This was noticed with `export LD_PRELOAD=libasan.so.8` with a non ASAN build, which induced a failure in dd invocations.
This commit is contained in:
parent
f9eebda93c
commit
3e57f08e36
@ -97,7 +97,7 @@ read_fifo_delayed & pid=$!
|
||||
dd count=20 bs=100K if=/dev/zero status=none |
|
||||
{
|
||||
dd count=0 oflag=nonblock status=none
|
||||
tee || { cleanup_; touch tee.fail; }
|
||||
timeout 10 tee || { cleanup_; touch tee.fail; }
|
||||
} >fifo
|
||||
test -f tee.fail && fail=1 || cleanup_
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user