From: Kienan Stewart Date: Mon, 15 Jan 2024 14:35:56 +0000 (-0500) Subject: lava: Wait until time is synchronised during test suite cleanup X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4663cfc2cf7d2f049d22f42c57d689247cd269d5;p=lttng-ci.git lava: Wait until time is synchronised during test suite cleanup Change-Id: I85d426b9167eb53777d0684d4f7f3249a6a48f3a Signed-off-by: Kienan Stewart --- diff --git a/scripts/system-tests/run-test-suites.sh b/scripts/system-tests/run-test-suites.sh index 62ab7d2..81be13f 100755 --- a/scripts/system-tests/run-test-suites.sh +++ b/scripts/system-tests/run-test-suites.sh @@ -71,6 +71,15 @@ verne() { function cleanup { timedatectl set-ntp true + # The false dates used in the tests are far in the past + # and it may take some time for the ntp update to actually + # happen. + # If the date is still in the past, it is possible that + # subsequent steps will fail (eg. TLS certificates cannot + # be validated). + while [[ "$(date +%Y)" -lt "2024" ]] ; do + sleep 1 + done } trap cleanup EXIT SIGINT SIGTERM @@ -107,5 +116,4 @@ if [[ "${failed_tests}" != "0" ]] ; then find tests/ -iname '*.trs' -print0 -or -iname '*.log' -print0 | tar czf /tmp/coredump/logs.tgz --null -T - fi -timedatectl set-ntp true exit $failed_tests