Skip to content

Commit

Permalink
environment.py: XXX grab apparmor denied messages from hos
Browse files Browse the repository at this point in the history
  • Loading branch information
panlinux committed Mar 15, 2024
1 parent 0856fb0 commit 391589d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions features/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 391589d

Please sign in to comment.