Skip to content
Snippets Groups Projects

Better fixing of cursor use

Merged Walter Lozano requested to merge wip/wlozano/apparmor-fixes into apertis/v2024dev1
1 file
+ 8
2
Compare changes
  • Side-by-side
  • Inline
+ 8
2
@@ -74,7 +74,7 @@ TMP_DIR=$(mktemp -d)
trap "rm -rf $TMP_DIR; exit" EXIT
# Log start cursor
START_CURSOR="$(journalctl --output-fields=__CURSOR --output=json -n1 | sed 's/.*\"__CURSOR\":\"\([^\"]*\)\".*/\1/')"
START_CURSOR="$(journalctl -t audit --output-fields=__CURSOR --output=json -n1 | sed 's/.*\"__CURSOR\":\"\([^\"]*\)\".*/\1/')"
if [ "${LAUNCH_DBUS}" = "True" ]; then
# Start a new D-Bus session for this test
@@ -132,7 +132,13 @@ if [ "${UID}" != "0" ]
then
JOURNALCTL="sudo journalctl"
fi
${JOURNALCTL} --cursor "${START_CURSOR}" -t audit -o cat > ${AUDIT_FILE}
CURSOR_ARG=""
if [ "${START_CURSOR}" != "" ]; then
CURSOR_ARG="--after-cursor ${START_CURSOR}"
fi
${JOURNALCTL} ${CURSOR_ARG} -t audit -o cat > ${AUDIT_FILE}
echo "#=== ${TEST_TITLE} ==="
Loading