diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-06-01 08:54:44 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-06-01 15:25:50 +0200 |
commit | 7faf8987edaec4f160c4daa455721dab8f2261d4 (patch) | |
tree | f685a4cc6111305e2b015a82b84e30a10e811f11 /test/units/TEST-04-JOURNAL.journal.sh | |
parent | po: Translated using Weblate (Turkish) (diff) | |
download | systemd-7faf8987edaec4f160c4daa455721dab8f2261d4.tar.xz systemd-7faf8987edaec4f160c4daa455721dab8f2261d4.zip |
test: sync journal in short-living services
This also adjusts LogLevelMax=.
Hopefully, this makes the test much stabler.
Diffstat (limited to '')
-rwxr-xr-x | test/units/TEST-04-JOURNAL.journal.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/units/TEST-04-JOURNAL.journal.sh b/test/units/TEST-04-JOURNAL.journal.sh index bb4f66d2c8..bd9f8a5e82 100755 --- a/test/units/TEST-04-JOURNAL.journal.sh +++ b/test/units/TEST-04-JOURNAL.journal.sh @@ -104,12 +104,10 @@ diff /tmp/expected /tmp/output # test that LogLevelMax can also suppress logging about services, not only by services systemctl start silent-success -journalctl --sync [[ -z "$(journalctl -b -q -u silent-success.service)" ]] # Test syslog identifiers exclusion systemctl start verbose-success.service -journalctl --sync [[ -n "$(journalctl -b -q -u verbose-success.service -t systemd)" ]] [[ -n "$(journalctl -b -q -u verbose-success.service -t echo)" ]] [[ -n "$(journalctl -b -q -u verbose-success.service -T systemd)" ]] @@ -262,8 +260,8 @@ UNIT_NAME="test-cursor-$RANDOM.service" CURSOR_FILE="$(mktemp)" # Generate some messages we can match against journalctl --cursor-file="$CURSOR_FILE" -n1 -systemd-run --unit="$UNIT_NAME" --wait --service-type=exec bash -ec "sleep 2; set -x; echo hello; echo world; set +x; sleep 2" -journalctl --sync +systemd-run --unit="$UNIT_NAME" --wait --service-type=exec -p LogLevelMax=info \ + bash -ec "set -x; echo hello; echo world; set +x; journalctl --sync" # --after-cursor= + --unit= # The format of the "Starting ..." message depends on StatusUnitFormat=, so match only the beginning # which should be enough in this case |