[apparmor] [PATCH v2 7/7] tests: Mark cross policy ns changeprofile test as xpass on older kernels
Tyler Hicks
tyhicks at canonical.com
Fri Mar 18 21:17:16 UTC 2016
Policy namespaces are not well supported in older parsers and kernels.
This is a case where the kernel support doesn't seem to be working.
Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
---
tests/regression/apparmor/changeprofile.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/regression/apparmor/changeprofile.sh b/tests/regression/apparmor/changeprofile.sh
index 66b078d..752f8b9 100755
--- a/tests/regression/apparmor/changeprofile.sh
+++ b/tests/regression/apparmor/changeprofile.sh
@@ -84,7 +84,12 @@ genprofile --stdin <<EOF
$test { file, change_profile -> ${nstest}, }
$nstest { $subfile ${okperm}, }
EOF
-runchecktest "CHANGEPROFILE_NS (access sub file)" pass $nstest $subfile
+expected_result=pass
+if [ "$(kernel_features domain/stack)" != "true" ]; then
+ # Fails on older kernels due to namespaces not being well supported
+ expected_result=xpass
+fi
+runchecktest "CHANGEPROFILE_NS (access sub file)" $expected_result $nstest $subfile
runchecktest "CHANGEPROFILE_NS (access file)" fail $nstest $file
if [ "$(kernel_features domain/stack)" != "true" ]; then
--
2.7.3
More information about the AppArmor
mailing list