blob: ef957c3e0eb5cbbb01f75d59e61e8928efae69eb [file] [log] [blame]
#!/bin/sh
# Check decoding of ipc semget/semctl syscalls
. "${srcdir=.}/init.sh"
check_prog grep
OUT="$LOG.out"
./ipc_sem > /dev/null || {
if [ $? -eq 77 ]; then
framework_skip_ 'ipc semget/semctl syscalls do not behave as expected'
else
fail_ 'ipc_sem failed'
fi
}
args='-eipc ./ipc_sem'
$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