summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-05-13 18:36:29 +0200
committerJim Meyering <meyering@redhat.com>2011-05-13 18:38:52 +0200
commit89d542f3d8fc97b3f9c45ad5beee9afdb68da152 (patch)
tree5026c2a9ec8bec45b56b405440b1f1aa4f275d01 /tests
parenta085b6fc6c8fa03dac20f01f2f2b64b50b8bdf66 (diff)
downloadcoreutils-89d542f3d8fc97b3f9c45ad5beee9afdb68da152.tar.xz
tests: use skip_test_, not skip_
skip_test_ emits its diagnostic both to FD 9 (tty), and to FD 2 (usually the log file), whereas init.sh's skip_ emits only to FD 9. Without that, the log is slightly less useful. * tests/cp/fiemap-2: Use skip_test_, not skip_. * tests/cp/fiemap-perf: Likewise. * tests/du/bigtime: Likewise. * tests/du/files0-from-dir: Likewise. * tests/du/move-dir-while-traversing: Likewise. * tests/init.sh: Likewise. * tests/misc/sort-stale-thread-mem: Likewise. * tests/misc/stat-nanoseconds: Likewise. * tests/mv/i-3: Likewise. * tests/mv/sticky-to-xpart: Likewise. * tests/split/filter: Likewise. Prompted by a report from Pádraig Brady.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cp/fiemap-22
-rwxr-xr-xtests/cp/fiemap-perf4
-rwxr-xr-xtests/du/bigtime6
-rwxr-xr-xtests/du/files0-from-dir2
-rwxr-xr-xtests/du/move-dir-while-traversing2
-rw-r--r--tests/init.sh4
-rwxr-xr-xtests/misc/sort-stale-thread-mem2
-rwxr-xr-xtests/misc/stat-nanoseconds2
-rwxr-xr-xtests/mv/i-32
-rwxr-xr-xtests/mv/sticky-to-xpart2
-rwxr-xr-xtests/split/filter2
11 files changed, 15 insertions, 15 deletions
diff --git a/tests/cp/fiemap-2 b/tests/cp/fiemap-2
index 691ead255..76edd4830 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_ "this file system lacks FIEMAP support"
+ || skip_test_ "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-perf b/tests/cp/fiemap-perf
index c88e8eca8..2c56fc81e 100755
--- a/tests/cp/fiemap-perf
+++ b/tests/cp/fiemap-perf
@@ -22,12 +22,12 @@ print_ver_ cp
# Require a fiemap-enabled FS.
touch fiemap_chk
fiemap_capable_ fiemap_chk ||
- skip_ "this file system lacks FIEMAP support"
+ skip_test_ "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_ "ext3 has known slow FIEMAP scanning"
+ skip_test_ "ext3 has known slow FIEMAP scanning"
# Create a large-but-sparse file.
timeout 10 truncate -s1T f || framework_failure_
diff --git a/tests/du/bigtime b/tests/du/bigtime
index d665cb820..03f9e76e0 100755
--- a/tests/du/bigtime
+++ b/tests/du/bigtime
@@ -30,10 +30,10 @@ case "$future_time" in
*" $bignum "*)
: ;;
*' Dec 4 300627798676 '*)
- skip_ "file system and localtime both handle big timestamps" ;;
+ skip_test_ "file system and localtime both handle big timestamps" ;;
*)
- skip_ "file system or localtime mishandles big time stamps: $future_time" ;;
-esac || skip_ "file system cannot represent big time stamps"
+ skip_test_ "file system or localtime mishandles big time stamps: $future_time" ;;
+esac || skip_test_ "file system cannot represent big time stamps"
printf "0\t$bignum\tfuture\n" > exp || framework_failure_
printf "du: time $bignum is out of range\n" > err_ok || framework_failure_
diff --git a/tests/du/files0-from-dir b/tests/du/files0-from-dir
index fc1e1844c..a72212239 100755
--- a/tests/du/files0-from-dir
+++ b/tests/du/files0-from-dir
@@ -25,7 +25,7 @@ mkdir dir
# In that case, using --files0-from=dir would yield garbage,
# interpreting the directory entry as a sequence of
# NUL-separated file names.
-cat dir > /dev/null && skip_ "cat dir/ succeeds"
+cat dir > /dev/null && skip_test_ "cat dir/ succeeds"
for prog in du wc; do
$prog --files0-from=dir > /dev/null 2>err && fail=1
diff --git a/tests/du/move-dir-while-traversing b/tests/du/move-dir-while-traversing
index 68302b8ff..0270389a6 100755
--- a/tests/du/move-dir-while-traversing
+++ b/tests/du/move-dir-while-traversing
@@ -21,7 +21,7 @@ print_ver_ du
# We use a python-inotify script, so...
python -m pyinotify -h > /dev/null \
- || skip_ 'python inotify package not installed'
+ || skip_test_ 'python inotify package not installed'
# Move a directory "up" while du is processing its sub-directories.
# While du is processing a hierarchy .../B/C/D/... this script
diff --git a/tests/init.sh b/tests/init.sh
index 71c651696..14f2e26e0 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -32,7 +32,7 @@
# or perhaps export PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH"
# to all tests via automake's TESTS_ENVIRONMENT.
# Set the exit code 0 for success, 77 for skipped, or 1 or other for failure.
-# Use the skip_ and fail_ functions to print a diagnostic and then exit
+# Use the skip_test_ and fail_ functions to print a diagnostic and then exit
# with the corresponding exit code.
# Exit $?
@@ -148,7 +148,7 @@ else
# If we've made it all the way to the sentinel, "fail" without
# finding even a marginal shell, skip this test.
if test "$re_shell_" = fail; then
- test -z "$marginal_" && skip_ failed to find an adequate shell
+ test -z "$marginal_" && skip_test_ failed to find an adequate shell
re_shell_=$marginal_
break
fi
diff --git a/tests/misc/sort-stale-thread-mem b/tests/misc/sort-stale-thread-mem
index a93ea4db4..6f676eff4 100755
--- a/tests/misc/sort-stale-thread-mem
+++ b/tests/misc/sort-stale-thread-mem
@@ -23,7 +23,7 @@ print_ver_ sort
very_expensive_
-valgrind --help >/dev/null || skip_ "requires valgrind"
+valgrind --help >/dev/null || skip_test_ "requires valgrind"
grep '^#define HAVE_PTHREAD_T 1' "$CONFIG_HEADER" > /dev/null ||
skip_test_ 'requires pthreads'
diff --git a/tests/misc/stat-nanoseconds b/tests/misc/stat-nanoseconds
index 27282f4e7..33dc58a7a 100755
--- a/tests/misc/stat-nanoseconds
+++ b/tests/misc/stat-nanoseconds
@@ -27,7 +27,7 @@ export TZ
touch -d '1970-01-01 18:43:33.023456789' k || framework_failure_
ls --full-time | grep 18:43:33.023456789 \
- || skip_ this file system does not support sub-second time stamps
+ || skip_test_ this file system does not support sub-second time stamps
test "$(stat -c %X k)" = 67413 || fail=1
test "$(stat -c %.X k)" = 67413.023456789 || fail=1
diff --git a/tests/mv/i-3 b/tests/mv/i-3
index 7fba1396e..83d93a86f 100755
--- a/tests/mv/i-3
+++ b/tests/mv/i-3
@@ -23,7 +23,7 @@ require_controlling_input_terminal_
skip_if_root_
trap '' TTIN # Ignore SIGTTIN
-test "$(uname -s)" = FreeBSD && skip_ "known spurious failure on FreeBSD"
+test "$(uname -s)" = FreeBSD && skip_test_ "known spurious failure on FreeBSD"
touch f g h i || framework_failure
chmod 0 g i || framework_failure
diff --git a/tests/mv/sticky-to-xpart b/tests/mv/sticky-to-xpart
index f689d9d0a..979d31fac 100755
--- a/tests/mv/sticky-to-xpart
+++ b/tests/mv/sticky-to-xpart
@@ -47,7 +47,7 @@ version=`
`
case $version in
$PACKAGE_VERSION) ;;
- *) skip_ "cannot access just-built mv as user $NON_ROOT_USERNAME";;
+ *) skip_test_ "cannot access just-built mv as user $NON_ROOT_USERNAME";;
esac
setuidgid $NON_ROOT_USERNAME env PATH="$PATH" \
diff --git a/tests/split/filter b/tests/split/filter
index 1a7b06ac1..4c25c5fcd 100755
--- a/tests/split/filter
+++ b/tests/split/filter
@@ -18,7 +18,7 @@
. "${srcdir=.}/init.sh"; path_prepend_ ../src
print_ver_ split
-xz --version || skip_ "xz (better than gzip/bzip2) required"
+xz --version || skip_test_ "xz (better than gzip/bzip2) required"
for total_n_lines in 5 3000 20000; do
seq $total_n_lines > in || framework_failure_