tests: raise strace check timeout to 60 seconds

* tests/init.sh (check_timeout): New variable.
* tests/ptrace_setoptions: Use it.
* tests/strace-f: Likewise.

Reported-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Дмитрий Левин 2012-05-01 21:32:09 +00:00
parent a28fbfd523
commit 823eba28cd
3 changed files with 6 additions and 4 deletions

View File

@ -2,6 +2,8 @@
ME_="${0##*/}"
check_timeout=60
warn_() { printf >&2 '%s\n' "$*"; }
fail_() { warn_ "$ME_: failed test: $*"; exit 1; }
skip_() { warn_ "$ME_: skipped test: $*"; exit 77; }

View File

@ -15,17 +15,17 @@ esac
check_strace
check_prog timeout
timeout -s 9 9 \
timeout -s 9 $check_timeout \
$STRACE -df -enone / 2>&1 |
grep -F -x 'ptrace_setoptions = 0xe' > /dev/null ||
fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACECLONE support'
timeout -s 9 9 \
timeout -s 9 $check_timeout \
$STRACE -df -enone / 2>&1 |
grep -F -x 'ptrace_setoptions = 0x1f' > /dev/null ||
fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'
timeout -s 9 9 \
timeout -s 9 $check_timeout \
$STRACE -d -enone / 2>&1 |
grep -F -x 'ptrace_setoptions = 0x11' > /dev/null ||
fail_ 'strace failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'

View File

@ -9,6 +9,6 @@ check_prog timeout
time=/usr/bin/time
check_prog $time
timeout -s 9 9 \
timeout -s 9 $check_timeout \
$STRACE -f $time /bin/ls > check.log 2>&1 ||
{ cat check.log; fail_ 'strace -f does not work'; }