Skip to content

Commit 46565ac

Browse files
matttbePaolo Abeni
authored andcommitted
selftests: mptcp: diag: skip if MPTCP is not supported
Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: multipath-tcp/mptcp_net-next#368 Fixes: df62f2e ("selftests/mptcp: add diag interface tests") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 715c78a commit 46565ac

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • tools/testing/selftests/net/mptcp

tools/testing/selftests/net/mptcp/diag.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22
# SPDX-License-Identifier: GPL-2.0
33

4+
. "$(dirname "${0}")/mptcp_lib.sh"
5+
46
sec=$(date +%s)
57
rndh=$(printf %x $sec)-$(mktemp -u XXXXXX)
68
ns="ns1-$rndh"
@@ -31,6 +33,8 @@ cleanup()
3133
ip netns del $ns
3234
}
3335

36+
mptcp_lib_check_mptcp
37+
3438
ip -Version > /dev/null 2>&1
3539
if [ $? -ne 0 ];then
3640
echo "SKIP: Could not run test without ip tool"

0 commit comments

Comments
 (0)