Skip to content

Commit 6673851

Browse files
matttbekuba-moo
authored andcommitted
selftests: mptcp: join: skip mixed tests if not supported
Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the support of a mix of subflows in v4 and v6 by the in-kernel PM introduced by commit b9d69db ("mptcp: let the in-kernel PM use mixed IPv4 and IPv6 addresses"). It looks like there is no external sign we can use to predict the expected behaviour. Instead of accepting different behaviours and thus not really checking for the expected behaviour, we are looking here for a specific kernel version. That's not ideal but it looks better than removing the test because it cannot support older kernel versions. Link: multipath-tcp/mptcp_net-next#368 Fixes: ad34937 ("selftests: mptcp: add test-cases for mixed v4/v6 subflows") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 96b8419 commit 6673851

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2637,7 +2637,8 @@ v4mapped_tests()
26372637

26382638
mixed_tests()
26392639
{
2640-
if reset "IPv4 sockets do not use IPv6 addresses"; then
2640+
if reset "IPv4 sockets do not use IPv6 addresses" &&
2641+
continue_if mptcp_lib_kversion_ge 6.3; then
26412642
pm_nl_set_limits $ns1 0 1
26422643
pm_nl_set_limits $ns2 1 1
26432644
pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal
@@ -2646,7 +2647,8 @@ mixed_tests()
26462647
fi
26472648

26482649
# Need an IPv6 mptcp socket to allow subflows of both families
2649-
if reset "simult IPv4 and IPv6 subflows"; then
2650+
if reset "simult IPv4 and IPv6 subflows" &&
2651+
continue_if mptcp_lib_kversion_ge 6.3; then
26502652
pm_nl_set_limits $ns1 0 1
26512653
pm_nl_set_limits $ns2 1 1
26522654
pm_nl_add_endpoint $ns1 10.0.1.1 flags signal
@@ -2655,7 +2657,8 @@ mixed_tests()
26552657
fi
26562658

26572659
# cross families subflows will not be created even in fullmesh mode
2658-
if reset "simult IPv4 and IPv6 subflows, fullmesh 1x1"; then
2660+
if reset "simult IPv4 and IPv6 subflows, fullmesh 1x1" &&
2661+
continue_if mptcp_lib_kversion_ge 6.3; then
26592662
pm_nl_set_limits $ns1 0 4
26602663
pm_nl_set_limits $ns2 1 4
26612664
pm_nl_add_endpoint $ns2 dead:beef:2::2 flags subflow,fullmesh
@@ -2666,7 +2669,8 @@ mixed_tests()
26662669

26672670
# fullmesh still tries to create all the possibly subflows with
26682671
# matching family
2669-
if reset "simult IPv4 and IPv6 subflows, fullmesh 2x2"; then
2672+
if reset "simult IPv4 and IPv6 subflows, fullmesh 2x2" &&
2673+
continue_if mptcp_lib_kversion_ge 6.3; then
26702674
pm_nl_set_limits $ns1 0 4
26712675
pm_nl_set_limits $ns2 2 4
26722676
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal

0 commit comments

Comments
 (0)