1#!/bin/sh
2
3# Check decoding of out-of-range syscalls along with debug ouput
4
5. "${srcdir=.}/init.sh"
6
7: ${debug_flag=-d}
8NAME=nsyscalls-d
9
10if [ "$MIPS_ABI" = "o32" ]; then
11	syscall=syscall
12	[ -z "$debug_flag" ] ||
13		skip_ "mips $MIPS_ABI is not supported by this test yet"
14else
15	syscall=none
16fi
17
18run_strace $debug_flag -e trace=$syscall ../$NAME "$STRACE_EXE" 9 \
19	2> "$LOG-err-all" > "$EXP" 9> "$EXP-err"
20
21[ -n "$debug_flag" ] || > "$EXP-err"
22
23grep "invalid syscall" "$LOG-err-all" > "$LOG-err"
24
25match_diff "$LOG" "$EXP"
26match_diff "$LOG-err" "$EXP-err"
27