strace/tests/ptrace_setoptions
Dmitry V. Levin 4e4b5adfab Implement two basic "strace -f" tests
* Makefile.am (SUBDIRS): Add tests.
* configure.ac (AC_CONFIG_FILES): Add tests/Makefile.
* tests/.gitignore: New file.
* tests/Makefile.am: Likewise.
* tests/init.sh: Likewise.
* tests/ptrace_setoptions: Likewise.
* tests/strace-f: Likewise.
2011-02-27 00:28:50 +00:00

19 lines
406 B
Bash
Executable File

#!/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 /bin/true 2>&1 |
fgrep -qx 'ptrace_setoptions = 0xe' ||
fail_ 'strace failed to recognize proper kernel PTRACE_O_TRACECLONE support'