mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-12-04 08:07:04 +00:00
test(xcat-core): bmcsetup reports failed for a dotted-decimal BMC IPv6 address
An IPv6 address can end in dotted decimal: 2001:db8:1::192.0.2.20 and 2001:db8:1::c000:214 are the same address. ipmitool and BMCUtils accept the dotted form, but ipv6_expand in bmcsetup rejects the dots, so an OpenBMC configured with that spelling reports installstatus failed. The new cases check the final OpenBMC status for both spellings, in both directions, and for a different address. The first case fails on the current bmcsetup. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
@@ -521,6 +521,35 @@ LAN
|
||||
CASES
|
||||
}
|
||||
|
||||
@test 'bmcsetup reports an OpenBMC ready for a dotted-decimal spelling of its IPv6 address' {
|
||||
local configured readback
|
||||
while read -r configured readback; do
|
||||
run openbmc_status "$configured" "$readback"
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = '2001:db8::1 3002 installstatus bmcready' ] || {
|
||||
echo "$configured read back as $readback: $output"; return 1; }
|
||||
done <<'CASES'
|
||||
2001:db8:1::192.0.2.20 2001:db8:1::c000:214/64
|
||||
2001:db8:1::c000:214 2001:db8:1::192.0.2.20/64
|
||||
2001:db8:1::192.0.2.20 2001:db8:1::192.0.2.20/64
|
||||
::ffff:192.0.2.20 ::ffff:c000:214
|
||||
CASES
|
||||
}
|
||||
|
||||
@test 'bmcsetup reports an OpenBMC failed for a different dotted-decimal IPv6 address' {
|
||||
local configured readback
|
||||
while read -r configured readback; do
|
||||
run openbmc_status "$configured" "$readback"
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = '2001:db8::1 3002 installstatus failed' ] || {
|
||||
echo "$configured read back as $readback: $output"; return 1; }
|
||||
done <<'CASES'
|
||||
2001:db8:1::192.0.2.20 2001:db8:1::c000:215/64
|
||||
2001:db8:1::c000:214 2001:db8:1::192.0.2.21/64
|
||||
2001:db8:1::c000:214 2001:db8:1::192.0.2.276/64
|
||||
CASES
|
||||
}
|
||||
|
||||
@test 'bmcsetup reports an OpenBMC failed for an IPv6 address that only shares a text prefix' {
|
||||
local configured readback
|
||||
while read -r configured readback; do
|
||||
|
||||
Reference in New Issue
Block a user