scripts/runtime.bash: Fix TIMEOUT env var override
PATCH 1/1 scripts/runtime.bash: Fix TIMEOUT env var override
According to unittests.txt timeout deinition, the TIMEOUT environment variable should override the optional timeout specified in unittests.cfg. Fix this by defaulting the timeout in run() to the TIMEOUT env var, followed by the timeout in unittests.cfg, and lastly by the previously defined default of 90s.
--- scripts/runtime.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
scripts/runtime.bash +1 -2
@@ -1,6 +1,5 @@ : "${RUNTIME_arch_run?}" : "${MAX_SMP:=$(getconf _NPROCESSORS_ONLN)}" -: "${TIMEOUT:=90s}" PASS() { echo -ne "\e[32mPASS\e[0m"; } SKIP() { echo -ne "\e[33mSKIP\e[0m"; }
@@ -82,7 +81,7 @@ function run() local machine="$8" local check="${CHECK:-$9}" local accel="${10}" - local timeout="${11:-$TIMEOUT}" # unittests.cfg overrides the default + local timeout="${TIMEOUT:-${11:-90s}}" # TIMEOUT env var overrides unittests.cfg local disabled_if="${12}" if [ "${CONFIG_EFI}" == "y" ]; then
Signature · 1 line
2.52.0.rc1.455.g30608eb744-goog
Quoted 31 lines · Kevin Cheng
According to unittests.txt timeout deinition, the TIMEOUT environment variable should override the optional timeout specified in unittests.cfg. Fix this by defaulting the timeout in
run()to the TIMEOUT env var, followed by the timeout in unittests.cfg, and lastly by the previously defined default of 90s.--- scripts/runtime.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)scripts/runtime.bash +1
-3@@ -1,6 +1,5 @@ : "${RUNTIME_arch_run?}" : "${MAX_SMP:=$(getconf _NPROCESSORS_ONLN)}" -: "${TIMEOUT:=90s}" PASS() { echo -ne "\e[32mPASS\e[0m"; } SKIP() { echo -ne "\e[33mSKIP\e[0m"; }@@ -82,7 +81,7 @@ function run() local machine="$8" local check="${CHECK:-$9}" local accel="${10}" - local timeout="${11:-$TIMEOUT}" # unittests.cfg overrides the default + local timeout="${TIMEOUT:-${11:-90s}}" # TIMEOUT env var overrides unittests.cfg local disabled_if="${12}" if [ "${CONFIG_EFI}" == "y" ]; then --
Quoted 2 lines
2.52.0.rc1.455.g30608eb744-goog
Forgot to CC Sean
Quoted 5 lines · Kevin Cheng
According to unittests.txt timeout deinition, the TIMEOUT environment variable should override the optional timeout specified in unittests.cfg. Fix this by defaulting the timeout in
run()to the TIMEOUT env var, followed by the timeout in unittests.cfg, and lastly by the previously defined default of 90s.
Missing sign-off.
And let's add
even though that commit didn't document the intention at all, because I agree with the assumed intention documented with 7e62eeb72fe3 ("scripts:
Document environment variables").
Quoted 27 lines
--- scripts/runtime.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)scripts/runtime.bash +1
-2@@ -1,6 +1,5 @@ : "${RUNTIME_arch_run?}" : "${MAX_SMP:=$(getconf _NPROCESSORS_ONLN)}" -: "${TIMEOUT:=90s}" PASS() { echo -ne "\e[32mPASS\e[0m"; } SKIP() { echo -ne "\e[33mSKIP\e[0m"; }@@ -82,7 +81,7 @@ function run() local machine="$8" local check="${CHECK:-$9}" local accel="${10}" - local timeout="${11:-$TIMEOUT}" # unittests.cfg overrides the default + local timeout="${TIMEOUT:-${11:-90s}}" # TIMEOUT env var overrides unittests.cfg local disabled_if="${12}" if [ "${CONFIG_EFI}" == "y" ]; thenSignature · 1 line
2.52.0.rc1.455.g30608eb744-goog
Thanks,
drew
Quoted 10 lines · Andrew Jones
Quoted 5 lines · Kevin Cheng
According to unittests.txt timeout deinition, the TIMEOUT environment variable should override the optional timeout specified in unittests.cfg. Fix this by defaulting the timeout in
run()to the TIMEOUT env var, followed by the timeout in unittests.cfg, and lastly by the previously defined default of 90s.Missing sign-off.
Quoted 7 lines
And let's add
Fixes fd149358c491 ("run scripts: add timeout support")even though that commit didn't document the intention at all, because I agree with the assumed intention documented with
7e62eeb72fe3("scripts:
Document environment variables").
Done. Thanks for pointing that out!
Quoted 30 lines
Quoted 25 lines
--- scripts/runtime.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)scripts/runtime.bash +1
-3@@ -1,6 +1,5 @@ : "${RUNTIME_arch_run?}" : "${MAX_SMP:=$(getconf _NPROCESSORS_ONLN)}" -: "${TIMEOUT:=90s}" PASS() { echo -ne "\e[32mPASS\e[0m"; } SKIP() { echo -ne "\e[33mSKIP\e[0m"; }@@ -82,7 +81,7 @@ function run() local machine="$8" local check="${CHECK:-$9}" local accel="${10}" - local timeout="${11:-$TIMEOUT}" # unittests.cfg overrides the default + local timeout="${TIMEOUT:-${11:-90s}}" # TIMEOUT env var overrides unittests.cfg local disabled_if="${12}" if [ "${CONFIG_EFI}" == "y" ]; then --Quoted 2 lines
2.52.0.rc1.455.g30608eb744-goog
Thanks,
drew