summaryrefslogtreecommitdiff
path: root/tests/misc
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/misc
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/misc')
-rwxr-xr-xtests/misc/arch7
-rwxr-xr-xtests/misc/cat-proc7
-rwxr-xr-xtests/misc/md5sum-newline4
-rwxr-xr-xtests/misc/nice3
-rwxr-xr-xtests/misc/od-x86
-rwxr-xr-xtests/misc/pwd-unreadable-parent10
-rwxr-xr-xtests/misc/selinux6
-rwxr-xr-xtests/misc/stty-row-col3
-rwxr-xr-xtests/misc/tac-continue3
9 files changed, 15 insertions, 34 deletions
diff --git a/tests/misc/arch b/tests/misc/arch
index 942fa933d..c568b48fb 100755
--- a/tests/misc/arch
+++ b/tests/misc/arch
@@ -16,10 +16,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+. $srcdir/../test-lib.sh
+
# skip this test if arch isn't being built.
case " $built_programs " in
*" arch "*) ;;
- *) (exit 77); exit 77 ;;
+ *) skip_test_ 'not building arch';;
esac
if test "$VERBOSE" = yes; then
@@ -27,9 +29,6 @@ if test "$VERBOSE" = yes; then
arch --version
fi
-. $srcdir/../test-lib.sh
-
-
fail=0
arch > out || fail=1
diff --git a/tests/misc/cat-proc b/tests/misc/cat-proc
index 84265e18e..02bb26ad4 100755
--- a/tests/misc/cat-proc
+++ b/tests/misc/cat-proc
@@ -2,7 +2,7 @@
# Ensure that cat -E produces same output as cat, module `$'s,
# even when applied to a file in /proc.
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,10 +27,7 @@ fi
f=/proc/cpuinfo
test -f $f \
- || {
- echo "$0: no $f skipping this test" 1>&2
- (exit 77); exit 77
- }
+ || skip_test_ "no $f"
fail=0
diff --git a/tests/misc/md5sum-newline b/tests/misc/md5sum-newline
index e20f0be8e..df3254e71 100755
--- a/tests/misc/md5sum-newline
+++ b/tests/misc/md5sum-newline
@@ -36,9 +36,7 @@ rm -f 'a
b'
if test $filename_may_contain_newline = no; then
- echo 1>&2 "$0: can't create newline-containing file name," \
- "so can't run this test"
- exit 77
+ skip_test_ "failed to create newline-containing file name"
fi
me=`echo $0|sed 's,.*/,,'`
diff --git a/tests/misc/nice b/tests/misc/nice
index 6b063daa2..2e9d3c14c 100755
--- a/tests/misc/nice
+++ b/tests/misc/nice
@@ -58,8 +58,7 @@ niceness=`nice`
if test "$niceness" = 0; then
: ok
else
- echo "$0: this test must be run at nice level 0" 1>&2
- exit 77
+ skip_test_ "this test must be run at nice level 0"
fi
fail=0
diff --git a/tests/misc/od-x8 b/tests/misc/od-x8
index dc1ec00cb..852ddf43b 100755
--- a/tests/misc/od-x8
+++ b/tests/misc/od-x8
@@ -24,10 +24,8 @@ fi
. $srcdir/../test-lib.sh
-od -t x8 /dev/null >/dev/null || {
- echo >&2 "$0: 8-byte test skipped"
- exit 77
-}
+od -t x8 /dev/null >/dev/null ||
+ skip_test_ "od lacks support for 8-byte quantities"
echo abcdefgh |tr -d '\n' > in || framework_failure
diff --git a/tests/misc/pwd-unreadable-parent b/tests/misc/pwd-unreadable-parent
index f3ff874d8..c7cde7542 100755
--- a/tests/misc/pwd-unreadable-parent
+++ b/tests/misc/pwd-unreadable-parent
@@ -27,18 +27,12 @@ fi
. $srcdir/../test-lib.sh
test $host_os != linux-gnu &&
- {
- echo 1>&2 "$0: vendor getcwd may be inadequate; skipping this test"
- (exit 77); exit 77
- }
+ skip_test_ 'vendor getcwd may be inadequate'
# Linux ia64 has the gl_FUNC_GETCWD_ABORT_BUG, so we can't use
# the system getcwd.
test $REPLACE_GETCWD = 1 &&
- {
- echo 1>&2 "$0: can't use buggy system getcwd; skipping this test"
- (exit 77); exit 77
- }
+ skip_test_ "can't use buggy system getcwd; skipping this test"
mkdir -p a/b || framework_failure
cd a/b || framework_failure
diff --git a/tests/misc/selinux b/tests/misc/selinux
index 542d6e799..87d1a8dde 100755
--- a/tests/misc/selinux
+++ b/tests/misc/selinux
@@ -25,10 +25,8 @@ fail=0
ctx=root:object_r:tmp_t
# FIXME, what if $ctx is no different from the default. Not likely.
# give each a different context, via chcon
-chcon $ctx f d p 2>/dev/null || {
- echo 1>&2 'skipping this test: "chcon '$ctx' ..." failed'
- (exit 77); exit 77
-}
+chcon $ctx f d p 2>/dev/null ||
+ skip_test_ '"chcon '$ctx' ..." failed'
# inspect that context with both ls -Z and stat.
for i in d f p; do
diff --git a/tests/misc/stty-row-col b/tests/misc/stty-row-col
index 3fb387183..eb84499ed 100755
--- a/tests/misc/stty-row-col
+++ b/tests/misc/stty-row-col
@@ -58,8 +58,7 @@ NA LAST NA
set $tests
saved_size=`stty size` && test -n "$saved_size" \
- || { echo "$0: skipping this test: can't get window size" 1>&2;
- exit 77; exit; }
+ || skip_test_ "can't get window size"
fail=0
while :; do
diff --git a/tests/misc/tac-continue b/tests/misc/tac-continue
index 0c1319404..efc87f0a2 100755
--- a/tests/misc/tac-continue
+++ b/tests/misc/tac-continue
@@ -28,8 +28,7 @@ fi
# See if the envvar is defined.
if test x = "x$FULL_PARTITION_TMPDIR"; then
- echo "$0: FULL_PARTITION_TMPDIR not defined; skipping this test" 1>&2
- (exit 77); exit 77
+ skip_test_ "FULL_PARTITION_TMPDIR not defined"
fi
if ! test -d "$FULL_PARTITION_TMPDIR"; then