summaryrefslogtreecommitdiff
path: root/tests/du
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-03-13 21:05:59 +0000
committerJim Meyering <jim@meyering.net>2003-03-13 21:05:59 +0000
commit689922fc0147b013a9ba00b1a93cd6bc0ec9795e (patch)
tree4e73bad335bec82c01dda1ce11dee0d58fd67631 /tests/du
parent419e2147999bba7b96a8375aab44e3ecf84fec7e (diff)
downloadcoreutils-689922fc0147b013a9ba00b1a93cd6bc0ec9795e.tar.xz
Work around what appears to be an NFS failure that
would make this test fail on some systems.
Diffstat (limited to 'tests/du')
-rwxr-xr-xtests/du/8gb14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/du/8gb b/tests/du/8gb
index bd6ffb3b8..140036996 100755
--- a/tests/du/8gb
+++ b/tests/du/8gb
@@ -30,6 +30,20 @@ if test $? != 0; then
(exit 77); exit 77
fi
+# FIXME: this should be a test of dd.
+# On some systems (at least linux-2.4.18 + NFS to disks on a Solaris system)
+# the `dd' command above mistakenly creates a file of length `0', yet
+# doesn't fail. The root of that failure is that the ftruncate call
+# returns zero but doesn't do its job. Detect this failure.
+set x `ls -gG big`
+size=$4
+if test "$size" = 0; then
+ echo "$0: cannot create a file large enough for this test;" 1>&2
+ echo "$0: possibly because this system's NFS support is buggy;" 1>&2
+ echo "$0: Consider rerunning this test on a different file system." 1>&2
+ (exit 77); exit 77
+fi
+
fail=0
# This would print `0 big' with coreutils-4.5.8.