[PATCH v2] selftests: net: udpgro_fwd.sh: Use ping6 on systems where ping doesn't handle IPv6
From: Jianguo Wu <hidden>
Date: 2021-12-31 01:58:55
From: Jianguo Wu <redacted>
In CentOS7(iputils-20160308-10.el7.x86_64), udpgro_fwd.sh output
following message:
ping: 2001:db8:1::100: Address family for hostname not supported
Use ping6 on systems where ping doesn't handle IPv6.
v1 -> v2:
- explicitly checking the available ping feature, as e.g. do the
bareudp.sh self-tests.(Paolo)
Fixes: a062260a9d5f ("selftests: net: add UDP GRO forwarding self-tests")
Signed-off-by: Jianguo Wu <redacted>
---
tools/testing/selftests/net/udpgro_fwd.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/udpgro_fwd.sh b/tools/testing/selftests/net/udpgro_fwd.sh
index 6a3985b..6f05e06 100755
--- a/tools/testing/selftests/net/udpgro_fwd.sh
+++ b/tools/testing/selftests/net/udpgro_fwd.sh@@ -185,6 +185,7 @@ for family in 4 6; do IPT=iptables SUFFIX=24 VXDEV=vxlan + PING=ping if [ $family = 6 ]; then BM_NET=$BM_NET_V6
@@ -192,6 +193,8 @@ for family in 4 6; do SUFFIX="64 nodad" VXDEV=vxlan6 IPT=ip6tables + # Use ping6 on systems where ping doesn't handle IPv6 + ping -w 1 -c 1 ::1 > /dev/null 2>&1 || PING="ping6" fi echo "IPv$family"
@@ -237,7 +240,7 @@ for family in 4 6; do # load arp cache before running the test to reduce the amount of # stray traffic on top of the UDP tunnel - ip netns exec $NS_SRC ping -q -c 1 $OL_NET$DST_NAT >/dev/null + ip netns exec $NS_SRC $PING -q -c 1 $OL_NET$DST_NAT >/dev/null run_test "GRO fwd over UDP tunnel" $OL_NET$DST_NAT 1 1 $OL_NET$DST cleanup
--
1.8.3.1