From: Pádraig Brady Date: Wed, 1 Apr 2026 12:23:54 +0000 (+0100) Subject: tests: dd: avoid false failure with no controlling terminal X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=178c48154d87e580cb421d8acc5605e6bb4aa56c;p=thirdparty%2Fcoreutils.git tests: dd: avoid false failure with no controlling terminal * tests/dd/misc.sh: test -w /dev/tty is not a strong enough check, we need to actually open /dev/tty to ensure it's available. It's not available under setsid for example. --- diff --git a/tests/dd/misc.sh b/tests/dd/misc.sh index e6559bf168..aa776b1379 100755 --- a/tests/dd/misc.sh +++ b/tests/dd/misc.sh @@ -125,7 +125,7 @@ compare /dev/null $tmp_out || fail=1 compare err_ok err || fail=1 # Ensure of=/dev/tty is possible -if test -c /dev/tty && test -w /dev/tty; then +if test -c /dev/tty && >/dev/tty; then dd if=/dev/null of=/dev/tty || fail=1 fi