selftests: mptcp: export ip_mptcp to mptcp_lib
authorGeliang Tang <tanggeliang@kylinos.cn>
Fri, 5 Apr 2024 10:52:07 +0000 (12:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2024 10:53:20 +0000 (11:53 +0100)
commit29aa32fee7d0fdc71221158719137c1f4f5de3b4
tree63a6693824bff8f5ef8f7795d1435a287801329a
parent9109853a388b7b2b934f56f4ddb250d72e486555
selftests: mptcp: export ip_mptcp to mptcp_lib

This patch exports ip_mptcp into mptcp_lib.sh as a public variable,
named MPTCP_LIB_IP_MPTCP. Add a helper mptcp_lib_set_ip_mptcp() to set
it, and a helper mptcp_lib_is_ip_mptcp() to test whether it is set. Use
these two helpers in mptcp_join.sh.

This patch is prepared for coming commits.

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/mptcp/mptcp_join.sh
tools/testing/selftests/net/mptcp/mptcp_lib.sh