Commit 0471bb47 authored by Matthieu Baerts's avatar Matthieu Baerts Committed by Jakub Kicinski
Browse files

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
f8c9dfbd ("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: 178d0232 ("selftests: mptcp: listener test for in-kernel PM")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 632978f0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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 |