[apparmor] [patch] don't use system /etc/apparmor.d/ in severity_test.py

Steve Beattie steve at nxnw.org
Thu Jul 17 01:19:03 UTC 2014


On Mon, Jul 14, 2014 at 10:11:58PM +0200, Christian Boltz wrote:
> Am Montag, 14. Juli 2014 schrieb Christian Boltz:
> > this patch changes severity_test.py to use the in-tree profiles
> > instead of the system profiles in /etc/apparmor.d/
> > 
> > === modified file 'utils/test/severity_test.py'
> > --- utils/test/severity_test.py 2014-02-13 00:59:27 +0000
> > +++ utils/test/severity_test.py 2014-07-14 19:54:07 +0000
> > @@ -27,7 +27,7 @@
> >          #copy the local profiles to the test directory
> >          if os.path.exists('./profiles'):
> >              shutil.rmtree('./profiles')
> > -        shutil.copytree('/etc/apparmor.d/', './profiles/', symlinks=True) 
> > +        shutil.copytree('../../profiles/apparmor.d/', './profiles/', symlinks=True)
> 
> Same for minitools_test.py:
> 
> === modified file 'utils/test/minitools_test.py'
> --- utils/test/minitools_test.py        2014-03-03 22:59:47 +0000
> +++ utils/test/minitools_test.py        2014-07-14 20:07:21 +0000
> @@ -133,7 +134,7 @@
>  
>      #copy the local profiles to the test directory
>      #Should be the set of cleanprofile
> -    shutil.copytree('/etc/apparmor.d', './profiles', symlinks=True)
> +    shutil.copytree('../../profiles/apparmor.d/', './profiles', symlinks=True)
>  
>      apparmor.profile_dir = './profiles'
>  
> 
> (If you send an ACK, please indicate if it's valid for both files or 
> only one of them ;-)

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

That said, these tests should be using a temporary directory for
this kind of stuff, probably created during setUp() and removed
during tearDown().

-- 
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: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140716/77cfefdb/attachment.pgp>


More information about the AppArmor mailing list