From 32d45ea9e8e3d0f5bb0e9019861e2fccdb6fb581 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Thu, 5 Nov 2026 09:20:13 -0300 Subject: [PATCH 1/5] test(xcat-core): the Genesis awk helpers are unmeasured over IPv6 The Genesis ramdisk carries its own copies of allowcred.awk and updateflag.awk, because nothing of xCAT is installed in it. No test drove those copies, and they had drifted from the copies under xCAT/postscripts that the IPv6 work changed. The new bats file runs both Genesis copies against a listener on the loopback address of the family under test. Against the current copies four of its six cases fail: the credential listener accepts no connection on the port it was given, and the state report cannot resolve a bracketed IPv6 literal. The two that pass are the IPv4 and plain-IPv6 state reports, which show the method reaches a working listener. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-test/bats/ipv6_genesis_awk_inet6.bats | 167 +++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 xCAT-test/bats/ipv6_genesis_awk_inet6.bats diff --git a/xCAT-test/bats/ipv6_genesis_awk_inet6.bats b/xCAT-test/bats/ipv6_genesis_awk_inet6.bats new file mode 100644 index 0000000000..0a5a7e1e73 --- /dev/null +++ b/xCAT-test/bats/ipv6_genesis_awk_inet6.bats @@ -0,0 +1,167 @@ +#!/usr/bin/env bats +# +# The Genesis ramdisk carries its own copies of two awk helpers, because nothing +# of xCAT is installed in it. The copies under xCAT/postscripts choose the gawk +# network family from the management address; the copies under +# xCAT-genesis-scripts/usr/bin named /inet/ unconditionally, so on an IPv6-only +# cluster the credential listener accepted no connection and the state report +# reached no listener. A node discovered by Genesis then hung with no +# credentials and no state. +# +# Each test runs the real program and speaks to it over the loopback address of +# the family under test. Nothing here reaches the lab. + +load 'helpers/shell_source' + +setup() +{ + command -v gawk >/dev/null || skip 'gawk is required' + command -v socat >/dev/null || skip 'socat is required' + command -v ss >/dev/null || skip 'ss is required' + SERVER_PID= +} + +teardown() +{ + [ -n "${SERVER_PID:-}" ] || return 0 + kill -- "-${SERVER_PID}" 2>/dev/null + kill "$SERVER_PID" 2>/dev/null + return 0 +} + +# --------------------------------------------------------------------------- +# allowcred.awk -- the credential listener. + +# listen_cred