From: oech3 <79379754+oech3@users.noreply.github.com> Date: Tue, 31 Mar 2026 06:57:58 +0000 (+0900) Subject: tests: dd: check that erroneous seeks are not done in output X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee5092971ec8ce233f656445b81bde75e1fa9a3d;p=thirdparty%2Fcoreutils.git 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 --- diff --git a/tests/dd/misc.sh b/tests/dd/misc.sh index ad13d22086..e6559bf168 100755 --- a/tests/dd/misc.sh +++ b/tests/dd/misc.sh @@ -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