[PATCH] selftests: net: udpgro_fwd.sh: explicitly checking the available ping feature

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

STALE1738d LANDED

Landed in mainline as 5e75d0b215b8 on 2022-01-01.

2 messages, 2 authors, 2022-01-01 · open the first message on its own page

[PATCH] selftests: net: udpgro_fwd.sh: explicitly checking the available ping feature

From: Jianguo Wu <hidden>
Date: 2021-12-31 02:01:28

From: Jianguo Wu <redacted>

As Paolo pointed out, the result of ping IPv6 address depends on
the running distro. So explicitly checking the available ping feature,
as e.g. do the bareudp.sh self-tests.

Fixes: 8b3170e07539 ("selftests: net: using ping6 for IPv6 in udpgro_fwd.sh")
Signed-off-by: Jianguo Wu <redacted>
---
 tools/testing/selftests/net/udpgro_fwd.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/udpgro_fwd.sh b/tools/testing/selftests/net/udpgro_fwd.sh
index 3ea7301..6f05e06 100755
--- a/tools/testing/selftests/net/udpgro_fwd.sh
+++ b/tools/testing/selftests/net/udpgro_fwd.sh
@@ -193,7 +193,8 @@ for family in 4 6; do
 		SUFFIX="64 nodad"
 		VXDEV=vxlan6
 		IPT=ip6tables
-		PING="ping6"
+		# 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"
-- 
1.8.3.1

Re: [PATCH] selftests: net: udpgro_fwd.sh: explicitly checking the available ping feature

From: Jakub Kicinski <kuba@kernel.org>
Date: 2022-01-01 03:33:41

On Fri, 31 Dec 2021 10:01:08 +0800 Jianguo Wu wrote:
From: Jianguo Wu <redacted>

As Paolo pointed out, the result of ping IPv6 address depends on
the running distro. So explicitly checking the available ping feature,
as e.g. do the bareudp.sh self-tests.

Fixes: 8b3170e07539 ("selftests: net: using ping6 for IPv6 in udpgro_fwd.sh")
Signed-off-by: Jianguo Wu <redacted>
Applied, thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help