summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJianguo Wu <wujianguo@chinatelecom.cn>2021-12-31 05:01:08 +0300
committerJakub Kicinski <kuba@kernel.org>2022-01-01 05:36:41 +0300
commit5e75d0b215b868337e7a193f28a543ec00e858b1 (patch)
treeae6d85bf785dd865d27d461f6ca92261de579125 /tools
parent0f1fe7b83ba0e47a7c57135420630e9f68e332a3 (diff)
downloadlinux-5e75d0b215b868337e7a193f28a543ec00e858b1.tar.xz
selftests: net: udpgro_fwd.sh: explicitly checking the available ping feature
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 <wujianguo@chinatelecom.cn> Link: https://lore.kernel.org/r/825ee22b-4245-dbf7-d2f7-a230770d6e21@163.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/net/udpgro_fwd.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/udpgro_fwd.sh b/tools/testing/selftests/net/udpgro_fwd.sh
index 3ea73013d956..6f05e06f6761 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"