diff options
author | Jim Meyering <meyering@redhat.com> | 2008-04-14 23:33:43 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-04-14 23:33:43 +0200 |
commit | 739cf4e8325775dd6400984b3b52e67b3102e556 (patch) | |
tree | b7b57a61a96bfd2fdfc78010be47e5e6a88d2ad8 /tests/test-lib.sh | |
parent | 08f2a71ee34cc261fb39d1047069e01cb48fb0d7 (diff) | |
download | coreutils-739cf4e8325775dd6400984b3b52e67b3102e556.tar.xz |
tests: don't fail on systems without a "stat" syscall
* tests/test-lib.sh (require_strace_): Add a syscall parameter.
* tests/ls/stat-free-symlinks: Update caller.
* tests/mv/atomic: Likewise.
* tests/mv/atomic2: Likewise.
Reported by Mike Frysinger in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13222
Diffstat (limited to 'tests/test-lib.sh')
-rw-r--r-- | tests/test-lib.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test-lib.sh b/tests/test-lib.sh index 9e04cfad6..ebc6a7cfc 100644 --- a/tests/test-lib.sh +++ b/tests/test-lib.sh @@ -44,14 +44,17 @@ require_readable_root_() test -r / || skip_test_ "/ is not readable" } -# Skip the current test if strace is not available or doesn't work. +# Skip the current test if strace is not available or doesn't work +# with the named syscall. Usage: require_strace_ unlink require_strace_() { + test $# = 1 || framework_failure + strace -V < /dev/null > /dev/null 2>&1 || skip_test_ 'no strace program' - strace -qe unlink echo > /dev/null 2>&1 || - skip_test_ 'strace does not work' + strace -qe "$1" echo > /dev/null 2>&1 || + skip_test_ 'strace -qe "'"$1"'" does not work' } require_built_() |