3 # Ensure that strace tests kernel PTRACE_O_TRACECLONE
4 # and PTRACE_O_TRACESYSGOOD support properly.
6 . "${srcdir=.}/init.sh"
8 [ "$(uname -s)" = Linux ] ||
9 skip_ 'The kernel is not a Linux kernel'
11 2.[6-9]*|2.[1-5][0-9]*|[3-9].*|[12][0-9]*) ;;
12 *) skip_ 'The kernel is not Linux 2.6.* or newer' ;;
15 $STRACE -df -enone / > /dev/null 2> $LOG
16 grep -F -x 'ptrace_setoptions = 0xe' $LOG > /dev/null || {
18 fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACECLONE support'
21 grep -F -x 'ptrace_setoptions = 0x1f' $LOG > /dev/null || {
23 fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'
26 $STRACE -d -enone / > /dev/null 2> $LOG
27 grep -F -x 'ptrace_setoptions = 0x11' $LOG > /dev/null || {
29 fail_ 'strace failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'