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.
This commit is contained in:
Pádraig Brady committed 2026-04-01 13:31:57 +01:00
1 parent ee5092971e
commit 178c48154d
1 file changed
+1 -1
+1 -1
View File
@@ -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