diff --git a/features/environment.py b/features/environment.py index 85dcb19615..3754717331 100644 --- a/features/environment.py +++ b/features/environment.py @@ -425,6 +425,17 @@ def after_step(context, step): ) ) + # get apparmor DENIED messages from the host + # XXX + with open("/var/log/syslog", "r") as syslog_fd: + syslog_messages = syslog_fd.readlines() + apparmor_denied = [ + msg.strip() for msg in syslog_messages if "DENIED" in msg + ] + logging.warning("XXX apparmor DENIED from host begin") + logging.warning("\n".join(apparmor_denied)) + logging.warning("XXX apparmor DENIED from host end") + if hasattr(context, "machines") and SUT in context.machines: try: context.machines[SUT].instance.execute(