]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add basic seqnum test 26213/head
authorLennart Poettering <lennart@poettering.net>
Tue, 31 Jan 2023 13:40:03 +0000 (14:40 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 8 Feb 2023 12:52:14 +0000 (13:52 +0100)
test/units/testsuite-04.sh

index 5d27df91fbe079732f2bcb64cce154b34ef00a47..419d00bedfd6a6a45b198ded58a0608b3dededd0 100755 (executable)
@@ -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