From e335a66a9d1e6acaf5cb10817bd76bcb8867b12a Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Wed, 26 Jul 2023 15:28:09 -0600 Subject: [PATCH] System tests: quadlet: fix race in %T test Use "--wait" flag in "systemd start" for a one-shot container. Should fix a CI failure I've been seeing sporadically, in which the --==VALUE==-- string is not seen in journal. Signed-off-by: Ed Santiago --- test/system/252-quadlet.bats | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/system/252-quadlet.bats b/test/system/252-quadlet.bats index 7b824be00a..b6883ca320 100644 --- a/test/system/252-quadlet.bats +++ b/test/system/252-quadlet.bats @@ -768,10 +768,11 @@ Description=Get the value of percent T ExecStart=/bin/bash -c "echo --==%T==--" EOF systemctl daemon-reload - systemctl start $service + systemctl --wait start $service echo "$_LOG_PROMPT journalctl -u $service" run journalctl -u $service echo "$output" + assert "$output" =~ " --==.*==--" "get-percent-T unit ran to completion" percent_t=$(expr "$output" : ".* --==\(.*\)==--") # Clean up. Don't bother to systemctl-reload, service_setup does that below. rm -f $unitfile