When running 32bit ipc tests on ppc/sparc with a 64bit kernel, the ipc logic wrongly returns errors. Detect that and throw an error. * tests/ipc_sem.c: Return 99 when errno is EFAULT. * tests/ipc_sem.test: Save output to $OUT and show it when failing. Handle exit status 99 to throw an ERROR.
40 lines
601 B
Bash
Executable File
40 lines
601 B
Bash
Executable File
#!/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
|