diff options
Diffstat (limited to 'tests')
73 files changed, 158 insertions, 168 deletions
diff --git a/tests/chgrp/deref b/tests/chgrp/deref index cb664635d..d7225d145 100755 --- a/tests/chgrp/deref +++ b/tests/chgrp/deref @@ -31,7 +31,7 @@ chgrp -h $g2 symlink 2> /dev/null set _ `ls -ln symlink` g=$5 test "$g" = $g2 || - skip_test_ "your system doesn't support changing the owner or group" \ + skip_ "your system doesn't support changing the owner or group" \ "of a symbolic link." diff --git a/tests/chmod/setgid b/tests/chmod/setgid index 3efffab3c..364d25d5f 100755 --- a/tests/chmod/setgid +++ b/tests/chmod/setgid @@ -38,7 +38,7 @@ chmod g+s d 2> /dev/null && env -- test -g d || # "chmod g+s d" does nothing on some NFS file systems. env -- test -g d || - skip_test_ 'cannot create setgid directories' + skip_ 'cannot create setgid directories' chmod 755 d diff --git a/tests/chown/separator b/tests/chown/separator index 8a112250a..c10c5d909 100755 --- a/tests/chown/separator +++ b/tests/chown/separator @@ -37,7 +37,7 @@ test -n "$id_gn" || framework_failure case $host_triplet in *-freebsd6.*) case $id_gn in - *[^a-zA-Z0-9._-]*) skip_test_ "invalid group name: $id_gn";; + *[^a-zA-Z0-9._-]*) skip_ "invalid group name: $id_gn";; esac;; *) ;; esac diff --git a/tests/cp/acl b/tests/cp/acl index b99ac6be3..8c132a940 100755 --- a/tests/cp/acl +++ b/tests/cp/acl @@ -24,7 +24,7 @@ require_acl_ # Skip this test if cp was built without ACL support: grep '^#define USE_ACL 1' $CONFIG_HEADER > /dev/null || - skip_test_ "insufficient ACL support" + skip_ "insufficient ACL support" mkdir -p a b || framework_failure touch a/file || framework_failure @@ -34,7 +34,7 @@ skip=no acl1=`cd a && getfacl file` || skip=yes setfacl -m user:bin:rw a/file 2> /dev/null || skip=yes test $skip = yes && - skip_test_ "'.' is not on a suitable file system for this test" + skip_ "'.' is not on a suitable file system for this test" # copy a file without preserving permissions cp a/file b/ || fail=1 diff --git a/tests/cp/capability b/tests/cp/capability index 0106b8b9e..be5fb082a 100755 --- a/tests/cp/capability +++ b/tests/cp/capability @@ -23,21 +23,21 @@ working_umask_or_skip_ grep '^#define HAVE_CAP 1' $CONFIG_HEADER > /dev/null \ - || skip_test_ "configured without libcap support" + || skip_ "configured without libcap support" (setcap --help) 2>&1 |grep 'usage: setcap' > /dev/null \ - || skip_test_ "setcap utility not found" + || skip_ "setcap utility not found" (getcap --help) 2>&1 |grep 'usage: getcap' > /dev/null \ - || skip_test_ "getcap utility not found" + || skip_ "getcap utility not found" touch file || framework_failure chown $NON_ROOT_USERNAME file || framework_failure setcap 'cap_net_bind_service=ep' file || - skip_test_ "setcap doesn't work" + skip_ "setcap doesn't work" getcap file | grep cap_net_bind_service >/dev/null || - skip_test_ "getcap doesn't work" + skip_ "getcap doesn't work" cp --preserve=xattr file copy1 || fail=1 diff --git a/tests/cp/cp-a-selinux b/tests/cp/cp-a-selinux index 3d55a0f8e..76684d6f4 100755 --- a/tests/cp/cp-a-selinux +++ b/tests/cp/cp-a-selinux @@ -46,11 +46,11 @@ skip=0 dd if=/dev/zero of=blob bs=8192 count=200 || skip=1 mkdir mnt || skip=1 mkfs -t ext2 -F blob || - skip_test_ "failed to create an ext2 file system" + skip_ "failed to create an ext2 file system" mount -oloop,context=$ctx blob mnt || skip=1 test $skip = 1 \ - && skip_test_ "insufficient mount/ext2 support" + && skip_ "insufficient mount/ext2 support" cd mnt || framework_failure diff --git a/tests/cp/cp-mv-enotsup-xattr b/tests/cp/cp-mv-enotsup-xattr index 1732e2e4c..2f26dbd82 100755 --- a/tests/cp/cp-mv-enotsup-xattr +++ b/tests/cp/cp-mv-enotsup-xattr @@ -39,13 +39,13 @@ make_fs() { || skip=1 mkdir "$where" || skip=1 mkfs -t ext2 -F "$fs" || - skip_test_ "failed to create ext2 file system" + skip_ "failed to create ext2 file system" mount -oloop,$opts "$fs" "$where" || skip=1 echo test > "$where"/f || skip=1 test -s "$where"/f || skip=1 test $skip = 1 && - skip_test_ "insufficient mount/ext2 support" + skip_ "insufficient mount/ext2 support" } make_fs noxattr nouser_xattr @@ -57,13 +57,13 @@ xattr_value="bar" xattr_pair="$xattr_name=\"$xattr_value\"" echo test > xattr/a || framework_failure -getfattr -d xattr/a >out_a || skip_test_ "failed to get xattr of file" +getfattr -d xattr/a >out_a || skip_ "failed to get xattr of file" grep -F "$xattr_pair" out_a >/dev/null && framework_failure setfattr -n "$xattr_name" -v "$xattr_value" xattr/a >out_a \ - || skip_test_ "failed to set xattr of file" -getfattr -d xattr/a >out_a || skip_test_ "failed to get xattr of file" + || skip_ "failed to set xattr of file" +getfattr -d xattr/a >out_a || skip_ "failed to get xattr of file" grep -F "$xattr_pair" out_a >/dev/null \ - || skip_test_ "failed to set xattr of file" + || skip_ "failed to set xattr of file" # This should pass without diagnostics diff --git a/tests/cp/fiemap-2 b/tests/cp/fiemap-2 index 76edd4830..691ead255 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_test_ "this file system lacks FIEMAP support" + || skip_ "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-empty b/tests/cp/fiemap-empty index 836668ef7..095d1b7c3 100755 --- a/tests/cp/fiemap-empty +++ b/tests/cp/fiemap-empty @@ -22,18 +22,18 @@ print_ver_ cp # FIXME: enable any part of this test that is still relevant, # or, if none are relevant (now that cp does not handle unwritten # extents), just remove the test altogether. -skip_test_ 'disabled for now' +skip_ 'disabled for now' touch fiemap_chk fiemap_capable_ fiemap_chk || - skip_test_ 'this file system lacks FIEMAP support' + skip_ 'this file system lacks FIEMAP support' rm fiemap_chk # TODO: rather than requiring `fallocate`, possible add # this functionality to truncate --alloc -fallocate --help >/dev/null || skip_test_ 'The fallocate utility is required' +fallocate --help >/dev/null || skip_ 'The fallocate utility is required' fallocate -l 1 -n falloc.test || - skip_test_ 'this file system lacks FALLOCATE support' + skip_ 'this file system lacks FALLOCATE support' rm falloc.test # Require more space than we'll actually use, so that @@ -44,13 +44,13 @@ rm falloc.test require_file_system_bytes_free_ 800000000 fallocate -l 600MiB space.test || - skip_test_ 'this test needs at least 600MiB free space' + skip_ 'this test needs at least 600MiB free space' # Disable this test on old BTRFS (e.g. Fedora 14) # which reports ordinary extents for unwritten ones. -filefrag space.test || skip_test_ 'the `filefrag` utility is missing' +filefrag space.test || skip_ 'the `filefrag` utility is missing' filefrag -v space.test | grep -F 'unwritten' > /dev/null || - skip_test_ 'this file system does not report empty extents as "unwritten"' + skip_ 'this file system does not report empty extents as "unwritten"' rm space.test diff --git a/tests/cp/fiemap-perf b/tests/cp/fiemap-perf index 2c56fc81e..b17360e68 100755 --- a/tests/cp/fiemap-perf +++ b/tests/cp/fiemap-perf @@ -22,21 +22,21 @@ print_ver_ cp # Require a fiemap-enabled FS. touch fiemap_chk fiemap_capable_ fiemap_chk || - skip_test_ "this file system lacks FIEMAP support" + skip_ "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_test_ "ext3 has known slow FIEMAP scanning" + skip_ "ext3 has known slow FIEMAP scanning" # Create a large-but-sparse file. timeout 10 truncate -s1T f || framework_failure_ # Disable this test on old BTRFS (e.g. Fedora 14) # which reports (unwritten) extents for holes. -filefrag f || skip_test_ 'the `filefrag` utility is missing' +filefrag f || skip_ 'the `filefrag` utility is missing' filefrag f | grep -F ': 0 extents found' > /dev/null || - skip_test_ 'this file system reports extents for holes' + skip_ 'this file system reports extents for holes' # Nothing can read (much less write) that many bytes in so little time. timeout 10 cp f f2 || fail=1 diff --git a/tests/cp/link-symlink b/tests/cp/link-symlink index 443b337db..0d09f5d83 100755 --- a/tests/cp/link-symlink +++ b/tests/cp/link-symlink @@ -24,10 +24,10 @@ print_ver_ cp touch file ln -s file link || framework_failure touch -m -h -d 2011-01-01 link || - skip_test_ "Your system doesn't support updating symlink timestamps" + skip_ "Your system doesn't support updating symlink timestamps" case `stat --format=%y link` in 2011-01-01*) ;; - *) skip_test_ "Your system doesn't support updating symlink timestamps" ;; + *) skip_ "Your system doesn't support updating symlink timestamps" ;; esac # link.cp is probably a hardlink, but may also be a symlink diff --git a/tests/cp/preserve-gid b/tests/cp/preserve-gid index de4bc5bce..6893ba2b9 100755 --- a/tests/cp/preserve-gid +++ b/tests/cp/preserve-gid @@ -74,7 +74,7 @@ nameless_gid2=`$PERL -le ' if test -z "$nameless_uid" \ || test -z "$nameless_gid1" \ || test -z "$nameless_gid2"; then - skip_test_ "couldn't find a nameless UID or GID" + skip_ "couldn't find a nameless UID or GID" fi chown "+$nameless_uid:+0" . diff --git a/tests/cp/preserve-slink-time b/tests/cp/preserve-slink-time index 0dd6e7c1c..0f9bfe53d 100755 --- a/tests/cp/preserve-slink-time +++ b/tests/cp/preserve-slink-time @@ -21,7 +21,7 @@ print_ver_ cp grep '^#define HAVE_UTIMENSAT 1' "$CONFIG_HEADER" > /dev/null || grep '^#define HAVE_LUTIMES 1' "$CONFIG_HEADER" > /dev/null || - skip_test_ 'this system lacks the utimensat function' + skip_ 'this system lacks the utimensat function' ln -s no-such dangle || framework_failure diff --git a/tests/cp/proc-short-read b/tests/cp/proc-short-read index a90446d4c..2276a6e72 100755 --- a/tests/cp/proc-short-read +++ b/tests/cp/proc-short-read @@ -21,7 +21,7 @@ print_ver_ cp kall=/proc/kallsyms -test -r $kall || skip_test_ "your system lacks $kall" +test -r $kall || skip_ "your system lacks $kall" # Before coreutils-7.3, cp would copy less than 4KiB of this 1MB+ file. cp $kall 1 || fail=1 diff --git a/tests/cp/reflink-perm b/tests/cp/reflink-perm index 736f33a29..367704d72 100755 --- a/tests/cp/reflink-perm +++ b/tests/cp/reflink-perm @@ -24,7 +24,7 @@ print_ver_ cp : > file ts='2009-08-28 19:00' touch -d "$ts" file || framework_failure -test time_check -nt file || skip_test_ "The system clock is wrong" +test time_check -nt file || skip_ "The system clock is wrong" chmod a=rwx file || framework_failure umask 077 diff --git a/tests/cp/sparse-fiemap b/tests/cp/sparse-fiemap index 64668ed36..3d340777b 100755 --- a/tests/cp/sparse-fiemap +++ b/tests/cp/sparse-fiemap @@ -18,7 +18,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ cp -$PERL -e 1 || skip_test_ 'you lack perl' +$PERL -e 1 || skip_ 'you lack perl' # The test was seen to fail on ext3 so exclude that type # (or any file system where the type can't be determined) @@ -28,7 +28,7 @@ if fiemap_capable_ fiemap_chk && ! df -t ext3 . >/dev/null; then else # FIXME: temporarily(?) skip this variant, at least until after this bug # is fixed: http://thread.gmane.org/gmane.comp.file-systems.ext4/24495 - skip_test_ "current file system has insufficient FIEMAP support" + skip_ "current file system has insufficient FIEMAP support" # It's not; we need to create one, hence we need root access. require_root_ @@ -41,14 +41,14 @@ else dd if=/dev/zero of=blob bs=32k count=1000 || skip=1 mkdir mnt mkfs -t ext4 -F blob || - skip_test_ "failed to create ext4 file system" + skip_ "failed to create ext4 file system" mount -oloop blob mnt || skip=1 cd mnt || skip=1 echo test > f || skip=1 test -s f || skip=1 test $skip = 1 && - skip_test_ "insufficient mount/ext4 support" + skip_ "insufficient mount/ext4 support" fi # ================================================= diff --git a/tests/dd/direct b/tests/dd/direct index 6d45ce25d..9350545a6 100755 --- a/tests/dd/direct +++ b/tests/dd/direct @@ -21,7 +21,7 @@ print_ver_ dd truncate -s 8192 in || framework_failure dd if=in oflag=direct of=out 2> /dev/null \ - || skip_test_ 'this file system lacks support for O_DIRECT' + || skip_ 'this file system lacks support for O_DIRECT' truncate -s 511 short || framework_failure truncate -s 8191 m1 || framework_failure diff --git a/tests/dd/skip-seek-past-dev b/tests/dd/skip-seek-past-dev index 59f229fac..a54e0106c 100755 --- a/tests/dd/skip-seek-past-dev +++ b/tests/dd/skip-seek-past-dev @@ -36,7 +36,7 @@ get_device_size() { device=$(df -P . | tail -n1 | cut -d' ' -f1) || framework_failure dev_size=$(get_device_size "$device") || - skip_test_ "failed to determine size of $device" + skip_ "failed to determine size of $device" # Don't use shell arithmetic as older versions of dash use longs DEV_OFLOW=$(expr $dev_size + 1) diff --git a/tests/df/total-verify b/tests/df/total-verify index 7eaf4ff7c..bc9c99e5f 100755 --- a/tests/df/total-verify +++ b/tests/df/total-verify @@ -19,7 +19,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ df -df || skip_test_ "df fails" +df || skip_ "df fails" cat <<\EOF > check-df || framework_failure my ($total, $used, $avail) = (0, 0, 0); diff --git a/tests/du/2g b/tests/du/2g index 553dc509d..280ba30f8 100755 --- a/tests/du/2g +++ b/tests/du/2g @@ -33,14 +33,14 @@ very_expensive_ free_kb=`df -kP .|tail -1|sed 's/ [0-9][0-9]*%.*//;s/ *$//;s/.* //'` case "$free_kb" in [0-9]*) ;; - *) skip_test_ "invalid size from df: $free_kb";; + *) skip_ "invalid size from df: $free_kb";; esac # Require about 3GB free. min_kb=3000000 test $min_kb -lt $free_kb || { - skip_test_ \ + skip_ \ "too little free space on current partition: $free_kb (need $min_kb KB)" } diff --git a/tests/du/8gb b/tests/du/8gb index 2bd430644..ab283e42e 100755 --- a/tests/du/8gb +++ b/tests/du/8gb @@ -23,7 +23,7 @@ require_sparse_support_ dd bs=1 seek=8G of=big < /dev/null 2> /dev/null if test $? != 0; then - skip_test_ 'cannot create a file large enough for this test; possibly + skip_ 'cannot create a file large enough for this test; possibly because file offsets are only 32 bits on this file system' fi @@ -35,7 +35,7 @@ fi set x `ls -gG big` size=$4 if test "$size" = 0; then - skip_test_ "cannot create a file large enough for this test + skip_ "cannot create a file large enough for this test possibly because this system's NFS support is buggy Consider rerunning this test on a different file system." fi diff --git a/tests/du/bigtime b/tests/du/bigtime index 1498719f5..b33b80126 100755 --- a/tests/du/bigtime +++ b/tests/du/bigtime @@ -30,11 +30,11 @@ case "$future_time" in *" $bignum "*) : ;; *' Dec 4 300627798676 '*) - skip_test_ "file system and localtime both handle big timestamps" ;; + skip_ "file system and localtime both handle big timestamps" ;; *) - skip_test_ "file system or localtime mishandles big time stamps:" \ + skip_ "file system or localtime mishandles big time stamps:" \ "$future_time" ;; -esac || skip_test_ "file system cannot represent big time stamps" +esac || skip_ "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 a72212239..fc1e1844c 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_test_ "cat dir/ succeeds" +cat dir > /dev/null && skip_ "cat dir/ succeeds" for prog in du wc; do $prog --files0-from=dir > /dev/null 2>err && fail=1 diff --git a/tests/du/long-from-unreadable b/tests/du/long-from-unreadable index 43ef60dfb..92cd3788c 100755 --- a/tests/du/long-from-unreadable +++ b/tests/du/long-from-unreadable @@ -33,7 +33,7 @@ print_ver_ du proc_file=/proc/self/fd if test ! -d $proc_file; then - skip_test_ 'This test would fail, since your system lacks /proc support.' + skip_ 'This test would fail, since your system lacks /proc support.' fi dir=`printf '%200s\n' ' '|tr ' ' x` diff --git a/tests/du/long-sloop b/tests/du/long-sloop index 117e9da14..1f46a4a40 100755 --- a/tests/du/long-sloop +++ b/tests/du/long-sloop @@ -54,7 +54,7 @@ echo foo > $i # name traversal exceeds MAXSYMLINKS'. cat $file > /dev/null 2> err && - skip_test_ 'Your system appears to be able to handle more than $n symlinks + skip_ 'Your system appears to be able to handle more than $n symlinks in file name resolution' too_many=`sed 's/.*: //' err` diff --git a/tests/du/move-dir-while-traversing b/tests/du/move-dir-while-traversing index 0270389a6..68302b8ff 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_test_ 'python inotify package not installed' + || skip_ '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/du/slink b/tests/du/slink index c20d753ec..7f6c79d3e 100755 --- a/tests/du/slink +++ b/tests/du/slink @@ -27,7 +27,7 @@ require_local_dir_ if df --type=xfs . >/dev/null 2>&1; then # At least on Irix-6.5.19, when using an xfs file system, # each created symlink (name lengths up to 255) would have a size of `0'. - skip_test_ "\`.' is on an XFS file system" + skip_ "\`.' is on an XFS file system" fi symlink_name_lengths='1 15 16 31 32 59 60 63 64 127 128 255 256 511 512 1024' diff --git a/tests/init.cfg b/tests/init.cfg index 795f23c0d..1b8f870fc 100644 --- a/tests/init.cfg +++ b/tests/init.cfg @@ -34,16 +34,6 @@ sanitize_path_() export PATH } -# Use this function rather than init.sh's skip_. -# The "skip_" function emits its diagnostic only to one stream. -# This one emits it both to the tty and to the log file. -skip_test_() -{ - echo "$0: skipping test: $@" | head -1 1>&9 - echo "$0: skipping test: $@" 1>&2 - Exit 77 -} - getlimits_() { eval $(getlimits) @@ -55,10 +45,10 @@ require_acl_() { getfacl --version < /dev/null > /dev/null 2>&1 \ && setfacl --version < /dev/null > /dev/null 2>&1 \ - || skip_test_ "This test requires getfacl and setfacl." + || skip_ "This test requires getfacl and setfacl." id -u bin > /dev/null 2>&1 \ - || skip_test_ "This test requires a local user named bin." + || skip_ "This test requires a local user named bin." } is_local_dir_() @@ -70,14 +60,14 @@ is_local_dir_() require_local_dir_() { is_local_dir_ . || - skip_test_ "This test must be run on a local file system." + skip_ "This test must be run on a local file system." } # Skip this test if we're not in SELinux "enforcing" mode. require_selinux_enforcing_() { test "$(getenforce)" = Enforcing \ - || skip_test_ "This test is useful only with SELinux in Enforcing mode." + || skip_ "This test is useful only with SELinux in Enforcing mode." } require_openat_support_() @@ -85,13 +75,13 @@ require_openat_support_() # Skip this test if your system has neither the openat-style functions # nor /proc/self/fd support with which to emulate them. test -z "$CONFIG_HEADER" \ - && skip_test_ 'internal error: CONFIG_HEADER not defined' + && skip_ 'internal error: CONFIG_HEADER not defined' _skip=yes grep '^#define HAVE_OPENAT' "$CONFIG_HEADER" > /dev/null && _skip=no test -d /proc/self/fd && _skip=no if test $_skip = yes; then - skip_test_ 'this system lacks openat support' + skip_ 'this system lacks openat support' fi } @@ -107,12 +97,12 @@ require_ulimit_() ( ulimit -v 20; date ) > /dev/null 2>&1 && ulimit_works=no test $ulimit_works = no \ - && skip_test_ "this shell lacks ulimit support" + && skip_ "this shell lacks ulimit support" } require_readable_root_() { - test -r / || skip_test_ "/ is not readable" + test -r / || skip_ "/ is not readable" } # Skip the current test if strace is not available or doesn't work @@ -122,10 +112,10 @@ require_strace_() test $# = 1 || framework_failure strace -V < /dev/null > /dev/null 2>&1 || - skip_test_ 'no strace program' + skip_ 'no strace program' strace -qe "$1" echo > /dev/null 2>&1 || - skip_test_ 'strace -qe "'"$1"'" does not work' + skip_ 'strace -qe "'"$1"'" does not work' } # Require a controlling input `terminal'. @@ -134,7 +124,7 @@ require_controlling_input_terminal_() tty -s || have_input_tty=no test -t 0 || have_input_tty=no if test "$have_input_tty" = no; then - skip_test_ 'requires controlling input terminal + skip_ 'requires controlling input terminal This test must have a controlling input "terminal", so it may not be run via "batch", "at", or "ssh". On some systems, it may not even be run in the background.' @@ -151,7 +141,7 @@ require_built_() esac done - test $skip_ = yes && skip_test_ "required program(s) not built" + test $skip_ = yes && skip_ "required program(s) not built" } require_file_system_bytes_free_() @@ -159,7 +149,7 @@ require_file_system_bytes_free_() local req=$1 local expr=$(stat -f --printf "$req / %S <= %a" .) awk "BEGIN{ exit !($expr) }" \ - || skip_test_ "this test needs at least $req bytes of free space" + || skip_ "this test needs at least $req bytes of free space" } uid_is_privileged_() @@ -219,8 +209,8 @@ rwx_to_mode_() skip_if_() { case $1 in - root) skip_test_ must be run as root ;; - non-root) skip_test_ must be run as non-root ;; + root) skip_ must be run as root ;; + non-root) skip_ must be run as non-root ;; *) ;; # FIXME? esac } @@ -230,13 +220,13 @@ require_selinux_() # When in a chroot of an SELinux-enabled system, but with a mock-simulated # SELinux-*disabled* system, recognize that SELinux is disabled system wide: grep 'selinuxfs$' /proc/filesystems > /dev/null \ - || skip_test_ "this system lacks SELinux support" + || skip_ "this system lacks SELinux support" # Independent of whether SELinux is enabled system-wide, # the current file system may lack SELinux support. case `ls -Zd .` in '? .'|'unlabeled .') - skip_test_ "this system (or maybe just" \ + skip_ "this system (or maybe just" \ "the current file system) lacks SELinux support" ;; esac @@ -245,7 +235,7 @@ require_selinux_() very_expensive_() { if test "$RUN_VERY_EXPENSIVE_TESTS" != yes; then - skip_test_ 'very expensive: disabled by default + skip_ 'very expensive: disabled by default This test is very expensive, so it is disabled by default. To run it anyway, rerun make check with the RUN_VERY_EXPENSIVE_TESTS environment variable set to yes. E.g., @@ -258,7 +248,7 @@ environment variable set to yes. E.g., expensive_() { if test "$RUN_EXPENSIVE_TESTS" != yes; then - skip_test_ 'expensive: disabled by default + skip_ 'expensive: disabled by default This test is relatively expensive, so it is disabled by default. To run it anyway, rerun make check with the RUN_EXPENSIVE_TESTS environment variable set to yes. E.g., @@ -270,12 +260,12 @@ environment variable set to yes. E.g., require_root_() { - uid_is_privileged_ || skip_test_ "must be run as root" + uid_is_privileged_ || skip_ "must be run as root" NON_ROOT_USERNAME=${NON_ROOT_USERNAME=nobody} NON_ROOT_GROUP=${NON_ROOT_GROUP=$(id -g $NON_ROOT_USERNAME)} } -skip_if_root_() { uid_is_privileged_ && skip_test_ "must be run as non-root"; } +skip_if_root_() { uid_is_privileged_ && skip_ "must be run as non-root"; } error_() { echo "$0: $@" 1>&2; Exit 1; } framework_failure() { error_ 'failure in testing framework'; } @@ -288,7 +278,7 @@ require_membership_in_two_groups_() groups=${COREUTILS_GROUPS-`(id -G || /usr/xpg4/bin/id -G) 2>/dev/null`} case "$groups" in *' '*) ;; - *) skip_test_ 'requires membership in two groups + *) skip_ 'requires membership in two groups this test requires that you be a member of more than one group, but running `id -G'\'' either failed or found just one. If you really are a member of at least two groups, then rerun this test with @@ -309,7 +299,7 @@ require_proc_pid_status_() local pid=$! sleep .5 grep '^State:[ ]*[S]' /proc/$pid/status > /dev/null 2>&1 || - skip_test_ "/proc/$pid/status: missing or 'different'" + skip_ "/proc/$pid/status: missing or 'different'" kill $pid } @@ -329,10 +319,10 @@ fiemap_capable_() require_dirent_d_type_() { python < /dev/null \ - || skip_test_ python missing: assuming no d_type support + || skip_ python missing: assuming no d_type support python $abs_srcdir/d_type-check \ - || skip_test_ requires d_type support + || skip_ requires d_type support } # Does the current (working-dir) file system support sparse files? @@ -348,7 +338,7 @@ require_sparse_support_() kb_size=$2 rm -f $t if test $kb_size -ge 128; then - skip_test_ 'this file system does not support sparse files' + skip_ 'this file system does not support sparse files' fi } @@ -360,7 +350,7 @@ mkfifo_or_skip_() # failure as a test failure. However, in this case, when running on a SunOS # system using a disk NFS mounted from OpenBSD, the above fails like this: # mkfifo: cannot make fifo `fifo-10558': Not owner - skip_test_ 'unable to create a fifo' + skip_ 'unable to create a fifo' fi } @@ -375,7 +365,7 @@ skip_if_setgid_() case $perms in drwx------);; drwxr-xr-x);; # Windows98 + DJGPP 2.03 - *) skip_test_ 'this directory has the setgid bit set';; + *) skip_ 'this directory has the setgid bit set';; esac } @@ -390,7 +380,7 @@ skip_if_mcstransd_is_running_() case $__ctx in *:*:*:*) ;; # four components is ok *) # anything else probably means mcstransd is running - skip_test_ "unexpected context '$__ctx'; turn off mcstransd" ;; + skip_ "unexpected context '$__ctx'; turn off mcstransd" ;; esac } @@ -407,7 +397,7 @@ working_umask_or_skip_() case $perms in *' - '*) skip_test_ 'your build directory has unusual umask semantics' + '*) skip_ 'your build directory has unusual umask semantics' esac } diff --git a/tests/init.sh b/tests/init.sh index d7a5d8347..b8577305b 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_test_ and fail_ functions to print a diagnostic and then exit +# Use the skip_ and fail_ functions to print a diagnostic and then exit # with the corresponding exit code. # Exit $? @@ -163,7 +163,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_test_ failed to find an adequate shell + test -z "$marginal_" && skip_ failed to find an adequate shell re_shell_=$marginal_ break fi diff --git a/tests/install/install-C-selinux b/tests/install/install-C-selinux index 426beb8b3..072297dc8 100755 --- a/tests/install/install-C-selinux +++ b/tests/install/install-C-selinux @@ -22,7 +22,7 @@ require_selinux_ echo test > a || framework_failure -chcon -u system_u a || skip_test_ "chcon doesn't work" +chcon -u system_u a || skip_ "chcon doesn't work" echo "\`a' -> \`b'" > out_installed_first echo "removed \`b' @@ -42,7 +42,7 @@ ginstall -v --preserve-context a b > out || fail=1 compare out out_installed_second || fail=1 # destination file exists but SELinux context differs -chcon -u unconfined_u a || skip_test_ "chcon doesn't work" +chcon -u unconfined_u a || skip_ "chcon doesn't work" ginstall -Cv --preserve-context a b > out || fail=1 compare out out_installed_second || fail=1 ginstall -Cv --preserve-context a b > out || fail=1 diff --git a/tests/ls/capability b/tests/ls/capability index 9cc8ba26d..c4762c963 100755 --- a/tests/ls/capability +++ b/tests/ls/capability @@ -21,10 +21,10 @@ print_ver_ ls require_root_ grep '^#define HAVE_CAP 1' $CONFIG_HEADER > /dev/null \ - || skip_test_ "configured without libcap support" + || skip_ "configured without libcap support" (setcap --help) 2>&1 |grep 'usage: setcap' > /dev/null \ - || skip_test_ "setcap utility not found" + || skip_ "setcap utility not found" # Don't let a different umask perturb the results. umask 22 @@ -38,7 +38,7 @@ cd test touch cap_pos dir/cap_pos dir/cap_neg for file in cap_pos dir/cap_neg; do setcap 'cap_net_bind_service=ep' $file || - skip_test_ "setcap doesn't work" + skip_ "setcap doesn't work" done code='30;41' diff --git a/tests/ls/multihardlink b/tests/ls/multihardlink index cf7db21e5..a9d31f4b7 100755 --- a/tests/ls/multihardlink +++ b/tests/ls/multihardlink @@ -21,7 +21,7 @@ print_ver_ ls working_umask_or_skip_ touch file file1 || framework_failure -ln file1 file2 || skip_test_ "can't create hard link" +ln file1 file2 || skip_ "can't create hard link" code_mh='44;37' code_ex='01;32' code_png='01;35' diff --git a/tests/ls/nameless-uid b/tests/ls/nameless-uid index 7bd4f0ee3..a0de6ce92 100755 --- a/tests/ls/nameless-uid +++ b/tests/ls/nameless-uid @@ -29,7 +29,7 @@ nameless_uid=`$PERL -e ' '` if test x$nameless_uid = x; then - skip_test_ "couldn't find a nameless UID" + skip_ "couldn't find a nameless UID" fi touch f || framework_failure diff --git a/tests/ls/no-cap b/tests/ls/no-cap index 193aea3fb..2cca71ca1 100755 --- a/tests/ls/no-cap +++ b/tests/ls/no-cap @@ -21,7 +21,7 @@ print_ver_ ls require_strace_ capget strace -e capget ls --color=always > /dev/null 2> out || fail=1 -$EGREP 'capget\(' out || skip_test_ "your ls doesn't call capget" +$EGREP 'capget\(' out || skip_ "your ls doesn't call capget" rm -f out eval "$(TERM=xterm dircolors -b | sed 's/ca=[^:]*:/ca=:/')" diff --git a/tests/ls/readdir-mountpoint-inode b/tests/ls/readdir-mountpoint-inode index bd827acd5..83e67b0fc 100755 --- a/tests/ls/readdir-mountpoint-inode +++ b/tests/ls/readdir-mountpoint-inode @@ -23,7 +23,7 @@ print_ver_ ls # potentially very many remote mounts. mount_points=$(df --local -P 2>&1 | sed -n 's,.*[0-9]% \(/.\),\1,p') test -z "$mount_points" && - skip_test_ "this test requires a non-root mount point" + skip_ "this test requires a non-root mount point" # Given e.g., /dev/shm, produce the list of GNU ls options that # let us list just that entry using readdir data from its parent: @@ -50,8 +50,8 @@ inode_via_readdir() mount_point=$1 base=$(basename $mount_point) case $base in - .*) skip_test_ 'mount point component starts with "."' ;; - *[*?]*) skip_test_ 'mount point component contains "?" or "*"' ;; + .*) skip_ 'mount point component starts with "."' ;; + *[*?]*) skip_ 'mount point component contains "?" or "*"' ;; esac opts=$(ls_ignore_options "$base") parent_dir=$(dirname $mount_point) diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype index ddf8d2e43..dfa2dd555 100755 --- a/tests/ls/stat-dtype +++ b/tests/ls/stat-dtype @@ -30,7 +30,7 @@ print_ver_ ls mkdir -p c/d || framework_failure chmod a-x c || framework_failure if test "X`ls -p c 2>&1`" != Xd/; then - skip_test_ "'.' is not on a suitable file system for this test" + skip_ "'.' is not on a suitable file system for this test" fi mkdir d || framework_failure diff --git a/tests/misc/cat-proc b/tests/misc/cat-proc index 3cdc2bbb7..83c173513 100755 --- a/tests/misc/cat-proc +++ b/tests/misc/cat-proc @@ -23,7 +23,7 @@ print_ver_ cat f=/proc/cpuinfo test -f $f \ - || skip_test_ "no $f" + || skip_ "no $f" # Yes, parts of /proc/cpuinfo might change between cat runs. diff --git a/tests/misc/env b/tests/misc/env index 948b47527..d5e4fd627 100755 --- a/tests/misc/env +++ b/tests/misc/env @@ -57,7 +57,7 @@ test $? = 127 || fail=1 # For these reasons, it is more portable to grep that our desired changes # took place, rather than comparing output of env over an entire environment. if env | grep '^ENV_TEST' >/dev/null ; then - skip_test_ "environment has potential interference from ENV_TEST*" + skip_ "environment has potential interference from ENV_TEST*" fi ENV_TEST1=a diff --git a/tests/misc/nice b/tests/misc/nice index dc4c1b2f7..f63a28ecd 100755 --- a/tests/misc/nice +++ b/tests/misc/nice @@ -49,7 +49,7 @@ niceness=`nice` if test "$niceness" = 0; then : ok else - skip_test_ "this test must be run at nice level 0" + skip_ "this test must be run at nice level 0" fi while :; do diff --git a/tests/misc/od-x8 b/tests/misc/od-x8 index 7504414c3..4936109d8 100755 --- a/tests/misc/od-x8 +++ b/tests/misc/od-x8 @@ -21,7 +21,7 @@ print_ver_ od od -t x8 /dev/null >/dev/null || - skip_test_ "od lacks support for 8-byte quantities" + skip_ "od lacks support for 8-byte quantities" echo abcdefgh |tr -d '\n' > in || framework_failure diff --git a/tests/misc/printenv b/tests/misc/printenv index 5744afddc..607914c10 100755 --- a/tests/misc/printenv +++ b/tests/misc/printenv @@ -31,7 +31,7 @@ compare exp out || fail=1 # Environment variable values may contain newlines, which cannot be # observed by merely inspecting output from printenv. if env -- printenv | grep '^ENV_TEST' >/dev/null ; then - skip_test_ "environment has potential interference from ENV_TEST*" + skip_ "environment has potential interference from ENV_TEST*" fi # Printing a single variable's value. diff --git a/tests/misc/pwd-option b/tests/misc/pwd-option index 8eaf6be8f..c90049320 100755 --- a/tests/misc/pwd-option +++ b/tests/misc/pwd-option @@ -29,7 +29,7 @@ test "x$PWD" = "x$base" || framework_failure # Enter a logical directory. cd c || framework_failure -test "x$PWD" = "x$base/c" || skip_test_ "cd does not properly update \$PWD" +test "x$PWD" = "x$base/c" || skip_ "cd does not properly update \$PWD" env -- pwd -L > out || fail=1 printf %s\\n "$base/c" > exp || fail=1 diff --git a/tests/misc/selinux b/tests/misc/selinux index d1bc9caea..df3cb3ec1 100755 --- a/tests/misc/selinux +++ b/tests/misc/selinux @@ -33,7 +33,7 @@ mkfifo_or_skip_ p ctx=root:object_r:tmp_t:s0 chcon $ctx f d p || - skip_test_ '"chcon '$ctx' ..." failed' + skip_ '"chcon '$ctx' ..." failed' # inspect that context with both ls -Z and stat. for i in d f p; do diff --git a/tests/misc/seq-long-double b/tests/misc/seq-long-double index 4d3a20880..230912cbe 100755 --- a/tests/misc/seq-long-double +++ b/tests/misc/seq-long-double @@ -34,7 +34,7 @@ int foo[sizeof (long double) - sizeof (double) - 1]; #endif EOF $CC -c long.c \ - || skip_test_ \ + || skip_ \ 'this test runs only on systems with glibc and long double != double' a=$INTMAX_MAX diff --git a/tests/misc/sort-continue b/tests/misc/sort-continue index 40105d5a5..43881ac2e 100755 --- a/tests/misc/sort-continue +++ b/tests/misc/sort-continue @@ -21,7 +21,7 @@ print_ver_ sort # Skip the test when running under valgrind. ( ulimit -n 6; sort < /dev/null ) \ - || skip_test_ 'fd-limited sort failed; are you running under valgrind?' + || skip_ 'fd-limited sort failed; are you running under valgrind?' for i in $(seq 31); do echo $i | tee -a in > __test.$i || framework_failure diff --git a/tests/misc/sort-month b/tests/misc/sort-month index 126c61563..1b5b76c18 100755 --- a/tests/misc/sort-month +++ b/tests/misc/sort-month @@ -20,7 +20,7 @@ print_ver_ sort locale --version >/dev/null 2>&1 || - skip_test_ 'The locale utility is not present' + skip_ 'The locale utility is not present' # C will be used if the locale is not present for LOC in "$LOCALE_FR" "$LOCALE_FR_UTF8" "ja_JP.utf8"; do diff --git a/tests/misc/sort-spinlock-abuse b/tests/misc/sort-spinlock-abuse index fc9612cfc..4cf886660 100755 --- a/tests/misc/sort-spinlock-abuse +++ b/tests/misc/sort-spinlock-abuse @@ -21,7 +21,7 @@ print_ver_ sort grep '^#define HAVE_PTHREAD_T 1' "$CONFIG_HEADER" > /dev/null || - skip_test_ 'requires pthreads' + skip_ 'requires pthreads' seq 100000 > in || framework_failure_ mkfifo_or_skip_ fifo diff --git a/tests/misc/sort-stale-thread-mem b/tests/misc/sort-stale-thread-mem index 6f676eff4..5e9c0e765 100755 --- a/tests/misc/sort-stale-thread-mem +++ b/tests/misc/sort-stale-thread-mem @@ -23,9 +23,9 @@ print_ver_ sort very_expensive_ -valgrind --help >/dev/null || skip_test_ "requires valgrind" +valgrind --help >/dev/null || skip_ "requires valgrind" grep '^#define HAVE_PTHREAD_T 1' "$CONFIG_HEADER" > /dev/null || - skip_test_ 'requires pthreads' + skip_ 'requires pthreads' # gensort output seems to trigger the failure more often, # so prefer gensort if it is available. diff --git a/tests/misc/sort-unique-segv b/tests/misc/sort-unique-segv index 41eede2e7..6a40c379c 100755 --- a/tests/misc/sort-unique-segv +++ b/tests/misc/sort-unique-segv @@ -20,7 +20,7 @@ print_ver_ sort grep '^#define HAVE_PTHREAD_T 1' "$CONFIG_HEADER" > /dev/null || - skip_test_ 'requires pthreads' + skip_ 'requires pthreads' cat <<\EOF > in || framework_failure_ diff --git a/tests/misc/stat-nanoseconds b/tests/misc/stat-nanoseconds index 33dc58a7a..27282f4e7 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_test_ this file system does not support sub-second time stamps + || skip_ 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/misc/stdbuf b/tests/misc/stdbuf index 80ad870c2..ccf60b197 100755 --- a/tests/misc/stdbuf +++ b/tests/misc/stdbuf @@ -28,7 +28,7 @@ lf=' ' case $abs_top_builddir in *[\\\"\#\$\&\'\`$lf\ \ ]*) - skip_test_ "unsafe absolute build directory name: $abs_top_builddir";; + skip_ "unsafe absolute build directory name: $abs_top_builddir";; esac # Use a fifo rather than a pipe in the tests below diff --git a/tests/misc/stty-row-col b/tests/misc/stty-row-col index d1d114368..f54ea7d58 100755 --- a/tests/misc/stty-row-col +++ b/tests/misc/stty-row-col @@ -52,7 +52,7 @@ NA LAST NA set $tests saved_size=`stty size` && test -n "$saved_size" \ - || skip_test_ "can't get window size" + || skip_ "can't get window size" # Linux virtual consoles issue an error if you # try to increase their size. So skip in that case. @@ -60,7 +60,7 @@ if test "x$saved_size" != "x0 0"; then srow=$(echo $saved_size | cut -d ' ' -f1) scol=$(echo $saved_size | cut -d ' ' -f2) stty rows $(expr $srow + 1) cols $(expr $scol + 1) || - skip_test_ "can't increase window size" + skip_ "can't increase window size" fi while :; do diff --git a/tests/misc/tac-continue b/tests/misc/tac-continue index 2f6e81347..0040ac60a 100755 --- a/tests/misc/tac-continue +++ b/tests/misc/tac-continue @@ -23,7 +23,7 @@ print_ver_ tac # See if the envvar is defined. if test x = "x$FULL_PARTITION_TMPDIR"; then - skip_test_ "FULL_PARTITION_TMPDIR not defined" + skip_ "FULL_PARTITION_TMPDIR not defined" fi if ! test -d "$FULL_PARTITION_TMPDIR"; then diff --git a/tests/misc/xattr b/tests/misc/xattr index 60fc24c6c..05437d037 100755 --- a/tests/misc/xattr +++ b/tests/misc/xattr @@ -24,7 +24,7 @@ print_ver_ cp mv ginstall # Skip this test if cp was built without xattr support: touch src dest || framework_failure cp --preserve=xattr -n src dest \ - || skip_test_ "coreutils built without xattr support" + || skip_ "coreutils built without xattr support" # this code was taken from test mv/backup-is-src cleanup_() { rm -rf "$other_partition_tmpdir"; } @@ -39,42 +39,42 @@ xattr_pair="$xattr_name=\"$xattr_value\"" # create new file and check its xattrs touch a || framework_failure -getfattr -d a >out_a || skip_test_ "failed to get xattr of file" +getfattr -d a >out_a || skip_ "failed to get xattr of file" grep -F "$xattr_pair" out_a && framework_failure # try to set user xattr on file setfattr -n "$xattr_name" -v "$xattr_value" a >out_a \ - || skip_test_ "failed to set xattr of file" -getfattr -d a >out_a || skip_test_ "failed to get xattr of file" + || skip_ "failed to set xattr of file" +getfattr -d a >out_a || skip_ "failed to get xattr of file" grep -F "$xattr_pair" out_a \ - || skip_test_ "failed to set xattr of file" + || skip_ "failed to set xattr of file" # cp should not preserve xattr by default cp a b || fail=1 -getfattr -d b >out_b || skip_test_ "failed to get xattr of file" +getfattr -d b >out_b || skip_ "failed to get xattr of file" grep -F "$xattr_pair" out_b && fail=1 # test if --preserve=xattr option works cp --preserve=xattr a b || fail=1 -getfattr -d b >out_b || skip_test_ "failed to get xattr of file" +getfattr -d b >out_b || skip_ "failed to get xattr of file" grep -F "$xattr_pair" out_b || fail=1 # test if --preserve=all option works cp --preserve=all a c || fail=1 -getfattr -d c >out_c || skip_test_ "failed to get xattr of file" +getfattr -d c >out_c || skip_ "failed to get xattr of file" grep -F "$xattr_pair" out_c || fail=1 # cp's -a option must produce no diagnostics. cp -a a d 2>err && test -s err && fail=1 -getfattr -d d >out_d || skip_test_ "failed to get xattr of file" +getfattr -d d >out_d || skip_ "failed to get xattr of file" grep -F "$xattr_pair" out_d || fail=1 # test if --preserve=xattr works even for files without write access chmod a-w a || framework_failure rm -f e cp --preserve=xattr a e || fail=1 -getfattr -d e >out_e || skip_test_ "failed to get xattr of file" +getfattr -d e >out_e || skip_ "failed to get xattr of file" grep -F "$xattr_pair" out_e || fail=1 # Ensure that permission bits are preserved, too. @@ -88,14 +88,14 @@ rm b || framework_failure # install should never preserve xattr ginstall a b || fail=1 -getfattr -d b >out_b || skip_test_ "failed to get xattr of file" +getfattr -d b >out_b || skip_ "failed to get xattr of file" grep -F "$xattr_pair" out_b && fail=1 # mv should preserve xattr when renaming within a file system. # This is implicitly done by rename () and doesn't need explicit # xattr support in mv. mv a b || fail=1 -getfattr -d b >out_b || skip_test_ "failed to get xattr of file" +getfattr -d b >out_b || skip_ "failed to get xattr of file" grep -F "$xattr_pair" out_b || cat >&2 <<EOF ================================================================= $0: WARNING!!! @@ -116,7 +116,7 @@ if test $test_mv -eq 1; then # mv should preserve xattr when copying content from one partition to another mv b "$b_other" || fail=1 getfattr -d "$b_other" >out_b || - skip_test_ "failed to get xattr of file" + skip_ "failed to get xattr of file" grep -F "$xattr_pair" out_b || fail=1 else cat >&2 <<EOF diff --git a/tests/mkdir/writable-under-readonly b/tests/mkdir/writable-under-readonly index 38bd5aeef..c0f83fb5b 100755 --- a/tests/mkdir/writable-under-readonly +++ b/tests/mkdir/writable-under-readonly @@ -29,7 +29,7 @@ print_ver_ mkdir require_root_ # FIXME: for now, skip it unconditionally -skip_test_ temporarily disabled +skip_ temporarily disabled # FIXME: define cleanup_ to do the umount diff --git a/tests/mv/acl b/tests/mv/acl index 0abc5da0d..669868d34 100755 --- a/tests/mv/acl +++ b/tests/mv/acl @@ -24,7 +24,7 @@ require_acl_ # Skip this test if cp was built without ACL support: grep '^#define USE_ACL 1' $CONFIG_HEADER > /dev/null || - skip_test_ "insufficient ACL support" + skip_ "insufficient ACL support" cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" @@ -41,7 +41,7 @@ setfacl -m user:bin:rw $t1 || skip_partition=$other_partition_tmpdir acl1=`getfacl file` || skip_partition=. test $skip_partition != none && - skip_test_ "'$skip_partition' is not on a suitable file system for this test" + skip_ "'$skip_partition' is not on a suitable file system for this test" # move the access acl of a file mv file "$other_partition_tmpdir" || fail=1 diff --git a/tests/mv/i-3 b/tests/mv/i-3 index 83d93a86f..867b7cb62 100755 --- a/tests/mv/i-3 +++ b/tests/mv/i-3 @@ -23,21 +23,21 @@ require_controlling_input_terminal_ skip_if_root_ trap '' TTIN # Ignore SIGTTIN -test "$(uname -s)" = FreeBSD && skip_test_ "known spurious failure on FreeBSD" +test "$(uname -s)" = FreeBSD && skip_ "known spurious failure on FreeBSD" touch f g h i || framework_failure chmod 0 g i || framework_failure ls /dev/stdin >/dev/null 2>&1 \ - || skip_test_ 'there is no /dev/stdin file' + || skip_ 'there is no /dev/stdin file' # work around a dash bug when redirecting # from symlinked ttys in the background tty=$(readlink -f /dev/stdin) test -r "$tty" 2>&1 \ - || skip_test_ '/dev/stdin is not readable' + || skip_ '/dev/stdin is not readable' mv f g < $tty > out 2>&1 & pid=$! diff --git a/tests/mv/no-target-dir b/tests/mv/no-target-dir index f1e21d6f5..a73fae9ed 100755 --- a/tests/mv/no-target-dir +++ b/tests/mv/no-target-dir @@ -27,7 +27,7 @@ touch f || framework_failure mkdir a b b/a || framework_failure mv a b || - skip_test_ "your kernel's rename syscall is buggy" + skip_ "your kernel's rename syscall is buggy" # This should succeed, since both src and dest are directories, diff --git a/tests/mv/sticky-to-xpart b/tests/mv/sticky-to-xpart index 979d31fac..f689d9d0a 100755 --- a/tests/mv/sticky-to-xpart +++ b/tests/mv/sticky-to-xpart @@ -47,7 +47,7 @@ version=` ` case $version in $PACKAGE_VERSION) ;; - *) skip_test_ "cannot access just-built mv as user $NON_ROOT_USERNAME";; + *) skip_ "cannot access just-built mv as user $NON_ROOT_USERNAME";; esac setuidgid $NON_ROOT_USERNAME env PATH="$PATH" \ diff --git a/tests/other-fs-tmpdir b/tests/other-fs-tmpdir index 074be079f..9ea8a334d 100644 --- a/tests/other-fs-tmpdir +++ b/tests/other-fs-tmpdir @@ -45,7 +45,7 @@ for d in $CANDIDATE_TMP_DIRS; do done if test -z "$other_partition_tmpdir"; then - skip_test_ \ + skip_ \ "requires a writable directory on a different disk partition, and I couldn't find one. I tried these: $CANDIDATE_TMP_DIRS diff --git a/tests/rm/ext3-perf b/tests/rm/ext3-perf index efaaf67fc..95cce33d4 100755 --- a/tests/rm/ext3-perf +++ b/tests/rm/ext3-perf @@ -41,13 +41,13 @@ n=400000 # FIXME-maybe: try to find a suitable file system or allow # the user to specify it via an envvar. df -T -t ext3 -t ext4dev -t ext4 . \ - || skip_test_ 'this test runs only on an ext3 or ext4 file system' + || skip_ 'this test runs only on an ext3 or ext4 file system' # Skip if there are too few inodes free. Require some slack. free_inodes=$(stat -f --format=%d .) || framework_failure min_free_inodes=$(expr 12 \* $n / 10) test $min_free_inodes -lt $free_inodes \ - || skip_test_ "too few free inodes on '.': $free_inodes;" \ + || skip_ "too few free inodes on '.': $free_inodes;" \ "this test requires at least $min_free_inodes" ok=0 diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm index 92d19ecd6..4137d9dac 100755 --- a/tests/rm/fail-2eperm +++ b/tests/rm/fail-2eperm @@ -37,7 +37,7 @@ rm_version=` ` case $rm_version in $PACKAGE_VERSION) ;; - *) skip_test_ "cannot access just-built rm as user $NON_ROOT_USERNAME";; + *) skip_ "cannot access just-built rm as user $NON_ROOT_USERNAME";; esac setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm -rf a 2> out-t && fail=1 diff --git a/tests/rm/isatty b/tests/rm/isatty index ea2daba20..1118b9465 100755 --- a/tests/rm/isatty +++ b/tests/rm/isatty @@ -23,7 +23,7 @@ skip_if_root_ # Skip this test if there is no /dev/stdin file. ls /dev/stdin >/dev/null 2>&1 \ - || skip_test_ 'there is no /dev/stdin file' + || skip_ 'there is no /dev/stdin file' touch f chmod 0 f diff --git a/tests/rm/one-file-system b/tests/rm/one-file-system index 36990b208..1ef61a735 100755 --- a/tests/rm/one-file-system +++ b/tests/rm/one-file-system @@ -33,7 +33,7 @@ cleanup_() t=$other_partition_tmpdir mkdir -p a/b $t/y mount --bind $t a/b \ - || skip_test_ "This test requires mount with a working --bind option." + || skip_ "This test requires mount with a working --bind option." cat <<\EOF > exp || framework_failure rm: skipping `a/b', since it's on a different device diff --git a/tests/rm/read-only b/tests/rm/read-only index 35919d39f..c52883b60 100755 --- a/tests/rm/read-only +++ b/tests/rm/read-only @@ -29,7 +29,7 @@ dd if=/dev/zero of=blob bs=8192 count=200 > /dev/null 2>&1 \ || skip=1 mkdir mnt || skip=1 mkfs -t ext2 -F blob \ - || skip_test_ "failed to create ext2 file system" + || skip_ "failed to create ext2 file system" mount -oloop blob mnt || skip=1 echo test > mnt/f || skip=1 @@ -37,7 +37,7 @@ test -s mnt/f || skip=1 mount -o remount,loop,ro mnt || skip=1 test $skip = 1 \ - && skip_test_ "insufficient mount/ext2 support" + && skip_ "insufficient mount/ext2 support" # Applying rm -f to a nonexistent file on a read-only file system must succeed. rm -f mnt/no-such > out 2>&1 || fail=1 diff --git a/tests/split/filter b/tests/split/filter index 5bc54581f..afdd4d298 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_test_ "xz (better than gzip/bzip2) required" +xz --version || skip_ "xz (better than gzip/bzip2) required" for total_n_lines in 5 3000 20000; do seq $total_n_lines > in || framework_failure_ diff --git a/tests/tail-2/append-only b/tests/tail-2/append-only index ba55fcf7d..1457b1352 100755 --- a/tests/tail-2/append-only +++ b/tests/tail-2/append-only @@ -28,7 +28,7 @@ chattr +a f 2>/dev/null || chattr_a_works=0 echo x >> f || chattr_a_works=0 if test $chattr_a_works = 0; then - skip_test_ "chattr +a doesn't work on this file system" + skip_ "chattr +a doesn't work on this file system" fi diff --git a/tests/tail-2/big-4gb b/tests/tail-2/big-4gb index 08897135f..11faed5fb 100755 --- a/tests/tail-2/big-4gb +++ b/tests/tail-2/big-4gb @@ -31,7 +31,7 @@ echo 87654321 | tr -d '\n' > tmp || framework_failure dd bs=1 seek=4294967288 if=tmp of=big 2> err || dd_failed=1 if test "$dd_failed" = 1; then cat err 1>&2 - skip_test_ \ + skip_ \ 'cannot create a file large enough for this test, possibly because this system does not support large files; Consider rerunning this test on a different file system.' diff --git a/tests/tail-2/inotify-race b/tests/tail-2/inotify-race index 7e2310022..b88b8473c 100755 --- a/tests/tail-2/inotify-race +++ b/tests/tail-2/inotify-race @@ -34,7 +34,7 @@ touch tail.out || framework_failure ( timeout 10s gdb --version ) > gdb.out 2>&1 case $(cat gdb.out) in *'GNU gdb'*) ;; - *) skip_test_ "can't run gdb";; + *) skip_ "can't run gdb";; esac # See if gdb works and @@ -48,7 +48,7 @@ timeout 10s gdb -nx --batch-silent \ # FIXME: The above is seen to _intermittently_ fail with: # warning: .dynamic section for "/lib/libc.so.6" is not at the expected address # warning: difference appears to be caused by prelink, adjusting expectations -test -s gdb.out && { cat gdb.out; skip_test_ "can't set breakpoints in tail"; } +test -s gdb.out && { cat gdb.out; skip_ "can't set breakpoints in tail"; } # Run "tail -f file", stopping to append a line just before # inotify initialization, and then continue. Before the fix, diff --git a/tests/tail-2/pid b/tests/tail-2/pid index 6aba74948..f75c3deb2 100755 --- a/tests/tail-2/pid +++ b/tests/tail-2/pid @@ -40,7 +40,7 @@ for inotify in ---disable-inotify ''; do # Use an unlikely-to-be-live PID timeout 10 tail -f -s.1 --pid=$PID_T_MAX $inotify empty ret=$? - test $ret = 124 && skip_test_ "pid $PID_T_MAX present or tail too slow" + test $ret = 124 && skip_ "pid $PID_T_MAX present or tail too slow" test $ret = 0 || fail=1 # Ensure tail doesn't wait for data when PID is dead diff --git a/tests/touch/dangling-symlink b/tests/touch/dangling-symlink index dfde5c1bc..27534da93 100755 --- a/tests/touch/dangling-symlink +++ b/tests/touch/dangling-symlink @@ -34,7 +34,7 @@ if test $fail = 1; then *linux-gnu*) case "`uname -r`" in 2.3.9[0-9]*) - skip_test_ \ + skip_ \ '**************************************************** WARNING!!! This version of the Linux kernel causes touch to fail diff --git a/tests/touch/no-dereference b/tests/touch/no-dereference index 6d138114c..b73274627 100755 --- a/tests/touch/no-dereference +++ b/tests/touch/no-dereference @@ -41,7 +41,7 @@ test -f nowhere && fail=1 # The remaining tests of -h require kernel support for changing symlink times. grep '^#define HAVE_UTIMENSAT 1' "$CONFIG_HEADER" > /dev/null || grep '^#define HAVE_LUTIMES 1' "$CONFIG_HEADER" > /dev/null || - skip_test_ 'this system lacks the utimensat function' + skip_ 'this system lacks the utimensat function' # Changing time of dangling symlink is okay. # Skip the test if this fails, but the error text corresponds to @@ -51,7 +51,7 @@ case $? in 0) test -f nowhere && fail=1 test -s err && fail=1;; 1) grep 'Function not implemented' err \ - && skip_test_ 'this system lacks the utimensat function' + && skip_ 'this system lacks the utimensat function' fail=1;; *) fail=1;; esac diff --git a/tests/touch/not-owner b/tests/touch/not-owner index 953e76b28..1166c1608 100755 --- a/tests/touch/not-owner +++ b/tests/touch/not-owner @@ -21,11 +21,11 @@ print_ver_ touch if env -- test -w /; then - skip_test_ you have write access to /. + skip_ you have write access to /. fi if env -- test -O / || env -- test -G /; then - skip_test_ "you own /." + skip_ "you own /." fi skip_if_root_ |