From patchwork Wed Jul 12 16:03:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 119275 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1268521vqm; Wed, 12 Jul 2023 09:29:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlGiHC6Q8b41ToPebHyqa075gjfm5mQMcUGttZ1MxNXKayqFuYSFwDH+4HsBZEh9YxC5HWf1 X-Received: by 2002:a05:6a00:a1e:b0:66f:578c:59fb with SMTP id p30-20020a056a000a1e00b0066f578c59fbmr19037373pfh.10.1689179361481; Wed, 12 Jul 2023 09:29:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689179361; cv=none; d=google.com; s=arc-20160816; b=VR7cZhehmu/bfV3Y9hNvP8pYl14rbe4IRSC+s1kp7AscMoYvbJctQj47bQbxO+shU1 eZORN/6fRS4HEtnL0yLoUiA1eDOhq7X4C+95KxpYqV6XsT+YSrVnyT03LAo5oTwoOlh8 HG0WPAipS3o+Sqa/XderZ9fnaAhwLn5j0HE9BlmFsc9CvvyOFlsx8cV8oIXaKZvB9jM4 dBEuomiqLxmjxFte93aPyRUIrOUA1/J19yLt4oy39xgpZuBBGjfEtHpa2smybYFTtenB zDyqWQLQcSolImgQD2keE7d1ngzPNUVCQNDfm9CoPppCgiY5NcxZaRPf4LrbjyHzm9gj hyAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=YkaSkbg1hj7zqdIEy25ren99Ahk0q9+Tgw9lEzP9lo8=; fh=W5rn1gG81nIyOp2AvYKIXDwIEy66US4qHO9dtkppJI0=; b=V2Jp/VRp+FBptdE/0GH03gFWBCnyZlEgls2K4wm9PACDYBMePjZ5q8nKsH4kSnW8zF 1QHzYN1gsFeFRmquYgLrXrM8cL9m0uJz5AxqSgyXeOoPOLcvRQryu+Kt0Um5KRjsHs7w 5soEZBBmI+5oNK6fJ1ueWNYQcnJmD1aromBxcx+R07dztjI8lZq5AbngunCBAU5VBDzL VxDmOBrvjcIoRrJOmJIftb21fWNm7e/kxditQEHNsuce62imyEyqaxbncCLu6Amk+XT8 GiVGW+QFRzsbbGQYvRkkTpda354TWaDHMvvV70uQwdgJ4om5Qk0fNOzWITgCVO6ZGdlu mPKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b="B/JnRNFZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=tessares.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14-20020a63e54e000000b0055acfb661casi1515824pgj.894.2023.07.12.09.29.08; Wed, 12 Jul 2023 09:29:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b="B/JnRNFZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=tessares.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233553AbjGLQDe (ORCPT + 99 others); Wed, 12 Jul 2023 12:03:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233545AbjGLQDb (ORCPT ); Wed, 12 Jul 2023 12:03:31 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF50B1BEA for ; Wed, 12 Jul 2023 09:03:29 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3fbc1218262so79501625e9.3 for ; Wed, 12 Jul 2023 09:03:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1689177808; x=1691769808; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YkaSkbg1hj7zqdIEy25ren99Ahk0q9+Tgw9lEzP9lo8=; b=B/JnRNFZkPvmYIdrxaB+EY9/V3oHuNOtdmeDLi9tEmtTDUSRTx9pefe7v3PNl+UkVx i2raTidHLHWb3HHoHBmYpu9DbzQPUdH6ayA0QIwpxGh2RWVqk/lh7Vmv792L0IiCjP94 ecGqMpcejL46kdyPdxIH0n8v991/xkmxU0r0I35R+azGLQDyX4EcWC6DlfCM3bv5rmKz CxwkGw/VfIh5aPUkSNW1B4s1tbV4E9efBq/DnTnXfebJDUnQwiywQmWeS6oNYr7gE75H jEH/rqTvEmhivuEGQySlukN8PVKuvTkLv1s0ruT0MTH5JLTYCK+9ptG8Q42ekNbvCDPd MeYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689177808; x=1691769808; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YkaSkbg1hj7zqdIEy25ren99Ahk0q9+Tgw9lEzP9lo8=; b=Hzrp3cQMJJwONxXYcz9VCZ2J5H3MrRshN0PaGVVreC4MC80q09sQNzehAcEviqIMoN N+vRGkoVoL8O1CsVlwJ5ERMqS5o1ONSpTRe4DuDHjef3yuzl+3vKx+q50oJX0aqxxSgg azY9TVyMVu88A4ESAfirC4DH30p3aixD1wWc8NZxmMEA4tfDQVEqMQ/NrIIHx4kj4SIS otBCb9Kh+LfSB3YlohqFYbw0lGZT4hfbu9wOtn0kM1NT5tt42NFMxbQx5VjvIpAOAoSD I3tpVxO7ssd8FpW1UKcdOtzktc1JixR5KqRigNUWFVAGyzTA0PCZNtyiq9bu/IqD8mwe 3JOQ== X-Gm-Message-State: ABy/qLb0DKxGuVUFuF24L3I/ZmMhja7Xwuq1SwY6FjRB1hgs0uT7Nrar 6X2IY+wL4hxxF4EXrFo8eoHG8g== X-Received: by 2002:a1c:f706:0:b0:3fb:b637:22a7 with SMTP id v6-20020a1cf706000000b003fbb63722a7mr20401987wmh.4.1689177807717; Wed, 12 Jul 2023 09:03:27 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id o6-20020a05600c378600b003fbb9339b29sm15972581wmr.42.2023.07.12.09.03.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 09:03:27 -0700 (PDT) From: Matthieu Baerts Date: Wed, 12 Jul 2023 18:03:16 +0200 Subject: [PATCH net-next 1/4] selftests: mptcp: set all env vars as local ones MIME-Version: 1.0 Message-Id: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-1-f1c8b62fbf95@tessares.net> References: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-0-f1c8b62fbf95@tessares.net> In-Reply-To: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-0-f1c8b62fbf95@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: Geliang Tang , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2199; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=Giom2KcA4rMDsRQaqzRL7L0ciHAM8FES0ASumSNjEII=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkrs7NfKP2BTFBzVZodXxBjqEvsLpgFYb6dQ+Ys 6pCxH1Fm7KJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZK7OzQAKCRD2t4JPQmmg c71WEADAmsB+mm1iB3CpKf8c7tcm9ZhppYpf+iHLo9QvuDGC2wriRvnuErCl8euzoqq+c6tBYxz Pm9EOcu97ZKbUdnXwgZuCxJo2j58sVt0Nuan6+/1COMrncKFLceP3cFr53ZEaxOpnNaSIWgi7uJ ldDQjSpZzt4TZplxeH5RxOJsuuHX+zPeqxDrIAaFN/3NGWqZXsUqHIsS5by6cfGjjJPmizK7V3y kcybWPkx5ipyojMJE00rO8FlBnH/GK5w2GDMHiNjS8Agkbm/+MvUD587QYgfiztyMchnglWg4hr IXNNX8OfNU+s7pevJlaWSlnHfLUHwZJX0dqeO8fIp1/u+hiNplUDegT4PTmErJ5c6TpQGyl62yj hFBCQZYhPngNEYYGx2QpUtbYrRaXDwKWi91josmZnTOgENXVbu1EZDkKeLIXwI5d/+ifqFnrRz3 u0G6unM0CSeIFTPO1i8QWYmw2pwk7kpE4AL25BUwAzSpx8NyBqEB/9LIUeC3jEfMY/DPyTCiJc2 572YaE9x+XONCjvKYaTZBT1FuytunJxwlt1xsxYumjc+mO31hUnRPNuzVsmhymL0PLzpcJdKucP WXrndsShO8/zw+jFkyQGlfyxd1BiKn0fM6QkKiSelQ5KYwWEXMgfCkkC3no7TovOUgt3a7SnE0T 6g2lsy1JxCKdFRw== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771232938267376974 X-GMAIL-MSGID: 1771232938267376974 From: Geliang Tang It would be better to move the declaration of all the env variables to do_transfer(), run_tests(), or pm_nl_set_endpoint() as local variables, instead of exporting them globally at the beginning of the file. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index e6c9d5451c5b..b0aaeead56c4 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -49,11 +49,12 @@ TEST_COUNT=0 TEST_NAME="" nr_blank=40 -export FAILING_LINKS="" -export test_linkfail=0 -export addr_nr_ns1=0 -export addr_nr_ns2=0 -export sflags="" +# These var are used only in some tests, make sure they are not already set +unset FAILING_LINKS +unset test_linkfail +unset addr_nr_ns1 +unset addr_nr_ns2 +unset sflags # generated using "nfbpf_compile '(ip && (ip[54] & 0xf0) == 0x30) || # (ip6 && (ip6[74] & 0xf0) == 0x30)'" @@ -100,7 +101,6 @@ init_partial() stats_dumped=0 check_invert=0 validate_checksum=$checksum - FAILING_LINKS="" # ns1 ns2 # ns1eth1 ns2eth1 @@ -828,6 +828,10 @@ pm_nl_set_endpoint() local connector_ns="$2" local connect_addr="$3" + local addr_nr_ns1=${addr_nr_ns1:-0} + local addr_nr_ns2=${addr_nr_ns2:-0} + local sflags=${sflags:-""} + # let the mptcp subflow be established in background before # do endpoint manipulation if [ $addr_nr_ns1 != "0" ] || [ $addr_nr_ns2 != "0" ]; then @@ -979,6 +983,7 @@ do_transfer() local port=$((10000 + TEST_COUNT - 1)) local cappid + local FAILING_LINKS=${FAILING_LINKS:-""} :> "$cout" :> "$sout" @@ -1158,6 +1163,7 @@ run_tests() local speed="${4:-fast}" local size + local test_linkfail=${test_linkfail:-0} # The values above 2 are reused to make test files # with the given sizes (KB) From patchwork Wed Jul 12 16:03:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 119266 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1264685vqm; Wed, 12 Jul 2023 09:22:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlH3RPExnLXQfi0yp34Um2m9zyRZW88KZ0gVUTggtgHZqzZGDqWujvlO+41vNH0GkGUpN+tY X-Received: by 2002:aa7:d68d:0:b0:51d:9ddf:f0f3 with SMTP id d13-20020aa7d68d000000b0051d9ddff0f3mr16516539edr.31.1689178952314; Wed, 12 Jul 2023 09:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689178952; cv=none; d=google.com; s=arc-20160816; b=hTUjdQoO78JAnx+wlTUgsqQMhIOJfBEQn1gBG7YOGeEBzoud1MK/9t3OqG8FPScCur oiZP2OtcAQEnjzr5Lixe+c1GRGL1xLJqQKTnXOYy13btXBxBSUrPGTi4Hx8A4/GVvHea GoO2PmYx8xXn1/oZmbqI1RI4aV3dUSvbb4lEUSY5sjTAU+p4slkt0FkYysn3iy2XlqoO v41Vhp3GufLZzd9yOebq9rRXFOAx28cM12WAzcAvxBVu9Fa9fVNFV8+TvLXaoTkmKg8/ O/t4fV2IrblseVCljtxJgCqDaBRqaVwRE4ADtkobt/ZKwfNq5wyg01EF79zCvh5aHRKT gx7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=9u2n4oF6gKDwyM+Ju8cehthdYltlnqgxYGHl0ZLlW3U=; fh=W5rn1gG81nIyOp2AvYKIXDwIEy66US4qHO9dtkppJI0=; b=IxG83y3Cr5M4usCM9tBF2SUp0khlK0S6uWEN+zAy86fI3RQ0XNP42FmCcRXdGLJFFk PZq76DtmtN3jGaneu0ecSc7ASo4nD+WfMGzhf7BfcP3vCPjDbCbwSeyNN9sFKnX97T+N PGm7I8leeE9FzEpPnNItqfBivVzB+5VZ6f8XitUqf/M5qWUfZREOgiOT976FQYbSrT80 r3MCKhXcBPWK3pO1vNUs2ZTLhKuqQDaw57JlqO0QY41du4Oaj4Nm2x7MsWQPCnrXcE8N 3HgIsriGllxGsKUgnYHq+yHY2K4KtkH61eKifEHs7iRlImQ+YI5ochocWNaL4t497kQD kOLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=tI8OVDl1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=tessares.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j15-20020a50ed0f000000b0051e05151467si4975543eds.224.2023.07.12.09.22.05; Wed, 12 Jul 2023 09:22:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=tI8OVDl1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=tessares.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233839AbjGLQDh (ORCPT + 99 others); Wed, 12 Jul 2023 12:03:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233578AbjGLQDc (ORCPT ); Wed, 12 Jul 2023 12:03:32 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4F3A199D for ; Wed, 12 Jul 2023 09:03:30 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3fbc5d5746cso79544045e9.2 for ; Wed, 12 Jul 2023 09:03:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1689177809; x=1691769809; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=9u2n4oF6gKDwyM+Ju8cehthdYltlnqgxYGHl0ZLlW3U=; b=tI8OVDl13n23zaNluWbFvX5H141FPddM9NqMoNcTexnPwJOtrlxGVuBCGSNzteSqEL 1AQeZpBgnS7lC+FSub4Cf/e/hn2w1WSb/eHtRS44+/nQLSDhZVPJOe3tVLlc17ox4HsJ jZMU0DGdHfC9WdAuspsNKNFcsSJLF+5oibzHFlBS049RZ+gz1tqF6b6VSeNaqAY8Ok6p BWJcCtqowZz7L5BImjGE6BkawNtCBXDgtsiwMTcALyuqmyrP6lK0ZK9rOJhsyQP6dvOx LOCdP0RdgG8UNkjUBxGVTfZ/QiBqNNrhyfaSSoTFt/PRXHNytPn5fNE4ZcExX4Zvjuhu oRCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689177809; x=1691769809; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9u2n4oF6gKDwyM+Ju8cehthdYltlnqgxYGHl0ZLlW3U=; b=FhOScpM2r+tGNTi0Xq5E+oFE+S4pM08rfaTBCKIYOsA3i6+xMmS3eOGOXVz2taIPaB ONwyHeBFjrdKFjQaSdml+7YJl+LvUMdqRNYatUhM3RSMJPsfQHPpkICi9bvdr8wxmHE7 JgyFX103czITiMN/drQJrQuQmC+O3XpmLiH/aXLL30rtR9sIyh0cejFmF5n2+2mfgkca 5S0rmFYd4E1NLT6ZCgrw+afGUNf2IkOCL3wNsUcH2stRMWEOLSXJUfMJPziBsZZZtnfy D40NK1/6APBBZCQhgQfmqfvDKjjO6SnUtL/GZ0NaMaZcFfnwaEZzanyXff5/P7frmT8b ueNg== X-Gm-Message-State: ABy/qLZhkX1OwW4i8w4fnBkCaS4tjVx04gETNjhR5Uo6FL7tWkcIj3DQ 5RNbxzcxuavHeU3vWb0Zy74yCw== X-Received: by 2002:a1c:7917:0:b0:3fb:a937:6024 with SMTP id l23-20020a1c7917000000b003fba9376024mr20270918wme.29.1689177809028; Wed, 12 Jul 2023 09:03:29 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id o6-20020a05600c378600b003fbb9339b29sm15972581wmr.42.2023.07.12.09.03.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 09:03:28 -0700 (PDT) From: Matthieu Baerts Date: Wed, 12 Jul 2023 18:03:17 +0200 Subject: [PATCH net-next 2/4] selftests: mptcp: add fastclose env var MIME-Version: 1.0 Message-Id: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-2-f1c8b62fbf95@tessares.net> References: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-0-f1c8b62fbf95@tessares.net> In-Reply-To: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-0-f1c8b62fbf95@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: Geliang Tang , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3314; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=0Cy1x2l+pB/Y+z3Y4YGTHEQ52Bgd8t4VtWzV0XJI0HE=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkrs7NwHvlS8umYV88K0uLcJSLK6DfJE3YsXBlD YpKMdy2l5OJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZK7OzQAKCRD2t4JPQmmg cyH5D/9fZhRFNCAtGpBFEUo51XLdfcPXBouhjGxsGEWrTpfJee735Bb4QjP+aq+12XeeGqYFfYg BIt4ZbJZnnrbFw1OB6iqiFnr9Y88itffELRjll/ls5QwNHBoiVq5GWmIGRk56FAasikbffdb0mB QH9aA3kaup2Xj6EP4Qji//Mu78UDUItWHCw4Ve1GAmpOKGJPshCpPQpmytNJUB6wwIbqwt9UAHe IjiIKSiVS6FxA6u5JGW5rETJUqgLSHvNi5/Wy+VI9X0jgfDqcfrxcJCsznd+62Uc0ckJ11jhEGo Iw5HDNGiu+LR8eUPMpMRKErikcRpOweUn46jiFugfy+IqX2qS/xcIwptekjdI6O7VXQrqFvLAEd R1kj+lqdYushxIXHbk++nz8p6DWknkjXXx3Dyhb0iMASdmedU/xe/ZXJ+1QV17rZ3noHkK4sfnA OKHQGXiq2gAyKk5R77McvjrTTgu6Kh6lQfHO+Wjgt9ryjUBZtKqafBFWTW6xmPw9XrKlzgWzibO Y5hNfcgafv8e9gmGhpGcIVjJSxZNfg7k7prRQA6EEwa61XNCO/VxqLfrToVnVCmPTomPTat9UW4 uCeAZqWF0N3HD542UIKiBD4HhdulpDqXB/ww7gCeXojEQcjcJkkhImI/0GS9MmwqeUHbK6aB3Pa u7FJFx+aMNCBvew== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771232509271369529 X-GMAIL-MSGID: 1771232509271369529 From: Geliang Tang Use a new env var fastclose instead of passing fastclose to addr_nr_ns2. It can be set with 'server' or 'client': addr_nr_ns2=fastclose_client \ run_tests $ns1 $ns2 10.0.1.1 -> fastclose=client \ run_tests $ns1 $ns2 10.0.1.1. With this change, the fullmesh flag setting code can be moved into pm_nl_set_endpoint() from do_transfer(). Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index b0aaeead56c4..3e8c560938f2 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -55,6 +55,7 @@ unset test_linkfail unset addr_nr_ns1 unset addr_nr_ns2 unset sflags +unset fastclose # generated using "nfbpf_compile '(ip && (ip[54] & 0xf0) == 0x30) || # (ip6 && (ip6[74] & 0xf0) == 0x30)'" @@ -832,6 +833,12 @@ pm_nl_set_endpoint() local addr_nr_ns2=${addr_nr_ns2:-0} local sflags=${sflags:-""} + local flags="subflow" + if [[ "${addr_nr_ns2}" = "fullmesh_"* ]]; then + flags="${flags},fullmesh" + addr_nr_ns2=${addr_nr_ns2:9} + fi + # let the mptcp subflow be established in background before # do endpoint manipulation if [ $addr_nr_ns1 != "0" ] || [ $addr_nr_ns2 != "0" ]; then @@ -984,6 +991,7 @@ do_transfer() local port=$((10000 + TEST_COUNT - 1)) local cappid local FAILING_LINKS=${FAILING_LINKS:-""} + local fastclose=${fastclose:-""} :> "$cout" :> "$sout" @@ -1020,11 +1028,10 @@ do_transfer() extra_args="-r ${speed:6}" fi - local flags="subflow" local extra_cl_args="" local extra_srv_args="" local trunc_size="" - if [[ "${addr_nr_ns2}" = "fastclose_"* ]]; then + if [ -n "${fastclose}" ]; then if [ ${test_linkfail} -le 1 ]; then echo "fastclose tests need test_linkfail argument" fail_test @@ -1033,7 +1040,7 @@ do_transfer() # disconnect trunc_size=${test_linkfail} - local side=${addr_nr_ns2:10} + local side=${fastclose} if [ ${side} = "client" ]; then extra_cl_args="-f ${test_linkfail}" @@ -1046,10 +1053,6 @@ do_transfer() fail_test return 1 fi - addr_nr_ns2=0 - elif [[ "${addr_nr_ns2}" = "fullmesh_"* ]]; then - flags="${flags},fullmesh" - addr_nr_ns2=${addr_nr_ns2:9} fi extra_srv_args="$extra_args $extra_srv_args" @@ -3186,7 +3189,7 @@ fullmesh_tests() fastclose_tests() { if reset_check_counter "fastclose test" "MPTcpExtMPFastcloseTx"; then - test_linkfail=1024 addr_nr_ns2=fastclose_client \ + test_linkfail=1024 fastclose=client \ run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 0 0 0 chk_fclose_nr 1 1 @@ -3194,7 +3197,7 @@ fastclose_tests() fi if reset_check_counter "fastclose server test" "MPTcpExtMPFastcloseRx"; then - test_linkfail=1024 addr_nr_ns2=fastclose_server \ + test_linkfail=1024 fastclose=server \ run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 0 0 0 chk_fclose_nr 1 1 invert From patchwork Wed Jul 12 16:03:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 119277 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1269230vqm; Wed, 12 Jul 2023 09:30:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlF6T2Nre3mnTl78vac9qCV7UwiKYAEiaU1UIln2zYpeTxOlBW57ywAImC+mlRZLdCrOHGZ2 X-Received: by 2002:a05:6358:5916:b0:135:62de:ff7d with SMTP id g22-20020a056358591600b0013562deff7dmr11803430rwf.8.1689179431688; Wed, 12 Jul 2023 09:30:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689179431; cv=none; d=google.com; s=arc-20160816; b=qCpiSvj/71Fjhi4gAbnOsDYyl1sJRmpVw5iKYN986eCnsobuq05/ye+WPxE1gHlBuH KEvcBKgwxARjeWnROfLDdfUhplySxldZA+21VifeGWcIwLXr6Cgqe0arWgPM2ZrXLjo/ qwWePjnWcdJdkD69ReHblmxIsijdgsJfuK12eVSa9TNRIepLZYF8o6dUVeJ8iEMCBMeJ zI0FrCD+TuwFgfV6EoP3tUouoRklsGfL+b2vQ7HMhI4EO7JlC8GDCsXvxONJYkiJgmk2 eNcoRoY9GCsduP5+r/A+rbpzBms984nL/XtGs2uCHrkiP2HDM8QGNb6YaAXzyTZ8h8IS Q8nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=liX/45MwjWcCDqrEus/1D+DYuEA/UW5nbbNnFzTg4gI=; fh=W5rn1gG81nIyOp2AvYKIXDwIEy66US4qHO9dtkppJI0=; b=vjbmSKUHYfedQVi7AlURhOT2gxvWsFQ2jizsUu10zXP4sbD/JaRDWmVtTPWaRSlhqO f/wY3vD/9NmGEeP3P0YUCL8gpC2pID96A3rut58jfkQCK1P0hKBZ9PXMImXTHJ24N1mA YGFkW1fV0sNMTJi1hUl5YtxwRAZ30TpgFSW4a/GJs6XKRK3TXThTzmiDNOIzS+v3WW4M fiQ5Bc8K1Xr1lh5dpI5tnRs+nrZphCd52fV/TYJTc7hLVhAOtcl7jG13QUaQ5MtbVGyY XyZIohzqiGqgBfoYOg216WNARQEVfTdqfYH0c6SQxzCxHlF6l8m7mD/rmxzvptGSujZj fCpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=fciZYj0H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=tessares.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13-20020a63d00d000000b005533647f7c5si3230157pgf.420.2023.07.12.09.30.14; Wed, 12 Jul 2023 09:30:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=fciZYj0H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=tessares.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233848AbjGLQDk (ORCPT + 99 others); Wed, 12 Jul 2023 12:03:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233588AbjGLQDc (ORCPT ); Wed, 12 Jul 2023 12:03:32 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B30B19A6 for ; Wed, 12 Jul 2023 09:03:31 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3fbca8935bfso73380275e9.3 for ; Wed, 12 Jul 2023 09:03:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1689177810; x=1691769810; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=liX/45MwjWcCDqrEus/1D+DYuEA/UW5nbbNnFzTg4gI=; b=fciZYj0HX8H8WkRBLOhTwiSmGL44WONfFZusDuofkVO6jK4hJ11DpBSAZToZkwD/6l r2A1JTi7nX31eOZe6mKrjxLbCAw2p6KIf1ykDOvnpSpifT36IvQnorTxgY80+Lk+vlwS Hn7dd6Mht7QTVPHtQXa2ZSwwaWq8nmAKMHtts2A/aGAB0XNI0F2Kk3d0uI/bFJcfA2H9 M7g14jBjbbck1flxpcYXHcelSLhar1XE+qnx0fXVDp4D2Pm4miWv10lAqkklOQEP7RTD cX78JPh4WuhdFupprUhkfBCAOmD8bY5g5+z0h4teFj9AgJ6XQvtwmVNuuSEH5Gzfzg7x VA8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689177810; x=1691769810; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=liX/45MwjWcCDqrEus/1D+DYuEA/UW5nbbNnFzTg4gI=; b=UQPx4rSU4DNvcmp4gqcH1B2rrmJ8K2h1f81SGp4mY5xaErYXo4rB2/5YET5tmsiPDh JXYBxZJTLaIdGJ/hMu5KaZP4ZsyrD0nZ20muK3+xsWnHzt+O9WCTyKIk8As3royFplab yzLiiVeN2LeTci5YgWET/MTCrINWHZdF4k1JzubtGnMRhY9GBnqW/N9VqaysDhoDlaRV H+NAkuSJPHK95MG3RFkA4MgCf2T/KJWM9Qa1yLYvQ1K9fiLWkalWmdcXf33tqyP2S69X jDRVN/l1WBTfV/ORyV1DW//J4Cr0zH0v+eICHLaWi0VuwVBb5IG0va/dISr/t9VpC1pG zmAw== X-Gm-Message-State: ABy/qLaRME2fvblfylq2zKpzdJaNgturqXNgQ93bkDUWKgtqU1VZJs1O QINwIhKW7di/V4bw5yq3jyf5Qg== X-Received: by 2002:a7b:ce8e:0:b0:3fb:40ec:9483 with SMTP id q14-20020a7bce8e000000b003fb40ec9483mr17500250wmj.16.1689177809971; Wed, 12 Jul 2023 09:03:29 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id o6-20020a05600c378600b003fbb9339b29sm15972581wmr.42.2023.07.12.09.03.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 09:03:29 -0700 (PDT) From: Matthieu Baerts Date: Wed, 12 Jul 2023 18:03:18 +0200 Subject: [PATCH net-next 3/4] selftests: mptcp: add fullmesh env var MIME-Version: 1.0 Message-Id: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-3-f1c8b62fbf95@tessares.net> References: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-0-f1c8b62fbf95@tessares.net> In-Reply-To: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-0-f1c8b62fbf95@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: Geliang Tang , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2983; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=ZRZR5HmHd9wxvCYcF2FjC/vJjQ+ch43TVOjqYZkaOMw=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkrs7NeL73iGWFIRyzmvVjQ0jsjwYXrWg/7t1IR 9b4xcL0pxaJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZK7OzQAKCRD2t4JPQmmg c58SEAC2VJSE5J8PMyNYX+00lVSmRSPa2+qf5HH4NymX9rt4NROp7z48Kx5Z78bIGc3Cp1EWUTL INMg4cgamRfzDAdf70UZLoK3QA/QCya75TmGdwxzneTJzx5FIiBSPAI1MPzBWaUAAeOHrrV3E6M iyHPgH94H5R0Uj0hpgZLDW7QERGv3ls/PLnNBUOmXo7vW1yOY2eNJicd+mm4P+KYsXGsqeMJ9ZZ Qv6G2iYgcZ1ci9jAhUbeiw+Bm2Qg1tUoeVWqkxS0/Y5ZHDixi+yJ7r7nE71er9sitnsZn1zwCmc dcG8rCDAq1RUjgRoXEFn4GZrloYAmx0vv1t5MsRIllUTJO493gs1Gyxfq53uQVUxhLxznf7Yi8R DYFL04+q7KVcWJe/o/Uirm1Pt4aL+IS1Wwr36wsCFcmkH12JiZ0QBmZCdbtfT/KZ6BDfPNUJcFN A9eSpWI8w85NrBk3z6eJE+q70XtiwDm/JPEtYdMcW2J9EFcaTOLnvuWNJiWslLgNFYbhtfr9Y55 ZFz19uDr9fF5U/ZJczIrr2i55KRJCP/H0PX/GdB+j1Pp9kF5JyObvf5p3N1s5UiFUo55q+kuSJ+ 7+LyhUM/ROZpIaoshS1UK6IHeSTfko6R/uORt0GMA5JKPYCS+TPeCNbh9GInu9WYQcuSlXejEYD hKFAr7E+vp6q3hg== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771233011546740277 X-GMAIL-MSGID: 1771233011546740277 From: Geliang Tang Use a new env var fullmesh instead of passing 'fullmesh_*' to addr_nr_ns2. It can be set with the actual value of addr_nr_ns2 now: addr_nr_ns2=fullmesh_1 \ run_tests $ns1 $ns2 10.0.1.1 -> fullmesh=1 \ run_tests $ns1 $ns2 10.0.1.1. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 3e8c560938f2..5ad95cc382e6 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -56,6 +56,7 @@ unset addr_nr_ns1 unset addr_nr_ns2 unset sflags unset fastclose +unset fullmesh # generated using "nfbpf_compile '(ip && (ip[54] & 0xf0) == 0x30) || # (ip6 && (ip6[74] & 0xf0) == 0x30)'" @@ -832,11 +833,12 @@ pm_nl_set_endpoint() local addr_nr_ns1=${addr_nr_ns1:-0} local addr_nr_ns2=${addr_nr_ns2:-0} local sflags=${sflags:-""} + local fullmesh=${fullmesh:-""} local flags="subflow" - if [[ "${addr_nr_ns2}" = "fullmesh_"* ]]; then + if [ -n "${fullmesh}" ]; then flags="${flags},fullmesh" - addr_nr_ns2=${addr_nr_ns2:9} + addr_nr_ns2=${fullmesh} fi # let the mptcp subflow be established in background before @@ -2689,7 +2691,7 @@ mixed_tests() pm_nl_set_limits $ns2 2 4 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal - addr_nr_ns2=fullmesh_1 \ + fullmesh=1 \ run_tests $ns1 $ns2 dead:beef:1::1 slow chk_join_nr 4 4 4 fi @@ -3102,7 +3104,7 @@ fullmesh_tests() pm_nl_set_limits $ns1 1 3 pm_nl_set_limits $ns2 1 3 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal - addr_nr_ns2=fullmesh_1 \ + fullmesh=1 \ run_tests $ns1 $ns2 10.0.1.1 slow chk_join_nr 3 3 3 chk_add_nr 1 1 @@ -3115,7 +3117,7 @@ fullmesh_tests() pm_nl_set_limits $ns1 2 5 pm_nl_set_limits $ns2 1 5 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal - addr_nr_ns2=fullmesh_2 \ + fullmesh=2 \ run_tests $ns1 $ns2 10.0.1.1 slow chk_join_nr 5 5 5 chk_add_nr 1 1 @@ -3129,7 +3131,7 @@ fullmesh_tests() pm_nl_set_limits $ns1 2 4 pm_nl_set_limits $ns2 1 4 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal - addr_nr_ns2=fullmesh_2 \ + fullmesh=2 \ run_tests $ns1 $ns2 10.0.1.1 slow chk_join_nr 4 4 4 chk_add_nr 1 1 @@ -3153,7 +3155,7 @@ fullmesh_tests() pm_nl_set_limits $ns1 4 4 pm_nl_add_endpoint $ns1 10.0.2.1 flags subflow,fullmesh pm_nl_set_limits $ns2 4 4 - addr_nr_ns2=fullmesh_1 sflags=nofullmesh \ + fullmesh=1 sflags=nofullmesh \ run_tests $ns1 $ns2 10.0.1.1 slow chk_join_nr 2 2 2 chk_rm_nr 0 1 From patchwork Wed Jul 12 16:03:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 119260 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1257745vqm; Wed, 12 Jul 2023 09:12:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlGkolplkjmGrgHlf/pqHXH8mP/wIBV5UDEd2k4lZywaqplwIv55/mzwoG8nL8pup6mQFqbJ X-Received: by 2002:a17:90b:4a8e:b0:262:ea3e:e248 with SMTP id lp14-20020a17090b4a8e00b00262ea3ee248mr3327291pjb.7.1689178338537; Wed, 12 Jul 2023 09:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689178338; cv=none; d=google.com; s=arc-20160816; b=do9AJixYgQNBYzdKuT8Hx9u0tAEYAoBBlMCOnHYUEKTtwSGnUsf6k++M0qYNs3O3ME plwacm7MX33toIFHWosqpjjiwsC57K7kbDUhFDKyuAmB4dQuOCHRxYtFgQmEqVe3/slA Gc+FNm2C/45Acbob0qlEu1KEJRO9cgT+own0hyWUZJaB06fIZOqhLVRqAlRYvNjIUFgQ 8dwWHGNUNK1qRsQ8yN5Q6dyVkrRYC2fWD2ISPo05GLFD+j7R3rn/+QMB0RLRIQCnwlKO hldDsm2tOwH6M2QOZawu10elsGAmbVY9WXSLzkpYcqoOCPnpWfbVBiJlatVh/yotZJrs Penw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=MVlMBY+5/YKfP6HUFM2GkaKSHEcsx7YOTPwpnWoPGhQ=; fh=W5rn1gG81nIyOp2AvYKIXDwIEy66US4qHO9dtkppJI0=; b=XULlA+EXv+GzGB3oxh9n0sVS2663I/0xKAPbSmd6TNb00KB/k56CdPQdn31ctlW4QT SdOnTzhsHccWjwCEpFBWj6KeObgd5uD47xVTNQU3uyiMtOekBPc2860O5Z9MEQk9+eWN 8WO511/qoffywXO8YQYYX4jmJToj6dQbvmLAyWI7AQpynNpeSLTK2hcFO7ts1uiO8vPF sfGqT5logmn//QlJbkd+iXouSIiDH8lz2GJNqSK+KV0S97JeNyi0pBPOV07uPJs+8/DC 9hWmPoYHuQeWW6Dp6fq7vab39gpMSvB0y0HGzE53wUNu3V6Z1si73g0vQD/tcZcdyOaa ixMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=4BmJCuRe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=tessares.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lt21-20020a17090b355500b0025960d035c6si3628866pjb.138.2023.07.12.09.12.05; Wed, 12 Jul 2023 09:12:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=4BmJCuRe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=tessares.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233866AbjGLQDn (ORCPT + 99 others); Wed, 12 Jul 2023 12:03:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233593AbjGLQDf (ORCPT ); Wed, 12 Jul 2023 12:03:35 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D6AA1BE4 for ; Wed, 12 Jul 2023 09:03:32 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3fb4146e8fcso6443785e9.0 for ; Wed, 12 Jul 2023 09:03:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1689177811; x=1691769811; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=MVlMBY+5/YKfP6HUFM2GkaKSHEcsx7YOTPwpnWoPGhQ=; b=4BmJCuReCrpg05dFkCvUZ3FE/D0vawQvW8csm414hc3xWp5HvpfkUwv3gP7+4Mogpw L4MdZQMesOh4xoX9yzFaWt8SAPGu+7h6ZkXFOaa6x6UOwSTreQD2y+m22owSBVOMa9pq kTihgmr/UXmtMBz0rY2r6tC9krHO73ufYy2CIOdPim33zB282YghTdkVEam4NTyb61ic bVKsb+Q6J9gBs4EoEOVm145E4fzd75L1dfWEIJW3qJH0S5siI/BtFmvTW9qCYuEcLvGE o+5MPGZ0pp7PZI358FOemy1gpmigZ6g6JsyqewhQKrAc2oHbMRytbucuhwcq66RCI8VM e6gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689177811; x=1691769811; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MVlMBY+5/YKfP6HUFM2GkaKSHEcsx7YOTPwpnWoPGhQ=; b=N47qjm1eMnIW+rl/CESiuHBd8pTexuSRSpJ7wjEQ9gDIGb/YB/mfGl0LUFo2IeVi6e 2cU/TjdwRz+5fh6dL+Rk2pw6HzCDLClvfIRkmz/y3RbNg4GvlWjVnb5rWympjsLlrCf4 Jr7jtimhKMZAhagSDAR8l1DwECMoPKFmu+EiLEMhJmfg22ZvcNBF5rj9OJR4KbC8p3cw TyaSfWIsrI1g32idvsEuO8SFJigVohajtbLMCIdX2H9UgsV/ommZMfYvcxNdOP8xkVFJ TFFiOIXDCxIOlrEWpsVhFbVc67XX7SJxUIA88R1TchGcGkiyj+R0JwCus7VrFKIiNdHB dazA== X-Gm-Message-State: ABy/qLa6Zaiw7MQNf8amKQ2/kXZjuh5qrMfZALlohArBfNWZBfbkooUQ N5//J6mbvzxpAue/bc/3boGGuA== X-Received: by 2002:a05:600c:4590:b0:3f9:b867:4bb with SMTP id r16-20020a05600c459000b003f9b86704bbmr2356367wmo.2.1689177810940; Wed, 12 Jul 2023 09:03:30 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id o6-20020a05600c378600b003fbb9339b29sm15972581wmr.42.2023.07.12.09.03.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 09:03:30 -0700 (PDT) From: Matthieu Baerts Date: Wed, 12 Jul 2023 18:03:19 +0200 Subject: [PATCH net-next 4/4] selftests: mptcp: add speed env var MIME-Version: 1.0 Message-Id: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-4-f1c8b62fbf95@tessares.net> References: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-0-f1c8b62fbf95@tessares.net> In-Reply-To: <20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-0-f1c8b62fbf95@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: Geliang Tang , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=22653; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=LmaWDmR4NwSIDXQringvnl58L1jLrauBfol011sWzkI=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkrs7OMfyUbrK8N52VDSv2gl1J/FInwU2Hm97MC /Y75Ms/tIeJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZK7OzgAKCRD2t4JPQmmg cyIuD/sGeFDlhhcCxxJFurnApn89Ow9FK/v2oU+oeY1N441Ix2IV3/Xpx1nuxvgakrKGYBdLAIQ MYjwPGOQjr1pTFyWI0ip9BfdnFfbyF8tAQyXWAIb6YRbUnLEwuffO9imgjAPH+3tTdTGfOB0C1x aFw4clOHbRYaYSyTsU2y5ZE0i+NCCwaWdtN0qrXH2M2dnop+fDf/L9A0BlF/eNFcW4/yHfRRD8u UARNqO72oZidNHRZtBbxjLF8puS603ThNRHTX+Hanz3zsxFxA6dO4CEi/4eQGMr7qeCAvZWM6m6 81UQaxO6PwR9XdB++62ZMAYwjfCtxZJOQ8NxWwOjxs2Yz92+A1HM8BHZqZmfLETecrGxoDgm3vu H48ojDxYdDFHU2mUdWxk1i9Y0zYgWckw7DECmCcevtsqHAfrFY/vT0YM7Pn4clQCjQBFLFKqzC8 zR7oldzlpKBE6JAyOFYKSq+e/Nx0q+keRLxieivFhHzhwAIA0THfI+4/9ap1Fah0f9WW/g7srI3 XCN9pJFMTLW0HGmVuvQVKHj05R2/HDsCrZBTsO5F0Vjb1OuN+9JWfgWNdU4sPuITe+X/1ZrG3Cl 7dOEUWTnj5z1rSoNFCUapOIYadEJGBZK+jzgzCYsuY3+Vu5ry12Ixcn1xCwNZrd8zfXAgeTH3iY isDyKRCHP26Bc+Q== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771231865646145823 X-GMAIL-MSGID: 1771231865646145823 From: Geliang Tang Use a new env var speed instead of using 'speed' argument of run_tests() and do_transfer(). It can be set with 'fast', 'slow', or the actual speed number: run_tests $ns1 $ns2 10.0.1.1 slow -> speed=slow \ run_tests $ns1 $ns2 10.0.1.1. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 230 +++++++++++++----------- 1 file changed, 125 insertions(+), 105 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 5ad95cc382e6..b5eeea4c3efa 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -57,6 +57,7 @@ unset addr_nr_ns2 unset sflags unset fastclose unset fullmesh +unset speed # generated using "nfbpf_compile '(ip && (ip[54] & 0xf0) == 0x30) || # (ip6 && (ip6[74] & 0xf0) == 0x30)'" @@ -988,12 +989,12 @@ do_transfer() local cl_proto="$3" local srv_proto="$4" local connect_addr="$5" - local speed="$6" local port=$((10000 + TEST_COUNT - 1)) local cappid local FAILING_LINKS=${FAILING_LINKS:-""} local fastclose=${fastclose:-""} + local speed=${speed:-"fast"} :> "$cout" :> "$sout" @@ -1026,8 +1027,8 @@ do_transfer() extra_args="-j" elif [ $speed = "slow" ]; then extra_args="-r 50" - elif [[ $speed = "speed_"* ]]; then - extra_args="-r ${speed:6}" + elif [ $speed -gt 0 ]; then + extra_args="-r ${speed}" fi local extra_cl_args="" @@ -1165,7 +1166,6 @@ run_tests() local listener_ns="$1" local connector_ns="$2" local connect_addr="$3" - local speed="${4:-fast}" local size local test_linkfail=${test_linkfail:-0} @@ -1210,7 +1210,7 @@ run_tests() make_file "$sinfail" "server" $size fi - do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP ${connect_addr} ${speed} + do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP ${connect_addr} } dump_stats() @@ -1999,7 +1999,8 @@ subflows_error_tests() pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 0 1 pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow - run_tests $ns1 $ns2 10.0.1.1 slow + speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 0 0 0 fi @@ -2010,7 +2011,8 @@ subflows_error_tests() pm_nl_set_limits $ns2 0 2 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow - run_tests $ns1 $ns2 10.0.1.1 slow + speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 fi @@ -2021,7 +2023,8 @@ subflows_error_tests() pm_nl_set_limits $ns2 0 2 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow - run_tests $ns1 $ns2 10.0.1.1 slow + speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 fi @@ -2033,7 +2036,8 @@ subflows_error_tests() pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 0 1 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow - run_tests $ns1 $ns2 10.0.1.1 slow & + speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 & # mpj subflow will be in TW after the reset wait_attempt_fail $ns2 @@ -2132,7 +2136,8 @@ signal_address_tests() # the peer could possibly miss some addr notification, allow retransmission ip netns exec $ns1 sysctl -q net.mptcp.add_addr_timeout=1 - run_tests $ns1 $ns2 10.0.1.1 slow + speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 # It is not directly linked to the commit introducing this # symbol but for the parent one which is linked anyway. @@ -2242,7 +2247,8 @@ add_addr_timeout_tests() pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 1 1 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal - run_tests $ns1 $ns2 10.0.1.1 slow + speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 chk_add_tx_nr 4 4 chk_add_nr 4 0 @@ -2253,7 +2259,8 @@ add_addr_timeout_tests() pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 1 1 pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal - run_tests $ns1 $ns2 dead:beef:1::1 slow + speed=slow \ + run_tests $ns1 $ns2 dead:beef:1::1 chk_join_nr 1 1 1 chk_add_nr 4 0 fi @@ -2264,7 +2271,8 @@ add_addr_timeout_tests() pm_nl_add_endpoint $ns1 10.0.2.1 flags signal pm_nl_add_endpoint $ns1 10.0.3.1 flags signal pm_nl_set_limits $ns2 2 2 - run_tests $ns1 $ns2 10.0.1.1 speed_10 + speed=10 \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 2 2 2 chk_add_nr 8 0 fi @@ -2275,7 +2283,8 @@ add_addr_timeout_tests() pm_nl_add_endpoint $ns1 10.0.12.1 flags signal pm_nl_add_endpoint $ns1 10.0.3.1 flags signal pm_nl_set_limits $ns2 2 2 - run_tests $ns1 $ns2 10.0.1.1 speed_10 + speed=10 \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 chk_add_nr 8 0 fi @@ -2288,8 +2297,8 @@ remove_tests() pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 0 1 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow - addr_nr_ns2=-1 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns2=-1 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 chk_rm_tx_nr 1 chk_rm_nr 1 1 @@ -2301,8 +2310,8 @@ remove_tests() pm_nl_set_limits $ns2 0 2 pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow - addr_nr_ns2=-2 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns2=-2 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 2 2 2 chk_rm_nr 2 2 fi @@ -2312,8 +2321,8 @@ remove_tests() pm_nl_set_limits $ns1 0 1 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal pm_nl_set_limits $ns2 1 1 - addr_nr_ns1=-1 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns1=-1 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 chk_add_nr 1 1 chk_rm_nr 1 1 invert @@ -2325,8 +2334,8 @@ remove_tests() pm_nl_add_endpoint $ns1 10.0.2.1 flags signal pm_nl_set_limits $ns2 1 2 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow - addr_nr_ns1=-1 addr_nr_ns2=-1 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns1=-1 addr_nr_ns2=-1 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 2 2 2 chk_add_nr 1 1 chk_rm_nr 1 1 @@ -2339,8 +2348,8 @@ remove_tests() pm_nl_set_limits $ns2 1 3 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow pm_nl_add_endpoint $ns2 10.0.4.2 flags subflow - addr_nr_ns1=-1 addr_nr_ns2=-2 \ - run_tests $ns1 $ns2 10.0.1.1 speed_10 + addr_nr_ns1=-1 addr_nr_ns2=-2 speed=10 \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 3 3 3 chk_add_nr 1 1 chk_rm_nr 2 2 @@ -2353,8 +2362,8 @@ remove_tests() pm_nl_add_endpoint $ns1 10.0.3.1 flags signal pm_nl_add_endpoint $ns1 10.0.4.1 flags signal pm_nl_set_limits $ns2 3 3 - addr_nr_ns1=-3 \ - run_tests $ns1 $ns2 10.0.1.1 speed_10 + addr_nr_ns1=-3 speed=10 \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 3 3 3 chk_add_nr 3 3 chk_rm_nr 3 3 invert @@ -2367,8 +2376,8 @@ remove_tests() pm_nl_add_endpoint $ns1 10.0.3.1 flags signal pm_nl_add_endpoint $ns1 10.0.14.1 flags signal pm_nl_set_limits $ns2 3 3 - addr_nr_ns1=-3 \ - run_tests $ns1 $ns2 10.0.1.1 speed_10 + addr_nr_ns1=-3 speed=10 \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 chk_add_nr 3 3 chk_rm_nr 3 1 invert @@ -2381,8 +2390,8 @@ remove_tests() pm_nl_set_limits $ns2 1 3 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow pm_nl_add_endpoint $ns2 10.0.4.2 flags subflow - addr_nr_ns1=-8 addr_nr_ns2=-8 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns1=-8 addr_nr_ns2=-8 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 3 3 3 chk_add_nr 1 1 chk_rm_nr 1 3 invert simult @@ -2395,8 +2404,8 @@ remove_tests() pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow id 150 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow pm_nl_add_endpoint $ns2 10.0.4.2 flags subflow - addr_nr_ns1=-8 addr_nr_ns2=-8 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns1=-8 addr_nr_ns2=-8 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 3 3 3 if mptcp_lib_kversion_ge 5.18; then @@ -2414,8 +2423,8 @@ remove_tests() pm_nl_add_endpoint $ns1 10.0.3.1 flags signal pm_nl_add_endpoint $ns1 10.0.4.1 flags signal pm_nl_set_limits $ns2 3 3 - addr_nr_ns1=-8 addr_nr_ns2=-8 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns1=-8 addr_nr_ns2=-8 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 3 3 3 chk_add_nr 3 3 chk_rm_nr 3 3 invert simult @@ -2428,8 +2437,8 @@ remove_tests() pm_nl_add_endpoint $ns1 10.0.3.1 flags signal pm_nl_add_endpoint $ns1 10.0.14.1 flags signal pm_nl_set_limits $ns2 3 3 - addr_nr_ns1=-8 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns1=-8 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 chk_add_nr 3 3 chk_rm_nr 3 1 invert @@ -2440,8 +2449,8 @@ remove_tests() pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 0 1 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow - addr_nr_ns2=-9 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns2=-9 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 chk_rm_nr 1 1 fi @@ -2451,8 +2460,8 @@ remove_tests() pm_nl_set_limits $ns1 0 1 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal pm_nl_set_limits $ns2 1 1 - addr_nr_ns1=-9 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns1=-9 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 chk_add_nr 1 1 chk_rm_nr 1 1 invert @@ -2465,8 +2474,8 @@ add_tests() if reset "add single subflow"; then pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 0 1 - addr_nr_ns2=1 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns2=1 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 fi @@ -2474,8 +2483,8 @@ add_tests() if reset "add signal address"; then pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 1 1 - addr_nr_ns1=1 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns1=1 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 chk_add_nr 1 1 fi @@ -2484,8 +2493,8 @@ add_tests() if reset "add multiple subflows"; then pm_nl_set_limits $ns1 0 2 pm_nl_set_limits $ns2 0 2 - addr_nr_ns2=2 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns2=2 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 2 2 2 fi @@ -2493,8 +2502,8 @@ add_tests() if reset "add multiple subflows IPv6"; then pm_nl_set_limits $ns1 0 2 pm_nl_set_limits $ns2 0 2 - addr_nr_ns2=2 \ - run_tests $ns1 $ns2 dead:beef:1::1 slow + addr_nr_ns2=2 speed=slow \ + run_tests $ns1 $ns2 dead:beef:1::1 chk_join_nr 2 2 2 fi @@ -2502,8 +2511,8 @@ add_tests() if reset "add multiple addresses IPv6"; then pm_nl_set_limits $ns1 0 2 pm_nl_set_limits $ns2 2 2 - addr_nr_ns1=2 \ - run_tests $ns1 $ns2 dead:beef:1::1 slow + addr_nr_ns1=2 speed=slow \ + run_tests $ns1 $ns2 dead:beef:1::1 chk_join_nr 2 2 2 chk_add_nr 2 2 fi @@ -2516,14 +2525,16 @@ ipv6_tests() pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 0 1 pm_nl_add_endpoint $ns2 dead:beef:3::2 dev ns2eth3 flags subflow - run_tests $ns1 $ns2 dead:beef:1::1 slow + speed=slow \ + run_tests $ns1 $ns2 dead:beef:1::1 chk_join_nr 1 1 1 fi # add_address, unused IPv6 if reset "unused signal address IPv6"; then pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal - run_tests $ns1 $ns2 dead:beef:1::1 slow + speed=slow \ + run_tests $ns1 $ns2 dead:beef:1::1 chk_join_nr 0 0 0 chk_add_nr 1 1 fi @@ -2533,7 +2544,8 @@ ipv6_tests() pm_nl_set_limits $ns1 0 1 pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal pm_nl_set_limits $ns2 1 1 - run_tests $ns1 $ns2 dead:beef:1::1 slow + speed=slow \ + run_tests $ns1 $ns2 dead:beef:1::1 chk_join_nr 1 1 1 chk_add_nr 1 1 fi @@ -2543,8 +2555,8 @@ ipv6_tests() pm_nl_set_limits $ns1 0 1 pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal pm_nl_set_limits $ns2 1 1 - addr_nr_ns1=-1 \ - run_tests $ns1 $ns2 dead:beef:1::1 slow + addr_nr_ns1=-1 speed=slow \ + run_tests $ns1 $ns2 dead:beef:1::1 chk_join_nr 1 1 1 chk_add_nr 1 1 chk_rm_nr 1 1 invert @@ -2556,8 +2568,8 @@ ipv6_tests() pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal pm_nl_set_limits $ns2 1 2 pm_nl_add_endpoint $ns2 dead:beef:3::2 dev ns2eth3 flags subflow - addr_nr_ns1=-1 addr_nr_ns2=-1 \ - run_tests $ns1 $ns2 dead:beef:1::1 slow + addr_nr_ns1=-1 addr_nr_ns2=-1 speed=slow \ + run_tests $ns1 $ns2 dead:beef:1::1 chk_join_nr 2 2 2 chk_add_nr 1 1 chk_rm_nr 1 1 @@ -2658,7 +2670,8 @@ mixed_tests() pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 1 1 pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal - run_tests $ns1 $ns2 10.0.1.1 slow + speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 0 0 0 fi @@ -2668,7 +2681,8 @@ mixed_tests() pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 1 1 pm_nl_add_endpoint $ns1 10.0.1.1 flags signal - run_tests $ns1 $ns2 dead:beef:2::1 slow + speed=slow \ + run_tests $ns1 $ns2 dead:beef:2::1 chk_join_nr 1 1 1 fi @@ -2679,7 +2693,8 @@ mixed_tests() pm_nl_set_limits $ns2 1 4 pm_nl_add_endpoint $ns2 dead:beef:2::2 flags subflow,fullmesh pm_nl_add_endpoint $ns1 10.0.1.1 flags signal - run_tests $ns1 $ns2 dead:beef:2::1 slow + speed=slow \ + run_tests $ns1 $ns2 dead:beef:2::1 chk_join_nr 1 1 1 fi @@ -2691,8 +2706,8 @@ mixed_tests() pm_nl_set_limits $ns2 2 4 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal - fullmesh=1 \ - run_tests $ns1 $ns2 dead:beef:1::1 slow + fullmesh=1 speed=slow \ + run_tests $ns1 $ns2 dead:beef:1::1 chk_join_nr 4 4 4 fi } @@ -2705,8 +2720,8 @@ backup_tests() pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 0 1 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow,backup - sflags=nobackup \ - run_tests $ns1 $ns2 10.0.1.1 slow + sflags=nobackup speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 chk_prio_nr 0 1 fi @@ -2717,8 +2732,8 @@ backup_tests() pm_nl_set_limits $ns1 0 1 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal pm_nl_set_limits $ns2 1 1 - sflags=backup \ - run_tests $ns1 $ns2 10.0.1.1 slow + sflags=backup speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 chk_add_nr 1 1 chk_prio_nr 1 1 @@ -2730,8 +2745,8 @@ backup_tests() pm_nl_set_limits $ns1 0 1 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal port 10100 pm_nl_set_limits $ns2 1 1 - sflags=backup \ - run_tests $ns1 $ns2 10.0.1.1 slow + sflags=backup speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 chk_add_nr 1 1 chk_prio_nr 1 1 @@ -2740,7 +2755,8 @@ backup_tests() if reset "mpc backup" && continue_if mptcp_lib_kallsyms_doesnt_have "mptcp_subflow_send_ack$"; then pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow,backup - run_tests $ns1 $ns2 10.0.1.1 slow + speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 0 0 0 chk_prio_nr 0 1 fi @@ -2749,7 +2765,8 @@ backup_tests() continue_if mptcp_lib_kallsyms_doesnt_have "mptcp_subflow_send_ack$"; then pm_nl_add_endpoint $ns1 10.0.1.1 flags subflow,backup pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow,backup - run_tests $ns1 $ns2 10.0.1.1 slow + speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 0 0 0 chk_prio_nr 1 1 fi @@ -2757,8 +2774,8 @@ backup_tests() if reset "mpc switch to backup" && continue_if mptcp_lib_kallsyms_doesnt_have "mptcp_subflow_send_ack$"; then pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow - sflags=backup \ - run_tests $ns1 $ns2 10.0.1.1 slow + sflags=backup speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 0 0 0 chk_prio_nr 0 1 fi @@ -2767,8 +2784,8 @@ backup_tests() continue_if mptcp_lib_kallsyms_doesnt_have "mptcp_subflow_send_ack$"; then pm_nl_add_endpoint $ns1 10.0.1.1 flags subflow pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow - sflags=backup \ - run_tests $ns1 $ns2 10.0.1.1 slow + sflags=backup speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 0 0 0 chk_prio_nr 1 1 fi @@ -2857,8 +2874,8 @@ add_addr_ports_tests() pm_nl_set_limits $ns1 0 1 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal port 10100 pm_nl_set_limits $ns2 1 1 - addr_nr_ns1=-1 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns1=-1 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 1 chk_add_nr 1 1 1 chk_rm_nr 1 1 invert @@ -2874,8 +2891,8 @@ add_addr_ports_tests() pm_nl_add_endpoint $ns1 10.0.2.1 flags signal port 10100 pm_nl_set_limits $ns2 1 2 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow - addr_nr_ns1=-1 addr_nr_ns2=-1 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns1=-1 addr_nr_ns2=-1 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 2 2 2 chk_add_nr 1 1 1 chk_rm_nr 1 1 @@ -2888,8 +2905,8 @@ add_addr_ports_tests() pm_nl_set_limits $ns2 1 3 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow pm_nl_add_endpoint $ns2 10.0.4.2 flags subflow - addr_nr_ns1=-8 addr_nr_ns2=-2 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns1=-8 addr_nr_ns2=-2 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 3 3 3 chk_add_nr 1 1 chk_rm_nr 1 3 invert simult @@ -3091,8 +3108,8 @@ fullmesh_tests() pm_nl_set_limits $ns2 1 4 pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow,fullmesh pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow,fullmesh - addr_nr_ns1=1 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns1=1 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 4 4 4 chk_add_nr 1 1 fi @@ -3104,8 +3121,8 @@ fullmesh_tests() pm_nl_set_limits $ns1 1 3 pm_nl_set_limits $ns2 1 3 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal - fullmesh=1 \ - run_tests $ns1 $ns2 10.0.1.1 slow + fullmesh=1 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 3 3 3 chk_add_nr 1 1 fi @@ -3117,8 +3134,8 @@ fullmesh_tests() pm_nl_set_limits $ns1 2 5 pm_nl_set_limits $ns2 1 5 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal - fullmesh=2 \ - run_tests $ns1 $ns2 10.0.1.1 slow + fullmesh=2 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 5 5 5 chk_add_nr 1 1 fi @@ -3131,8 +3148,8 @@ fullmesh_tests() pm_nl_set_limits $ns1 2 4 pm_nl_set_limits $ns2 1 4 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal - fullmesh=2 \ - run_tests $ns1 $ns2 10.0.1.1 slow + fullmesh=2 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 4 4 4 chk_add_nr 1 1 fi @@ -3143,8 +3160,8 @@ fullmesh_tests() pm_nl_set_limits $ns1 4 4 pm_nl_add_endpoint $ns1 10.0.2.1 flags subflow pm_nl_set_limits $ns2 4 4 - addr_nr_ns2=1 sflags=fullmesh \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns2=1 sflags=fullmesh speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 2 2 2 chk_rm_nr 0 1 fi @@ -3155,8 +3172,8 @@ fullmesh_tests() pm_nl_set_limits $ns1 4 4 pm_nl_add_endpoint $ns1 10.0.2.1 flags subflow,fullmesh pm_nl_set_limits $ns2 4 4 - fullmesh=1 sflags=nofullmesh \ - run_tests $ns1 $ns2 10.0.1.1 slow + fullmesh=1 sflags=nofullmesh speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 2 2 2 chk_rm_nr 0 1 fi @@ -3167,8 +3184,8 @@ fullmesh_tests() pm_nl_set_limits $ns1 4 4 pm_nl_add_endpoint $ns1 10.0.2.1 flags subflow pm_nl_set_limits $ns2 4 4 - addr_nr_ns2=1 sflags=backup,fullmesh \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns2=1 sflags=backup,fullmesh speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 2 2 2 chk_prio_nr 0 1 chk_rm_nr 0 1 @@ -3180,8 +3197,8 @@ fullmesh_tests() pm_nl_set_limits $ns1 4 4 pm_nl_set_limits $ns2 4 4 pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow,backup,fullmesh - sflags=nobackup,nofullmesh \ - run_tests $ns1 $ns2 10.0.1.1 slow + sflags=nobackup,nofullmesh speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 2 2 2 chk_prio_nr 0 1 chk_rm_nr 0 1 @@ -3356,8 +3373,8 @@ userspace_tests() pm_nl_set_limits $ns1 1 1 pm_nl_set_limits $ns2 1 1 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow - sflags=backup \ - run_tests $ns1 $ns2 10.0.1.1 slow + sflags=backup speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 1 1 0 chk_prio_nr 0 0 fi @@ -3370,8 +3387,8 @@ userspace_tests() pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 0 1 pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow - addr_nr_ns2=-1 \ - run_tests $ns1 $ns2 10.0.1.1 slow + addr_nr_ns2=-1 speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 chk_join_nr 0 0 0 chk_rm_nr 0 0 fi @@ -3381,7 +3398,8 @@ userspace_tests() continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then set_userspace_pm $ns1 pm_nl_set_limits $ns2 1 1 - run_tests $ns1 $ns2 10.0.1.1 speed_10 & + speed=10 \ + run_tests $ns1 $ns2 10.0.1.1 & local tests_pid=$! wait_mpj $ns1 userspace_pm_add_addr 10.0.2.1 10 @@ -3401,7 +3419,8 @@ userspace_tests() continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then set_userspace_pm $ns2 pm_nl_set_limits $ns1 0 1 - run_tests $ns1 $ns2 10.0.1.1 speed_10 & + speed=10 \ + run_tests $ns1 $ns2 10.0.1.1 & local tests_pid=$! wait_mpj $ns2 userspace_pm_add_sf 10.0.3.2 20 @@ -3424,7 +3443,8 @@ endpoint_tests() pm_nl_set_limits $ns1 2 2 pm_nl_set_limits $ns2 2 2 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal - run_tests $ns1 $ns2 10.0.1.1 slow 2>/dev/null & + speed=slow \ + run_tests $ns1 $ns2 10.0.1.1 2>/dev/null & wait_mpj $ns1 pm_nl_check_endpoint 1 "creation" \ @@ -3447,8 +3467,8 @@ endpoint_tests() pm_nl_set_limits $ns1 1 1 pm_nl_set_limits $ns2 1 1 pm_nl_add_endpoint $ns2 10.0.2.2 id 2 dev ns2eth2 flags subflow - test_linkfail=4 \ - run_tests $ns1 $ns2 10.0.1.1 speed_20 2>/dev/null & + test_linkfail=4 speed=20 \ + run_tests $ns1 $ns2 10.0.1.1 2>/dev/null & wait_mpj $ns2 chk_subflow_nr needtitle "before delete" 2