]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: wrap sd-run call with timeout to avoid long hangs in TEST-54-CREDS
authorLuca Boccassi <luca.boccassi@gmail.com>
Thu, 4 Jun 2026 10:54:53 +0000 (11:54 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 4 Jun 2026 13:44:55 +0000 (14:44 +0100)
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

index 523046ec765b0d4b8113bf2c0d90a958792ca61b..f2321481f50e3b5a2327d55ad0dec6e19a5f34f7 100755 (executable)
@@ -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")
 )