Jim Meyering wrote: > I've just tested the latest coreutils from git > on sparc-Solaris 10 and got one failure: > > + compare err_ok err > + diff -u err_ok err > --- err_ok 2009-02-05 14:04:40.340945300 -0700 > +++ err 2009-02-05 14:04:40.340267500 -0700 > @@ -1,3 +1,3 @@ > -dd: `standard input': cannot skip: Invalid argument > +dd: `standard input': cannot skip to specified offset
The attached patch should fix it. cheers, Pádraig.
>From 3c1cdfcb85502f582832a90f8c8b2bda63b2a396 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?P=C3=A1draig=20Brady?= <[email protected]> Date: Fri, 6 Feb 2009 02:01:43 +0000 Subject: [PATCH] tests: fix dd skip=greater_max_file_size test on Solaris 10 * tests/dd/skip-seek-past-file: I had previously commented that on some systems lseek(> max file size) may succeed, but left the possibility of failure in that case, so that I could determine specific systems to put in the comments for both failure modes. --- tests/dd/skip-seek-past-file | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/dd/skip-seek-past-file b/tests/dd/skip-seek-past-file index 9c055bd..6d288f9 100755 --- a/tests/dd/skip-seek-past-file +++ b/tests/dd/skip-seek-past-file @@ -75,17 +75,21 @@ echo "dd: \`standard input': cannot skip: Value too large for defined data type compare err_ok err || fail=1 # skipping > max file size should fail immediately -# Note I'm guessing there is a small chance that an lseek() could actually work -# and only a write() would fail (with EFBIG) when offset > max file size. -# So this test will both test for that, and ensure that dd -# exits immediately with an appropriate error when lseek() does error. 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 && fail=1 + dd bs=1 skip=$OFF_T_MAX count=0 status=noxfer < file 2> err && lseek_ok=1 echo "dd: \`standard input': cannot skip: Invalid argument 0+0 records in 0+0 records out" > err_ok || framework_failure - compare err_ok err || fail=1 + + if [ "$lseek_ok" ]; then + # On Solaris 10 at least, lseek(>max file size) succeeds, + # so just check for the skip warning. + compare skip_err err || fail=1 + else + # On Linux at least lseek(>max file size) fails. + compare err_ok err || fail=1 + fi fi Exit $fail -- 1.5.3.6
_______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
