summaryrefslogtreecommitdiff
path: root/tests/rm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rm')
-rwxr-xr-xtests/rm/empty-name7
-rwxr-xr-xtests/rm/fail-eperm7
-rwxr-xr-xtests/rm/inaccessible3
-rwxr-xr-xtests/rm/isatty2
-rwxr-xr-xtests/rm/unreadable7
5 files changed, 8 insertions, 18 deletions
diff --git a/tests/rm/empty-name b/tests/rm/empty-name
index a2af5be4c..1384a2fd1 100755
--- a/tests/rm/empty-name
+++ b/tests/rm/empty-name
@@ -24,11 +24,8 @@
: ${PERL=perl}
: ${srcdir=.}
-$PERL -e 'use warnings;' > /dev/null 2>&1 || {
- echo 1>&2 "$0: configure didn't find a usable version of Perl," \
- "so can't run this test"
- exit 77
-}
+$PERL -e 'use warnings;' > /dev/null 2>&1 ||
+ skip_test_ "configure didn't find a usable version of Perl"
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF
diff --git a/tests/rm/fail-eperm b/tests/rm/fail-eperm
index 40b719b48..c619574ce 100755
--- a/tests/rm/fail-eperm
+++ b/tests/rm/fail-eperm
@@ -32,11 +32,8 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check
: ${PERL=perl}
: ${srcdir=.}
-$PERL -e 1 > /dev/null 2>&1 || {
- echo 1>&2 "$0: configure didn't find a usable version of Perl," \
- "so can't run this test"
- (exit 77); exit 77
-}
+$PERL -e 1 > /dev/null 2>&1 ||
+ skip_test_ "configure didn't find a usable version of Perl"
ARGV_0=$0
export ARGV_0
diff --git a/tests/rm/inaccessible b/tests/rm/inaccessible
index 8d05b3ede..ca82a2c74 100755
--- a/tests/rm/inaccessible
+++ b/tests/rm/inaccessible
@@ -30,8 +30,7 @@ skip=yes
grep '^#define HAVE_OPENAT' $CONFIG_HEADER > /dev/null && skip=no
test -d /proc/self/fd && skip=no
if test $skip = yes; then
- echo 1>&2 "$0: no openat support, so skipping this test"
- (exit 77); exit 77
+ skip_test_ 'this system lacks openat support'
fi
. $srcdir/../test-lib.sh
diff --git a/tests/rm/isatty b/tests/rm/isatty
index cb3f0fd2b..040d97548 100755
--- a/tests/rm/isatty
+++ b/tests/rm/isatty
@@ -29,7 +29,7 @@ fail=0
# Skip this test if there is no /dev/stdin file.
ls /dev/stdin >/dev/null 2>&1 \
- || { (exit 77); exit; }
+ || skip_test_ 'there is no /dev/stdin file'
touch f
chmod 0 f
diff --git a/tests/rm/unreadable b/tests/rm/unreadable
index 16c4c920a..05024c2dc 100755
--- a/tests/rm/unreadable
+++ b/tests/rm/unreadable
@@ -19,11 +19,8 @@
: ${PERL=perl}
: ${srcdir=.}
-$PERL -e 'use warnings;' > /dev/null 2>&1 || {
- echo 1>&2 "$0: configure didn't find a usable version of Perl," \
- "so can't run this test"
- exit 77
-}
+$PERL -e 'use warnings;' > /dev/null 2>&1 ||
+ skip_test_ "configure didn't find a usable version of Perl"
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF