]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: use systemd-run --wait in TEST-44-LOG-NAMESPACE
authorLuca Boccassi <bluca@debian.org>
Wed, 14 Apr 2021 20:26:50 +0000 (21:26 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 Apr 2021 06:16:19 +0000 (08:16 +0200)
The test appears to be occasionally failing. It uses systemd-run to echo
'hello world' into a namespaced journal and then uses journalctl to look for it,
but it doesn't wait.
In the failed runs it can't find it, but the automated journal dump shows
the message at the end.

Use --wait to avoid races.

test/units/testsuite-44.sh

index 50b5c3046f2c9e6bc9e6aadb8fa304554f826452..0100b31b576978534ae20d3155e58bd7bb683b5f 100755 (executable)
@@ -3,7 +3,7 @@ set -eux
 
 systemd-analyze log-level debug
 
-systemd-run -p LogNamespace=foobar echo "hello world"
+systemd-run --wait -p LogNamespace=foobar echo "hello world"
 
 journalctl --namespace=foobar --sync
 journalctl -o cat --namespace=foobar >/tmp/hello-world