Dmitry V. Levin | 12e2442 | 2015-01-12 16:08:59 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Check decoding of ipc msgget/msgctl syscalls |
| 4 | |
| 5 | . "${srcdir=.}/init.sh" |
| 6 | |
| 7 | check_prog grep |
| 8 | |
| 9 | OUT="$LOG.out" |
| 10 | |
| 11 | ./ipc_msg > /dev/null || { |
| 12 | if [ $? -eq 77 ]; then |
| 13 | framework_skip_ 'ipc msgget/msgctl syscalls do not behave as expected' |
| 14 | else |
| 15 | fail_ 'ipc_msg failed' |
| 16 | fi |
| 17 | } |
| 18 | |
| 19 | args="-eipc ./ipc_msg $f" |
| 20 | $STRACE -o "$LOG" $args > "$OUT" && |
| 21 | LC_ALL=C grep -E -x -f "$OUT" "$LOG" > /dev/null || { |
| 22 | cat "$OUT" "$LOG" |
| 23 | fail_ "$STRACE $args output mismatch" |
| 24 | } |
| 25 | |
| 26 | rm -f "$OUT" |
| 27 | |
| 28 | exit 0 |