From: Yu Watanabe Date: Wed, 13 Aug 2025 03:03:03 +0000 (+0900) Subject: TEST-17-UDEV: rotate journal before checking X-Git-Tag: v258-rc3~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e4115e59e25fc2eeb31c8f47c3ce1b59835f215;p=thirdparty%2Fsystemd.git TEST-17-UDEV: rotate journal before checking Otherwise, journal files may be rotated during checking journal entries and the main system journal file may not be loaded: ``` [ 350.372652] TEST-17-UDEV.sh[5841]: + test b253:2 = b253:2 [ 350.373288] TEST-17-UDEV.sh[5841]: + [[ 1 == \1 ]] [ 350.373722] TEST-17-UDEV.sh[5841]: + journalctl -n 1 -q -u systemd-udevd.service --invocation=0 --grep 'Found inotify watch .*457' [ 350.374534] TEST-17-UDEV.sh[5970]: Journal file /run/log/journal/edc1fb58daff00ad89d6c8d9689bf172/system.journal is truncated, ignoring file. [ 350.375415] TEST-17-UDEV.sh[415]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/TEST-17-UDEV.watch.sh failed' ``` Fixes #38559. --- diff --git a/test/units/TEST-17-UDEV.watch.sh b/test/units/TEST-17-UDEV.watch.sh index 96a67f4c565..cc7f78bbbea 100755 --- a/test/units/TEST-17-UDEV.watch.sh +++ b/test/units/TEST-17-UDEV.watch.sh @@ -24,6 +24,9 @@ function check_validity() { function check() { for _ in {1..2}; do + # To make journal not rotated during checking journals below. + journalctl --rotate + systemctl reset-failed systemd-udevd.service systemctl restart systemd-udevd.service udevadm settle --timeout=30