From 178c48154d87e580cb421d8acc5605e6bb4aa56c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?=
Date: Wed, 1 Apr 2026 13:23:54 +0100 Subject: [PATCH] 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. --- tests/dd/misc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/dd/misc.sh b/tests/dd/misc.sh index e6559bf16..aa776b137 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