Due to automake limitations, some features work only for tests that end in one of the suffixes listed in TEST_EXTENSIONS. * tests/detach-running: Rename to detach-running.test. * tests/detach-sleeping: Rename to detach-sleeping.test. * tests/detach-stopped: Rename to detach-stopped.test. * tests/net: Rename to net.test. * tests/ptrace_setoptions: Rename to ptrace_setoptions.test. * tests/qual_syscall: Rename to qual_syscall.test. * tests/sigaction.sh: Rename to sigaction.test. * tests/stat: Rename to stat.test. * tests/strace-f: Rename to strace-f.test. * tests/Makefile.am (TESTS): Update. (LOG_COMPILER): Rename to TEST_LOG_COMPILER.
31 lines
879 B
Bash
Executable File
31 lines
879 B
Bash
Executable File
#!/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
|
|
|
|
$STRACE -df -enone / > /dev/null 2> $LOG
|
|
grep -F -x 'ptrace_setoptions = 0xe' $LOG > /dev/null || {
|
|
cat $LOG
|
|
fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACECLONE support'
|
|
}
|
|
|
|
grep -F -x 'ptrace_setoptions = 0x1f' $LOG > /dev/null || {
|
|
cat $LOG
|
|
fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'
|
|
}
|
|
|
|
$STRACE -d -enone / > /dev/null 2> $LOG
|
|
grep -F -x 'ptrace_setoptions = 0x11' $LOG > /dev/null || {
|
|
cat $LOG
|
|
fail_ 'strace failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'
|
|
}
|