selftests: mptcp: add mptcp_lib_verify_listener_events
authorGeliang Tang <tanggeliang@kylinos.cn>
Fri, 8 Mar 2024 22:10:20 +0000 (23:10 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 11 Mar 2024 22:07:27 +0000 (15:07 -0700)
commit7f0782ca1ce9f5dcb163c3f3a626f8b23fa85b3d
treefe2bba4958002c76f477d2c6bfb236dc76c6a7fd
parent8ebb44196585d3c9405fba1e409cf2312bca30ac
selftests: mptcp: add mptcp_lib_verify_listener_events

To avoid duplicated code in different MPTCP selftests, we can add and use
helpers defined in mptcp_lib.sh.

The helper verify_listener_events() is defined both in mptcp_join.sh and
userspace_pm.sh, export it into mptcp_lib.sh and rename it with mptcp_lib_
prefix. Use this new helper in both scripts.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://lore.kernel.org/r/20240308-upstream-net-next-20240308-selftests-mptcp-unification-v1-13-4f42c347b653@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_join.sh
tools/testing/selftests/net/mptcp/mptcp_lib.sh
tools/testing/selftests/net/mptcp/userspace_pm.sh