From nobody Thu Nov 14 07:01:25 2024 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30E96214F2 for ; Wed, 12 Jul 2023 16:03:29 +0000 (UTC) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-3fbc5d5746cso79543815e9.2 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=F5mvmQ84vIJJ9ddMTaAwIEu9oN23s+ZNbZWJbZvV/8QjFbrAGPGpNu/vFmdLdfuiyb VGXuAwW0aVI8VKHrc3155+yu/wHd/kXi5FD+B0Nj5g/6KDNILigE1GZca1PpehxMpUkb WcLQhUbHwBVvQADk8im28uQFKsR1ALqMx1mG+4NB9p9fOjkewFnHWFSF8sqfps+7WRLP ON7grjLyIdHtvt8k5TvC35Jo/EgsZeO8fybYoH9JZX9fNDSrVuEiJUExYmZgqhMKj4dc g1aaE6GPxEIQnu7bokGFR6Ip7ytnxRBEQ/Fp9AtFjX8Xtlmfl5A85BdKwRy4Ks/ZNPiB vIbw== X-Gm-Message-State: ABy/qLbFI962obXBud6QnIDofGm8niQzZv0aRTP/lRPOn5KsjjqUgLwh MC4YiUtD2pVCh6jwIvsGpQRZpg== X-Google-Smtp-Source: APBJJlHWObV3Y4B+PFR9B9YnoxQXzqf6JH2+g53jCkQDKCalLO8q53q17xxbkojPPip/5EU1+iWpEA== 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 Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 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/testin= g/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=3D0 TEST_NAME=3D"" nr_blank=3D40 =20 -export FAILING_LINKS=3D"" -export test_linkfail=3D0 -export addr_nr_ns1=3D0 -export addr_nr_ns2=3D0 -export sflags=3D"" +# 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 =20 # generated using "nfbpf_compile '(ip && (ip[54] & 0xf0) =3D=3D 0x30) || # (ip6 && (ip6[74] & 0xf0) =3D=3D 0x30)'" @@ -100,7 +101,6 @@ init_partial() stats_dumped=3D0 check_invert=3D0 validate_checksum=3D$checksum - FAILING_LINKS=3D"" =20 # ns1 ns2 # ns1eth1 ns2eth1 @@ -828,6 +828,10 @@ pm_nl_set_endpoint() local connector_ns=3D"$2" local connect_addr=3D"$3" =20 + local addr_nr_ns1=3D${addr_nr_ns1:-0} + local addr_nr_ns2=3D${addr_nr_ns2:-0} + local sflags=3D${sflags:-""} + # let the mptcp subflow be established in background before # do endpoint manipulation if [ $addr_nr_ns1 !=3D "0" ] || [ $addr_nr_ns2 !=3D "0" ]; then @@ -979,6 +983,7 @@ do_transfer() =20 local port=3D$((10000 + TEST_COUNT - 1)) local cappid + local FAILING_LINKS=3D${FAILING_LINKS:-""} =20 :> "$cout" :> "$sout" @@ -1158,6 +1163,7 @@ run_tests() local speed=3D"${4:-fast}" =20 local size + local test_linkfail=3D${test_linkfail:-0} =20 # The values above 2 are reused to make test files # with the given sizes (KB) --=20 2.40.1