tests: Skip seccomp check if env. sets up seccomp profile

If the test environment is running in a seccomp profile do not check
that the seccomp profile of the swtpm process runs with the action
provided in --seccomp action=... since the environment may override
this.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
Stefan Berger 2019-08-08 06:47:24 -04:00 committed by Stefan Berger
parent ab1b346ef0
commit 1ce7293d3c

View File

@ -707,6 +707,15 @@ function check_seccomp_profile()
return 0
fi
tmp=$(grep -E "^Seccomp" /proc/self/status |
cut -d":" -f2 |
tr -d '\t')
if [ "${tmp}" != "0" ]; then
echo "check_seccomp_profile: skipping check since test env." \
"runs with in a seccomp profile overriding --seccomp"
return 0
fi
tmp=$(grep -E "^Seccomp" /proc/${swtpm_pid}/status |
cut -d":" -f2 |
tr -d '\t')