diff options
author | Armin Kuster <akuster808@gmail.com> | 2019-05-04 14:27:37 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2019-05-09 17:44:59 -0700 |
commit | f67e1bc01d828b68c8701357d39b828a19bce808 (patch) | |
tree | 36d328362174dfb1094390757f3a7552c4ec5e8f | |
parent | f506138eb54f0a85be80c3803fe22d5b359b12cf (diff) | |
download | meta-security-f67e1bc01d828b68c8701357d39b828a19bce808.tar.gz |
apparmor: add a few more runtime
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | lib/oeqa/runtime/cases/apparmor.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/oeqa/runtime/cases/apparmor.py b/lib/oeqa/runtime/cases/apparmor.py index e2cb316..b6a9537 100644 --- a/lib/oeqa/runtime/cases/apparmor.py +++ b/lib/oeqa/runtime/cases/apparmor.py | |||
@@ -25,3 +25,22 @@ class ApparmorTest(OERuntimeTestCase): | |||
25 | msg = ('aa-status failed. ' | 25 | msg = ('aa-status failed. ' |
26 | 'Status and output:%s and %s' % (status, output)) | 26 | 'Status and output:%s and %s' % (status, output)) |
27 | self.assertEqual(status, 0, msg = msg) | 27 | self.assertEqual(status, 0, msg = msg) |
28 | |||
29 | @OETestDepends(['apparmor.ApparmorTest.test_apparmor_aa_status']) | ||
30 | def test_apparmor_aa_complain(self): | ||
31 | status, output = self.target.run('aa-complain /etc/apparmor.d/*') | ||
32 | match = re.search('apparmor module is loaded.', output) | ||
33 | if not match: | ||
34 | msg = ('aa-complain failed. ' | ||
35 | 'Status and output:%s and %s' % (status, output)) | ||
36 | self.assertEqual(status, 0, msg = msg) | ||
37 | |||
38 | @OETestDepends(['apparmor.ApparmorTest.test_apparmor_aa_complain']) | ||
39 | def test_apparmor_aa_enforce(self): | ||
40 | status, output = self.target.run('aa-enforce /etc/apparmor.d/*') | ||
41 | match = re.search('apparmor module is loaded.', output) | ||
42 | if not match: | ||
43 | msg = ('aa-enforce failed. ' | ||
44 | 'Status and output:%s and %s' % (status, output)) | ||
45 | self.assertEqual(status, 0, msg = msg) | ||
46 | |||