]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-17-UDEV: rotate journal after pending journal entries in buffer before flushed
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 16 Aug 2025 19:36:26 +0000 (04:36 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sun, 17 Aug 2025 10:16:57 +0000 (11:16 +0100)
Then, expected journal entries should be in the archived journal, hence
hopefully we can safely get them.

Follow-up for 5e4115e59e25fc2eeb31c8f47c3ce1b59835f215.

test/units/TEST-17-UDEV.watch.sh

index cc7f78bbbea6db0023abd1204014cb009f2e058f..14a05648950a42bab7dad95388ed46d55d4905ba 100755 (executable)
@@ -24,14 +24,13 @@ 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
 
         journalctl --sync
+        # Also rotate journal to make expected journal entries in an archived journal file.
+        journalctl --rotate
 
         # Check if the inotify watch fd is received from fd store.
         journalctl -n 1 -q -u systemd-udevd.service --invocation=0 --grep 'Received inotify fd \(\d+\) from service manager.'