mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
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:
1 parent
ee5092971e
commit
178c48154d
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user