summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-12-02 17:45:54 +0000
committerJim Meyering <jim@meyering.net>2002-12-02 17:45:54 +0000
commita2ff596c1f818cc2f2f6854d0b9b44421147d785 (patch)
tree6678580c83a7a9356b28be22ac311606c3e7392f /tests
parent0d387e7ff2624161e4dcf98d82ff61f52900f13a (diff)
downloadcoreutils-a2ff596c1f818cc2f2f6854d0b9b44421147d785.tar.xz
Skip this test if `.' is on a non-local file system.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/du/slink11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/du/slink b/tests/du/slink
index b309dddf6..6d6f5b9fe 100755
--- a/tests/du/slink
+++ b/tests/du/slink
@@ -15,6 +15,17 @@ framework_failure=0
mkdir -p $tmp || framework_failure=1
cd $tmp || framework_failure=1
+# Determine if `.' is on a local (would non-NFS be sufficient?) file system.
+# On at least some NFS implementations, symlinks never take up space,
+df --local . > tmp
+# So if this is a non-local file system, skip the test.
+if grep '^/' tmp > /dev/null; then
+ # Ok.
+else
+ echo "$0: skipping this test, since \`.' is on a non-local file system" 1>&2
+ (exit 77); exit
+fi
+
if test $framework_failure = 1; then
echo "$0: failure in testing framework" 1>&2
(exit 1); exit 1