diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2013-03-01 15:50:22 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2013-03-01 16:22:02 +0000 |
commit | 7b9e45e89151c80c5569ad32b4174893258adcec (patch) | |
tree | 7775a0248d5fe28c64f75ad26ee7ffb10a816ba2 /tests | |
parent | 879ddddebab29211e495d99811cbd30a9eaf3055 (diff) | |
download | strace-7b9e45e89151c80c5569ad32b4174893258adcec.tar.gz strace-7b9e45e89151c80c5569ad32b4174893258adcec.tar.bz2 strace-7b9e45e89151c80c5569ad32b4174893258adcec.tar.xz |
Fix trace=set regression introduced by commit v4.7-111-g9cbc15b
* syscall.c (qual_syscall, qualify): Pass personality down to
qualify_one.
* tests/qual_syscall: New test.
* tests/Makefile.am (TESTS): Add qual_syscall.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rwxr-xr-x | tests/qual_syscall | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 93636ca..b7776b7 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ # Automake input for strace tests. -TESTS = ptrace_setoptions strace-f +TESTS = ptrace_setoptions strace-f qual_syscall EXTRA_DIST = init.sh $(TESTS) diff --git a/tests/qual_syscall b/tests/qual_syscall new file mode 100755 index 0000000..a0ac029 --- /dev/null +++ b/tests/qual_syscall @@ -0,0 +1,29 @@ +#!/bin/sh + +# Ensure that strace -e trace=set works. + +. "${srcdir=.}/init.sh" + +check_strace +check_prog timeout +check_prog ls +check_prog grep + +timeout -s 9 $check_timeout \ +$STRACE -e execve ls > /dev/null 2> check.log && +grep '^execve(' check.log > /dev/null || + { cat check.log; fail_ 'strace -e execve does not work'; } + +grep -v '^execve(' check.log | +LC_ALL=C grep '^[[:alnum:]_]*(' > /dev/null && + { cat check.log; fail_ 'strace -e execve does not work properly'; } + +timeout -s 9 $check_timeout \ +$STRACE -e trace=process ls > /dev/null 2> check.log && +grep '^execve(' check.log > /dev/null || + { cat check.log; fail_ 'strace -e trace=process does not work'; } + +grep '^open' check.log > /dev/null && + { cat check.log; fail_ 'strace -e trace=process does not work properly'; } + +exit 0 |