2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 05:47:59 +00:00

Merge branch 'cboltz-2.13-tests-profile-dir' into 'apparmor-2.13'

[2.11..2.13] fix setting apparmor.aa.profile_dir in some tests

cherry picked from commit 6fe4b5e59afe85e3bbfe98eab7e291c9f532db25 -
but only the test-aa.py changes because test-profile-list.py didn't have
the affected tests in 2.13 yet.

See merge request apparmor/apparmor!574

Acked-by: Steve Beattie <steve.beattie@canonical.com> for 2.11..2.13
This commit is contained in:
Christian Boltz 2020-06-19 11:42:57 +00:00
commit ac4bf706e5

View File

@ -130,7 +130,7 @@ class AaTest_create_new_profile(AATest):
shutil.copytree('../../profiles/apparmor.d/', self.profile_dir, symlinks=True)
# load the abstractions we need in the test
apparmor.aa.profiledir = self.profile_dir
apparmor.aa.profile_dir = self.profile_dir
apparmor.aa.load_include('abstractions/base')
apparmor.aa.load_include('abstractions/bash')
@ -818,7 +818,7 @@ class AaTest_get_file_perms_2(AATest):
shutil.copytree('../../profiles/apparmor.d/', self.profile_dir, symlinks=True)
# load the abstractions we need in the test
apparmor.aa.profiledir = self.profile_dir
apparmor.aa.profile_dir = self.profile_dir
apparmor.aa.load_include('abstractions/base')
apparmor.aa.load_include('abstractions/bash')
apparmor.aa.load_include('abstractions/enchant')
@ -856,7 +856,7 @@ class AaTest_propose_file_rules(AATest):
shutil.copytree('../../profiles/apparmor.d/', self.profile_dir, symlinks=True)
# load the abstractions we need in the test
apparmor.aa.profiledir = self.profile_dir
apparmor.aa.profile_dir = self.profile_dir
apparmor.aa.load_include('abstractions/base')
apparmor.aa.load_include('abstractions/bash')
apparmor.aa.load_include('abstractions/enchant')
@ -898,7 +898,7 @@ class AaTest_propose_file_rules_with_absolute_includes(AATest):
shutil.copytree('../../profiles/apparmor.d/', self.profile_dir, symlinks=True)
# load the abstractions we need in the test
apparmor.aa.profiledir = self.profile_dir
apparmor.aa.profile_dir = self.profile_dir
apparmor.aa.load_include('abstractions/base')
abs_include1 = write_file(self.tmpdir, 'test-abs1', "/some/random/include rw,")