summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMatthieu Baerts <matthieu.baerts@tessares.net>2023-06-10 18:11:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-06-28 11:14:03 +0200
commit54722f776dcbf030d3629a90297befc62e65ac33 (patch)
treeca5620877ac58e60b9fb962c5ff6984fe57bc49f /tools
parentcf84db1d9ea391088b55e8fde670eb6859c564e5 (diff)
downloadlinux-stable-54722f776dcbf030d3629a90297befc62e65ac33.tar.gz
linux-stable-54722f776dcbf030d3629a90297befc62e65ac33.tar.bz2
linux-stable-54722f776dcbf030d3629a90297befc62e65ac33.zip
selftests: mptcp: join: skip PM listener tests if not supported
commit 0471bb479af03874b09350fcfe51d3743a5608de upstream. Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the support of PM listener events introduced by commit f8c9dfbd875b ("mptcp: add pm listener events"). It is possible to look for "mptcp_event_pm_listener" in kallsyms to know in advance if the kernel supports this feature. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 178d023208eb ("selftests: mptcp: listener test for in-kernel PM") 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>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/net/mptcp/mptcp_join.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 352ffbc1010f..e5d479cc6283 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -2734,6 +2734,11 @@ verify_listener_events()
$e_saddr $e_sport
fi
+ if ! mptcp_lib_kallsyms_has "mptcp_event_pm_listener$"; then
+ printf "[skip]: event not supported\n"
+ return
+ fi
+
type=$(grep "type:$e_type," $evt |
sed --unbuffered -n 's/.*\(type:\)\([[:digit:]]*\).*$/\2/p;q')
family=$(grep "type:$e_type," $evt |