#!/bin/sh

set -e

. "${srcdir:-.}/snap-confine/tests/common.sh"

get_common_syscalls >"$TMP"/tmpl
cat >>"$TMP"/tmpl <<EOF
getpriority
EOF

cat "$TMP"/tmpl >"$TMP"/snap.name.app
echo "ioctl - TIOCSTI" >>"$TMP"/snap.name.app

printf "Test good seccomp arg filtering (ioctl - %s)" "TIOCSTI"
# ensure that the command "true" can run with the right filter
if $L snap.name.app /bin/true ; then
	PASS
else
	dmesg|tail -n1
	FAIL
fi
