[apparmor] [PATCH v2 2/8] utils: Update the logprof.conf in the test dir to point to in-tree paths

Tyler Hicks tyhicks at canonical.com
Wed Mar 1 20:52:00 UTC 2017


The utils tests should make use of the logprof.conf that resides in
utils/test/ when testing against the in-tree parser and profiles. When
testing against the system, it the utils tests should continue to use
the system logprof.conf.

This patch updates the parser and profiles paths to point to the in-tree
paths. Another patch is needed to get aa.py to honor a non-hardcoded
search path for logprof.conf and other configuration files.

Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
Acked-by: Christian Boltz <apparmor at cboltz.de>
Acked-by: Seth Arnold <seth.arnold at canonical.com>
---
 utils/test/logprof.conf   | 6 +++---
 utils/test/test-config.py | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/utils/test/logprof.conf b/utils/test/logprof.conf
index 47ad563..31ed5c9 100644
--- a/utils/test/logprof.conf
+++ b/utils/test/logprof.conf
@@ -10,11 +10,11 @@
 # ------------------------------------------------------------------
 
 [settings]
-  profiledir = /etc/apparmor.d /etc/subdomain.d
-  inactive_profiledir = /usr/share/doc/apparmor-profiles/extras 
+  profiledir = ../../profiles/apparmor.d
+  inactive_profiledir = ../../profiles/apparmor/profiles/extra
   logfiles = /var/log/audit/audit.log /var/log/syslog /var/log/messages
 
-  parser = /sbin/apparmor_parser /sbin/subdomain_parser
+  parser = ../../parser/apparmor_parser
   ldd = /usr/bin/ldd
   logger = /bin/logger /usr/bin/logger
 
diff --git a/utils/test/test-config.py b/utils/test/test-config.py
index 70bdfca..3468c3b 100755
--- a/utils/test/test-config.py
+++ b/utils/test/test-config.py
@@ -24,7 +24,7 @@ class Test(unittest.TestCase):
         conf = ini_config.read_config('logprof.conf')
         logprof_sections = ['settings', 'repository', 'qualifiers', 'required_hats', 'defaulthat', 'globs']
         logprof_sections_options = ['profiledir', 'inactive_profiledir', 'logfiles', 'parser', 'ldd', 'logger', 'default_owner_prompt', 'custom_includes']
-        logprof_settings_parser = '/sbin/apparmor_parser /sbin/subdomain_parser'
+        logprof_settings_parser = '../../parser/apparmor_parser'
 
         self.assertEqual(conf.sections(), logprof_sections)
         self.assertEqual(conf.options('settings'), logprof_sections_options)
-- 
2.7.4




More information about the AppArmor mailing list