selftests: mptcp: sockopt: skip TCP_INQ checks if not supported
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Thu, 22 Jun 2023 09:17:09 +0000 (11:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jun 2023 09:12:21 +0000 (11:12 +0200)
commitbce23d12543479712f6bbcd86e59b6221c2f31cc
tree2f6ddd422ce62900634fc5edcc666b2284c4bcd0
parent157dcb20000bd8725f23b8031295d6ff2eb325ba
selftests: mptcp: sockopt: skip TCP_INQ checks if not supported

commit b631e3a4e94c77c9007d60b577a069c203ce9594 upstream.

Selftests are supposed to run on any kernels, including the old ones not
supporting all MPTCP features.

One of them is TCP_INQ cmsg support introduced in commit 2c9e77659a0c
("mptcp: add TCP_INQ cmsg support").

It is possible to look for "mptcp_ioctl" in kallsyms because it was
needed to introduce the mentioned feature. We can skip these tests and
not set TCPINQ option if the feature is not supported.

Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368
Fixes: 5cbd886ce2a9 ("selftests: mptcp: add TCP_INQ support")
Cc: stable@vger.kernel.org
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/net/mptcp/mptcp_sockopt.sh