selftests: mptcp: diag: skip inuse 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 reporting of the MPTCP sockets being used, introduced
by commit c558246ee7 ("mptcp: add statistics for mptcp socket in use").

Similar to the parent commit, it looks like there is no good pre-check
to do here, i.e. dedicated function available in kallsyms. Instead, we
try to get info and if nothing is returned, the test is marked as
skipped.

Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368
Fixes: e04a30f788 ("selftest: mptcp: add test for mptcp socket in use")
Cc: stable@vger.kernel.org
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Matthieu Baerts 2023-06-08 18:38:48 +02:00 committed by Jakub Kicinski
parent dc97251bf0
commit dc93086aff
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ chk_msk_inuse()
sleep 0.1
done
__chk_nr get_msk_inuse $expected "$msg"
__chk_nr get_msk_inuse $expected "$msg" 0
}
# $1: ns, $2: port