From f723784b600d5d68380e9b8a6a7a075bbed5d42c Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 4 Jun 2026 11:54:53 +0100 Subject: [PATCH] test: wrap sd-run call with timeout to avoid long hangs in TEST-54-CREDS This has been observed to get stuck in an ASAN run, so wrap it in a timeout call to at least get it to fail fast and hopefully get better logs rather than a testbed timeout. --- test/units/TEST-54-CREDS.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/units/TEST-54-CREDS.sh b/test/units/TEST-54-CREDS.sh index 523046ec76..f2321481f5 100755 --- a/test/units/TEST-54-CREDS.sh +++ b/test/units/TEST-54-CREDS.sh @@ -17,7 +17,8 @@ run_with_cred_compare() ( trap "rm -f '$log_file'" RETURN set -o pipefail - systemd-run -p SetCredential="$cred" --wait --pipe -- systemd-creds "$@" | tee "$log_file" + # This has been observed to get stuck under ASAN, so add a timeout as precaution + timeout 120 systemd-run -p SetCredential="$cred" --wait --pipe -- systemd-creds "$@" | tee "$log_file" diff "$log_file" <(echo -ne "$exp") )