blob: de8b47c1870b35c5e502f380600735f693c84947 [file] [log] [blame]
#!/bin/sh
# Check decoding of ipc shmget/shmctl syscalls
. "${srcdir=.}/init.sh"
check_prog grep
OUT="$LOG.out"
./ipc_shm > /dev/null || {
if [ $? -eq 77 ]; then
framework_skip_ 'ipc shmget/shmctl syscalls do not behave as expected'
else
fail_ 'ipc_shm failed'
fi
}
args="-eipc ./ipc_shm"
$STRACE -o "$LOG" $args > "$OUT" &&
exp_lines=$(wc -l < "$OUT") &&
matched_lines=$(LC_ALL=C grep -c -E -x -f "$OUT" "$LOG") &&
test $exp_lines -eq $matched_lines || {
cat "$OUT" "$LOG"
fail_ "$STRACE $args output mismatch"
}
rm -f "$OUT"
exit 0