diff options
author | dann frazier <dann.frazier@canonical.com> | 2020-01-27 18:45:17 -0700 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-02-05 17:35:38 +0100 |
commit | df7b3a05c9981da96bd2fc986bc5cf96a18c95bc (patch) | |
tree | afeec63eac42b5d180a9b89bc63ab2964d35c279 /test | |
parent | 9326efee71c8829a8ad5601d1e36a08fa6cc1c3e (diff) | |
download | systemd-df7b3a05c9981da96bd2fc986bc5cf96a18c95bc.tar.gz |
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
(cherry picked from commit 37b9966e2525790843ab302a5b8009853a7905a0)
(cherry picked from commit 2bbbe9ae41ab7037555ceb18f457ba84fa7241ba)
Diffstat (limited to 'test')
-rwxr-xr-x | test/TEST-21-SYSUSERS/test.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/TEST-21-SYSUSERS/test.sh b/test/TEST-21-SYSUSERS/test.sh index a1a2e62ab1..add16ea19f 100755 --- a/test/TEST-21-SYSUSERS/test.sh +++ b/test/TEST-21-SYSUSERS/test.sh @@ -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" |