tests: cleanup checks for basic programs

* tests/init.sh: Check for cat and rm.
* tests/getdents.test: Check for awk.
* tests/ptrace_setoptions.test: Check for grep.
* tests/net-fd.test: Do not check for rm.
* tests/net.test: Likewise.
* tests/scm_rights-fd.test: Likewise.
* tests/stat.test: Likewise.
* tests/uio.test: Likewise.
This commit is contained in:
Дмитрий Левин 2014-09-23 01:51:05 +00:00
parent fdfa72276a
commit 3ec5c0492c
13 changed files with 14 additions and 13 deletions

View File

@ -4,8 +4,8 @@
. "${srcdir=.}/init.sh"
check_prog sleep
check_prog grep
check_prog sleep
make_log()
{

View File

@ -4,8 +4,8 @@
. "${srcdir=.}/init.sh"
check_prog sleep
check_prog grep
check_prog sleep
set -e

View File

@ -4,8 +4,8 @@
. "${srcdir=.}/init.sh"
check_prog sleep
check_prog grep
check_prog sleep
set -e

View File

@ -4,8 +4,8 @@
. "${srcdir=.}/init.sh"
check_prog sleep
check_prog grep
check_prog sleep
$STRACE -d -enone / > /dev/null 2> $LOG
if grep -F -x "PTRACE_SEIZE doesn't work" $LOG > /dev/null; then

View File

@ -4,6 +4,7 @@
. "${srcdir=.}/init.sh"
check_prog awk
check_prog grep
check_prog ls
check_prog mkdir

View File

@ -2,9 +2,6 @@
ME_="${0##*/}"
LOG="$ME_.tmp"
rm -f "$LOG"
warn_() { printf >&2 '%s\n' "$*"; }
fail_() { warn_ "$ME_: failed test: $*"; exit 1; }
skip_() { warn_ "$ME_: skipped test: $*"; exit 77; }
@ -17,6 +14,12 @@ check_prog()
framework_skip_ "$* is not available"
}
check_prog cat
check_prog rm
LOG="$ME_.tmp"
rm -f "$LOG"
: "${STRACE:=../strace}"
: "${TIMEOUT_DURATION:=60}"
: "${SLEEP_A_BIT:=sleep 1}"

View File

@ -9,7 +9,6 @@
framework_skip_ '/proc/self/fd/ is not available'
check_prog grep
check_prog rm
rm -f $LOG.*

View File

@ -8,8 +8,8 @@
[ -d /proc/self/fd/ ] ||
framework_skip_ '/proc/self/fd/ is not available'
check_prog sed
check_prog awk
check_prog sed
rm -f $LOG.* $LOG-*

View File

@ -5,7 +5,6 @@
. "${srcdir=.}/init.sh"
check_prog grep
check_prog rm
rm -f $LOG.*

View File

@ -5,6 +5,8 @@
. "${srcdir=.}/init.sh"
check_prog grep
[ "$(uname -s)" = Linux ] ||
skip_ 'The kernel is not a Linux kernel'
case "$(uname -r)" in

View File

@ -9,7 +9,6 @@
framework_skip_ '/proc/self/fd/ is not available'
check_prog grep
check_prog rm
rm -f $LOG.*

View File

@ -7,7 +7,6 @@
check_prog dd
check_prog find
check_prog grep
check_prog rm
umask 022
truncate_cmd='dd seek=46118400000 obs=1 count=0 if=/dev/null of=sample'

View File

@ -5,7 +5,6 @@
. "${srcdir=.}/init.sh"
check_prog grep
check_prog rm
./uio || {
if [ $? -eq 77 ]; then