add strace bundled test cases
This commit is contained in:
28
test/strace/strace-bundle/ptrace_setoptions
Executable file
28
test/strace/strace-bundle/ptrace_setoptions
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Ensure that strace tests kernel PTRACE_O_TRACECLONE
|
||||
# and 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_timeout
|
||||
|
||||
$TIMEOUT $MCEXEC $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 $MCEXEC $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 $MCEXEC $STRACE -d -enone / 2>&1 |
|
||||
grep -F -x 'ptrace_setoptions = 0x11' > /dev/null ||
|
||||
fail_ 'strace failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'
|
||||
Reference in New Issue
Block a user