]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
dd: port big-offset test to macOS 12.6
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 20 Nov 2024 19:11:54 +0000 (11:11 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 20 Nov 2024 19:11:54 +0000 (11:11 -0800)
* tests/dd/skip-seek-past-file.sh: Do not assume that
seek to exactly OFF_T_MAX should fail; it works on macOS 12.6
and POSIX allows this.  Come to think of it, it should work
on Solaris too, if someone ever comes across a Solaris host
with a file system that allows such files.

tests/dd/skip-seek-past-file.sh

index 41b34e99acde5a77f86007c0401d634ef0865245..9dffc2e687a9f377fa80832f4d8aa250f88ee90f 100755 (executable)
@@ -74,14 +74,14 @@ grep "invalid number:" err >/dev/null || fail=1
 # skipping > max file size should fail immediately
 if ! truncate --size=$OFF_T_MAX in 2>/dev/null; then
   # truncate is to ensure file system doesn't actually support OFF_T_MAX files
-  dd bs=1 skip=$OFF_T_MAX count=0 status=noxfer < file 2> err \
+  dd bs=1 skip=$OFF_T_MAX count=0 status=none < file 2> err \
     && lseek_ok=yes \
     || lseek_ok=no
 
   if test $lseek_ok = yes; then
     # On Solaris 10 at least, lseek(>max file size) succeeds,
-    # so just check for the skip warning.
-    compare skip_err err || fail=1
+    # so just check that there are no diagnostics.
+    compare /dev/null err || fail=1
   else
     # On Linux kernels at least, lseek(>max file size) fails.
     # error message should be "... cannot skip: strerror(EINVAL)"