Commit 8ebb4419 authored by Geliang Tang's avatar Geliang Tang Committed by Jakub Kicinski

selftests: mptcp: print_test out of verify_listener_events

verify_listener_events() helper will be exported into mptcp_lib.sh as a
public function, but print_test() is invoked in it, which is a private
function in userspace_pm.sh only. So this patch moves print_test() out of
verify_listener_events().
Signed-off-by: default avatarGeliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://lore.kernel.org/r/20240308-upstream-net-next-20240308-selftests-mptcp-unification-v1-12-4f42c347b653@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 663260e1
...@@ -845,12 +845,6 @@ verify_listener_events() ...@@ -845,12 +845,6 @@ verify_listener_events()
local saddr local saddr
local sport local sport
if [ $e_type = $LISTENER_CREATED ]; then
print_test "CREATE_LISTENER $e_saddr:$e_sport"
elif [ $e_type = $LISTENER_CLOSED ]; then
print_test "CLOSE_LISTENER $e_saddr:$e_sport"
fi
type=$(mptcp_lib_evts_get_info type $evt $e_type) type=$(mptcp_lib_evts_get_info type $evt $e_type)
family=$(mptcp_lib_evts_get_info family $evt $e_type) family=$(mptcp_lib_evts_get_info family $evt $e_type)
sport=$(mptcp_lib_evts_get_info sport $evt $e_type) sport=$(mptcp_lib_evts_get_info sport $evt $e_type)
...@@ -882,6 +876,7 @@ test_listener() ...@@ -882,6 +876,7 @@ test_listener()
local listener_pid=$! local listener_pid=$!
sleep 0.5 sleep 0.5
print_test "CREATE_LISTENER 10.0.2.2:$client4_port"
verify_listener_events $client_evts $LISTENER_CREATED $AF_INET 10.0.2.2 $client4_port verify_listener_events $client_evts $LISTENER_CREATED $AF_INET 10.0.2.2 $client4_port
# ADD_ADDR from client to server machine reusing the subflow port # ADD_ADDR from client to server machine reusing the subflow port
...@@ -898,6 +893,7 @@ test_listener() ...@@ -898,6 +893,7 @@ test_listener()
mptcp_lib_kill_wait $listener_pid mptcp_lib_kill_wait $listener_pid
sleep 0.5 sleep 0.5
print_test "CLOSE_LISTENER 10.0.2.2:$client4_port"
verify_listener_events $client_evts $LISTENER_CLOSED $AF_INET 10.0.2.2 $client4_port verify_listener_events $client_evts $LISTENER_CLOSED $AF_INET 10.0.2.2 $client4_port
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment