[apparmor] [PATCH v2 7/7] tests: Mark cross policy ns changeprofile test as xpass on older kernels

Steve Beattie steve at nxnw.org
Sat Mar 19 05:21:05 UTC 2016


On Fri, Mar 18, 2016 at 04:17:16PM -0500, Tyler Hicks wrote:
> 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>

Acked-by: Steve Beattie <steve at nxnw.org>. Thanks.

> ---
>  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
-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160318/0c04bc24/attachment.pgp>


More information about the AppArmor mailing list