FYI,

(as with any global change like this,
 I'll write a syntax checking rule, too)

>From 89d542f3d8fc97b3f9c45ad5beee9afdb68da152 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyer...@redhat.com>
Date: Fri, 13 May 2011 18:36:29 +0200
Subject: [PATCH] tests: use skip_test_, not skip_
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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.
---
 tests/cp/fiemap-2                  |    2 +-
 tests/cp/fiemap-perf               |    4 ++--
 tests/du/bigtime                   |    6 +++---
 tests/du/files0-from-dir           |    2 +-
 tests/du/move-dir-while-traversing |    2 +-
 tests/init.sh                      |    4 ++--
 tests/misc/sort-stale-thread-mem   |    2 +-
 tests/misc/stat-nanoseconds        |    2 +-
 tests/mv/i-3                       |    2 +-
 tests/mv/sticky-to-xpart           |    2 +-
 tests/split/filter                 |    2 +-
 11 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/tests/cp/fiemap-2 b/tests/cp/fiemap-2
index 691ead2..76edd48 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 c88e8ec..2c56fc8 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 d665cb8..03f9e76 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 fc1e184..a722122 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 68302b8..0270389 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 71c6516..14f2e26 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 a93ea4d..6f676ef 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 27282f4..33dc58a 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 7fba139..83d93a8 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 f689d9d..979d31f 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 1a7b06a..4c25c5f 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_
--
1.7.5.1.398.g86d1d

Reply via email to