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.
This commit is contained in:
Luca Boccassi
2026-06-04 14:44:55 +01:00
parent d15dd708cc
commit f723784b60
+2 -1
View File
@@ -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")
)