1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-15 03:41:57 +02:00

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.
This commit is contained in:
Jim Meyering
2011-05-13 18:36:29 +02:00
parent a085b6fc6c
commit 89d542f3d8
11 changed files with 15 additions and 15 deletions

View File

@@ -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_

View File

@@ -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_

View File

@@ -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_

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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'

View File

@@ -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

View File

@@ -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

View File

@@ -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" \

View File

@@ -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_