summaryrefslogtreecommitdiff
path: root/tests/du
diff options
context:
space:
mode:
Diffstat (limited to 'tests/du')
-rwxr-xr-xtests/du/basic2
-rwxr-xr-xtests/du/slink17
2 files changed, 4 insertions, 15 deletions
diff --git a/tests/du/basic b/tests/du/basic
index 8b728537b..6d3eeb1e7 100755
--- a/tests/du/basic
+++ b/tests/du/basic
@@ -63,7 +63,7 @@ compare out exp || fail=1
# Perform this test only if "." is on a local file system.
# Otherwise, it would fail e.g., on an NFS-mounted Solaris ZFS file system.
-if df --local . >/dev/null 2>&1; then
+if is_local_dir_ .; then
rm -f out exp
du --block-size=$B -a d | sort -r -k2,2 > out || fail=1
echo === >> out
diff --git a/tests/du/slink b/tests/du/slink
index 2bb375714..5c2b125c7 100755
--- a/tests/du/slink
+++ b/tests/du/slink
@@ -24,14 +24,9 @@ fi
. $srcdir/test-lib.sh
# Determine if `.' is on a local (would non-NFS be sufficient?) file system.
-# On at least some NFS implementations, symlinks never take up space,
-
-# So if this is a non-local file system, skip the test.
-if df --local . >/dev/null 2>&1; then
- : # Ok.
-else
- skip_test_ "\`.' is on a non-local file system"
-fi
+# At least on OSF/1 4.0d, when using an nfsv3 file system,
+# each created symlink can end up having a size of 0.
+require_local_dir_
if df --type=xfs . >/dev/null 2>&1; then
# At least on Irix-6.5.19, when using an xfs file system,
@@ -39,12 +34,6 @@ if df --type=xfs . >/dev/null 2>&1; then
skip_test_ "\`.' is on an XFS file system"
fi
-if df --type=nfsv3 . >/dev/null 2>&1; then
- # At least on OSF/1 4.0d, when using an nfsv3 file system,
- # each created symlink can end up having a size of 0.
- skip_test_ "\`.' is on an NFS file system"
-fi
-
symlink_name_lengths='1 15 16 31 32 59 60 63 64 127 128 255 256 511 512 1024'
for len in $symlink_name_lengths; do
name=`seq 1 $len|tr -c x y |head -c$len`