distro/fedora contains two versions of the basic tests, used for different Fedora versions. One uses explicit listening address for netcat in some extra places, the other does not. Apparently the older netcat versions didn't require the explicit addresses. Not supplying addresses doesn't test anything useful though, just a detail in netcat's behaviour. So, it's cleaner to just always supply explicit addresses. In addition, we're explicitly expecting the nmap version of ncat, also known as "ncat". So, it's more explicit what we're after if we invoke it via that name rather than "nc", which will go via an /etc/alternatives link. Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au> --- test/distro/fedora | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/distro/fedora b/test/distro/fedora index f2f8f27..b7f1e3b 100644 --- a/test/distro/fedora +++ b/test/distro/fedora @@ -16,13 +16,13 @@ htools wget virt-edit guestfish head sed cat kill # Quick pasta test: send message from init to ns, and from ns to init def distro_quick_pasta_test -host (nc -6 -l -p 10000 > /tmp/init_msg; echo "from_init" | nc ::1 9999) & +host (ncat -6 -l -p 10000 ::1 > /tmp/init_msg; echo "from_init" | ncat ::1 9999) & hostb ./pasta sleep 1 host PS1='$ ' -host nc -6 -l -p 9999 > /tmp/ns_msg & +host ncat -6 -l -p 9999 ::1 > /tmp/ns_msg & sleep 2 -host echo "from_ns" | nc ::1 10000 +host echo "from_ns" | ncat ::1 10000 sleep 2 host echo sleep 1 @@ -34,17 +34,17 @@ hout INIT_MSG cat /tmp/init_msg check [ __INIT_MSG__ = "from_ns" ] endef -# Explicit listening address, bracketed paste mode off, needed from Fedora 34 +# Bracketed paste mode off, needed from Fedora 34 def distro_quick_pasta_test_fedora34 host bind 'set enable-bracketed-paste off' -host (nc -6 -l -p 10000 > /tmp/init_msg; echo "from_init" | nc -6 ::1 9999) & +host (ncat -6 -l -p 10000 ::1 > /tmp/init_msg; echo "from_init" | ncat -6 ::1 9999) & hostb ./pasta sleep 1 host PS1='$ ' host bind 'set enable-bracketed-paste off' -host nc -6 -l ::1 9999 > /tmp/ns_msg & +host ncat -6 -l ::1 9999 > /tmp/ns_msg & sleep 2 -host echo "from_ns" | nc -6 ::1 10000 +host echo "from_ns" | ncat -6 ::1 10000 sleep 2 host echo hout NS_MSG cat /tmp/ns_msg -- 2.36.1