fi
. $srcdir/test-lib.sh
+
require_membership_in_two_groups_
+# cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least
+require_local_dir_
+
set _ $groups; shift
g1=$1
g2=$2
. $srcdir/test-lib.sh
+# cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least
+require_local_dir_
+
umask 022
mkfifo fifo ||
skip_test_ "fifos not supported"
. $srcdir/test-lib.sh
working_umask_or_skip_
+# cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least
+require_local_dir_
mkdir -p a/b/c a/b/d e || framework_failure
touch a/b/c/foo a/b/d/foo || framework_failure
. $srcdir/test-lib.sh
+# cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least
+require_local_dir_
+
umask 002
mkdir mode ownership d || framework_failure
chmod g+s d 2>/dev/null # The cp test is valid either way.
. $srcdir/test-lib.sh
-touch f || framework_failure
+# cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least
+require_local_dir_
+touch f || framework_failure
cp --preserve=mode,links f g || fail=1
. $srcdir/test-lib.sh
-# need write access to device
+# need write access to local device
# (even though we don't actually write anything)
require_root_
+require_local_dir_
get_device_size() {
BLOCKDEV=blockdev
# Get path to device the current dir is on.
# Note df can only get fs size, not device size.
-device=$(df -P --local . | tail -n1 | cut -d' ' -f1) ||
- skip_test_ 'this test runs only on local file systems'
+device=$(df -P . | tail -n1 | cut -d' ' -f1) || framework_failure
dev_size=$(get_device_size "$device") ||
skip_test_ "failed to determine size of $device"
# 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
. $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,
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`
|| skip_test_ "This test requires a local user named bin."
}
+is_local_dir_()
+{
+ test $# = 1 || framework_failure
+ df --local "$1" >/dev/null 2>&1
+}
+
+require_local_dir_()
+{
+ is_local_dir_ . ||
+ skip_test_ "This test must be run on a local file system."
+}
+
# Skip this test if we're not in SELinux "enforcing" mode.
require_selinux_enforcing_()
{
# inaccessible parent. coreutils 5.97 fails this test.
# Perform this test only if "." is on a local file system.
# Otherwise, it would fail e.g., on an NFS-mounted file system.
-if df --local . >/dev/null 2>&1; then
+if is_local_dir_ .; then
mkdir -p sub1/d || fail=1
(cd sub1/d && chmod a-r . && chmod a-rx .. &&
ginstall -d "$iwd/xx/zz" rel/a rel/b) || fail=1
# From Paul Eggert: fixed in 1.22n (this would fail on Solaris7,
# with LC_ALL set to en_US).
-# Unfortunately, that Solaris7's en_US local folds case (making
+# Unfortunately, that Solaris7's en_US locale folds case (making
# the first input file sorted) is not portable, so this test would
# fail on e.g. Linux systems, because the input to join isn't sorted.
# ['lc-collate', '', ["a 1a\nB 1B\n", "B 2B\n"], "B 1B 2B\n", 0],
# whose parent is inaccessible. coreutils 5.97 fails this test.
# Perform this test only if "." is on a local file system.
# Otherwise, it would fail e.g., on an NFS-mounted file system.
-if df --local . >/dev/null 2>&1; then
+if is_local_dir_ .; then
(cd no-acce3s/d && chmod a-r . && chmod a-rx .. &&
mkdir -p a/b "$p/b/c" d/e && test -d a/b && test -d d/e) || fail=1
test -d "$p/b/c" || fail=1
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_srcdir/other-fs-tmpdir"
+# On NFS on Linux 2.6.9 at least we get:
+# mv: preserving permissions for `rem_sl': Operation not supported
+require_local_dir_
+
pwd_tmp=`pwd`
# Unset CDPATH. Otherwise, output from the `cd dir' command