From: Pádraig Brady Date: Mon, 15 Sep 2025 13:43:16 +0000 (+0100) Subject: tests: avoid infinite loop in init.sh X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b26ea307aae7f8bcc4e0641f2a6d5d3f3c0d32c6;p=thirdparty%2Fgnulib.git tests: avoid infinite loop in init.sh This was noticed when building expr in coreutils with -fsanitize=memory, which induced false failures resulting in an infinite loop. * tests/init.sh: Break from the loop if there's an issue with expr(1). --- diff --git a/ChangeLog b/ChangeLog index 69d42a0f98..3aba1b6e4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2025-09-15 Pádraig Brady + + tests: avoid infinite loop in init.sh + * tests/init.sh: Break from the loop if there's an issue with expr(1). + 2025-09-15 Pádraig Brady cpu-supports: relicense under LGPL diff --git a/tests/init.sh b/tests/init.sh index 2058822627..6a63f05ee9 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -394,7 +394,7 @@ mktempd_ () err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \ && { echo "$candidate_dir_"; return; } test $MAX_TRIES_ -le $i_ && break; - i_=`expr $i_ + 1` + i_=`expr $i_ + 1` || break done fail_ "$err_" }