summaryrefslogtreecommitdiff
path: root/tests/du
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2010-09-02 13:22:41 +0100
committerPádraig Brady <P@draigBrady.com>2010-09-07 10:49:55 +0100
commit437671accc0af8fa43a3f9bda6c150cb63fc42cb (patch)
tree170c21e6db5b8055281f95285acc9e2c9b29ba75 /tests/du
parent0e295c88bccb7fe8aedbbcf1798fdfa8f6beec88 (diff)
downloadcoreutils-437671accc0af8fa43a3f9bda6c150cb63fc42cb.tar.xz
tests: exclude some tests when running on NFS
All tests currently pass on NFS on Linux kernel 2.6.22 at least, but some fail on 2.6.9, so we exclude those here. * tests/init.cfg (is_local_dir_): A new function returning if the specified directory is on a local file system. (require_local_dir_): A new function to skip tests if the current directory is not on a local file system. * tests/cp/existing-perm-race: Skip if non local. * tests/cp/file-perm-race: Likewise. * tests/cp/parent-perm: Likewise. * tests/cp/parent-perm-race: Likewise. * tests/cp/preserve-2: Likewise. * tests/mv/part-symlink: Likewise. * tests/du/basic: Use refactored function. * tests/install/basic-1: Likewise. * tests/mkdir/p-3: Likewise. * tests/dd/skip-seek-past-dev: Likewise. * tests/du/slink: Likewise. Remove redundant test for NFS file system. * tests/misc/join: s/local/locale/.
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`