Dmitry V. Levin | 4ff687b | 2015-07-27 10:02:33 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Check execve syscall decoding. |
| 4 | |
| 5 | . "${srcdir=.}/init.sh" |
| 6 | |
Dmitry V. Levin | 23168c1 | 2016-02-07 14:37:53 +0000 | [diff] [blame^] | 7 | check_prog grep |
| 8 | run_prog > /dev/null |
Dmitry V. Levin | 4ff687b | 2015-07-27 10:02:33 +0000 | [diff] [blame] | 9 | |
Dmitry V. Levin | 23168c1 | 2016-02-07 14:37:53 +0000 | [diff] [blame^] | 10 | OUT="$LOG.out" |
| 11 | EXP="$LOG.exp" |
| 12 | run_strace -eexecve $args > "$EXP" |
| 13 | |
| 14 | # Filter out execve() call made by strace. |
| 15 | grep -F test.execve < "$LOG" > "$OUT" |
| 16 | match_diff "$OUT" "$EXP" |
| 17 | |
| 18 | rm -f "$EXP" "$OUT" |