[apparmor] [patch] regression sysctl: skip if sysctl not implemented
John Johansen
john.johansen at canonical.com
Wed Mar 19 08:47:32 UTC 2014
Check to see if sysctl is enabled on the kernel before running the tests
If sysctl is not enabled warn that the test is being skipped
---
=== modified file 'tests/regression/apparmor/syscall_sysctl.sh'
--- tests/regression/apparmor/syscall_sysctl.sh 2010-12-20 20:29:10 +0000
+++ tests/regression/apparmor/syscall_sysctl.sh 2014-03-16 10:09:09 +0000
@@ -27,6 +27,13 @@
##
settest syscall_sysctl
+#check if the architecture support sysctl
+res=`${test} ro`
+if [ $? -ne 0 -a $res == "FAIL: sysctl read failed - Function not implemented" ] ; then
+ echo " syscall sysctl not implemented skipping tests ..."
+ exit 0
+fi
+
runchecktest "SYSCTL (no confinement read only)" pass ro
runchecktest "SYSCTL (no confinement rw)" pass
More information about the AppArmor
mailing list