summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2009-02-26 00:01:06 +0000
committerPádraig Brady <P@draigBrady.com>2009-02-26 09:50:30 +0000
commit3f1579c470bdee6469d9fa6e2465529ab95360bf (patch)
treea8cebc5b2291ff6a57858f3e6e65e47bdf49dad2 /tests
parentbba5a47651a4a09f745f7f996c3b22fc410fabef (diff)
downloadcoreutils-3f1579c470bdee6469d9fa6e2465529ab95360bf.tar.xz
tests: Remove system specific error strings
* tests/dd/skip-seek-past-file: Just check for the non system specific part of the error strings. This was causing an erroneous failure on NetBSD 1.6 at least.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/dd/skip-seek-past-file11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/dd/skip-seek-past-file b/tests/dd/skip-seek-past-file
index fd8bdc6a1..33abb69cd 100755
--- a/tests/dd/skip-seek-past-file
+++ b/tests/dd/skip-seek-past-file
@@ -69,10 +69,8 @@ compare err_ok err || fail=1
# skipping > OFF_T_MAX should fail immediately
dd bs=1 skip=$OFF_T_OFLOW count=0 status=noxfer < file 2> err && fail=1
-echo "dd: \`standard input': cannot skip: Value too large for defined data type
-0+0 records in
-0+0 records out" > err_ok || framework_failure
-compare err_ok err || fail=1
+# error message should be "... cannot skip: strerror(EOVERFLOW)"
+grep "cannot skip:" err >/dev/null || fail=1
# skipping > max file size should fail immediately
if ! truncate --size=$OFF_T_MAX in 2>/dev/null; then
@@ -80,8 +78,6 @@ if ! truncate --size=$OFF_T_MAX in 2>/dev/null; then
dd bs=1 skip=$OFF_T_MAX count=0 status=noxfer < file 2> err \
&& lseek_ok=yes \
|| lseek_ok=no
- printf '%s\n' "dd: \`standard input': cannot skip: Invalid argument" \
- '0+0 records in' '0+0 records out' > err_ok || framework_failure
if test $lseek_ok = yes; then
# On Solaris 10 at least, lseek(>max file size) succeeds,
@@ -89,7 +85,8 @@ if ! truncate --size=$OFF_T_MAX in 2>/dev/null; then
compare skip_err err || fail=1
else
# On Linux at least lseek(>max file size) fails.
- compare err_ok err || fail=1
+ # error message should be "... cannot skip: strerror(EINVAL)"
+ grep "cannot skip:" err >/dev/null || fail=1
fi
fi