diff options
author | Matthieu Baerts <matthieu.baerts@tessares.net> | 2023-06-10 19:11:50 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-06-13 02:55:43 +0300 |
commit | 0471bb479af03874b09350fcfe51d3743a5608de (patch) | |
tree | edbe5ff74f3111390a008f39737fc69985b0b25f | |
parent | 632978f0a961b4591a05ba9e39eab24541d83e84 (diff) | |
download | linux-0471bb479af03874b09350fcfe51d3743a5608de.tar.xz |
selftests: mptcp: join: skip PM listener 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 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>
-rwxr-xr-x | tools/testing/selftests/net/mptcp/mptcp_join.sh | 5 |
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 554fcafd6e8a..0c22efeba675 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -2774,6 +2774,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 | |