#!/bin/sh

set -e

. "${srcdir:-.}/common.sh"

get_common_syscalls >"$TMP/snap.name.app"
cat >>"$TMP/snap.name.app" <<EOF
# unknown syscalls are ignore
i-dont-exit

less-than-SC_MAX_LINE_LENGTH-but-still-looooooooooooooonnnnnnnngggggggggggggggg
EOF

# ensure that the command "true" can run with the right filter

printf "Test that good whitelist"
if "$L" snap.name.app /bin/true 2>/dev/null; then
   PASS
else
    dmesg|tail -n1
    FAIL
fi
