criu/test/zdtm/static/apparmor_stacking.hook
Tycho Andersen 06b5d2fa8d tests: add a test for apparmor_stacking
v2: use a profile that doesn't have "unix" to test the suspend feature too
v3: use "/" in the profile names to make sure this works

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-03 10:31:00 -07:00

10 lines
205 B
Bash
Executable file

#!/bin/bash
[ "$1" == "--clean" -o "$1" == "--pre-restore" ] || exit 0
dir="/sys/kernel/security/apparmor/policy/namespaces/criu_stacking_test"
echo "Cleaning $dir"
if [ -d $dir ]; then
rmdir $dir
fi