From: Dmitry V. Levin Date: Tue, 1 May 2012 21:32:09 +0000 (+0000) Subject: tests: raise strace check timeout to 60 seconds X-Git-Tag: v4.7~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=823eba28cd7a0e0cedf9bb3cd4e7f3765ceb2ef8;p=strace 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 --- diff --git a/tests/init.sh b/tests/init.sh index b0dbbf84..f860b0b0 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -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; } diff --git a/tests/ptrace_setoptions b/tests/ptrace_setoptions index 7afd0436..7511047c 100755 --- a/tests/ptrace_setoptions +++ b/tests/ptrace_setoptions @@ -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' diff --git a/tests/strace-f b/tests/strace-f index 869f331d..7b395526 100755 --- a/tests/strace-f +++ b/tests/strace-f @@ -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'; }