[apparmor] [patch] Add more set_profile_flags tests
Christian Boltz
apparmor at cboltz.de
Sun Jun 14 19:54:47 UTC 2015
Hello,
this patch adds more set_profile_flags tests.
The existing tests didn't test removing all flags.
[ 51-more-set_profile_flags-tests.diff ]
=== modified file utils/test/test-aa.py
--- utils/test/test-aa.py 2015-05-29 12:59:07.488328718 +0200
+++ utils/test/test-aa.py 2015-06-14 21:51:28.615330724 +0200
@@ -181,6 +181,8 @@
self._test_set_flags('profile "/foo bar"', 'flags=(complain)', 'audit', profile_name='/foo bar')
def test_set_flags_12(self):
self._test_set_flags('profile xy "/foo bar"', 'flags=(complain)', 'audit', profile_name='xy')
+ def test_set_flags_13(self):
+ self._test_set_flags('/foo', '(audit)', '')
# test handling of hat flags
def test_set_flags_with_hat_01(self):
@@ -208,6 +210,12 @@
expected_more_rules='\n hat foobar flags=(audit) { # comment\n}\n'
)
+ def test_set_flags_with_hat_05(self):
+ self._test_set_flags('/foo', '(audit)', '',
+ more_rules='\n hat foobar (attach_disconnected) { # comment\n}\n', # XXX attach_disconnected will be lost!
+ expected_more_rules='\n hat foobar { # comment\n}\n'
+ )
+
# test handling of child profiles
def test_set_flags_with_child_01(self):
self._test_set_flags('/foo', 'flags=(complain)', 'audit',
Regards,
Christian Boltz
--
> Du kennst den Spruch: Nach dem Release. [Ich sage absichtlich nicht,
> wie groß der Zeitabstand zum Release sein wird ;-) ]
In zeitlicher Reihenfolge:
Vor Longhorn,
zwischen Longhorn und der Apokalypse,
zwischen der Apokalypse und Hurd,
oder nach Hurd?
[> Christian Boltz und Ratti in fontlinge-devel]
More information about the AppArmor
mailing list