From faee4559ce84d596782394ba0cbbef848d6ce6b5 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Wed, 8 Nov 2023 14:46:12 +0100 Subject: [PATCH] test: wait for journal to rotate in testLogs In our CI the testLogs sometimes does not get a `START` and then fails. From the failed log it looks like this is due to journal being rotated. The user test case already sleeps to let journalctl settle so now we unify this approach. Nov 08 13:13:09 ubuntu systemd[1]: Started test.service - Test Service. Nov 08 13:13:09 ubuntu test-service[2427]: START Nov 08 13:13:09 ubuntu systemd-journald[271]: Received client request to rotate journal. Nov 08 13:19:51 ubuntu systemd-journald[271]: Received client request to rotate journal. Nov 08 13:19:52 ubuntu test-service[2480]: START Nov 08 13:19:57 ubuntu test-service[2480]: WORKING --- test/verify/check-system-services | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/verify/check-system-services b/test/verify/check-system-services index 78af03182292..dc64b2849be4 100755 --- a/test/verify/check-system-services +++ b/test/verify/check-system-services @@ -162,10 +162,11 @@ trap "echo STOP" 0 if [ $(id -u) -eq 0 ]; then journalctl --sync -else - # increase the chance for journal to catch up - sleep 5 fi + +# increase the chance for journal to catch up +sleep 5 + echo START while true; do sleep 5