diff options
| author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-06-21 15:55:07 +0200 |
|---|---|---|
| committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-06-21 15:55:07 +0200 |
| commit | 8f0f14b6da8d4482ad53d9bba9f909651ce55d40 (patch) | |
| tree | 10db4201d873e31ae1bc31f48028f165fa5f8500 /tests | |
| parent | f0a5f6d7107ade2ea9c425330655e97d11d17d79 (diff) | |
| download | strace-8f0f14b6da8d4482ad53d9bba9f909651ce55d40.tar.gz strace-8f0f14b6da8d4482ad53d9bba9f909651ce55d40.tar.bz2 strace-8f0f14b6da8d4482ad53d9bba9f909651ce55d40.tar.xz | |
Fix tests/ptrace_setoptions_* to match last fix in ptrace options code
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/ptrace_setoptions | 28 | ||||
| -rwxr-xr-x | tests/ptrace_setoptions_followfork | 20 | ||||
| -rwxr-xr-x | tests/ptrace_setoptions_for_all | 20 |
3 files changed, 28 insertions, 40 deletions
diff --git a/tests/ptrace_setoptions b/tests/ptrace_setoptions new file mode 100755 index 0000000..57e92b6 --- /dev/null +++ b/tests/ptrace_setoptions @@ -0,0 +1,28 @@ +#!/bin/sh + +# Ensure that strace tests kernel PTRACE_O_TRACECLONE support properly. + +. "${srcdir=.}/init.sh" + +case "$(uname -rs)" in + Linux\ 2.6.*) ;; + *) skip_ 'The kernel is not Linux 2.6.*' ;; +esac + +check_strace +check_prog timeout + +timeout -s 9 9 \ +$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 \ +$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 \ +$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/ptrace_setoptions_followfork b/tests/ptrace_setoptions_followfork deleted file mode 100755 index bb25c03..0000000 --- a/tests/ptrace_setoptions_followfork +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# Ensure that strace tests kernel PTRACE_O_TRACECLONE support properly. - -. "${srcdir=.}/init.sh" - -[ "$(uname -s)" = Linux ] || - skip_ 'The kernel is not a Linux kernel' -case "$(uname -r)" in - 2.[6-9]*|2.[1-5][0-9]*|[3-9].*|[12][0-9]*) ;; - *) skip_ 'The kernel is not Linux 2.6.* or newer' ;; -esac - -check_strace -check_prog timeout - -timeout -s 9 9 \ -$STRACE -df -enone / 2>&1 | - grep -F -x 'ptrace_setoptions_followfork = 0xe' > /dev/null || - fail_ 'strace failed to recognize proper kernel PTRACE_O_TRACECLONE support' diff --git a/tests/ptrace_setoptions_for_all b/tests/ptrace_setoptions_for_all deleted file mode 100755 index 1625c00..0000000 --- a/tests/ptrace_setoptions_for_all +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# Ensure that strace tests kernel PTRACE_O_TRACESYSGOOD support properly. - -. "${srcdir=.}/init.sh" - -[ "$(uname -s)" = Linux ] || - skip_ 'The kernel is not a Linux kernel' -case "$(uname -r)" in - 2.[6-9]*|2.[1-5][0-9]*|[3-9].*|[12][0-9]*) ;; - *) skip_ 'The kernel is not Linux 2.6.* or newer' ;; -esac - -check_strace -check_prog timeout - -timeout -s 9 9 \ -$STRACE -d -enone / 2>&1 | - grep -F -x 'ptrace_setoptions_for_all = 0x11' > /dev/null || - fail_ 'strace failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support' |
