xref: /aosp_15_r20/external/strace/tests-m32/prctl-seccomp-strict.test (revision cf84ac9a129d8ea9952db616b4e9b904c4bdde56)
1#!/bin/sh
2
3# Check how prctl PR_SET_SECCOMP SECCOMP_MODE_STRICT is decoded.
4
5. "${srcdir=.}/init.sh"
6
7check_prog grep
8set -- "../$NAME"
9"$@" > /dev/null || {
10	case $? in
11		77) skip_ "$* exited with code 77" ;;
12		137) framework_skip_ "$* killed by SIGKILL, fix your kernel" ;;
13		*) fail_ "$args failed" ;;
14	esac
15}
16run_strace -eprctl "$@" > "$EXP"
17grep -v '^prctl(PR_GET_' < "$LOG" > "$OUT"
18match_diff "$OUT" "$EXP"
19