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