From 3e57f08e36d210095989ee1aaa1c5758938ed072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?=
Date: Wed, 21 Jan 2026 18:57:53 +0000 Subject: [PATCH] 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. --- tests/tee/tee.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tee/tee.sh b/tests/tee/tee.sh index 1ba5d77ad..41d1b9acd 100755 --- a/tests/tee/tee.sh +++ b/tests/tee/tee.sh @@ -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_