tests: dd: check that erroneous seeks are not done in output

* tests/dd/misc.sh: Add test case for of=/dev/tty.
The same occurs for /dev/stdout, but that varies
in the test hardness so is best avoided.
https://github.com/coreutils/coreutils/pull/234
This commit is contained in:
oech3 authored and Pádraig Brady committed 2026-03-31 12:09:26 +01:00
1 parent 368bfc7cb0
commit ee5092971e
1 file changed
+6
+6
View File
@@ -124,4 +124,10 @@ dd if=$tmp_in of=$tmp_out count=00x$big status=noxfer 2>err || fail=1
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
dd if=/dev/null of=/dev/tty || fail=1
fi
Exit $fail