From nobody Sun Feb 8 04:31:02 2026 Received: from out-181.mta0.migadu.com (out-181.mta0.migadu.com [91.218.175.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C4736BB5F for ; Thu, 21 Dec 2023 11:33:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="qyW3c1q/" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1703158409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BysrwTikvik3FPcWoGVbV4erIE4IE9IHMIf5bMsYymU=; b=qyW3c1q/c/nz0rJ1ZzKctt2tMfjHz7lV2XwL7XxVGvUskQ40svj41unXRei5mqtJX4Vv4q CGydMG86NKFof5MmO2m/nfVbR1/dPA2MEWSIS9YgZoRsXpFmad2X4aHi8hol3BVE8rrw5P nrQqplFG3IvaI1WrWWh1YMLQ/icT/Fo= From: Geliang Tang To: mptcp@lists.linux.dev Cc: Geliang Tang Subject: [PATCH mptcp-next v6 08/15] selftests: mptcp: export event macros in mptcp_lib Date: Thu, 21 Dec 2023 19:31:11 +0800 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" SUB_ESTABLISHED, LISTENER_CREATED, LISTENER_CLOSED, AF_INET and AF_INET6 are defined in both mptcp_join.sh and userspace_pm.sh, export all event macros into mptcp_lib.sh. Add MPTCP_LIB_ prefix for the first three and add readonly for the last two. Signed-off-by: Geliang Tang --- .../testing/selftests/net/mptcp/mptcp_join.sh | 21 ++- .../testing/selftests/net/mptcp/mptcp_lib.sh | 10 ++ .../selftests/net/mptcp/userspace_pm.sh | 121 +++++++++--------- 3 files changed, 78 insertions(+), 74 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index fd217d4bad5b..1bdf28613494 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -2816,13 +2816,6 @@ backup_tests() fi } =20 -SUB_ESTABLISHED=3D10 # MPTCP_EVENT_SUB_ESTABLISHED -LISTENER_CREATED=3D15 #MPTCP_EVENT_LISTENER_CREATED -LISTENER_CLOSED=3D16 #MPTCP_EVENT_LISTENER_CLOSED - -AF_INET=3D2 -AF_INET6=3D10 - verify_listener_events() { local evt=3D$1 @@ -2836,9 +2829,9 @@ verify_listener_events() local sport local name =20 - if [ $e_type =3D $LISTENER_CREATED ]; then + if [ $e_type =3D $MPTCP_LIB_LISTENER_CREATED ]; then name=3D"LISTENER_CREATED" - elif [ $e_type =3D $LISTENER_CLOSED ]; then + elif [ $e_type =3D $MPTCP_LIB_LISTENER_CLOSED ]; then name=3D"LISTENER_CLOSED " else name=3D"$e_type" @@ -2905,8 +2898,10 @@ add_addr_ports_tests() chk_add_nr 1 1 1 chk_rm_nr 1 1 invert =20 - verify_listener_events $server_evts $LISTENER_CREATED $AF_INET 10.0.2.1 = 10100 - verify_listener_events $server_evts $LISTENER_CLOSED $AF_INET 10.0.2.1 1= 0100 + verify_listener_events $server_evts $MPTCP_LIB_LISTENER_CREATED \ + $AF_INET 10.0.2.1 10100 + verify_listener_events $server_evts $MPTCP_LIB_LISTENER_CLOSED \ + $AF_INET 10.0.2.1 10100 mptcp_lib_evts_kill fi =20 @@ -3482,7 +3477,7 @@ userspace_tests() chk_subflows_total 2 2 chk_mptcp_info add_addr_signal 1 add_addr_accepted 1 userspace_pm_rm_addr $ns1 10 - userspace_pm_rm_sf $ns1 "::ffff:10.0.2.1" $SUB_ESTABLISHED + userspace_pm_rm_sf $ns1 "::ffff:10.0.2.1" $MPTCP_LIB_SUB_ESTABLISHED chk_rm_nr 1 1 invert chk_mptcp_info subflows 0 subflows 0 chk_subflows_total 1 1 @@ -3504,7 +3499,7 @@ userspace_tests() chk_mptcp_info subflows 1 subflows 1 chk_subflows_total 2 2 userspace_pm_rm_addr $ns2 20 - userspace_pm_rm_sf $ns2 10.0.3.2 $SUB_ESTABLISHED + userspace_pm_rm_sf $ns2 10.0.3.2 $MPTCP_LIB_SUB_ESTABLISHED chk_rm_nr 1 1 chk_mptcp_info subflows 0 subflows 0 chk_subflows_total 1 1 diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing= /selftests/net/mptcp/mptcp_lib.sh index 6ba3747ce217..872946eb28d3 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh @@ -10,6 +10,16 @@ readonly KSFT_TEST=3D$(basename "${0}" | sed 's/\.sh$//g= ') =20 ret=3D0 =20 +MPTCP_LIB_ANNOUNCED=3D6 # MPTCP_EVENT_ANNOUNCED +MPTCP_LIB_REMOVED=3D7 # MPTCP_EVENT_REMOVED +MPTCP_LIB_SUB_ESTABLISHED=3D10 # MPTCP_EVENT_SUB_ESTABLISHED +MPTCP_LIB_SUB_CLOSED=3D11 # MPTCP_EVENT_SUB_CLOSED +MPTCP_LIB_LISTENER_CREATED=3D15 #MPTCP_EVENT_LISTENER_CREATED +MPTCP_LIB_LISTENER_CLOSED=3D16 #MPTCP_EVENT_LISTENER_CLOSED + +readonly AF_INET=3D2 +readonly AF_INET6=3D10 + MPTCP_LIB_SUBTESTS=3D() =20 # only if supported (or forced) and not disabled, see no-color.org diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/test= ing/selftests/net/mptcp/userspace_pm.sh index 0b4484472313..057024bf21a8 100755 --- a/tools/testing/selftests/net/mptcp/userspace_pm.sh +++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh @@ -23,16 +23,6 @@ if ! ip -Version &> /dev/null; then exit ${KSFT_SKIP} fi =20 -ANNOUNCED=3D6 # MPTCP_EVENT_ANNOUNCED -REMOVED=3D7 # MPTCP_EVENT_REMOVED -SUB_ESTABLISHED=3D10 # MPTCP_EVENT_SUB_ESTABLISHED -SUB_CLOSED=3D11 # MPTCP_EVENT_SUB_CLOSED -LISTENER_CREATED=3D15 #MPTCP_EVENT_LISTENER_CREATED -LISTENER_CLOSED=3D16 #MPTCP_EVENT_LISTENER_CLOSED - -AF_INET=3D2 -AF_INET6=3D10 - file=3D"" client4_pid=3D0 server4_pid=3D0 @@ -305,8 +295,8 @@ test_announce() ns2eth1 print_test "ADD_ADDR id:${client_addr_id} 10.0.2.2 (ns2) =3D> ns1, reuse = port" sleep 0.5 - verify_announce_event $server_evts $ANNOUNCED $server4_token "10.0.2.2" $= client_addr_id \ - "$client4_port" + verify_announce_event $server_evts $MPTCP_LIB_ANNOUNCED $server4_token \ + "10.0.2.2" $client_addr_id "$client4_port" =20 # ADD_ADDR6 from the client to server machine reusing the subflow port :>"$server_evts" @@ -314,8 +304,8 @@ test_announce() dead:beef:2::2 token "$client6_token" id $client_addr_id dev ns2eth1 print_test "ADD_ADDR6 id:${client_addr_id} dead:beef:2::2 (ns2) =3D> ns1,= reuse port" sleep 0.5 - verify_announce_event "$server_evts" "$ANNOUNCED" "$server6_token" "dead:= beef:2::2"\ - "$client_addr_id" "$client6_port" "v6" + verify_announce_event "$server_evts" "$MPTCP_LIB_ANNOUNCED" "$server6_tok= en" \ + "dead:beef:2::2" "$client_addr_id" "$client6_port" "v6" =20 # ADD_ADDR from the client to server machine using a new port :>"$server_evts" @@ -324,7 +314,7 @@ test_announce() $client_addr_id dev ns2eth1 port $new4_port print_test "ADD_ADDR id:${client_addr_id} 10.0.2.2 (ns2) =3D> ns1, new po= rt" sleep 0.5 - verify_announce_event "$server_evts" "$ANNOUNCED" "$server4_token" "10.0.= 2.2"\ + verify_announce_event "$server_evts" "$MPTCP_LIB_ANNOUNCED" "$server4_tok= en" "10.0.2.2"\ "$client_addr_id" "$new4_port" =20 # Capture events on the network namespace running the client @@ -335,7 +325,7 @@ test_announce() $server_addr_id dev ns1eth2 print_test "ADD_ADDR id:${server_addr_id} 10.0.2.1 (ns1) =3D> ns2, reuse = port" sleep 0.5 - verify_announce_event "$client_evts" "$ANNOUNCED" "$client4_token" "10.0.= 2.1"\ + verify_announce_event "$client_evts" "$MPTCP_LIB_ANNOUNCED" "$client4_tok= en" "10.0.2.1"\ "$server_addr_id" "$app4_port" =20 # ADD_ADDR6 from the server to client machine reusing the subflow port @@ -344,8 +334,8 @@ test_announce() $server_addr_id dev ns1eth2 print_test "ADD_ADDR6 id:${server_addr_id} dead:beef:2::1 (ns1) =3D> ns2,= reuse port" sleep 0.5 - verify_announce_event "$client_evts" "$ANNOUNCED" "$client6_token" "dead:= beef:2::1"\ - "$server_addr_id" "$app6_port" "v6" + verify_announce_event "$client_evts" "$MPTCP_LIB_ANNOUNCED" "$client6_tok= en" \ + "dead:beef:2::1" "$server_addr_id" "$app6_port" "v6" =20 # ADD_ADDR from the server to client machine using a new port :>"$client_evts" @@ -354,7 +344,7 @@ test_announce() $server_addr_id dev ns1eth2 port $new4_port print_test "ADD_ADDR id:${server_addr_id} 10.0.2.1 (ns1) =3D> ns2, new po= rt" sleep 0.5 - verify_announce_event "$client_evts" "$ANNOUNCED" "$client4_token" "10.0.= 2.1"\ + verify_announce_event "$client_evts" "$MPTCP_LIB_ANNOUNCED" "$client4_tok= en" "10.0.2.1"\ "$server_addr_id" "$new4_port" } =20 @@ -415,7 +405,7 @@ test_remove() $client_addr_id print_test "RM_ADDR id:${client_addr_id} ns2 =3D> ns1" sleep 0.5 - verify_remove_event "$server_evts" "$REMOVED" "$server4_token" "$client_a= ddr_id" + verify_remove_event "$server_evts" "$MPTCP_LIB_REMOVED" "$server4_token" = "$client_addr_id" =20 # RM_ADDR from the client to server machine :>"$server_evts" @@ -424,7 +414,7 @@ test_remove() $client_addr_id print_test "RM_ADDR id:${client_addr_id} ns2 =3D> ns1" sleep 0.5 - verify_remove_event "$server_evts" "$REMOVED" "$server4_token" "$client_a= ddr_id" + verify_remove_event "$server_evts" "$MPTCP_LIB_REMOVED" "$server4_token" = "$client_addr_id" =20 # RM_ADDR6 from the client to server machine :>"$server_evts" @@ -432,7 +422,7 @@ test_remove() $client_addr_id print_test "RM_ADDR6 id:${client_addr_id} ns2 =3D> ns1" sleep 0.5 - verify_remove_event "$server_evts" "$REMOVED" "$server6_token" "$client_a= ddr_id" + verify_remove_event "$server_evts" "$MPTCP_LIB_REMOVED" "$server6_token" = "$client_addr_id" =20 # Capture events on the network namespace running the client :>"$client_evts" @@ -442,7 +432,7 @@ test_remove() $server_addr_id print_test "RM_ADDR id:${server_addr_id} ns1 =3D> ns2" sleep 0.5 - verify_remove_event "$client_evts" "$REMOVED" "$client4_token" "$server_a= ddr_id" + verify_remove_event "$client_evts" "$MPTCP_LIB_REMOVED" "$client4_token" = "$server_addr_id" =20 # RM_ADDR from the server to client machine :>"$client_evts" @@ -451,7 +441,7 @@ test_remove() $server_addr_id print_test "RM_ADDR id:${server_addr_id} ns1 =3D> ns2" sleep 0.5 - verify_remove_event "$client_evts" "$REMOVED" "$client4_token" "$server_a= ddr_id" + verify_remove_event "$client_evts" "$MPTCP_LIB_REMOVED" "$client4_token" = "$server_addr_id" =20 # RM_ADDR6 from the server to client machine :>"$client_evts" @@ -459,7 +449,7 @@ test_remove() $server_addr_id print_test "RM_ADDR6 id:${server_addr_id} ns1 =3D> ns2" sleep 0.5 - verify_remove_event "$client_evts" "$REMOVED" "$client6_token" "$server_a= ddr_id" + verify_remove_event "$client_evts" "$MPTCP_LIB_REMOVED" "$client6_token" = "$server_addr_id" } =20 verify_subflow_events() @@ -488,7 +478,7 @@ verify_subflow_events() =20 info=3D"${e_saddr} (${e_from}) =3D> ${e_daddr} (${e_to})" =20 - if [ "$e_type" =3D "$SUB_ESTABLISHED" ] + if [ "$e_type" =3D "$MPTCP_LIB_SUB_ESTABLISHED" ] then if [ "$e_family" =3D "$AF_INET6" ] then @@ -545,22 +535,24 @@ test_subflows() ip netns exec "$ns1" ./pm_nl_ctl csf lip 10.0.2.1 lid 23 rip 10.0.2.2\ rport "$client4_port" token "$server4_token" sleep 0.5 - verify_subflow_events $server_evts $SUB_ESTABLISHED $server4_token $AF_IN= ET "10.0.2.1" \ - "10.0.2.2" "$client4_port" "23" "$client_addr_id" "ns1" "ns2" + verify_subflow_events $server_evts $MPTCP_LIB_SUB_ESTABLISHED $server4_to= ken \ + $AF_INET "10.0.2.1" "10.0.2.2" "$client4_port" "23" \ + "$client_addr_id" "ns1" "ns2" =20 # Delete the listener from the client ns, if one was created mptcp_lib_kill_wait $listener_pid =20 local sport - sport=3D$(mptcp_lib_evts_get_info sport "$server_evts" $SUB_ESTABLISHED) + sport=3D$(mptcp_lib_evts_get_info sport "$server_evts" $MPTCP_LIB_SUB_EST= ABLISHED) =20 # DESTROY_SUBFLOW from server to client machine :>"$server_evts" ip netns exec "$ns1" ./pm_nl_ctl dsf lip 10.0.2.1 lport "$sport" rip 10.0= .2.2 rport\ "$client4_port" token "$server4_token" sleep 0.5 - verify_subflow_events "$server_evts" "$SUB_CLOSED" "$server4_token" "$AF_= INET" "10.0.2.1"\ - "10.0.2.2" "$client4_port" "23" "$client_addr_id" "ns1" "ns2" + verify_subflow_events "$server_evts" "$MPTCP_LIB_SUB_CLOSED" "$server4_to= ken" \ + "$AF_INET" "10.0.2.1" "10.0.2.2" "$client4_port" "23" \ + "$client_addr_id" "ns1" "ns2" =20 # RM_ADDR from client to server machine ip netns exec "$ns2" ./pm_nl_ctl rem id $client_addr_id token\ @@ -583,21 +575,21 @@ test_subflows() ip netns exec "$ns1" ./pm_nl_ctl csf lip dead:beef:2::1 lid 23 rip\ dead:beef:2::2 rport "$client6_port" token "$server6_token" sleep 0.5 - verify_subflow_events "$server_evts" "$SUB_ESTABLISHED" "$server6_token" = "$AF_INET6"\ - "dead:beef:2::1" "dead:beef:2::2" "$client6_port" "23"\ - "$client_addr_id" "ns1" "ns2" + verify_subflow_events "$server_evts" "$MPTCP_LIB_SUB_ESTABLISHED" "$serve= r6_token" \ + "$AF_INET6" "dead:beef:2::1" "dead:beef:2::2" "$client6_port" \ + "23" "$client_addr_id" "ns1" "ns2" =20 # Delete the listener from the client ns, if one was created mptcp_lib_kill_wait $listener_pid =20 - sport=3D$(mptcp_lib_evts_get_info sport "$server_evts" $SUB_ESTABLISHED) + sport=3D$(mptcp_lib_evts_get_info sport "$server_evts" $MPTCP_LIB_SUB_EST= ABLISHED) =20 # DESTROY_SUBFLOW6 from server to client machine :>"$server_evts" ip netns exec "$ns1" ./pm_nl_ctl dsf lip dead:beef:2::1 lport "$sport" ri= p\ dead:beef:2::2 rport "$client6_port" token "$server6_token" sleep 0.5 - verify_subflow_events "$server_evts" "$SUB_CLOSED" "$server6_token" "$AF_= INET6"\ + verify_subflow_events "$server_evts" "$MPTCP_LIB_SUB_CLOSED" "$server6_to= ken" "$AF_INET6"\ "dead:beef:2::1" "dead:beef:2::2" "$client6_port" "23"\ "$client_addr_id" "ns1" "ns2" =20 @@ -622,22 +614,23 @@ test_subflows() ip netns exec "$ns1" ./pm_nl_ctl csf lip 10.0.2.1 lid 23 rip 10.0.2.2 rpo= rt\ $new4_port token "$server4_token" sleep 0.5 - verify_subflow_events "$server_evts" "$SUB_ESTABLISHED" "$server4_token" = "$AF_INET"\ - "10.0.2.1" "10.0.2.2" "$new4_port" "23"\ + verify_subflow_events "$server_evts" "$MPTCP_LIB_SUB_ESTABLISHED" "$serve= r4_token" \ + "$AF_INET" "10.0.2.1" "10.0.2.2" "$new4_port" "23" \ "$client_addr_id" "ns1" "ns2" =20 # Delete the listener from the client ns, if one was created mptcp_lib_kill_wait $listener_pid =20 - sport=3D$(mptcp_lib_evts_get_info sport "$server_evts" $SUB_ESTABLISHED) + sport=3D$(mptcp_lib_evts_get_info sport "$server_evts" $MPTCP_LIB_SUB_EST= ABLISHED) =20 # DESTROY_SUBFLOW from server to client machine :>"$server_evts" ip netns exec "$ns1" ./pm_nl_ctl dsf lip 10.0.2.1 lport "$sport" rip 10.0= .2.2 rport\ $new4_port token "$server4_token" sleep 0.5 - verify_subflow_events "$server_evts" "$SUB_CLOSED" "$server4_token" "$AF_= INET" "10.0.2.1"\ - "10.0.2.2" "$new4_port" "23" "$client_addr_id" "ns1" "ns2" + verify_subflow_events "$server_evts" "$MPTCP_LIB_SUB_CLOSED" "$server4_to= ken" \ + "$AF_INET" "10.0.2.1" "10.0.2.2" "$new4_port" "23" \ + "$client_addr_id" "ns1" "ns2" =20 # RM_ADDR from client to server machine ip netns exec "$ns2" ./pm_nl_ctl rem id $client_addr_id token\ @@ -661,21 +654,22 @@ test_subflows() ip netns exec "$ns2" ./pm_nl_ctl csf lip 10.0.2.2 lid 23 rip 10.0.2.1 rpo= rt\ $app4_port token "$client4_token" sleep 0.5 - verify_subflow_events $client_evts $SUB_ESTABLISHED $client4_token $AF_IN= ET "10.0.2.2"\ - "10.0.2.1" "$app4_port" "23" "$server_addr_id" "ns2" "ns1" + verify_subflow_events $client_evts $MPTCP_LIB_SUB_ESTABLISHED $client4_to= ken $AF_INET \ + "10.0.2.2" "10.0.2.1" "$app4_port" "23" "$server_addr_id" "ns2" "= ns1" =20 # Delete the listener from the server ns, if one was created mptcp_lib_kill_wait $listener_pid =20 - sport=3D$(mptcp_lib_evts_get_info sport "$client_evts" $SUB_ESTABLISHED) + sport=3D$(mptcp_lib_evts_get_info sport "$client_evts" $MPTCP_LIB_SUB_EST= ABLISHED) =20 # DESTROY_SUBFLOW from client to server machine :>"$client_evts" ip netns exec "$ns2" ./pm_nl_ctl dsf lip 10.0.2.2 lport "$sport" rip 10.0= .2.1 rport\ $app4_port token "$client4_token" sleep 0.5 - verify_subflow_events "$client_evts" "$SUB_CLOSED" "$client4_token" "$AF_= INET" "10.0.2.2"\ - "10.0.2.1" "$app4_port" "23" "$server_addr_id" "ns2" "ns1" + verify_subflow_events "$client_evts" "$MPTCP_LIB_SUB_CLOSED" "$client4_to= ken" \ + "$AF_INET" "10.0.2.2" "10.0.2.1" "$app4_port" "23" \ + "$server_addr_id" "ns2" "ns1" =20 # RM_ADDR from server to client machine ip netns exec "$ns1" ./pm_nl_ctl rem id $server_addr_id token\ @@ -698,7 +692,7 @@ test_subflows() ip netns exec "$ns2" ./pm_nl_ctl csf lip dead:beef:2::2 lid 23 rip\ dead:beef:2::1 rport $app6_port token "$client6_token" sleep 0.5 - verify_subflow_events "$client_evts" "$SUB_ESTABLISHED" "$client6_token"\ + verify_subflow_events "$client_evts" "$MPTCP_LIB_SUB_ESTABLISHED" "$clien= t6_token"\ "$AF_INET6" "dead:beef:2::2"\ "dead:beef:2::1" "$app6_port" "23"\ "$server_addr_id" "ns2" "ns1" @@ -706,15 +700,16 @@ test_subflows() # Delete the listener from the server ns, if one was created mptcp_lib_kill_wait $listener_pid =20 - sport=3D$(mptcp_lib_evts_get_info sport "$client_evts" $SUB_ESTABLISHED) + sport=3D$(mptcp_lib_evts_get_info sport "$client_evts" $MPTCP_LIB_SUB_EST= ABLISHED) =20 # DESTROY_SUBFLOW6 from client to server machine :>"$client_evts" ip netns exec "$ns2" ./pm_nl_ctl dsf lip dead:beef:2::2 lport "$sport" ri= p\ dead:beef:2::1 rport $app6_port token "$client6_token" sleep 0.5 - verify_subflow_events $client_evts $SUB_CLOSED $client6_token $AF_INET6 "= dead:beef:2::2"\ - "dead:beef:2::1" "$app6_port" "23" "$server_addr_id" "ns2" "ns1" + verify_subflow_events $client_evts $MPTCP_LIB_SUB_CLOSED $client6_token \ + $AF_INET6 "dead:beef:2::2" "dead:beef:2::1" "$app6_port" \ + "23" "$server_addr_id" "ns2" "ns1" =20 # RM_ADDR6 from server to client machine ip netns exec "$ns1" ./pm_nl_ctl rem id $server_addr_id token\ @@ -737,21 +732,23 @@ test_subflows() ip netns exec "$ns2" ./pm_nl_ctl csf lip 10.0.2.2 lid 23 rip 10.0.2.1 rpo= rt\ $new4_port token "$client4_token" sleep 0.5 - verify_subflow_events "$client_evts" "$SUB_ESTABLISHED" "$client4_token" = "$AF_INET"\ - "10.0.2.2" "10.0.2.1" "$new4_port" "23" "$server_addr_id" "ns2" "= ns1" + verify_subflow_events "$client_evts" "$MPTCP_LIB_SUB_ESTABLISHED" "$clien= t4_token" \ + "$AF_INET" "10.0.2.2" "10.0.2.1" "$new4_port" "23" \ + "$server_addr_id" "ns2" "ns1" =20 # Delete the listener from the server ns, if one was created mptcp_lib_kill_wait $listener_pid =20 - sport=3D$(mptcp_lib_evts_get_info sport "$client_evts" $SUB_ESTABLISHED) + sport=3D$(mptcp_lib_evts_get_info sport "$client_evts" $MPTCP_LIB_SUB_EST= ABLISHED) =20 # DESTROY_SUBFLOW from client to server machine :>"$client_evts" ip netns exec "$ns2" ./pm_nl_ctl dsf lip 10.0.2.2 lport "$sport" rip 10.0= .2.1 rport\ $new4_port token "$client4_token" sleep 0.5 - verify_subflow_events "$client_evts" "$SUB_CLOSED" "$client4_token" "$AF_= INET" "10.0.2.2"\ - "10.0.2.1" "$new4_port" "23" "$server_addr_id" "ns2" "ns1" + verify_subflow_events "$client_evts" "$MPTCP_LIB_SUB_CLOSED" "$client4_to= ken" \ + "$AF_INET" "10.0.2.2" "10.0.2.1" "$new4_port" "23" \ + "$server_addr_id" "ns2" "ns1" =20 # RM_ADDR from server to client machine ip netns exec "$ns1" ./pm_nl_ctl rem id $server_addr_id token\ @@ -774,7 +771,7 @@ test_subflows_v4_v6_mix() $server_addr_id dev ns1eth2 print_test "ADD_ADDR4 id:${server_addr_id} 10.0.2.1 (ns1) =3D> ns2, reuse= port" sleep 0.5 - verify_announce_event "$client_evts" "$ANNOUNCED" "$client6_token" "10.0.= 2.1"\ + verify_announce_event "$client_evts" "$MPTCP_LIB_ANNOUNCED" "$client6_tok= en" "10.0.2.1"\ "$server_addr_id" "$app6_port" =20 # CREATE_SUBFLOW from client to server machine @@ -782,21 +779,21 @@ test_subflows_v4_v6_mix() ip netns exec "$ns2" ./pm_nl_ctl csf lip 10.0.2.2 lid 23 rip 10.0.2.1 rpo= rt\ $app6_port token "$client6_token" sleep 0.5 - verify_subflow_events "$client_evts" "$SUB_ESTABLISHED" "$client6_token"\ + verify_subflow_events "$client_evts" "$MPTCP_LIB_SUB_ESTABLISHED" "$clien= t6_token"\ "$AF_INET" "10.0.2.2" "10.0.2.1" "$app6_port" "23"\ "$server_addr_id" "ns2" "ns1" =20 # Delete the listener from the server ns, if one was created mptcp_lib_kill_wait $listener_pid =20 - sport=3D$(mptcp_lib_evts_get_info sport "$client_evts" $SUB_ESTABLISHED) + sport=3D$(mptcp_lib_evts_get_info sport "$client_evts" $MPTCP_LIB_SUB_EST= ABLISHED) =20 # DESTROY_SUBFLOW from client to server machine :>"$client_evts" ip netns exec "$ns2" ./pm_nl_ctl dsf lip 10.0.2.2 lport "$sport" rip 10.0= .2.1 rport\ $app6_port token "$client6_token" sleep 0.5 - verify_subflow_events "$client_evts" "$SUB_CLOSED" "$client6_token" \ + verify_subflow_events "$client_evts" "$MPTCP_LIB_SUB_CLOSED" "$client6_to= ken" \ "$AF_INET" "10.0.2.2" "10.0.2.1" "$app6_port" "23"\ "$server_addr_id" "ns2" "ns1" =20 @@ -888,7 +885,8 @@ test_listener() local listener_pid=3D$! =20 sleep 0.5 - verify_listener_events $client_evts $LISTENER_CREATED $AF_INET 10.0.2.2 $= client4_port + verify_listener_events $client_evts $MPTCP_LIB_LISTENER_CREATED \ + $AF_INET 10.0.2.2 $client4_port =20 # ADD_ADDR from client to server machine reusing the subflow port ip netns exec $ns2 ./pm_nl_ctl ann 10.0.2.2 token $client4_token id\ @@ -904,7 +902,8 @@ test_listener() mptcp_lib_kill_wait $listener_pid =20 sleep 0.5 - verify_listener_events $client_evts $LISTENER_CLOSED $AF_INET 10.0.2.2 $c= lient4_port + verify_listener_events $client_evts $MPTCP_LIB_LISTENER_CLOSED \ + $AF_INET 10.0.2.2 $client4_port } =20 print_title "Make connections" --=20 2.35.3