diff options
author | Matthieu Baerts <matthieu.baerts@tessares.net> | 2023-06-08 18:38:56 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-06-28 11:14:01 +0200 |
commit | f13f3a5b0186613c3cd95c4ce1cd011c83899789 (patch) | |
tree | 89272752a07b2ccae68f43ca361816f375f69ced /tools | |
parent | c045d528bc6e5e747d27ca8590ddcb115f21ca6f (diff) | |
download | linux-stable-f13f3a5b0186613c3cd95c4ce1cd011c83899789.tar.gz linux-stable-f13f3a5b0186613c3cd95c4ce1cd011c83899789.tar.bz2 linux-stable-f13f3a5b0186613c3cd95c4ce1cd011c83899789.zip |
selftests: mptcp: userspace pm: skip PM listener events tests if unavailable
commit 626cb7a5f6b892e48f27a76d11af040c538e03dc upstream.
Selftests are supposed to run on any kernels, including the old ones not
supporting all MPTCP features.
One of them is the new listener events linked to the path-manager
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 and skip these sub-tests
if the feature is not supported.
Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368
Fixes: 6c73008aa301 ("selftests: mptcp: listener test for userspace 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-x | tools/testing/selftests/net/mptcp/userspace_pm.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh index 38a1d34f7b4d..98d9e4d2d3fc 100755 --- a/tools/testing/selftests/net/mptcp/userspace_pm.sh +++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh @@ -4,6 +4,7 @@ . "$(dirname "${0}")/mptcp_lib.sh" mptcp_lib_check_mptcp +mptcp_lib_check_kallsyms if ! mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then echo "userspace pm tests are not supported by the kernel: SKIP" @@ -914,6 +915,11 @@ test_listener() { print_title "Listener tests" + if ! mptcp_lib_kallsyms_has "mptcp_event_pm_listener$"; then + stdbuf -o0 -e0 printf "LISTENER events \t[SKIP] Not supported\n" + return + fi + # Capture events on the network namespace running the client :>$client_evts |