On Thu, Nov 27, 2014 at 07:02:11PM +0100, Christian Boltz wrote:
> this patch adds some tests for aa.py check_for_apparmor().
> 
> It also changes check_for_apparmor() to allow easier testing by optionally 
> specifying alternative locations for /proc/filesystems and /proc/mounts 
> as parameter.
> 
> I ran this testcase also with the old code (before applying Peter's patch). 
> The old code raised an unexpected TypeError in
>     if not valid_path(aa_mountpoint + '/profiles'):
> if aa_mountpoint was None. After temporarily fixing that in my local 
> copy, all tests passed. (No patch for that since Peter's patch fixed 
> that anyway.)
> 
> Needless to say that the tests also pass with Peter's patch applied.
> 
> Also note that the code in check_for_apparmor() differs from what the 
> comment says - valid_path() only does syntax checks, but doesn't 
> check if the directory exists. I added a comment saying exactly that. 
> 
> Currently things could explode if securityfs is mounted, but AppArmor 
> is disabled in the kernel (assumption based on reading the code, not 
> tested). Fixing that is worth another patch ;-) - any volunteers?

> [ add-aa.py-check_for_apparmor-tests.diff ]

Acked-by: Steve Beattie <[email protected]>

Thanks! I really appreciate the effort of going in and backfilling
tests.

-- 
Steve Beattie
<[email protected]>
http://NxNW.org/~steve/

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to