From df7fb2816c63e28dfcaa9b5438f924c35a209b1e Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Wed, 11 Nov 2026 15:46:57 -0300 Subject: [PATCH] fix(xcat-core): test that bmcsetup compares BMC addresses as text An OpenBMC node can report "failed" after its IPv6 address is set correctly, and "bmcready" when the BMC has a different address. bmc_has_address in bmcsetup searches the lan6 print output for the configured text, so a different spelling of the same address does not match, and "2001:db8:1::2" matches "2001:db8:1::20". The new tests give the BMC equivalent spellings (zero-padded and compressed, upper and lower case, with and without a prefix length), and different addresses that share a text prefix, for IPv6 and IPv4. They fail on this commit. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-test/bats/genesis_bmcsetup_users.bats | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/xCAT-test/bats/genesis_bmcsetup_users.bats b/xCAT-test/bats/genesis_bmcsetup_users.bats index d993e60799..e340d9c581 100644 --- a/xCAT-test/bats/genesis_bmcsetup_users.bats +++ b/xCAT-test/bats/genesis_bmcsetup_users.bats @@ -480,3 +480,67 @@ LAN run cat "$fixture/flags" [ "$output" = '192.0.2.1 3002 installstatus bmcready' ] } + +# openbmc_status -- give the OpenBMC the IPv6 address +# , let lan6 print report , and print the status that +# bmcsetup sends. +openbmc_status() +{ + openbmc + ipv6_config + sed -i "s|.*|$1|" "$fixture/ipmicfg.xml" + cat >"$fixture/lan6.0" <