Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp77825rbb; Fri, 23 Feb 2024 12:20:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUWBlDsVLCTvsULVHF3zx2jRB4vl/vMytnc99decMUUaQHJ7Zf9BFnualjMZNrLWUgG1J0ytzRaRrqetu0YcpMPGCw17jGWUEL781ihGg== X-Google-Smtp-Source: AGHT+IGnI0uFr5/1aMmPTfNAfHsGXWRHtb7Q2s/bUEM+nDQg0idAJlMOvfeNMNnrGnBzf3CzFPuv X-Received: by 2002:ae9:f312:0:b0:787:a6b8:6e6b with SMTP id p18-20020ae9f312000000b00787a6b86e6bmr916960qkg.22.1708719652423; Fri, 23 Feb 2024 12:20:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708719652; cv=pass; d=google.com; s=arc-20160816; b=qEm34SU8T0klKrPnvfYgdt05oHQUTvMwCP/HCFbDMTA1XgasTZU3m63LfH9XKrncxC +oTrVJc5EUvQMGCZrup21NX0NjcA7KPZ6ohrYMb8g9c2fwjCh2PNqEEWapjCZO7F4eyG 1dyfYeGOuW/OqmQwjLbdzjqqS+q0DvQ8SNZiMnR4hrRON1xtqiqiIRi5SD6AK5KEB/7A LQB0yIpvX//KwJ2lJa54r4TnxkA9BMC4ehcpuDx41OpVNs7gFbVZspbWxLVVBv9W0KuR GZNkK+PJ9k+GrfBOnklCZMrKHtw1IGDj3i38jencZ/98FIjIITCtIsf9oN6jVfWitGhb vSdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=rvMTYTkwo3PDWo6uCreD3OnoD2lo5dEB+mW1etvwFiQ=; fh=gM1fTaWoK9TL7webZ8yB3tcO8X47vwS7DNlJ3C0B/Lk=; b=NYDTLFG+B+UDPhzLcp2Y0kTWQv+WOOFdPSyBbv13N1MMpVjJiPHkNG7Q237LrtmI96 j/1qAfV6JIzDCE+Wzek+oSc7ziv5j++uURAuVJJZVe/UUDfUE0MDlm7TsZdvmief7yrB CwMdvKbMRxP0JkHtgZd8qpZhPODOeH/GmzvsfCsd2KNX2qF5dVr+M/UcR1wBjGv/t5+j /4chHyapce7AUIcGxzt3JxX8lbnxmZmg4YudT/RzMNVgiwmag77sR13mdG1czPG2apKB GWoaXu5Twrovlf1aYUhWYyn32BTNqOQ4muHL5mHMjXaCyfeGj/yOE9BXLnPiSxdD7ICy pY8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rN2ojuFv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79089-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id wk11-20020a05620a578b00b00787b5b259a7si1487946qkn.472.2024.02.23.12.20.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 12:20:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rN2ojuFv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79089-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C620B1C20E16 for ; Fri, 23 Feb 2024 20:20:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D660F14DFDF; Fri, 23 Feb 2024 20:19:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rN2ojuFv" 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 1EE18146E67; Fri, 23 Feb 2024 20:19:23 +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=1708719564; cv=none; b=CrqbmlSdPbrBq7HGHmKLqLInO78gPPOvtgFGyuXhTGuBgrlnHT1/GLUR9DXgkMUskOohLKZnUFOIa9j1uH40oTBKOWIzwjOW79OTbRv8Bo5HjEkp3t519NevdvOFv0KmsBqech4AZvVsGcq34PUVcKyrZeKIaVQYUxU46L97qik= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708719564; c=relaxed/simple; bh=ukSJGjxu+ue1SOHBDHfmlxv7527kiTH7F4ql4XDr00c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=auzYV+HKVcINDGAKZX4jUu0mOl1m60pK+irSBjX1lnTEWGFfOgUsIaPE03L3d9D21J6oNsBhLinGDp+idc4gsNXYhb6sH4pMmTeq6m3NSS2zAI0zMkE5G6FBVBYJlkMTMF2mbV8r9LesCpIOW+19krKpmh9JPkan9xjtDWJa/3M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rN2ojuFv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8286C43399; Fri, 23 Feb 2024 20:19:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708719563; bh=ukSJGjxu+ue1SOHBDHfmlxv7527kiTH7F4ql4XDr00c=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=rN2ojuFv0oyQzoZrLloiVhjjVW7mrKYyGs20DBvUKJpmHEi3lRvah7wxoLCyPrX2X jP78+SB1aQ9GuY0U5ltgL9GEfb13F6mBu2Aibwb6DOoZnYcQwepfDOcGW+FaK9OkSM knP43mIIDYsHeJdh/Ax53hQaRkbipXNAMqUhMqocr4YlF5bxN1PXmuPYVl72Cequuh PzOhYdEghtt265IhbT50lUGW8K661aS9NUYAEd1pqLHgQ/PO4Rc1Y8SUTxpCVXJgRg mOxc+V/86snBfZvzhuH3uEX16KZjzWU5zB6rKHIcRbiG6XLYLTnMiCXuoCcTRwrmlz tHPLHPtKSteMw== From: "Matthieu Baerts (NGI0)" Date: Fri, 23 Feb 2024 21:17:59 +0100 Subject: [PATCH net-next 7/8] selftests: mptcp: join: change capture/checksum as bool Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240223-upstream-net-next-20240223-misc-improvements-v1-7-b6c8a10396bd@kernel.org> References: <20240223-upstream-net-next-20240223-misc-improvements-v1-0-b6c8a10396bd@kernel.org> In-Reply-To: <20240223-upstream-net-next-20240223-misc-improvements-v1-0-b6c8a10396bd@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, "Matthieu Baerts (NGI0)" , Geliang Tang X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2685; i=matttbe@kernel.org; h=from:subject:message-id; bh=QAwNFzDN+MJTxQHIwpBmAUpR/yt5FrvMyfSOP6mUHgI=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBl2P2qKA6ebgNQ99j+L4S74IFVKs1uktyoR1Cj6 XeSLiF4xD+JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZdj9qgAKCRD2t4JPQmmg c7wvEACeZtD25TbQuGVn8mbHzk+UtSKtpAeKEACWF60jZNCOipC/EBQ0W4njcHMiaBg7XMx8RmQ LqxtGTnUJsEVBZWTi0BrCT3xgcnhpvG49eSpJtjcpWWVlebZLuRCDU+GZwq+4HN1j39WWe/4p/d tsoHbwQ0bcFQHdgPVjUEZQ2w8ZnPAQkJXbEL54f+RAe0CmNbNAh1KwK9PT7v47SuhJYBoXpvib/ 3F6r2vh/EWYU3g7BZk+jgLrLhpt9Z54JZ34f/HRlL0WCH51+7+70dAgWwsKb3x09tG0WVX7Y/fa eXCWtmha7mpdKLWDBW0pRTUqLWqX1QzgEdTHJ71sD+FPfK7kXPHl4EhPE/Ded2wXKdgoqBLrFst WH2vmO+AjTf0WOBs7DPnAS6eFufGekpWuzGeffdTFoYtd10afM3dCPN57aDyPk7/O3TXwFRZ3WL I1iqcCu53jSW1z7WHxmPhg/ROY0MhuAnsveTRFEHV7Tt6uAevFum8pKF1nbR4bz1kvilSlIFGfv bwLC8IsWqgzyCUkGkawPGvKcgaODbNc3D1/mLnxvRMFB9VKPrCGmz6tN5oHs14hMRQnlfR26Ljb 97qzKAxFKDmPcgMwli18qUr8zKgnPYGzufWIQWRvC8kfnacsHKZZVUwU3S3yGVtC1gIdprs1xiT 0boa+s0q0rx34XA== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Geliang Tang To maintain consistency with other scripts, this patch changes vars 'capture' and 'checksum' as bool vars in mptcp_join. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index c07386e21e0a..3f198743cb03 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -29,11 +29,11 @@ iptables="iptables" ip6tables="ip6tables" timeout_poll=30 timeout_test=$((timeout_poll * 2 + 1)) -capture=0 -checksum=0 +capture=false +checksum=false ip_mptcp=0 check_invert=0 -validate_checksum=0 +validate_checksum=false init=0 evts_ns1="" evts_ns2="" @@ -100,7 +100,7 @@ init_partial() ip netns exec $netns sysctl -q net.mptcp.pm_type=0 2>/dev/null || true ip netns exec $netns sysctl -q net.ipv4.conf.all.rp_filter=0 ip netns exec $netns sysctl -q net.ipv4.conf.default.rp_filter=0 - if [ $checksum -eq 1 ]; then + if $checksum; then ip netns exec $netns sysctl -q net.mptcp.checksum_enabled=1 fi done @@ -380,7 +380,7 @@ reset_with_checksum() ip netns exec $ns1 sysctl -q net.mptcp.checksum_enabled=$ns1_enable ip netns exec $ns2 sysctl -q net.mptcp.checksum_enabled=$ns2_enable - validate_checksum=1 + validate_checksum=true } reset_with_allow_join_id0() @@ -413,7 +413,7 @@ reset_with_allow_join_id0() setup_fail_rules() { check_invert=1 - validate_checksum=1 + validate_checksum=true local i="$1" local ip="${2:-4}" local tables @@ -1017,7 +1017,7 @@ do_transfer() :> "$sout" :> "$capout" - if [ $capture -eq 1 ]; then + if $capture; then local capuser if [ -z $SUDO_USER ] ; then capuser="" @@ -1119,7 +1119,7 @@ do_transfer() wait $spid local rets=$? - if [ $capture -eq 1 ]; then + if $capture; then sleep 1 kill $cappid fi @@ -1507,7 +1507,7 @@ chk_join_nr() else print_ok fi - if [ $validate_checksum -eq 1 ]; then + if $validate_checksum; then chk_csum_nr $csum_ns1 $csum_ns2 chk_fail_nr $fail_nr $fail_nr chk_rst_nr $rst_nr $rst_nr @@ -3664,10 +3664,10 @@ while getopts "${all_tests_args}cCih" opt; do tests+=("${all_tests[${opt}]}") ;; c) - capture=1 + capture=true ;; C) - checksum=1 + checksum=true ;; i) ip_mptcp=1 -- 2.43.0