OSDN Git Service

selftests: mptcp: make evts global in mptcp_join
authorGeliang Tang <geliang.tang@suse.com>
Wed, 30 Nov 2022 14:06:32 +0000 (15:06 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 2 Dec 2022 04:06:07 +0000 (20:06 -0800)
commita3735625572d8f9cac3eb12a43c869d97ccbf584
treeda1751e1eb5a94649cf82279b0d07504e48b8db8
parent6c73008aa301b7456b80d0e1416a240815fe947b
selftests: mptcp: make evts global in mptcp_join

This patch moves evts_ns1 and evts_ns2 out of do_transfer() as two global
variables in mptcp_join.sh. Init them in init() and remove them in
cleanup().

Add a new helper reset_with_events() to save the outputs of 'pm_nl_ctl
events' command in them. And a new helper kill_events_pids() to kill
pids of 'pm_nl_ctl events' command. Use these helpers in userspace pm
tests.

Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_join.sh