2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-12-04 08:07:04 +00:00

fix(xcat-core): the Genesis bats sandbox stops a slow run after 20 s

run_genesis stops the Genesis script after 20 s. On a riscv64 host,
tests 2 and 3 of genesis_secondary_dhcp6_order.bats take about 34 s
each, so they fail with exit 124 although the script is correct.

The cap is now 120 s, and GENESIS_SANDBOX_TIMEOUT overrides it. With
GENESIS_SANDBOX_TIMEOUT=10 on x86_64, tests 2 and 3 fail with exit
124, which is the failure seen on riscv64.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
Daniel Hilst
2026-11-10 07:24:57 -03:00
parent 150d820300
commit cd27d21e13
+2 -1
View File
@@ -53,7 +53,8 @@ run_genesis()
if [ "$expected_status" -gt 128 ]; then
alternate_status=$((expected_status - 128))
fi
run "${sandbox[@]}" "$@" timeout 20 /bin/bash /run/script </dev/null
# A slow host needs over 30 s for one run. GENESIS_SANDBOX_TIMEOUT overrides the cap.
run "${sandbox[@]}" "$@" timeout "${GENESIS_SANDBOX_TIMEOUT:-120}" /bin/bash /run/script </dev/null
if [ "$status" -ne "$expected_status" ] && [ "$status" -ne "$alternate_status" ]; then
printf 'Expected exit %s or %s, got %s\n%s\n' \
"$expected_status" "$alternate_status" "$status" "$output" >&2