mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
test: Synchronize journal before reading from it
There's a race condition in the sysuser test where it may try to read entries from the journal before they are available. Fix it by adding a `journalctl --sync` call. BugLink: https://bugs.launchpad.net/bugs/1776654
This commit is contained in:
parent
766840af42
commit
37b9966e25
@ -114,6 +114,7 @@ test_run() {
|
||||
prepare_testdir ${f%.input}
|
||||
cp $f $TESTDIR/usr/lib/sysusers.d/test.conf
|
||||
systemd-sysusers --root=$TESTDIR 2> /dev/null
|
||||
journalctl --sync
|
||||
journalctl -t systemd-sysusers -o cat | tail -n1 > $TESTDIR/tmp/err
|
||||
if ! diff -u $TESTDIR/tmp/err ${f%.*}.expected-err; then
|
||||
echo "**** Unexpected error output for $f"
|
||||
|
Loading…
Reference in New Issue
Block a user