#!/bin/sh # Check decoding of ipc semget/semctl syscalls . "${srcdir=.}/init.sh" check_prog grep OUT="$LOG.out" ./ipc_sem > "$OUT" || { case $? in 77) rm -f "$OUT" framework_skip_ 'ipc semget/semctl syscalls do not behave as expected' ;; 99) cat "$OUT" rm -f "$OUT" framework_failure_ 'broken kernel detected' ;; *) cat "$OUT" rm -f "$OUT" fail_ 'ipc_sem failed' ;; esac } args='-eipc ./ipc_sem' $STRACE -o "$LOG" $args > "$OUT" && LC_ALL=C grep -E -x -f "$OUT" "$LOG" > /dev/null || { cat "$OUT" "$LOG" fail_ "$STRACE $args output mismatch" } rm -f "$OUT" exit 0