summaryrefslogtreecommitdiff
path: root/tests/cp
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-06-14 16:22:41 +0200
committerJim Meyering <meyering@redhat.com>2011-06-17 09:17:37 +0200
commit2e580ca741b83202e6b22e0bb58b18101a443bd8 (patch)
tree790f68faa9a1d05898f71be8bdeee1b574ec2bb2 /tests/cp
parent13672ec3211a5a77caf16dc24b83100d57e2a2ec (diff)
downloadcoreutils-2e580ca741b83202e6b22e0bb58b18101a443bd8.tar.xz
tests: remove skip_test_ function; use new skip_ instead
* tests/init.cfg (skip_test_): Remove function. Use skip_ in place of skip_test_ everywhere else. * cfg.mk (sc_prohibit_skip_): Remove rule. * tests/**: Use skip_, not skip_test_, everywhere.
Diffstat (limited to 'tests/cp')
-rwxr-xr-xtests/cp/acl4
-rwxr-xr-xtests/cp/capability10
-rwxr-xr-xtests/cp/cp-a-selinux4
-rwxr-xr-xtests/cp/cp-mv-enotsup-xattr12
-rwxr-xr-xtests/cp/fiemap-22
-rwxr-xr-xtests/cp/fiemap-empty14
-rwxr-xr-xtests/cp/fiemap-perf8
-rwxr-xr-xtests/cp/link-symlink4
-rwxr-xr-xtests/cp/preserve-gid2
-rwxr-xr-xtests/cp/preserve-slink-time2
-rwxr-xr-xtests/cp/proc-short-read2
-rwxr-xr-xtests/cp/reflink-perm2
-rwxr-xr-xtests/cp/sparse-fiemap8
13 files changed, 37 insertions, 37 deletions
diff --git a/tests/cp/acl b/tests/cp/acl
index b99ac6be3..8c132a940 100755
--- a/tests/cp/acl
+++ b/tests/cp/acl
@@ -24,7 +24,7 @@ require_acl_
# Skip this test if cp was built without ACL support:
grep '^#define USE_ACL 1' $CONFIG_HEADER > /dev/null ||
- skip_test_ "insufficient ACL support"
+ skip_ "insufficient ACL support"
mkdir -p a b || framework_failure
touch a/file || framework_failure
@@ -34,7 +34,7 @@ skip=no
acl1=`cd a && getfacl file` || skip=yes
setfacl -m user:bin:rw a/file 2> /dev/null || skip=yes
test $skip = yes &&
- skip_test_ "'.' is not on a suitable file system for this test"
+ skip_ "'.' is not on a suitable file system for this test"
# copy a file without preserving permissions
cp a/file b/ || fail=1
diff --git a/tests/cp/capability b/tests/cp/capability
index 0106b8b9e..be5fb082a 100755
--- a/tests/cp/capability
+++ b/tests/cp/capability
@@ -23,21 +23,21 @@ working_umask_or_skip_
grep '^#define HAVE_CAP 1' $CONFIG_HEADER > /dev/null \
- || skip_test_ "configured without libcap support"
+ || skip_ "configured without libcap support"
(setcap --help) 2>&1 |grep 'usage: setcap' > /dev/null \
- || skip_test_ "setcap utility not found"
+ || skip_ "setcap utility not found"
(getcap --help) 2>&1 |grep 'usage: getcap' > /dev/null \
- || skip_test_ "getcap utility not found"
+ || skip_ "getcap utility not found"
touch file || framework_failure
chown $NON_ROOT_USERNAME file || framework_failure
setcap 'cap_net_bind_service=ep' file ||
- skip_test_ "setcap doesn't work"
+ skip_ "setcap doesn't work"
getcap file | grep cap_net_bind_service >/dev/null ||
- skip_test_ "getcap doesn't work"
+ skip_ "getcap doesn't work"
cp --preserve=xattr file copy1 || fail=1
diff --git a/tests/cp/cp-a-selinux b/tests/cp/cp-a-selinux
index 3d55a0f8e..76684d6f4 100755
--- a/tests/cp/cp-a-selinux
+++ b/tests/cp/cp-a-selinux
@@ -46,11 +46,11 @@ skip=0
dd if=/dev/zero of=blob bs=8192 count=200 || skip=1
mkdir mnt || skip=1
mkfs -t ext2 -F blob ||
- skip_test_ "failed to create an ext2 file system"
+ skip_ "failed to create an ext2 file system"
mount -oloop,context=$ctx blob mnt || skip=1
test $skip = 1 \
- && skip_test_ "insufficient mount/ext2 support"
+ && skip_ "insufficient mount/ext2 support"
cd mnt || framework_failure
diff --git a/tests/cp/cp-mv-enotsup-xattr b/tests/cp/cp-mv-enotsup-xattr
index 1732e2e4c..2f26dbd82 100755
--- a/tests/cp/cp-mv-enotsup-xattr
+++ b/tests/cp/cp-mv-enotsup-xattr
@@ -39,13 +39,13 @@ make_fs() {
|| skip=1
mkdir "$where" || skip=1
mkfs -t ext2 -F "$fs" ||
- skip_test_ "failed to create ext2 file system"
+ skip_ "failed to create ext2 file system"
mount -oloop,$opts "$fs" "$where" || skip=1
echo test > "$where"/f || skip=1
test -s "$where"/f || skip=1
test $skip = 1 &&
- skip_test_ "insufficient mount/ext2 support"
+ skip_ "insufficient mount/ext2 support"
}
make_fs noxattr nouser_xattr
@@ -57,13 +57,13 @@ xattr_value="bar"
xattr_pair="$xattr_name=\"$xattr_value\""
echo test > xattr/a || framework_failure
-getfattr -d xattr/a >out_a || skip_test_ "failed to get xattr of file"
+getfattr -d xattr/a >out_a || skip_ "failed to get xattr of file"
grep -F "$xattr_pair" out_a >/dev/null && framework_failure
setfattr -n "$xattr_name" -v "$xattr_value" xattr/a >out_a \
- || skip_test_ "failed to set xattr of file"
-getfattr -d xattr/a >out_a || skip_test_ "failed to get xattr of file"
+ || skip_ "failed to set xattr of file"
+getfattr -d xattr/a >out_a || skip_ "failed to get xattr of file"
grep -F "$xattr_pair" out_a >/dev/null \
- || skip_test_ "failed to set xattr of file"
+ || skip_ "failed to set xattr of file"
# This should pass without diagnostics
diff --git a/tests/cp/fiemap-2 b/tests/cp/fiemap-2
index 76edd4830..691ead255 100755
--- a/tests/cp/fiemap-2
+++ b/tests/cp/fiemap-2
@@ -22,7 +22,7 @@ print_ver_ cp
# Require a fiemap-enabled FS.
touch fiemap_chk # check a file rather than current dir for best coverage
fiemap_capable_ fiemap_chk \
- || skip_test_ "this file system lacks FIEMAP support"
+ || skip_ "this file system lacks FIEMAP support"
# Exercise the code that handles a file ending in a hole.
printf x > k || framework_failure_
diff --git a/tests/cp/fiemap-empty b/tests/cp/fiemap-empty
index 836668ef7..095d1b7c3 100755
--- a/tests/cp/fiemap-empty
+++ b/tests/cp/fiemap-empty
@@ -22,18 +22,18 @@ print_ver_ cp
# FIXME: enable any part of this test that is still relevant,
# or, if none are relevant (now that cp does not handle unwritten
# extents), just remove the test altogether.
-skip_test_ 'disabled for now'
+skip_ 'disabled for now'
touch fiemap_chk
fiemap_capable_ fiemap_chk ||
- skip_test_ 'this file system lacks FIEMAP support'
+ skip_ 'this file system lacks FIEMAP support'
rm fiemap_chk
# TODO: rather than requiring `fallocate`, possible add
# this functionality to truncate --alloc
-fallocate --help >/dev/null || skip_test_ 'The fallocate utility is required'
+fallocate --help >/dev/null || skip_ 'The fallocate utility is required'
fallocate -l 1 -n falloc.test ||
- skip_test_ 'this file system lacks FALLOCATE support'
+ skip_ 'this file system lacks FALLOCATE support'
rm falloc.test
# Require more space than we'll actually use, so that
@@ -44,13 +44,13 @@ rm falloc.test
require_file_system_bytes_free_ 800000000
fallocate -l 600MiB space.test ||
- skip_test_ 'this test needs at least 600MiB free space'
+ skip_ 'this test needs at least 600MiB free space'
# Disable this test on old BTRFS (e.g. Fedora 14)
# which reports ordinary extents for unwritten ones.
-filefrag space.test || skip_test_ 'the `filefrag` utility is missing'
+filefrag space.test || skip_ 'the `filefrag` utility is missing'
filefrag -v space.test | grep -F 'unwritten' > /dev/null ||
- skip_test_ 'this file system does not report empty extents as "unwritten"'
+ skip_ 'this file system does not report empty extents as "unwritten"'
rm space.test
diff --git a/tests/cp/fiemap-perf b/tests/cp/fiemap-perf
index 2c56fc81e..b17360e68 100755
--- a/tests/cp/fiemap-perf
+++ b/tests/cp/fiemap-perf
@@ -22,21 +22,21 @@ print_ver_ cp
# Require a fiemap-enabled FS.
touch fiemap_chk
fiemap_capable_ fiemap_chk ||
- skip_test_ "this file system lacks FIEMAP support"
+ skip_ "this file system lacks FIEMAP support"
# Exclude ext3 (or unknown fs types)
# as the emulated extent scanning is slow
df -t ext3 . >/dev/null &&
- skip_test_ "ext3 has known slow FIEMAP scanning"
+ skip_ "ext3 has known slow FIEMAP scanning"
# Create a large-but-sparse file.
timeout 10 truncate -s1T f || framework_failure_
# Disable this test on old BTRFS (e.g. Fedora 14)
# which reports (unwritten) extents for holes.
-filefrag f || skip_test_ 'the `filefrag` utility is missing'
+filefrag f || skip_ 'the `filefrag` utility is missing'
filefrag f | grep -F ': 0 extents found' > /dev/null ||
- skip_test_ 'this file system reports extents for holes'
+ skip_ 'this file system reports extents for holes'
# Nothing can read (much less write) that many bytes in so little time.
timeout 10 cp f f2 || fail=1
diff --git a/tests/cp/link-symlink b/tests/cp/link-symlink
index 443b337db..0d09f5d83 100755
--- a/tests/cp/link-symlink
+++ b/tests/cp/link-symlink
@@ -24,10 +24,10 @@ print_ver_ cp
touch file
ln -s file link || framework_failure
touch -m -h -d 2011-01-01 link ||
- skip_test_ "Your system doesn't support updating symlink timestamps"
+ skip_ "Your system doesn't support updating symlink timestamps"
case `stat --format=%y link` in
2011-01-01*) ;;
- *) skip_test_ "Your system doesn't support updating symlink timestamps" ;;
+ *) skip_ "Your system doesn't support updating symlink timestamps" ;;
esac
# link.cp is probably a hardlink, but may also be a symlink
diff --git a/tests/cp/preserve-gid b/tests/cp/preserve-gid
index de4bc5bce..6893ba2b9 100755
--- a/tests/cp/preserve-gid
+++ b/tests/cp/preserve-gid
@@ -74,7 +74,7 @@ nameless_gid2=`$PERL -le '
if test -z "$nameless_uid" \
|| test -z "$nameless_gid1" \
|| test -z "$nameless_gid2"; then
- skip_test_ "couldn't find a nameless UID or GID"
+ skip_ "couldn't find a nameless UID or GID"
fi
chown "+$nameless_uid:+0" .
diff --git a/tests/cp/preserve-slink-time b/tests/cp/preserve-slink-time
index 0dd6e7c1c..0f9bfe53d 100755
--- a/tests/cp/preserve-slink-time
+++ b/tests/cp/preserve-slink-time
@@ -21,7 +21,7 @@ print_ver_ cp
grep '^#define HAVE_UTIMENSAT 1' "$CONFIG_HEADER" > /dev/null ||
grep '^#define HAVE_LUTIMES 1' "$CONFIG_HEADER" > /dev/null ||
- skip_test_ 'this system lacks the utimensat function'
+ skip_ 'this system lacks the utimensat function'
ln -s no-such dangle || framework_failure
diff --git a/tests/cp/proc-short-read b/tests/cp/proc-short-read
index a90446d4c..2276a6e72 100755
--- a/tests/cp/proc-short-read
+++ b/tests/cp/proc-short-read
@@ -21,7 +21,7 @@ print_ver_ cp
kall=/proc/kallsyms
-test -r $kall || skip_test_ "your system lacks $kall"
+test -r $kall || skip_ "your system lacks $kall"
# Before coreutils-7.3, cp would copy less than 4KiB of this 1MB+ file.
cp $kall 1 || fail=1
diff --git a/tests/cp/reflink-perm b/tests/cp/reflink-perm
index 736f33a29..367704d72 100755
--- a/tests/cp/reflink-perm
+++ b/tests/cp/reflink-perm
@@ -24,7 +24,7 @@ print_ver_ cp
: > file
ts='2009-08-28 19:00'
touch -d "$ts" file || framework_failure
-test time_check -nt file || skip_test_ "The system clock is wrong"
+test time_check -nt file || skip_ "The system clock is wrong"
chmod a=rwx file || framework_failure
umask 077
diff --git a/tests/cp/sparse-fiemap b/tests/cp/sparse-fiemap
index 64668ed36..3d340777b 100755
--- a/tests/cp/sparse-fiemap
+++ b/tests/cp/sparse-fiemap
@@ -18,7 +18,7 @@
. "${srcdir=.}/init.sh"; path_prepend_ ../src
print_ver_ cp
-$PERL -e 1 || skip_test_ 'you lack perl'
+$PERL -e 1 || skip_ 'you lack perl'
# The test was seen to fail on ext3 so exclude that type
# (or any file system where the type can't be determined)
@@ -28,7 +28,7 @@ if fiemap_capable_ fiemap_chk && ! df -t ext3 . >/dev/null; then
else
# FIXME: temporarily(?) skip this variant, at least until after this bug
# is fixed: http://thread.gmane.org/gmane.comp.file-systems.ext4/24495
- skip_test_ "current file system has insufficient FIEMAP support"
+ skip_ "current file system has insufficient FIEMAP support"
# It's not; we need to create one, hence we need root access.
require_root_
@@ -41,14 +41,14 @@ else
dd if=/dev/zero of=blob bs=32k count=1000 || skip=1
mkdir mnt
mkfs -t ext4 -F blob ||
- skip_test_ "failed to create ext4 file system"
+ skip_ "failed to create ext4 file system"
mount -oloop blob mnt || skip=1
cd mnt || skip=1
echo test > f || skip=1
test -s f || skip=1
test $skip = 1 &&
- skip_test_ "insufficient mount/ext4 support"
+ skip_ "insufficient mount/ext4 support"
fi
# =================================================