Skip to content
Snippets Groups Projects
Commit 3e56065a authored by Martyn Welch's avatar Martyn Welch
Browse files

Merge commit '061cc818'

parents 10b4bcc1 061cc818
No related branches found
No related tags found
1 merge request!2T4802: Fix up issues with apparmor-dbus testing
......@@ -54,7 +54,6 @@ if [ ! -x $1 ]; then
exit 1
fi
SOMETHING_FAILED="False"
# typically "normal.expected" or "malicious.expected"
TEST_TITLE=$( basename ${EXPECT_FILE} )
......@@ -78,7 +77,7 @@ if [ "${LAUNCH_DBUS}" = "True" ]; then
# Start a new D-Bus session for this test
CMD="dbus-run-session -- $*"
else
CMD=$*
CMD="$*"
fi
CMDLINE="common/run-test-in-systemd"
......@@ -114,10 +113,11 @@ else
echo "# ${CMDLINE} exited ${RET}"
# typically "normal.expected_underlying_tests: fail"
echo "${TEST_TITLE}_underlying_tests: fail"
SOMETHING_FAILED="True"
exit 1
fi
# Give auditd time to log the entries.
# Give journal time to log the entries.
sleep 3
# Get audit information from journal
......@@ -143,6 +143,9 @@ done
PARSE_FILE="${TMP_DIR}/PARSE"
# TODO: There is potential for other processes to cause messages to appear in
# the journal that may lead to false failures. If this is found to be an
# issue in practice, then additional filtering of results may be required
apparmor_parse_journal ${AUDIT_FILE} DENIED > ${PARSE_FILE}
echo "#---8<--- actual parsed apparmor output from journal"
......@@ -171,10 +174,6 @@ else
diff -urN ${TMP_DIR}/EXPECT${NUM} ${PARSE_FILE}
echo "#--->8---"
echo "${TEST_TITLE}: fail"
SOMETHING_FAILED="True"
fi
if [ "${SOMETHING_FAILED}" = "True" ]; then
exit 1
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment