Dmitry V. Levin | 7b9e45e | 2013-03-01 15:50:22 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Ensure that strace -e trace=set works. |
| 4 | |
| 5 | . "${srcdir=.}/init.sh" |
| 6 | |
Dmitry V. Levin | 7b9e45e | 2013-03-01 15:50:22 +0000 | [diff] [blame] | 7 | check_prog ls |
| 8 | check_prog grep |
| 9 | |
Dmitry V. Levin | f60347d | 2013-06-18 15:28:47 +0000 | [diff] [blame] | 10 | $STRACE -e execve ls > /dev/null 2> $LOG && |
Dmitry V. Levin | 107ceb9 | 2013-06-18 13:35:29 +0000 | [diff] [blame] | 11 | grep '^execve(' $LOG > /dev/null || |
| 12 | { cat $LOG; fail_ 'strace -e execve does not work'; } |
Dmitry V. Levin | 7b9e45e | 2013-03-01 15:50:22 +0000 | [diff] [blame] | 13 | |
Dmitry V. Levin | 107ceb9 | 2013-06-18 13:35:29 +0000 | [diff] [blame] | 14 | grep -v '^execve(' $LOG | |
Dmitry V. Levin | 7b9e45e | 2013-03-01 15:50:22 +0000 | [diff] [blame] | 15 | LC_ALL=C grep '^[[:alnum:]_]*(' > /dev/null && |
Dmitry V. Levin | 107ceb9 | 2013-06-18 13:35:29 +0000 | [diff] [blame] | 16 | { cat $LOG; fail_ 'strace -e execve does not work properly'; } |
Dmitry V. Levin | 7b9e45e | 2013-03-01 15:50:22 +0000 | [diff] [blame] | 17 | |
Dmitry V. Levin | f60347d | 2013-06-18 15:28:47 +0000 | [diff] [blame] | 18 | $STRACE -e trace=process ls > /dev/null 2> $LOG && |
Dmitry V. Levin | 107ceb9 | 2013-06-18 13:35:29 +0000 | [diff] [blame] | 19 | grep '^execve(' $LOG > /dev/null || |
| 20 | { cat $LOG; fail_ 'strace -e trace=process does not work'; } |
Dmitry V. Levin | 7b9e45e | 2013-03-01 15:50:22 +0000 | [diff] [blame] | 21 | |
Dmitry V. Levin | 107ceb9 | 2013-06-18 13:35:29 +0000 | [diff] [blame] | 22 | grep '^open' $LOG > /dev/null && |
| 23 | { cat $LOG; fail_ 'strace -e trace=process does not work properly'; } |
Dmitry V. Levin | 7b9e45e | 2013-03-01 15:50:22 +0000 | [diff] [blame] | 24 | |
| 25 | exit 0 |