mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-27 12:52:16 +00:00
e89f68d59e
run_genesis in xCAT-test/bats/helpers/genesis_sandbox.bash compared the status of "timeout 20 /bin/bash /run/script" with one exact number. GNU coreutils timeout reports a child that a signal killed as 128+signal, so genesis_discovery_uuid.bats expects 143 for SIGTERM. The uutils coreutils of Ubuntu 26.04 reports the signal number alone, 15, so the same outcome fails the assertion there. run_genesis now accepts the expected status or, when that status is above 128, the signal number alone. A caller that expects 0 keeps one accepted value, and an unrelated failure is still a failure. The comment names the two conventions. Evidence: a four-case bats file drives run_genesis with a controlled status. With the change, 143 and 15 both pass against an expected 143, while status 1 against 143 and status 15 against 0 still fail. Without the change only the 15 case flips to "Expected exit 143, got 15"; the control and both discriminators are unchanged. The five "= 143" comparisons in genesis_openembedded_runtime.bats stay as they are: terminate_after reads its status from the bash wait builtin, which computes 128+signal itself and does not call timeout. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>