Skip to content

Commit

Permalink
selftests: mptcp: connect: skip TFO tests if not supported
Browse files Browse the repository at this point in the history
Selftests are supposed to run on any kernels, including the old ones not
supporting all MPTCP features.

One of them is the support of TCP_FASTOPEN socket option with MPTCP
connections introduced by commit 4ffb0a0 ("mptcp: add TCP_FASTOPEN
sock option").

It is possible to look for "mptcp_fastopen_" in kallsyms to know if the
feature is supported or not.

Link: multipath-tcp/mptcp_net-next#368
Fixes: ca7ae89 ("selftests: mptcp: mptfo Initiator/Listener")
Signed-off-by: Matthieu Baerts <[email protected]>
  • Loading branch information
matttbe authored and intel-lab-lkp committed May 22, 2023
1 parent 5b5270e commit 81efeaf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/testing/selftests/net/mptcp/mptcp_connect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,11 @@ run_tests_peekmode()

run_tests_mptfo()
{
if ! mptcp_lib_kallsyms_has "mptcp_fastopen_"; then
echo "INFO: TFO not supported by the kernel: SKIP"
return
fi

echo "INFO: with MPTFO start"
ip netns exec "$ns1" sysctl -q net.ipv4.tcp_fastopen=2
ip netns exec "$ns2" sysctl -q net.ipv4.tcp_fastopen=1
Expand Down

0 comments on commit 81efeaf

Please sign in to comment.