mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
selftests: mptcp: sockopt: skip getsockopt checks if not supported
commitc6f7eccc51
upstream. Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the getsockopt(SOL_MPTCP) to get info about the MPTCP connections introduced by commit55c42fa7fa
("mptcp: add MPTCP_INFO getsockopt") and the following ones. It is possible to look for "mptcp_diag_fill_info" in kallsyms because it is introduced by the mentioned feature. So we can know in advance if the feature is supported and skip the sub-test if not. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes:ce9979129a
("selftests: mptcp: add mptcp getsockopt test cases") 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
103b4e62de
commit
bfe225dec6
1 changed files with 6 additions and 0 deletions
|
@ -84,6 +84,7 @@ cleanup()
|
|||
}
|
||||
|
||||
mptcp_lib_check_mptcp
|
||||
mptcp_lib_check_kallsyms
|
||||
|
||||
ip -Version > /dev/null 2>&1
|
||||
if [ $? -ne 0 ];then
|
||||
|
@ -248,6 +249,11 @@ do_mptcp_sockopt_tests()
|
|||
{
|
||||
local lret=0
|
||||
|
||||
if ! mptcp_lib_kallsyms_has "mptcp_diag_fill_info$"; then
|
||||
echo "INFO: MPTCP sockopt not supported: SKIP"
|
||||
return
|
||||
fi
|
||||
|
||||
ip netns exec "$ns_sbox" ./mptcp_sockopt
|
||||
lret=$?
|
||||
|
||||
|
|
Loading…
Reference in a new issue