Commit 5513dc1d authored by Matthieu Baerts (NGI0)'s avatar Matthieu Baerts (NGI0) Committed by Jakub Kicinski
Browse files

selftests: mptcp: list sysctl data



Listing all the values linked to the MPTCP sysctl knobs was not
exercised in MPTCP test suite.

Let's do that to avoid any regressions, but also to have a kernel with a
debug kconfig verifying more assumptions. For the moment, we are not
interested by the output, only to avoid crashes and warnings.

Signed-off-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241021-net-mptcp-sched-lock-v1-3-637759cf061c@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 3deb12c7
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -259,6 +259,15 @@ check_mptcp_disabled()
	mptcp_lib_ns_init disabled_ns

	print_larger_title "New MPTCP socket can be blocked via sysctl"

	# mainly to cover more code
	if ! ip netns exec ${disabled_ns} sysctl net.mptcp >/dev/null; then
		mptcp_lib_pr_fail "not able to list net.mptcp sysctl knobs"
		mptcp_lib_result_fail "not able to list net.mptcp sysctl knobs"
		ret=${KSFT_FAIL}
		return 1
	fi

	# net.mptcp.enabled should be enabled by default
	if [ "$(ip netns exec ${disabled_ns} sysctl net.mptcp.enabled | awk '{ print $3 }')" -ne 1 ]; then
		mptcp_lib_pr_fail "net.mptcp.enabled sysctl is not 1 by default"