@@ -117,7 +117,36 @@ cleanup()
117
117
trap cleanup EXIT
118
118
119
119
# Create and configure network namespaces for testing
120
+ print_title " Init"
120
121
mptcp_lib_ns_init ns1 ns2
122
+
123
+ # check path_manager and pm_type sysctl mapping
124
+ if [ -f /proc/sys/net/mptcp/path_manager ]; then
125
+ ip netns exec " $ns1 " sysctl -q net.mptcp.path_manager=userspace
126
+ pm_type=" $( ip netns exec " $ns1 " sysctl -n net.mptcp.pm_type) "
127
+ if [ " ${pm_type} " != " 1" ]; then
128
+ test_fail " unexpected pm_type: ${pm_type} "
129
+ mptcp_lib_result_print_all_tap
130
+ exit ${KSFT_FAIL}
131
+ fi
132
+
133
+ ip netns exec " $ns1 " sysctl -q net.mptcp.path_manager=error 2> /dev/null
134
+ pm_type=" $( ip netns exec " $ns1 " sysctl -n net.mptcp.pm_type) "
135
+ if [ " ${pm_type} " != " 1" ]; then
136
+ test_fail " unexpected pm_type after error: ${pm_type} "
137
+ mptcp_lib_result_print_all_tap
138
+ exit ${KSFT_FAIL}
139
+ fi
140
+
141
+ ip netns exec " $ns1 " sysctl -q net.mptcp.pm_type=0
142
+ pm_name=" $( ip netns exec " $ns1 " sysctl -n net.mptcp.path_manager) "
143
+ if [ " ${pm_name} " != " kernel" ]; then
144
+ test_fail " unexpected path-manager: ${pm_name} "
145
+ mptcp_lib_result_print_all_tap
146
+ exit ${KSFT_FAIL}
147
+ fi
148
+ fi
149
+
121
150
for i in " $ns1 " " $ns2 " ; do
122
151
ip netns exec " $i " sysctl -q net.mptcp.pm_type=1
123
152
done
@@ -152,7 +181,6 @@ mptcp_lib_events "${ns1}" "${server_evts}" server_evts_pid
152
181
sleep 0.5
153
182
mptcp_lib_subtests_last_ts_reset
154
183
155
- print_title " Init"
156
184
print_test " Created network namespaces ns1, ns2"
157
185
test_pass
158
186
0 commit comments