test: add basic seqnum test

This commit is contained in:
Lennart Poettering
2023-01-31 14:40:03 +01:00
parent 11181f8a5a
commit f28ed2c1be

View File

@@ -259,4 +259,13 @@ if is_xattr_supported; then
rm -rf /etc/systemd/system/logs-filtering.service.d
fi
# Check that the seqnum field at least superficially works
systemd-cat echo "ya"
journalctl --sync
SEQNUM1=$(journalctl -o export -n 1 | grep -a __SEQNUM= | cut -d= -f2)
systemd-cat echo "yo"
journalctl --sync
SEQNUM2=$(journalctl -o export -n 1 | grep -a __SEQNUM= | cut -d= -f2)
test "$SEQNUM2" -gt "$SEQNUM1"
touch /testok