[apparmor] [patch] use seperate fs with user_xattr for xattr regression tests

Steve Beattie steve at nxnw.org
Thu Sep 30 07:02:12 BST 2010


This patch modifies the xattr regression test to use a separate loopback
mounted filesystem to operate on, to guarantee that the mount option
user_xattr is enabled (it's disabled by default on Ubuntu).

With this change, a number of the user xattr testcases that were
expected to pass but weren't started working; however, some of the ones
that were failing as expected are now passing. I've touched up the
expectations as well.

After this patch is applied, the number of testcases in it that are not
matching their expected result is still annoyingly high:

$ egrep '(xpass|xfail)' xattrs.sh
    if [ $var != $link ] ; then xattrtest $var $badperm write user xfail ; fi
    xattrtest $var "$badperm+cap SYS_ADMIN" write security xfail
    xattrtest $var "$badperm+cap SYS_ADMIN" write trusted xfail
    if [ $var != $link ] ; then xattrtest $var "$badperm+cap SYS_ADMIN" write user xfail ; fi
    xattrtest $var $okperm write security xpass
    if [ $var != $link ] ; then xattrtest $var $badperm remove user xfail ; fi
    xattrtest $var "$badperm+cap SYS_ADMIN" remove security xfail
    xattrtest $var "$badperm+cap SYS_ADMIN" remove trusted xfail
    if [ $var != $link ] ; then xattrtest $var "$badperm+cap SYS_ADMIN" remove user xfail ; fi
    xattrtest $var $okperm remove security xpass

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: apparmor-regression_xattrs_test.patch
Type: text/x-diff
Size: 4882 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/apparmor/attachments/20100929/74fe0e59/attachment.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/apparmor/attachments/20100929/74fe0e59/attachment.pgp 


More information about the AppArmor mailing list