summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2023-02-15 20:58:58 +0100
committerGitHub <noreply@github.com>2023-02-15 20:58:58 +0100
commit6f97aae029c0fe44d64dc5ff202ab0125571211f (patch)
treeea5f4f3fc2803ef8b982f7eee426f490091dfe5b /test
parentMerge pull request #26410 from DaanDeMeyer/xattr-symlink (diff)
parenttest: add basic seqnum test (diff)
downloadsystemd-6f97aae029c0fe44d64dc5ff202ab0125571211f.tar.xz
systemd-6f97aae029c0fe44d64dc5ff202ab0125571211f.zip
Merge pull request #26213 from poettering/journal-rework-seqnum
journal sequence number rework
Diffstat (limited to 'test')
-rwxr-xr-xtest/units/testsuite-04.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/units/testsuite-04.sh b/test/units/testsuite-04.sh
index bab2bdc24e..3cde55cacb 100755
--- a/test/units/testsuite-04.sh
+++ b/test/units/testsuite-04.sh
@@ -70,7 +70,7 @@ ID=$(journalctl --new-id128 | sed -n 2p)
printf $'foo' | systemd-cat -t "$ID" --level-prefix false
journalctl --sync
journalctl -b -o export --output-fields=MESSAGE,FOO --output-fields=PRIORITY,MESSAGE -t "$ID" >/output
-[[ $(grep -c . /output) -eq 6 ]]
+[[ $(grep -c . /output) -eq 8 ]]
grep -q '^__CURSOR=' /output
grep -q '^MESSAGE=foo$' /output
grep -q '^PRIORITY=6$' /output
@@ -266,4 +266,13 @@ if is_xattr_supported; then
rm -rf /etc/systemd/system/delegated-cgroup-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