* tests/init.cfg (skip_test_): Remove function.
Use skip_ in place of skip_test_ everywhere else.
* cfg.mk (sc_prohibit_skip_): Remove rule.
* tests/**: Use skip_, not skip_test_, everywhere.
halt='use of emacs indent-tabs-mode: setting' \
$(_sc_search_regexp)
-# Use skip_test_ rather than init.sh's "skip_" function.
-sc_prohibit_skip_:
- @prohibit=' skip[_] ' \
- halt="use init.cfg's skip_test_, not init.sh's skip_" \
- $(_sc_search_regexp)
-
# Ensure that each file that contains fail=1 also contains fail=0.
# Otherwise, setting file=1 in the environment would make tests fail
# unexpectedly.
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."
# "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
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
# 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
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
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
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
|| 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
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
# 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_
# 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
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
# 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
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
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" .
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
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
: > 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
. "${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)
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_
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
# =================================================
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
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)
. "${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);
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)"
}
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
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
*" $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_
# 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
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`
# 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`
# 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
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'
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)
{
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_()
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_()
# 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
}
( 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
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'.
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.'
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_()
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_()
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
}
# 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
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.,
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.,
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'; }
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
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
}
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?
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
}
# 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
}
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
}
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
}
case $perms in
*'
- '*) skip_test_ 'your build directory has unusual umask semantics'
+ '*) skip_ 'your build directory has unusual umask semantics'
esac
}
# 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 $?
# 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
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'
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
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
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'
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'
'`
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
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=:/')"
# 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:
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)
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
f=/proc/cpuinfo
test -f $f \
- || skip_test_ "no $f"
+ || skip_ "no $f"
# Yes, parts of /proc/cpuinfo might change between cat runs.
# 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
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
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
# 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.
# 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
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
#endif
EOF
$CC -c long.c \
- || skip_test_ \
+ || skip_ \
'this test runs only on systems with glibc and long double != double'
a=$INTMAX_MAX
# 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
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
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
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.
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_
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
'
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
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.
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
# 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
# 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"; }
# 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.
# 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!!!
# 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
require_root_
# FIXME: for now, skip it unconditionally
-skip_test_ temporarily disabled
+skip_ temporarily disabled
# FIXME: define cleanup_ to do the umount
# 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"
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
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=$!
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,
`
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" \
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
# 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
`
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
# 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
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
|| 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
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
. "${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_
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
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.'
( 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
# 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,
# 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
*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
# 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
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
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_