summaryrefslogtreecommitdiff
path: root/tests/cp
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2007-11-29 09:21:22 +0100
committerJim Meyering <meyering@redhat.com>2008-02-09 10:30:33 +0100
commit72565ddffe0b249fc23bd8253564aaf3311f833c (patch)
treebf827f4d0980adc9f163359eda745c6e6a1e8675 /tests/cp
parent52d9bba7126de635eb356e3b379c5e4659ce2462 (diff)
downloadcoreutils-72565ddffe0b249fc23bd8253564aaf3311f833c.tar.xz
tests: call skip_test_ in place of echo+exit 77
* tests/mv/no-target-dir: Likewise. * tests/other-fs-tmpdir: Likewise. * tests/rm/empty-name: Likewise. * tests/rm/fail-eperm: Likewise. * tests/rm/inaccessible: Likewise. * tests/rm/isatty: Likewise. * tests/rm/unreadable: Likewise. * tests/setgid-check: Likewise. * tests/sparse-file: Likewise. * tests/strace: Likewise. * tests/tail-2/append-only: Likewise. * tests/tail-2/big-4gb: Likewise. * tests/tail-2/tail-n0f: Likewise. * tests/touch/dangling-symlink: Likewise. * tests/touch/fifo: Likewise. * tests/touch/not-owner: Likewise. * tests/mv/i-3: Likewise. * tests/umask-check: Likewise. * tests/mv/acl: Likewise. * tests/cp/acl: Likewise. * tests/chgrp/deref: Likewise. * tests/chmod/setgid: Likewise. * tests/cp/existing-perm-race: Likewise. * tests/cp/file-perm-race: Likewise. * tests/cp/parent-perm-race: Likewise. * tests/du/2g: Likewise. * tests/du/8gb: Likewise. * tests/du/long-from-unreadable: Likewise. * tests/du/long-sloop: Likewise. * tests/du/slink: Likewise. * tests/ls/nameless-uid: Likewise. * tests/ls/stat-dtype: Likewise. * tests/misc/cat-proc: Likewise. * tests/misc/md5sum-newline: Likewise. * tests/misc/nice: Likewise. * tests/misc/od-x8: Likewise. * tests/misc/pwd-unreadable-parent: Likewise. * tests/misc/selinux: Likewise. * tests/misc/stty-row-col: Likewise. * tests/misc/tac-continue: Likewise. * tests/misc/arch: Likewise, and source $srcdir/../test-lib.sh *before* the use of skip_test_.
Diffstat (limited to 'tests/cp')
-rwxr-xr-xtests/cp/acl13
-rwxr-xr-xtests/cp/existing-perm-race6
-rwxr-xr-xtests/cp/file-perm-race6
-rwxr-xr-xtests/cp/parent-perm-race6
4 files changed, 9 insertions, 22 deletions
diff --git a/tests/cp/acl b/tests/cp/acl
index 42f7c3464..fd6e86dd0 100755
--- a/tests/cp/acl
+++ b/tests/cp/acl
@@ -21,11 +21,8 @@
. $srcdir/../lang-default
# Skip this test if cp was built without ACL support:
-grep '^#define USE_ACL 0' $CONFIG_HEADER > /dev/null && \
- {
- echo 1>&2 "$0: insufficient ACL support, so skipping this test"
- (exit 77); exit 77
- }
+grep '^#define USE_ACL 0' $CONFIG_HEADER > /dev/null &&
+ skip_test_ "insufficient ACL support"
if test "$VERBOSE" = yes; then
set -x
@@ -47,11 +44,7 @@ acl1=`cd a && getfacl file | grep -v ':bin:' | grep -v 'mask::'` \
|| skip=yes
test $skip = yes &&
- {
- echo "$0: '.' is not on a suitable file system for this test" 1>&2
- echo "$0: skipping this test" 1>&2
- (exit 77); exit 77
- }
+ skip_test_ "'.' 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/existing-perm-race b/tests/cp/existing-perm-race
index 11f38d261..0ab10e94d 100755
--- a/tests/cp/existing-perm-race
+++ b/tests/cp/existing-perm-race
@@ -31,10 +31,8 @@ g2=$2
fail=0
umask 077
-mkfifo fifo || {
- echo "$0: fifos not supported; skipping this test." 1>&2
- (exit 77); exit 77
-}
+mkfifo fifo ||
+ skip_test_ "fifos not supported"
touch fifo-copy &&
chgrp $g1 fifo &&
diff --git a/tests/cp/file-perm-race b/tests/cp/file-perm-race
index 94e402dbc..3e3859773 100755
--- a/tests/cp/file-perm-race
+++ b/tests/cp/file-perm-race
@@ -24,10 +24,8 @@ fi
. $srcdir/../test-lib.sh
umask 022
-mkfifo fifo || {
- echo "$0: fifos not supported; skipping this test." 1>&2
- (exit 77); exit 77
-}
+mkfifo fifo ||
+ skip_test_ "fifos not supported"
# Copy a fifo's contents. That way, we can examine the
# destination permissions before they're finalized.
diff --git a/tests/cp/parent-perm-race b/tests/cp/parent-perm-race
index b09f8bced..8afa0c0b7 100755
--- a/tests/cp/parent-perm-race
+++ b/tests/cp/parent-perm-race
@@ -31,10 +31,8 @@ fail=0
for attr in mode ownership
do
- mkfifo $attr/fifo || {
- echo "$0: fifos not supported; skipping this test." 1>&2
- (exit 77); exit 77
- }
+ mkfifo $attr/fifo ||
+ skip_test_ "fifos not supported"
# Copy a fifo's contents. That way, we can examine d/$attr's
# state while cp is running.