From: Lennart Poettering Date: Tue, 26 Sep 2023 09:44:28 +0000 (+0200) Subject: test: extend some existing tests with varlinkctl lines, to test varlinkctl + new... X-Git-Tag: v255-rc1~305^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8525de13651362800a94849e03386e40c41d9404;p=thirdparty%2Fsystemd.git test: extend some existing tests with varlinkctl lines, to test varlinkctl + new PCRExtend service --- diff --git a/test/units/testsuite-04.journal.sh b/test/units/testsuite-04.journal.sh index 1e105a05664..3efac616e08 100755 --- a/test/units/testsuite-04.journal.sh +++ b/test/units/testsuite-04.journal.sh @@ -10,8 +10,12 @@ for ((i = 0; i < ITERATIONS; i++)); do dd if=/dev/urandom bs=1M count=1 | base64 | systemd-cat done journalctl --rotate +# Let's test varlinkctl a bit, i.e. implement the equivalent of 'journalctl --rotate' via varlinkctl +varlinkctl call /run/systemd/journal/io.systemd.journal io.systemd.Journal.Rotate '{}' journalctl --flush +varlinkctl call /run/systemd/journal/io.systemd.journal io.systemd.Journal.FlushToVar '{}' journalctl --sync +varlinkctl call /run/systemd/journal/io.systemd.journal io.systemd.Journal.Synchronize '{}' journalctl --rotate --vacuum-size=8M # Reset the ratelimit buckets for the subsequent tests below. @@ -42,7 +46,8 @@ write_and_match "<5> \t Leading spaces\n" " \t Leading spaces\n" --level-prefix # --output-fields restricts output ID="$(systemd-id128 new)" echo -ne "foo" | systemd-cat -t "$ID" --level-prefix false -journalctl --sync +# Let's test varlinkctl a bit, i.e. implement the equivalent of 'journalctl --sync' via varlinkctl +varlinkctl call /run/systemd/journal/io.systemd.journal io.systemd.Journal.Synchronize '{}' journalctl -b -o export --output-fields=MESSAGE,FOO --output-fields=PRIORITY,MESSAGE -t "$ID" >/tmp/output [[ $(wc -l /run/systemd/system/systemd-pcrextend.socket.d/50-no-condition.conf <