parser: add empty config file for parser caching tests

The caching tests will fail if a warning is thrown. Some setups may
not have a parser config file in the default location which results
in the warning
  config file '/etc/apparmor/parser.conf' not found

which causes the tests to fail.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/175
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
John Johansen 2018-08-19 01:05:27 -07:00
parent af1818c053
commit 657495fa55
2 changed files with 3 additions and 1 deletions

View file

@ -68,7 +68,9 @@ class AAParserCachingCommon(testlib.AATestTemplate):
self.do_cleanup = False
self.debug = True
self.cmd_prefix = [config.parser, '--base', self.tmp_dir, '--skip-kernel-load']
# Warnings break the test harness, but chroots may not be setup
# to have the config file, etc.
self.cmd_prefix = [config.parser, '--config-file=./parser.conf', '--base', self.tmp_dir, '--skip-kernel-load']
if not self.is_apparmorfs_mounted():
self.cmd_prefix += ['-M', './features_files/features.all']

0
parser/tst/parser.conf Normal file
View file