diff options
author | Ed Tanous <ed.tanous@intel.com> | 2019-04-15 23:11:05 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2019-04-15 23:11:05 +0300 |
commit | a75bff085ba9443315222231c42692745e5781e9 (patch) | |
tree | e1aa422babae0dffc866af076a0274ff26c2c4b2 /meta-security/lib/oeqa/runtime/cases/apparmor.py | |
parent | 3e809d0d5cf96c18c5720d1b6b3b53e9f4c0cfae (diff) | |
parent | 6d4bcf0a75b2a6055055c9ad8ed6b93599082385 (diff) | |
download | openbmc-a75bff085ba9443315222231c42692745e5781e9.tar.xz |
Merge branch 'master' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into intel
Diffstat (limited to 'meta-security/lib/oeqa/runtime/cases/apparmor.py')
-rw-r--r-- | meta-security/lib/oeqa/runtime/cases/apparmor.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/meta-security/lib/oeqa/runtime/cases/apparmor.py b/meta-security/lib/oeqa/runtime/cases/apparmor.py new file mode 100644 index 000000000..e2cb316d1 --- /dev/null +++ b/meta-security/lib/oeqa/runtime/cases/apparmor.py @@ -0,0 +1,27 @@ +# Copyright (C) 2019 Armin Kuster <akuster808@gmail.com> +# +import re + +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.runtime.decorator.package import OEHasPackage + + +class ApparmorTest(OERuntimeTestCase): + + @OEHasPackage(['apparmor']) + @OETestDepends(['ssh.SSHTest.test_ssh']) + def test_apparmor_help(self): + status, output = self.target.run('aa-status --help') + msg = ('apparmor command does not work as expected. ' + 'Status and output:%s and %s' % (status, output)) + self.assertEqual(status, 0, msg = msg) + + @OETestDepends(['apparmor.ApparmorTest.test_apparmor_help']) + def test_apparmor_aa_status(self): + status, output = self.target.run('aa-status') + match = re.search('apparmor module is loaded.', output) + if not match: + msg = ('aa-status failed. ' + 'Status and output:%s and %s' % (status, output)) + self.assertEqual(status, 0, msg = msg) |