[PATCH v2] selftests: net: udpgro_fwd.sh: Use ping6 on systems where ping doesn't handle IPv6

Subsystems: kernel selftest framework, networking [general], the rest

DORMANTno replies

3 messages, 2 authors, 2021-12-31 · open the first message on its own page

[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

Re: [PATCH v2] selftests: net: udpgro_fwd.sh: Use ping6 on systems where ping doesn't handle IPv6

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-12-31 01:31:11

On Fri, 31 Dec 2021 09:10:00 +0800 Jianguo Wu wrote:
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>
I'm afraid v1 got silently applied, see 8b3170e07539 ("selftests: net:
using ping6 for IPv6 in udpgro_fwd.sh") upstream. Could you send an
incremental patch?

Re: [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:50:02


在 2021/12/31 9:31, Jakub Kicinski 写道:
On Fri, 31 Dec 2021 09:10:00 +0800 Jianguo Wu wrote:
quoted
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>
I'm afraid v1 got silently applied, see 8b3170e07539 ("selftests: net:
using ping6 for IPv6 in udpgro_fwd.sh") upstream. Could you send an
incremental patch?
OK, I will send an incremental patch.

Thanks!

Jianguo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help