]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: sync journal before read
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 6 Jan 2024 02:29:01 +0000 (11:29 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 6 Jan 2024 03:45:59 +0000 (12:45 +0900)
Otherwise, test cases that check journal entries, e.g. test_unit_file()
may fail.

test/test-network/systemd-networkd-tests.py

index 0a87c5d239fe726023ff42af9d0ddb681b1ef55d..7c9ca6610da192c881f8556eaaeb9d2c595ff9fa 100755 (executable)
@@ -713,6 +713,7 @@ def read_networkd_log(invocation_id=None, since=None):
     ]
     if since:
         command.append(f'--since={since}')
+    check_output('journalctl --sync')
     return check_output(*command)
 
 def stop_networkd(show_logs=True):