From: Pádraig Brady
Date: Sun, 3 May 2026 10:28:19 +0000 (+0100) Subject: tests: tee: ensure tee is non buffered X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=a0b4ac0fa2d3ae34fcb3930e160b1ad5b49dfd0f;p=thirdparty%2Fcoreutils.git tests: tee: ensure tee is non buffered * tests/tee/tee.sh: tests/misc/responsive.sh only confirms responsiveness to lines, so add a test for non line terminated. https://github.com/coreutils/coreutils/pull/259 --- diff --git a/tests/tee/tee.sh b/tests/tee/tee.sh index eccfdb8755..5c4de6a5e3 100755 --- a/tests/tee/tee.sh +++ b/tests/tee/tee.sh @@ -26,6 +26,12 @@ printf "1\n2\n" > exp || framework_failure_ (echo 1;sleep .1;echo 2) | tee > out || fail=1 compare exp out || fail=1 +# Ensure tee is not buffered +tee_output() { sleep $1; test -s tee_output; } +{ printf 'a'; retry_delay_ tee_output .1 7 || touch no_output; } | + tee > tee_output +test -e no_output && fail=1; + # POSIX says: "Processing of at least 13 file operands shall be supported." for n in 0 1 2 12 13; do files=$(seq $n)