From: Yu Watanabe Date: Mon, 28 Jul 2025 23:25:23 +0000 (+0900) Subject: TEST-04-JOURNAL: add one more missing journalctl --sync X-Git-Tag: v258-rc2~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f9b56cf3b6d781f28c4e0c3e55bc5dc0797c312c;p=thirdparty%2Fsystemd.git TEST-04-JOURNAL: add one more missing journalctl --sync Fixes the following failure: ``` TEST-04-JOURNAL.sh[124]: + add_logs_filtering_override delegated-cgroup-filtering.service 01-discard-hello '~hello' TEST-04-JOURNAL.sh[124]: + local unit=delegated-cgroup-filtering.service TEST-04-JOURNAL.sh[124]: + local override_name=01-discard-hello TEST-04-JOURNAL.sh[124]: + local 'log_filter=~hello' TEST-04-JOURNAL.sh[124]: + mkdir -p /run/systemd/system/delegated-cgroup-filtering.service.d/ TEST-04-JOURNAL.sh[124]: + echo -ne '[Service]\nLogFilterPatterns=~hello' TEST-04-JOURNAL.sh[124]: + NEEDS_RELOAD=1 TEST-04-JOURNAL.sh[1408]: ++ run_service_and_fetch_logs delegated-cgroup-filtering.service TEST-04-JOURNAL.sh[1408]: ++ local unit=delegated-cgroup-filtering.service TEST-04-JOURNAL.sh[1408]: ++ [[ -n 1 ]] TEST-04-JOURNAL.sh[1408]: ++ systemctl daemon-reload TEST-04-JOURNAL.sh[1408]: ++ NEEDS_RELOAD= TEST-04-JOURNAL.sh[1408]: ++ systemctl start delegated-cgroup-filtering.service TEST-04-JOURNAL.sh[1408]: ++ journalctl --sync TEST-04-JOURNAL.sh[1408]: ++ journalctl -q -u delegated-cgroup-filtering.service -I -p notice TEST-04-JOURNAL.sh[124]: + [[ -z Jul 28 22:41:41 H delegated_cgroup_filtering_payload.sh[1448]: child_process: hello, world! TEST-04-JOURNAL.sh[124]: Jul 28 22:41:41 H delegated_cgroup_filtering_payload.sh[1448]: child_process: hello, people! ]] TEST-04-JOURNAL.sh[124]: + at_exit ``` --- diff --git a/test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/delegated_cgroup_filtering_payload_child.sh b/test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/delegated_cgroup_filtering_payload_child.sh index 2d67ad9a388..bd1cd41fa7f 100755 --- a/test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/delegated_cgroup_filtering_payload_child.sh +++ b/test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/delegated_cgroup_filtering_payload_child.sh @@ -5,4 +5,7 @@ echo $$ >/sys/fs/cgroup/system.slice/delegated-cgroup-filtering.service/the_chil echo "child_process: hello, world!" echo "child_process: hello, people!" -sleep .15 + +# If the service finishes extremely fast, journald cannot find the source of the +# stream. Hence, we need to call 'journalctl --sync' before service finishes. +journalctl --sync