summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/pmtu.sh
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2018-11-02 09:00:55 +0200
committerJani Nikula <jani.nikula@intel.com>2018-11-02 09:01:28 +0200
commit7a085c3aad94cce7e11031c6800e41668418ae4c (patch)
treeb3474f8bd622f87ad39227057f9de60959c8bd95 /tools/testing/selftests/net/pmtu.sh
parent18cde299df33ff73908f7e5dcebf321fb79ed36c (diff)
parentf9885ef875e9160454392f85159163674159c51f (diff)
downloadlinux-stable-7a085c3aad94cce7e11031c6800e41668418ae4c.tar.gz
linux-stable-7a085c3aad94cce7e11031c6800e41668418ae4c.tar.bz2
linux-stable-7a085c3aad94cce7e11031c6800e41668418ae4c.zip
Merge drm/drm-next into drm-intel-next-queued
Although there's nothing crucial missing, it's been a long time since the last backmerge. Catch up with drm-next. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'tools/testing/selftests/net/pmtu.sh')
-rwxr-xr-xtools/testing/selftests/net/pmtu.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
index f8cc38afffa2..0ab9423d009f 100755
--- a/tools/testing/selftests/net/pmtu.sh
+++ b/tools/testing/selftests/net/pmtu.sh
@@ -46,6 +46,9 @@
# Kselftest framework requirement - SKIP code is 4.
ksft_skip=4
+# Some systems don't have a ping6 binary anymore
+which ping6 > /dev/null 2>&1 && ping6=$(which ping6) || ping6=$(which ping)
+
tests="
pmtu_vti6_exception vti6: PMTU exceptions
pmtu_vti4_exception vti4: PMTU exceptions
@@ -175,8 +178,8 @@ setup() {
cleanup() {
[ ${cleanup_done} -eq 1 ] && return
- ip netns del ${NS_A} 2 > /dev/null
- ip netns del ${NS_B} 2 > /dev/null
+ ip netns del ${NS_A} 2> /dev/null
+ ip netns del ${NS_B} 2> /dev/null
cleanup_done=1
}
@@ -274,7 +277,7 @@ test_pmtu_vti6_exception() {
mtu "${ns_b}" veth_b 4000
mtu "${ns_a}" vti6_a 5000
mtu "${ns_b}" vti6_b 5000
- ${ns_a} ping6 -q -i 0.1 -w 2 -s 60000 ${vti6_b_addr} > /dev/null
+ ${ns_a} ${ping6} -q -i 0.1 -w 2 -s 60000 ${vti6_b_addr} > /dev/null
# Check that exception was created
if [ "$(route_get_dst_pmtu_from_exception "${ns_a}" ${vti6_b_addr})" = "" ]; then
@@ -334,7 +337,7 @@ test_pmtu_vti4_link_add_mtu() {
fail=0
min=68
- max=$((65528 - 20))
+ max=$((65535 - 20))
# Check invalid values first
for v in $((min - 1)) $((max + 1)); do
${ns_a} ip link add vti4_a mtu ${v} type vti local ${veth4_a_addr} remote ${veth4_b_addr} key 10 2>/dev/null