Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp955698lqs; Wed, 6 Mar 2024 01:43:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXS2DWozSBajk/nk3yaM0NIUKU/jMYrjbQe4roeOo0Q71+YiF3WachUue0lzEOxRngogE2Pa7cJ7yzklM8JXoCUnYduDGOhVojZ1vLOJw== X-Google-Smtp-Source: AGHT+IH3VSz8jCVogv567pqwS401bfYjkuyg64ZansEPxEPR4bSARdeeKqDm+S2bcmPQGOac/ZMa X-Received: by 2002:a0d:d48f:0:b0:608:a212:f494 with SMTP id w137-20020a0dd48f000000b00608a212f494mr12051179ywd.20.1709718197101; Wed, 06 Mar 2024 01:43:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709718197; cv=pass; d=google.com; s=arc-20160816; b=PvSRjuI2UG9UktS8+7ucnZRXmryEW3PqyVRn2ByA788eCNfRvmfsSgTq4Hlq2UHu9s Stp5w0UV+jcbB6jmI+vca/oWWAnK2jFoDuPBJ5hW64rClngz1NDCMZ4lfCMgxm4EljmP QF8mvSYUax/WBOZFoNKUAe6TzGUcZDIU7kOHTfWXFBXCRJUN29pPD2vevvaKSXSJ8j+T kByU4F+6k36FKfMFymH5R8eKZWhEVMg4rWWXKrhQZftEkaFts41esNStgBuLf9QnRL0/ frdBI5FqEKffBctRJZe0rzLv5GQv9ggsClWDM+gY6hDuzLShMScouOQ9USfjGQTVB9Zo HO5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=JJA1kBelZL+VAIDNTtA3/XxT56ZkLFjr2rT+Fv+ELUY=; fh=nsG2ft207JVcgjr96aF1vEYTFxRnqAIWs/lvhNq5sdA=; b=U2N15NAuJ/yPa96hVfCmxg982JiJYMo4Wygsq/k5pyWki5/xTo4VLD904eeJM6bq+U CHYlh7EQiFli5CK7r0XeeY19zEOnaJrAW/o9MFUXJaOj3O8rIhjr2jznLel2uUTj/xVA 6ttFzi58Hfbx0uAOCrZS7/U7+Av1I0h2aNxbBq4zHeZEzsJYoDxKbfFOhj0pYP1MxKdc mHT5jfOfg8p7ujzReX4VHBw342TYBP00Hc4lL7rus64R8XTFl0zPQfE20n0LKZE7+OSS aK7/z0hOZUW7ze9rcx6VgCE5IR3w2DkZyluM/CKF3JkUEOOEzmYnKn+8va22cAVupgsA HMjA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rk5A19O3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-93645-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93645-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 f14-20020ac859ce000000b0042e4b1d6edcsi5324221qtf.29.2024.03.06.01.43.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 01:43:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93645-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=Rk5A19O3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-93645-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93645-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 873161C21B8F for ; Wed, 6 Mar 2024 09:43:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F3DB5EE63; Wed, 6 Mar 2024 09:43:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Rk5A19O3" 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 BB010433C5; Wed, 6 Mar 2024 09:43:06 +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=1709718186; cv=none; b=Yjv0OXKWUcH1p0KoRbptILFLH3AfkF5FQqZHvRjgp0YQElT6x1u1guHt2Lg/KYdJxaXVgsMUZQ3kQSTyGjbECxi8dQEqI5Dy0W2TvWzx6CKNexSkNIKgsUZG98kmolVVcZa7AErSTz5ppEVlOIvFbYnrLeKIqmSZnuy5deoRnJ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709718186; c=relaxed/simple; bh=Y6OeUIFhACV1w8LgiRWi1ucYYzz5y/Z3CdvHWuXr3tM=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=FVWrL06e51u2mWaybhbr5qI1YrGnH5iv4jqQOgO31838qkzfWfJpo1RnBineTN5xOvoY2cOfHpGTVSKj83vreyyjlS3GVoUbZix4+JNs0jWjGz5rjjTp7vhn+cPWomgI6kapKFTbEJ8SfA/PyLm+xYjkRqVh3qz+mld6aDQinfo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Rk5A19O3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BD53C433C7; Wed, 6 Mar 2024 09:43:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709718186; bh=Y6OeUIFhACV1w8LgiRWi1ucYYzz5y/Z3CdvHWuXr3tM=; h=From:Subject:Date:To:Cc:From; b=Rk5A19O3V7nk4YtyIQoPlY9Frr0CfHp6Sj89uJ0pGG3buLNhXLcWpM6MwA/fGKWow JMOia1ZEzl48p9Jiush0eoDNAm+b3AATId/rs39HdCXNXJdw4NOOnKQheH/z4/SIlJ 2jVEY+VCsbsRhrVKRdxV2/pienzBukSCyDnsCt3v1Pa0GkAbWGvCdbjriV7EIeHjei vbDfiIMACYmMFQSMaqhx2k1yfMtbM6NVX+gMaU8KO39eX8VNjEkPJK9U1Pi7Lb4lkP pxaefT4fEW9NN08mULvMgG5uMlXH3Akzlcm7jF1wDmDzTfIrPSz9Digv7r4XFjKdDK oBlqrvWHurHJQ== From: "Matthieu Baerts (NGI0)" Subject: [PATCH net-next v2 00/12] selftests: mptcp: share code and fix shellcheck warnings Date: Wed, 06 Mar 2024 10:42:49 +0100 Message-Id: <20240306-upstream-net-next-20240304-selftests-mptcp-shared-code-shellcheck-v2-0-bc79e6e5e6a0@kernel.org> 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 X-B4-Tracking: v=1; b=H4sIAJk66GUC/62OTQqDMBCFr1Jm3SnRRild9R7FhY1PDf6FTCoW8 e4N0vYEXQzM44P3vpUE3kLoeljJY7ZipzGG9Hgg05ZjA7ZVzJSqVKuz0vx0EjzKgUeEeEvgHxL 0dYAE4cEF41ja0qNiM1WIP/retDAdJ7mqDR6ZgdYUd5xHbZfd4U7fVioiaa2Eyb92uTnZ+Wcs+ 4PHnLDiPM+TC8osUxq3Dn5Ef5p8Q8W2bW+0HgrDHQEAAA== 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)" , Pablo Neira Ayuso , Geliang Tang X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2528; i=matttbe@kernel.org; h=from:subject:message-id; bh=Y6OeUIFhACV1w8LgiRWi1ucYYzz5y/Z3CdvHWuXr3tM=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBl6DqmDh80NvIFkK0dyhBctExEu31+F6+md5WI+ BUY0H5bE0iJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZeg6pgAKCRD2t4JPQmmg c8dDEADk/Wj5WzxLrbR8NXtfVTLBwEy9uIeUrN+Os3Heh5JplO9kA/vEq5YuLUubWN3yphFOIwJ Pn7gMrnFyv0GjCc6NaD+hGXcScoWYX3cKMDde3fAe3JePZACbOjishLu7EJd4lyZvuPXF2hSxdD FR9gm1TwiyRTz6vmxgEa6LOAXT7slFI1oqWIxfE2VcnF2w9QcvJl98YEpqJPDGFNtREm9VsmDHk AYR0B0RwgudAJkXmI88cbfROsWAlSJnjcXgCUeoi6PFd3fYiWhfbZheadiYcs1B3YzjnCJRpB0g nS80p/OlVbZdJsugfluqwChsjUZYlfnVwV+Omm4H/x+VHtodHCaXUDbyteKPNgce9gqhujBpAza EVnF8ijUxdCzYexTNZKXi/csNmvJaqM0x8MLHYTfnYhUvMZ5QzP/uyl1X/Q6ZGo7jdoPB7gXrOs spVCsK6S1CgLA94KooqauBVcLt+h6ofcNbRmHBWA7gDQsecHhJozQ6K88dC8QgIVgwg/7jh6RA5 ede2Su9ItFELZTGpzEzFiiL6IQ+J6tgri5dH0iiwr+jEUYGdfTTNOvMGfv3x9keyb+FlywqgyiM 0CI1DRHfim6pFeKgC2t2XLSERVZS8j1w64k5bxpwAXKMHNU4fQdKxp1i9p7t5Uh6FmOuTvCRkTr INd9JqWjxPVvMzw== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 This series cleans MPTCP selftests code. Patch 1 stops using 'iptables-legacy' if available, but uses 'iptables', which is likely 'iptables-nft' behind. Patches 2, 4 and 6 move duplicated code to mptcp_lib.sh. Patch 3 is a preparation for patch 4, and patch 5 adds generic actions at the creation and deletion of netns. Patches 7 to 11 disable a few shellcheck warnings, and fix the rest, so it is easy to spot real issues later. MPTCP CI is checking that now. Patch 12 avoids redoing some actions at init time twice, e.g. restarting the pm events tool. Signed-off-by: Matthieu Baerts (NGI0) --- Changes in v2: - The former patch 3/13 ("selftests: mptcp: add mptcp_lib_check_output helper") has been dropped, it was not supposed to be sent. - Link to v1: https://lore.kernel.org/r/20240305-upstream-net-next-20240304-selftests-mptcp-shared-code-shellcheck-v1-0-66618ea5504e@kernel.org --- Geliang Tang (5): selftests: mptcp: add mptcp_lib_check_tools helper selftests: mptcp: add local variables rndh selftests: mptcp: add mptcp_lib_ns_init/exit helpers selftests: mptcp: more operations in ns_init/exit selftests: mptcp: add mptcp_lib_events helper Matthieu Baerts (NGI0) (7): selftests: mptcp: stop forcing iptables-legacy selftests: mptcp: diag: fix shellcheck warnings selftests: mptcp: connect: fix shellcheck warnings selftests: mptcp: sockopt: fix shellcheck warnings selftests: mptcp: pm netlink: fix shellcheck warnings selftests: mptcp: simult flows: fix shellcheck warnings selftests: userspace pm: avoid relaunching pm events tools/testing/selftests/net/mptcp/diag.sh | 35 +++---- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 111 +++++++++++---------- tools/testing/selftests/net/mptcp/mptcp_join.sh | 60 ++--------- tools/testing/selftests/net/mptcp/mptcp_lib.sh | 68 +++++++++++++ tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 55 +++------- tools/testing/selftests/net/mptcp/pm_netlink.sh | 31 +++--- tools/testing/selftests/net/mptcp/simult_flows.sh | 38 +++---- tools/testing/selftests/net/mptcp/userspace_pm.sh | 56 +++-------- 8 files changed, 210 insertions(+), 244 deletions(-) --- base-commit: 09fcde54776180a76e99cae7f6d51b33c4a06525 change-id: 20240304-upstream-net-next-20240304-selftests-mptcp-shared-code-shellcheck-160fceb5ce44 Best regards, -- Matthieu Baerts (NGI0)