From nobody Mon Feb 9 07:56:31 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5C166BA5F for ; Fri, 23 Feb 2024 03:08:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708657706; cv=none; b=X4AthIYWoq21I/mDxrw6wVEt9nVQ866XbkGlbamPmJGNv1Iz8r4Dy8eIOb8IyyxNok3/JAC1pYZTKyf+PnnS2jN2aXGD9saUeUQwGiwQ1cn9p1G7oidtVASYpKb8qiF5Yusl8BDYpYezSg5p0quRusenqKgoh6vdjenS8q4jqug= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708657706; c=relaxed/simple; bh=c0CXJ5bJj1c3oGtWVvcTK2MN/poQozywAYum8EZe/ts=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=j8Qs7MZMuaijYaiVPrvPyBYg63n5X37Psq1PjqZIy6cnvuDel/apoAcn8edbkLIqRK80uTMR1drV2cJJWd0LXBnCMAZsPDpawyT9b6PZocFPMfw2I30729xeOExlXSbVbpZbMmpMLkqgxR7MKR/3oauQm3lq/+/yqAaW/FF3a5M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XqNgK8da; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XqNgK8da" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11F58C433F1; Fri, 23 Feb 2024 03:08:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708657705; bh=c0CXJ5bJj1c3oGtWVvcTK2MN/poQozywAYum8EZe/ts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XqNgK8datP2bhHPoXihqJbW1ODMIJf4CiEuSZnsbJag5+FTvkVsH7rlC+kcaNh57A PRcpf6vuC14lqT0SsFVu5PJB24WLzmgRIBvs4m+SynmIdmFw3/A18gXEUteoPt/ndT qXsZmdgF/e9HPtB6Ox4XITdx1RWaSRPooyuHRK+QzTmTRlaXSLhLyaqx0b9vwkygla PfUwStfzDleA3Ubxyl0SiNML1LZcEnTLe7noezfvX9XzI2pVFY+0pP5Yeq7b+7YC1e O7aJPmEBaj5SS41k0TK2fI0FaWVy2zzuWQ+cUf24jsI3xTdp+qAbXh9Nc0c/sWgjDU qqh86dKsOHJUg== From: Geliang Tang To: mptcp@lists.linux.dev Cc: Geliang Tang Subject: [PATCH mptcp-next 7/8] selftests: mptcp: export event macros in mptcp_lib Date: Fri, 23 Feb 2024 11:08:10 +0800 Message-Id: <2802c1753683d0bb3bf8b99db4813fe742eda97d.1708657487.git.tanggeliang@kylinos.cn> X-Mailer: git-send-email 2.40.1 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 Content-Type: text/plain; charset="utf-8" From: Geliang Tang 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 | 23 ++-- .../testing/selftests/net/mptcp/mptcp_lib.sh | 10 ++ .../selftests/net/mptcp/userspace_pm.sh | 121 +++++++++--------- 3 files changed, 79 insertions(+), 75 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index 8e8977031fa0..c9b779510528 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -2789,13 +2789,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 @@ -2809,9 +2802,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" @@ -2878,8 +2871,10 @@ add_addr_ports_tests() chk_add_nr 1 1 1 chk_rm_nr 1 1 invert =20 - verify_listener_events $evts_ns1 $LISTENER_CREATED $AF_INET 10.0.2.1 101= 00 - verify_listener_events $evts_ns1 $LISTENER_CLOSED $AF_INET 10.0.2.1 10100 + verify_listener_events $evts_ns1 $MPTCP_LIB_LISTENER_CREATED \ + $AF_INET 10.0.2.1 10100 + verify_listener_events $evts_ns1 $MPTCP_LIB_LISTENER_CLOSED \ + $AF_INET 10.0.2.1 10100 kill_events_pids fi =20 @@ -3485,11 +3480,11 @@ userspace_tests() userspace_pm_chk_get_addr "${ns1}" "10" "id 10 flags signal 10.0.2.1" userspace_pm_chk_get_addr "${ns1}" "20" "id 20 flags signal 10.0.3.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 userspace_pm_chk_dump_addr "${ns1}" \ "id 20 flags signal 10.0.3.1" "after rm_addr 10" userspace_pm_rm_addr $ns1 20 - userspace_pm_rm_sf $ns1 10.0.3.1 $SUB_ESTABLISHED + userspace_pm_rm_sf $ns1 10.0.3.1 $MPTCP_LIB_SUB_ESTABLISHED userspace_pm_chk_dump_addr "${ns1}" "" "after rm_addr 20" chk_rm_nr 2 2 invert chk_mptcp_info subflows 0 subflows 0 @@ -3516,7 +3511,7 @@ userspace_tests() "subflow" userspace_pm_chk_get_addr "${ns2}" "20" "id 20 flags subflow 10.0.3.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 userspace_pm_chk_dump_addr "${ns2}" \ "" \ "after rm_addr 20" diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing= /selftests/net/mptcp/mptcp_lib.sh index abb786fa05c0..e6b9fbb51891 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh @@ -8,6 +8,16 @@ readonly KSFT_SKIP=3D4 # shellcheck disable=3DSC2155 # declare and assign separately readonly KSFT_TEST=3D"${MPTCP_LIB_KSFT_TEST:-$(basename "${0}" .sh)}" =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() MPTCP_LIB_SUBTESTS_DUPLICATED=3D0 =20 diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/test= ing/selftests/net/mptcp/userspace_pm.sh index 2fd9c7eabe79..46ea5d8f0da2 100755 --- a/tools/testing/selftests/net/mptcp/userspace_pm.sh +++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh @@ -19,16 +19,6 @@ if ! mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; t= hen fi mptcp_lib_check_tools ip =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"" server_evts=3D"" client_evts=3D"" @@ -308,8 +298,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" @@ -317,8 +307,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" @@ -327,7 +317,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 @@ -338,7 +328,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 @@ -347,8 +337,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" @@ -357,7 +347,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 @@ -418,7 +408,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" @@ -427,7 +417,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" @@ -435,7 +425,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" @@ -445,7 +435,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" @@ -454,7 +444,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" @@ -462,7 +452,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() @@ -491,7 +481,7 @@ verify_subflow_events() =20 info=3D"${e_saddr} (${e_from}) =3D> ${e_daddr}:${e_dport} (${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 @@ -548,22 +538,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\ @@ -586,21 +578,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 @@ -625,22 +617,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\ @@ -664,21 +657,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\ @@ -701,7 +695,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" @@ -709,15 +703,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\ @@ -740,21 +735,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\ @@ -777,7 +774,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 @@ -785,21 +782,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 @@ -891,7 +888,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\ @@ -907,7 +905,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.40.1