From patchwork Sun May 28 17:35:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 99914 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1068587vqr; Sun, 28 May 2023 10:37:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Il6N5NtiMPScPtkZ2aC7QI6HwxZCw8+1881i94To2DWj0b7hETvi67CS/hR6SskACFv0k X-Received: by 2002:a05:6a00:23c8:b0:63d:2d7d:b6f2 with SMTP id g8-20020a056a0023c800b0063d2d7db6f2mr13310871pfc.4.1685295422630; Sun, 28 May 2023 10:37:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685295422; cv=none; d=google.com; s=arc-20160816; b=aOCDx7Q5XwymfShceTlEjPs86QPt+PSVzJnmH9mQRVcUfxaYQhVVFIIzN6cLHBByGo USDsdvuTGRppatpjjnwqd982gY0FBK59ZoTFbu9/l3c1pyCiMoNNiytHaNaA+NfkuCkC H6BFrLfHEvc8/ojxM5DMw2hqvVVf8AXqOabJGpEpzpDChioIRK4AppO/h0UgyH78j02B r/Pg0GEDsUBbLjbVOVua59RgTiwjVDsnWiLky9nIHxecDK52K9E73RM0cAg03xEzjlxu YWYYSEoo7itxnWZ69xL/3mtyiwPPzIRvIz0QonZU5YU1/fAXUGwyOYrni9Y1allQlopE DebQ== 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=Gw5Qo+KgJFEsvwVTc4nzprJkJaDeXrbywxB/oWvh/40=; b=NasEcMfaU5k6Ml/NF4dwhRaGtodY5weA8mSluaL38DvpdduMwRPILKrSCrv+eFjLD2 eHhNxj9E/bicyI17r+jFN3NuateFKDHDad8sM0wLQEbEAKMuOgQRcxC1b0BGrxX4pVxb oB0n4Klh+3OCc2W+rqWIkZId+W5YVATpZIVtKTfy3EXhvm2Hd0cukD5duhB0Ckut8qWO pOn4KP8cIaG30MhTfh5IL9KreVxYO4q9cvMV4snyDR7Xt5LIwo643JvjzfitBtWFL1sc UBjaigrr8bWD9BHR99BkV7Q/oXYB5jIg1DqLue0uzyF1pHC8OeoH+Y/+NgySLb3k+Xsc OxWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=g6ggxEtG; 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 z6-20020aa79906000000b006391322d3f8si8136580pff.375.2023.05.28.10.36.48; Sun, 28 May 2023 10:37:02 -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=g6ggxEtG; 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 S229628AbjE1RgN (ORCPT + 99 others); Sun, 28 May 2023 13:36:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbjE1RgK (ORCPT ); Sun, 28 May 2023 13:36:10 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D7C4CF for ; Sun, 28 May 2023 10:36:05 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-30ae7cc0e86so575573f8f.1 for ; Sun, 28 May 2023 10:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1685295363; x=1687887363; 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=Gw5Qo+KgJFEsvwVTc4nzprJkJaDeXrbywxB/oWvh/40=; b=g6ggxEtGVEtUCktAAhTgXY3WVZk1YMCG1UgXrLSNHm58s7+ASvPprSVWRIYVvaoTEy jWJaBEk62igYLdKu6NMhExmstadX52pSZZ4C7P17urQqKz6vrHQgZfFFyTzkmwcbC6iC N32nUEMfi1vjQC7lnLw3o3xNccWCb7GCnjWhZDndpp1jZV0mTKMB2uu71mBaJxoOGeSU 5n7dxkjAoL3SjhHmts0+D7Bw1P3/OiJDomd7LCwr900M/fJf2pUTkunlPncWbh4jNqLQ BphtUD5VSq7l2P9MjaPJyh+0bYjT+3yAG51sg/7pGGrIP7HQ6zvU2/P2Lo20/4pAwHXf 7UqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685295363; x=1687887363; 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=Gw5Qo+KgJFEsvwVTc4nzprJkJaDeXrbywxB/oWvh/40=; b=f4qplBQqm4eb1oPcUs7+l/OA0zD5nbXTczHrgPXWfF+Vl1bTOTltuBmUSMsZJ2s3pM sAxF45ofkIgPkjz/+3kAfqIYvouXReIkZUoXqezJLZWShD/8PB4TN5o09jZjNRWwDnDb E3g+L8cOCljmjGqzJK2i3Gr3YhLjrvvxcsxwhhQGYxOaWeEpUgYesXNlJkbqASv+xOJv eV2omTEtP2Cv6npfll/VF+4Sxxw2Dy4dMVHMvFo4zFV709awZkKVsMDnlbKiK4EVrVpO p+LdtHDciHOrTzT1is6euaLLBCw/sU5L6aq+kVBRwywhfQIjzIJ1CI7kmTw0kLiSSA8D f+0w== X-Gm-Message-State: AC+VfDwaZafVnPUoJVh3gh7QmmzxgNB4OF7gVIVk7PkQxQP3pLw2xH57 5mqWk+l6CaOzPkOg+K28BlIe/w== X-Received: by 2002:a5d:5750:0:b0:306:2d32:8ec with SMTP id q16-20020a5d5750000000b003062d3208ecmr7086294wrw.6.1685295363515; Sun, 28 May 2023 10:36:03 -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 z10-20020a7bc7ca000000b003f602e2b653sm15334523wmk.28.2023.05.28.10.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 10:36:03 -0700 (PDT) From: Matthieu Baerts Date: Sun, 28 May 2023 19:35:26 +0200 Subject: [PATCH net 1/8] selftests: mptcp: join: avoid using 'cmp --bytes' MIME-Version: 1.0 Message-Id: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-1-a32d85577fc6@tessares.net> References: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> In-Reply-To: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Christoph Paasch , Florian Westphal , Davide Caratti , Kishen Maloor Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2362; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=N4Z8l0nJwYTCI5X9SpYQxTwd5KLfEUZJxihQPgZ+eIM=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkc5EAU38GHrb57SA9i8biGZvD1yosPf830vFU2 kNgxETB4qKJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZHORAAAKCRD2t4JPQmmg c3bhD/0eOYcaxbZo7nEfJcBVAs+tJ4IXpv3FvVHmUn1/aOVTceLeAgNO9teozN+LIZ6DTcF3FJw PsYvgKYNjVZFNTwNyGB1me7fYFhNOF0/AepoFgzv9MUlmINpeApdQjJ84g8zIbYIaCR464jIc4S ylLC8+NVxllBuGfyHaoVdrJWkq3LzcqlMzFfZWs8Z+c0VboUCkQGpw4JYSkInm9u4ugTevn7dBz f4K0S5TemszQUD11oShZvdx4Pzghwzr3cgO/SZAYzDP1a+bZp0uj+04I/7wulcnw/BNpBtrXSlT /Aj4ljycP8NOPEWlXYbfGWfs54hFEQ5CB4DCCH1dd90c9uTAzfWDvgAO5gO3inzJ5JJUmlYcOCO TV8nZ1QXdGKm1GCcUblvih6l+1Hdmy/RbNxKLUjQnR3vCEiy7VVuoaFTdjHpZ8ixQp841FlkJ0C If703hO+3ie610NIOkio/IFhJPiLzQ6Rjd5B5y/Id7sO99HgpbA/QIxOGUWKBlGcAD8TRz5KcYJ c+seEmeEGca3KBpdEIXxxSWllM85xiTpMEhuPVKSM5+HKIADsUIoJQTex5h/lNS6WGYTAElLfGW PnqrIrJqXqel/v/6auE+dW5kd8x+/6VwiS00tuKXxqsW6eNmQONt8sHd0ZNIbK7Z4lvDejcBzEv vS7pEhMJCUW8pRg== 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 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767160333020170479?= X-GMAIL-MSGID: =?utf-8?q?1767160333020170479?= BusyBox's 'cmp' command doesn't support the '--bytes' parameter. Some CIs -- i.e. LKFT -- use BusyBox and have the mptcp_join.sh test failing [1] because their 'cmp' command doesn't support this '--bytes' option: cmp: unrecognized option '--bytes=1024' BusyBox v1.35.0 () multi-call binary. Usage: cmp [-ls] [-n NUM] FILE1 [FILE2] Instead, 'head --bytes' can be used as this option is supported by BusyBox. A temporary file is needed for this operation. Because it is apparently quite common to use BusyBox, it is certainly better to backport this fix to impacted kernels. Fixes: 6bf41020b72b ("selftests: mptcp: update and extend fastclose test-cases") Cc: stable@vger.kernel.org Link: https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.3-rc5-5-g148341f0a2f5/testrun/16088933/suite/kselftest-net-mptcp/test/net_mptcp_userspace_pm_sh/log [1] Suggested-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 26310c17b4c6..4f3fe45f8f71 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -17,6 +17,7 @@ sout="" cin="" cinfail="" cinsent="" +tmpfile="" cout="" capout="" ns1="" @@ -175,6 +176,7 @@ cleanup() { rm -f "$cin" "$cout" "$sinfail" rm -f "$sin" "$sout" "$cinsent" "$cinfail" + rm -f "$tmpfile" rm -rf $evts_ns1 $evts_ns2 cleanup_partial } @@ -383,9 +385,16 @@ check_transfer() fail_test return 1 fi - bytes="--bytes=${bytes}" + + # note: BusyBox's "cmp" command doesn't support --bytes + tmpfile=$(mktemp) + head --bytes="$bytes" "$in" > "$tmpfile" + mv "$tmpfile" "$in" + head --bytes="$bytes" "$out" > "$tmpfile" + mv "$tmpfile" "$out" + tmpfile="" fi - cmp -l "$in" "$out" ${bytes} | while read -r i a b; do + cmp -l "$in" "$out" | while read -r i a b; do local sum=$((0${a} + 0${b})) if [ $check_invert -eq 0 ] || [ $sum -ne $((0xff)) ]; then echo "[ FAIL ] $what does not match (in, out):" From patchwork Sun May 28 17:35:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 99915 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1068639vqr; Sun, 28 May 2023 10:37:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5nClY+Dl6MbNUfZ/9vxbBUkjDMv/TVM+WpbIbj9LpMEf1euJktqaryMLlQg9k4typqV0+q X-Received: by 2002:a17:902:c946:b0:1af:d9d2:a234 with SMTP id i6-20020a170902c94600b001afd9d2a234mr9653221pla.3.1685295430845; Sun, 28 May 2023 10:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685295430; cv=none; d=google.com; s=arc-20160816; b=Wye98H6/ZIHVxZTAGAcnY0wQzj1T8TMO18debB5/kwEi8Mkbs16t4XKm6sR957iK8h NObhU3BZWjrqhkElTTNQqHs8ljAfz9aqeBLbgEI9dQRe7V9JUm4mWJqXXJBZ6V44tpmy h+o/jh4WRFhVfwbWdi0S6ERi/jnLnMWGIU11GpeQkRkBOJC6auhntI7C82Ict1cKbx4e vEgLA8ZBrbBdlL4ly4reWp0lBWv9kxLHPbr99sHk6X/b3LttGd0SbsACi3CsUS9lwt7O 1q1fSUalg/1qSELpTj1kIWYuI0OHx9clvk0PJuv5W+C+SslK+lZ0MyX9lA8Va/O3VKKC OiGQ== 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=s3hOp7A+/gdKa6ceniwP9XCSV18QbyWs0ktuK5d8pCE=; b=KZ1q08d9jm5elMje+uGB73SK4LO69wrqRkN44VbIV8EEt5WnuyAkMXzs7Mjm/D54TC 3D54eWa0C/VW4FKPhRvmN/JbDwkqbfBPindVCJ6K7HofH1BQzE47N5T4VZjY1o3g7EvR zuOT/FlMC+49ArwZomfOKxHp6h6ETW44onrdKAUSvSVtkfQaWXlmaK3PZRA5JdiGqAmH KyFUP3NoUzkY6Tc07SXKgBNF4dGXXzMqE866b7TQLU09sy0GbVhcKwnb3Q+3IG0B4KRw O4hAiTy+X/HsxvQpojgiMA4yMuWDG1Kf/VIVGOcT/NWK88AIt+1zG9V7HBpGJZfAWBAA QqAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=ARSKmT8J; 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 u17-20020a170903125100b001aafc5b5ca3si8482867plh.524.2023.05.28.10.36.56; Sun, 28 May 2023 10:37:10 -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=ARSKmT8J; 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 S229677AbjE1RgT (ORCPT + 99 others); Sun, 28 May 2023 13:36:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229651AbjE1RgN (ORCPT ); Sun, 28 May 2023 13:36:13 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23D41DC for ; Sun, 28 May 2023 10:36:06 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-30789a4c537so1438795f8f.0 for ; Sun, 28 May 2023 10:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1685295364; x=1687887364; 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=s3hOp7A+/gdKa6ceniwP9XCSV18QbyWs0ktuK5d8pCE=; b=ARSKmT8Ji7mM694G9E9aohgiCCCxneu6cztqGv5MbAuZ+/k+fo3TYqQ+ingoTubU0t jO9+Tv+TzYWk5unmVa8Df20sZFMen9ZdLvBVzRg2mmAjveVqMUYcwL3i4ZXLnUliamoz vNLmDrv7sMsMEU/lcbvzCLFDNPF/k9Tn4AtFwdDjFVT4nAmGU9/awBD+BGrEsNPR2Brt KajrCx/dcKuOgML/dYwpf0dJPVRxX/WSRBgjZNE1DIwnTlQXxkXwJcPxCyKzDys6qg+q qcUSZrfzISyWEjbP0rUMB6prjGyOt0n4NQnr+PyYVLHOtdaphx+769Ft4afpdnb5Ec3z nzPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685295364; x=1687887364; 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=s3hOp7A+/gdKa6ceniwP9XCSV18QbyWs0ktuK5d8pCE=; b=KjhcZmqshqKu85ihbeDj77SvdIDPL5cJESeVItufHPDQgKV+NzMDGcezQT7fDA7x/i V6DjXPYUXj1tRWcaLp9KcqZjG7P31GbcgEbHducHBDZh/opHAXGZZsIxjfDegMJJXQfI uClMjkpWBn4Z+4yuqYwsosZ1dAfMK5FeYFmyTA/8uUy5OGURbbc8rRuDPKfro0/upDxl yICE0IxqGhzo1MqiiGBgVnxB1HlmdahC6rU7bI1hrl+4CGTkKlrOWLD5s2gJVnnPBZqh jgBWdFDTjbr6hY9c7AsMwUJxdJzLW3qLaBZsdwflhL8EPLLDVocDRl+KL3r9A/O4AJUu coBA== X-Gm-Message-State: AC+VfDxyrspJtOlMyz7UrigMqpkoGVyTWvzOurr7cMUDmjEEssGfibff AsOpPObBs/rwRnLrqREJZms8XQ== X-Received: by 2002:adf:fd8d:0:b0:30a:dff0:7bac with SMTP id d13-20020adffd8d000000b0030adff07bacmr6083933wrr.30.1685295364602; Sun, 28 May 2023 10:36:04 -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 z10-20020a7bc7ca000000b003f602e2b653sm15334523wmk.28.2023.05.28.10.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 10:36:04 -0700 (PDT) From: Matthieu Baerts Date: Sun, 28 May 2023 19:35:27 +0200 Subject: [PATCH net 2/8] selftests: mptcp: connect: skip if MPTCP is not supported MIME-Version: 1.0 Message-Id: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-2-a32d85577fc6@tessares.net> References: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> In-Reply-To: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Christoph Paasch , Florian Westphal , Davide Caratti , Kishen Maloor Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3373; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=nA2G9Gp6t/Qi7hdZXemZ3CUHfQrooppvVjw4SfeTdgM=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkc5EAjivNWBqEV1EeGg+AXKQ47OeysRwmBS9Wo Dx5NgDv59+JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZHORAAAKCRD2t4JPQmmg czpkEADvdWy4AgG9umn2F8syDixF6Zv7mtOEVs+4v1yt3GBqmSmoBrbk8xiXb+p7wSu3HbXMNaT MOUgvPnvbC3Mbz/1f4U6kIF7rl4s5qwY5BVMmE4Jk0+IEtxJosaHkf/LFG2M4RAAXznVQh7Mqmz XJyC+U2zOSYFb5WTz1mDerVQ9l8VvCrwCrRGQhwfpPnmkcl24AKMfZ9/62O4nZM98PHdRfiA4tG kz8My0w8R2hcWBYN48dEv+P0xUH9vPFg1v2fEQIZGMrgMVX1pH5+0/nC68zfHUqBM/q+P1C0PYW mr8SDROB9k+xVkd3KPgYNHMn/cogQncuAlELwjS4ngCw112/XoQbBCu8vRZcJQvRWu8X/0IfvOk iH7viP9+KWiAg54dvNOsCzIwYTs74do60FAknvovLtoQzkplZHQLOgE4CRL2vvHTWQVS8kRhYJk /vnQl3Z0cSmewYNjYCSaCaI6HUN1rM8rvYeLpH6EzF+++NJA50/m3amzYHJGmtAkvfjFrWUYL1h cEcLEQF7qkwmER/fct4kDrcpAERTEbfPhwdZ8eAt3mual6gNWl6AosRglPN5ilSvX61toYeqaXT 0Q4TQnYmSZgm6FJWQIE4mVSH+xyGUNp4NVgdgAZgZJxwwQQHfsr9hMTaJvzMEaGTxJ4K49mLcpR jaZvUWoMLGk99mQ== 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 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767160342011111005?= X-GMAIL-MSGID: =?utf-8?q?1767160342011111005?= Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Note that this check can also mark the test as failed if 'SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES' env var is set to 1: by doing that, we can make sure a test is not being skipped by mistake. A new shared file is added here to be able to re-used the same check in the different selftests we have. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 048d19d444be ("mptcp: add basic kselftest for mptcp") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/Makefile | 2 +- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 4 +++ tools/testing/selftests/net/mptcp/mptcp_lib.sh | 40 ++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile index 43a723626126..7b936a926859 100644 --- a/tools/testing/selftests/net/mptcp/Makefile +++ b/tools/testing/selftests/net/mptcp/Makefile @@ -9,7 +9,7 @@ TEST_PROGS := mptcp_connect.sh pm_netlink.sh mptcp_join.sh diag.sh \ TEST_GEN_FILES = mptcp_connect pm_nl_ctl mptcp_sockopt mptcp_inq -TEST_FILES := settings +TEST_FILES := mptcp_lib.sh settings EXTRA_CLEAN := *.pcap diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index a43d3e2f59bb..c1f7bac19942 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -1,6 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +. "$(dirname "${0}")/mptcp_lib.sh" + time_start=$(date +%s) optstring="S:R:d:e:l:r:h4cm:f:tC" @@ -141,6 +143,8 @@ cleanup() done } +mptcp_lib_check_mptcp + ip -Version > /dev/null 2>&1 if [ $? -ne 0 ];then echo "SKIP: Could not run test without ip tool" diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh new file mode 100644 index 000000000000..3286536b79d5 --- /dev/null +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh @@ -0,0 +1,40 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 + +readonly KSFT_FAIL=1 +readonly KSFT_SKIP=4 + +# SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES env var can be set when validating all +# features using the last version of the kernel and the selftests to make sure +# a test is not being skipped by mistake. +mptcp_lib_expect_all_features() { + [ "${SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES:-}" = "1" ] +} + +# $1: msg +mptcp_lib_fail_if_expected_feature() { + if mptcp_lib_expect_all_features; then + echo "ERROR: missing feature: ${*}" + exit ${KSFT_FAIL} + fi + + return 1 +} + +# $1: file +mptcp_lib_has_file() { + local f="${1}" + + if [ -f "${f}" ]; then + return 0 + fi + + mptcp_lib_fail_if_expected_feature "${f} file not found" +} + +mptcp_lib_check_mptcp() { + if ! mptcp_lib_has_file "/proc/sys/net/mptcp/enabled"; then + echo "SKIP: MPTCP support is not available" + exit ${KSFT_SKIP} + fi +} From patchwork Sun May 28 17:35:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 99920 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1070669vqr; Sun, 28 May 2023 10:43:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ywi7u9HJOrUMxA3nl8kM26DmsxxFpat19WlMgPq2kWgM2c1CJpWIoAbtV90Ce70SS5+Mc X-Received: by 2002:a17:903:41c3:b0:1ae:4a0b:5957 with SMTP id u3-20020a17090341c300b001ae4a0b5957mr11047235ple.54.1685295812840; Sun, 28 May 2023 10:43:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685295812; cv=none; d=google.com; s=arc-20160816; b=sEB4dr+EWr5QjZbtdjZ9hBUlg/trDo0nr/7hL1Kbo3/csa3B5qrkX9/aUoWAkiCdF5 t4uPhv/dN8fxg0XnibbrJgHm7WsZUCOxWpE/UHQiv0VgEkai6k0+bC4dUc56kXlJ9OCe CJAkCQGFHraGIKSSQnOs+siRwCPHogmRUVajlArMtv2n/W++iKHv2TZ3TeWtcR8bp4up SqkJKiFPAtDtup+vCVKiJmmL2RsNLWOve21uvheKGAuajLRh0Z7GHP/oddGB8zOTddQb Buee0YVaa3xF/s4CiPOL4OBzsUysxIXrvX0V8WFS6TNF8/7ttbRz2ckPB6DMm2M9yFUT /bJg== 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=yejeJuBSt+D3FgC1LjNPeG+dJYpbJqtooI8scLwtIN4=; b=INuZNRpX5ukFDXamu2TQunCvvms5e+xWyjZIHpa0ZAEkVNrdHfBga7WyrmIJn68eAd 8oOAX0sX7Ae7k27oRMX9brdDhrcjgBh4u6BkH4yWlJNgKlmwDtCGYD9Fr4bzT5d32AZF Z/13mrAT6QiwGxk3gRack3BM9aErL1Au79hE/B+V48hOd472FJZLm33CIuq23Dxez79z G0w+0QVaBsm7JgYOoC2S0m//NIuB/ePja9Ib8n+ynWNyR+COFoiUTFRBhS9iZiQCttt9 T0+jR1u7Jva1hjUG/KhhTBfDGYT8wWXzuJgqaYwIeZsh7MTBZb6S+269PBHaJERjgR+A D1Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b="eD/qEuL7"; 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 m23-20020a170902bb9700b001a50dcd10c2si7724370pls.247.2023.05.28.10.43.20; Sun, 28 May 2023 10:43: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="eD/qEuL7"; 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 S229659AbjE1RgW (ORCPT + 99 others); Sun, 28 May 2023 13:36:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229658AbjE1RgR (ORCPT ); Sun, 28 May 2023 13:36:17 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E106E1 for ; Sun, 28 May 2023 10:36:07 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-3f6094cb2ebso16560495e9.3 for ; Sun, 28 May 2023 10:36:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1685295365; x=1687887365; 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=yejeJuBSt+D3FgC1LjNPeG+dJYpbJqtooI8scLwtIN4=; b=eD/qEuL79GN8tB8avqp9pE04vjjOZUEvY4jSmQjkSHthOSvGpYn8pcsr37VZTuZ9i9 etUOwsVyTj8fQ/ysbGKL6ULlXG3l+FOJe9wEwvLm+x+XNtX03lzMKGvAdOqO3Ed1B6Te b5IexFVNcMHNCbYhcpzttk9QpSfpWW4aL5515RKB7Cp+lZQ21yT3qClFgET2n9I6mgg+ gFBu4jCxmIhmiJNDS+DChU0EgZz1yMx3tqRWTizJCP4K9Jm9UW+OkhT0zFssIKIXi1es 5Hii5YLhoNYZ2xUJKvZ9Fb24ZRUF68oFVbWAykcGONPU+riDpR01KTHCwMTFA0ZyFdyx ZEmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685295365; x=1687887365; 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=yejeJuBSt+D3FgC1LjNPeG+dJYpbJqtooI8scLwtIN4=; b=GKIVx/yrdHYCzoJpPgwAuzXmV8LqRgrbalVyycD+BjVO/SNf08RpbtgdAR34AmQlQX BQ3VeNrDYjvD3gV8dyaooNwH7XFw+2YuZlsuR1YOYoN7ZWTM9ae8GLnVtJqy8VyzZPyw QtqfyVwy5k8pVOOvvywW+mYdZ2PsIe0vWsb51aPrZibaCm53TfARnn0qzid/Br7sj7U6 01wv1FCPJE/K1hEuARMgHO+M9z/7UThWk/2nhpQLfMYZjqyC21cHQ1u70JaFFSCx8+zb XsE+zyWY8NZHeFFcvSWFbxM+mTdjjaxo+nk+q0zBk4loNfXjQkULNZ3xFschPHC4SvLi VY2w== X-Gm-Message-State: AC+VfDw6xvYQo10qpgTeYOCRlCI2wxXpdbPvo4Y/oweCiP9VCbw5eZHP F+4/G2AT0yWnXLDiQHAjki5Nqg== X-Received: by 2002:a7b:c058:0:b0:3f4:2bb3:a5c9 with SMTP id u24-20020a7bc058000000b003f42bb3a5c9mr8194128wmc.8.1685295365690; Sun, 28 May 2023 10:36:05 -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 z10-20020a7bc7ca000000b003f602e2b653sm15334523wmk.28.2023.05.28.10.36.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 10:36:05 -0700 (PDT) From: Matthieu Baerts Date: Sun, 28 May 2023 19:35:28 +0200 Subject: [PATCH net 3/8] selftests: mptcp: pm nl: skip if MPTCP is not supported MIME-Version: 1.0 Message-Id: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-3-a32d85577fc6@tessares.net> References: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> In-Reply-To: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Christoph Paasch , Florian Westphal , Davide Caratti , Kishen Maloor Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1180; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=tPfgNXcbGxjjigcC15QgaIpP9qgezD0npYcEzdUe0K4=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkc5EAqrtp68GHwFx1tEZAaK+guHZ+yfGRfd+/T 1SfzH5iUrWJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZHORAAAKCRD2t4JPQmmg c/vtD/0Y66v71A4hyVzVrUApbKDsorh2KklzRJFGUG9nRZPGbAKJH1A+Q7e5u1RlW5g42px05n0 kux0by6ETPv9BOpZAPq1l3R7sMfpBgYD2UCC3Z51gBq0fzb59IemlzHQzCXvAt8G+qKyKgrhK4p ac2J6ESDlIvOVJLHgAsrRwm+UIteYmwiRn8SzH1MyzHAd1qK/NhlosqOvLf4yjB5HBs0jcXu/tK eCy5Olv81clL8VTy2rVJ4JHjgDumZ0kA/OnyFTld+wkcnxIE6qJwfdM265vCJCIMpvE+3xzMKww NqDEKWG/tryCeAjHJ3exhwT6lLtpL3X7H/IMIewhdsyyTl7THyxLRVljoXOqY2nc4Zc1sALziyM o4jWBG81Cv3eRjDeofbOg5MXIzp44IDXrvo1qhZASQvACemEH9Ebr8HINJaTSxyl/H3hRvPvkQx wfdR1zMMOuUNxa2T8oJdHAKCmXTO5VZr2mB2hS1PGXKYdiExzQk2ZfeuNQhAW5o7w7t3pKJ373k Ws5K22eTkowiiKr3hfmrqi7Yr4zodYabHSIrXJ2ZRntFbglfHhdN3pgmwfXdZNoVza/38oKR2dm Tb6tod7L5uP35oNrYif2zvv03UyQIeZgp9BmEdJBQo/huIBUGvepG/YJenk+5GmguMxhoH2Fpjb LoTp5Anc0c6MB0Q== 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 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767160742535426551?= X-GMAIL-MSGID: =?utf-8?q?1767160742535426551?= Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: eedbc685321b ("selftests: add PM netlink functional tests") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/pm_netlink.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/pm_netlink.sh b/tools/testing/selftests/net/mptcp/pm_netlink.sh index 89839d1ff9d8..32f7533e0919 100755 --- a/tools/testing/selftests/net/mptcp/pm_netlink.sh +++ b/tools/testing/selftests/net/mptcp/pm_netlink.sh @@ -1,6 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +. "$(dirname "${0}")/mptcp_lib.sh" + ksft_skip=4 ret=0 @@ -34,6 +36,8 @@ cleanup() ip netns del $ns1 } +mptcp_lib_check_mptcp + ip -Version > /dev/null 2>&1 if [ $? -ne 0 ];then echo "SKIP: Could not run test without ip tool" From patchwork Sun May 28 17:35:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 99921 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1071024vqr; Sun, 28 May 2023 10:44:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ686a5yED6GVKSaz+YIoCHVDoH2RZbHtF5Usz/ztWVY2lR9Sd00FBkCAO6Gy8t0euyW9TK7 X-Received: by 2002:a17:90a:9c0e:b0:256:6167:c725 with SMTP id h14-20020a17090a9c0e00b002566167c725mr2631149pjp.6.1685295876256; Sun, 28 May 2023 10:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685295876; cv=none; d=google.com; s=arc-20160816; b=c5zO613fRIlVOweaLQBnT6p9AWTo+KOPjr0uqj756xnaNQGUbqrZe7PRjn6ytudF5H aa+7DIw4cyekzEZtht1s3xUqXJctPf1vNfDGm2YNBoiW35fcZUpXxDBdK7MEZQG8wVPU LiBKXb44Jnab0AeRI/A7UZVGVnRiSlW3B+7NJcUBI7x2/gE2GhqcvJMk5xc56jqzITLR 8CWWqOmAcRPlsn457UaatWCRgfCI3xyl9YipzRQwGwB7OzJEr376NJwvaiblBK6gWgCt j+vksOQ71QYgnSigYayJQV4H7ZwzAgu6jDhz4hCLGTy1HIR3E9OnjMjxh+EKdSQ7pU4e zqxA== 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=q6K6x3Lobx0QTfuXnuqsexfdlQfCdQatiGE2P4TfjVI=; b=KhI1K571n2Jt5s0nGH/07OUJckPPdiq+pAPl9QDrijUUB+m/F0XbLi+PnuLjguMKpQ coYSrAO7m3PgbpsscnDnPul8G4OV2tgAVtKFu9/1htUaDzJdBGRuVvxJRLUXeGo2ConZ wC08h/Q6LU0Rjwqhc8Li0sJ+fnf8lLBselHHLXtPqFXyDdQMw6Kryu1w9bkt9xcsQuz9 lP1cSqmx+UJeB5kKClP68WzZ+sOZFZL8mccBWZ4+TrWTdwM+mgPea6no5LvufSo5iQqJ 4H3TiuQO8RkPL13Cq49hgnA4ym/xHQGE9CmrT9ub9x80qW1cihYp1KGLkr+bEVM7+/BQ T8BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=1QNqfwAj; 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 hg14-20020a17090b300e00b0024e4df1b2e3si3889188pjb.123.2023.05.28.10.44.22; Sun, 28 May 2023 10:44:36 -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=1QNqfwAj; 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 S229759AbjE1Rg0 (ORCPT + 99 others); Sun, 28 May 2023 13:36:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229660AbjE1RgS (ORCPT ); Sun, 28 May 2023 13:36:18 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B8C4F4 for ; Sun, 28 May 2023 10:36:08 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3f606a80d34so16940125e9.0 for ; Sun, 28 May 2023 10:36:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1685295367; x=1687887367; 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=q6K6x3Lobx0QTfuXnuqsexfdlQfCdQatiGE2P4TfjVI=; b=1QNqfwAjXGQ8lj2nB5KIJEJmvxLxHIYpQbxUVsUqP2hXYqLY8YF9bWvlvDvJJvniZw +7IVEf62g1bXPANco6ACu2HGPUdYUwFbmCSbLsIMTOnkIN3ExZi0j/hWxI/pX1Xn/8A3 0PvzI/vfNHo/wqbMyyqoclkFtL1XSiI/+QtjbB2D9LiUQxZaODS+5bHkg2inokEhv0RB SLjA5tdQ7CZ7ZkzC1CB8qQceNwzQKgPRQvkKFczsDal10uZQ4lHZTq3d3lWnKg8UPVZW jhG3WifxxGHGRfKJFbzmAWRNtYTYfRFSRDg7DRrrIE+vil1Kqs5tBx1qPg1n5B3Fjaqa xb5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685295367; x=1687887367; 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=q6K6x3Lobx0QTfuXnuqsexfdlQfCdQatiGE2P4TfjVI=; b=kRmpMJiwDAmASagOFlPq8oRY9z8qRerSKMwvqFE4T+NAd4p6VEsKpYIG6v6mMYnqxV ujdrrm1q86bYYfRnJTDFvnuE75hGytD1r1bHAWmq4jQlMs3QrrraJISDKpzSB8C6LCtp lwQjNZZYigEL/NHKA9cjee7nypRYEgYyFaMV8I5e3bELo1mwfl4Zt6cCsqf8Ij2woFyK dpyhfVJTvNjXixlz7S4wgcMwg+EJEmjN3x1duXHfcxIPCR7qOfSppG5XLgwe5U31Ebdx hds4bpr9ZWDsKH6mYNf5K5Kf5uOrI04Ojxd7molHPK/HbL5hPdJnNimHaqE1zbNVI9Q6 V2wg== X-Gm-Message-State: AC+VfDxObe3gzNb2AKiUq5CamIfLOjrEmDMaci8Uer4TwanpsmiucIXV naO1Nb6uh6HAt/qZvpKXNTg2vQ== X-Received: by 2002:a7b:cd89:0:b0:3f6:4ca:479a with SMTP id y9-20020a7bcd89000000b003f604ca479amr6674402wmj.21.1685295366744; Sun, 28 May 2023 10:36:06 -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 z10-20020a7bc7ca000000b003f602e2b653sm15334523wmk.28.2023.05.28.10.36.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 10:36:06 -0700 (PDT) From: Matthieu Baerts Date: Sun, 28 May 2023 19:35:29 +0200 Subject: [PATCH net 4/8] selftests: mptcp: join: skip if MPTCP is not supported MIME-Version: 1.0 Message-Id: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-4-a32d85577fc6@tessares.net> References: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> In-Reply-To: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Christoph Paasch , Florian Westphal , Davide Caratti , Kishen Maloor Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1255; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=SsOVrl07HCP7CyVkUoTtr6mVX+4hyXcjlT17Oj+pCOc=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkc5EAs5z14UH5i9SlXEU/9nZD+c+nJpPDVd5gA 5kFmMOf3q6JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZHORAAAKCRD2t4JPQmmg c0NhD/9X52SIPSCiXlegDZgEHVwg+6nivyNN7FOPblEzYOK7A3anDzDzxWD9MJNysOx+s0BSk3/ gnAaKJC82nShOtmRhwqhCMt1OGTZaDXTPg6fzWWIeX9qaQMwTxRTfXMO46lKJzSByKV+r7Ah8h6 9w871ERRkVAQnSXHj6cPToI64Sxp8Zs3Jxc/A8gqY3vJ1csYojcYHh4QCGvAc88pNLVPbsw45kV 5JbfJlvyv/JQySCQsywmXrfEYmCS0PG2LoQWQgUWRsCY82zeKtxeOldOPcVhvz4o+wQJBS4ttIF F1us8YaJZlUiLt/NWaFBWBoc1QDluWwG4mMqT0c7X0YFmSDutMyMutdEosQr8ff/7M9MJSM+H9A xkceWuQhFp24c7SrCWQ10Dq5NqsdaqRLPJLKaQbNcriVsbRQZvvDCWMMSUsv8MW8HsWZY3grBpn 4w9pbqILgEfrM6gSQppKROp4B/M40zgBvEPuhtg1fb/43+xWBMzL4m39JhaeGpx8DH6UYShSk5w ffsUbi15v1jqDcqnTjUqtVxNKGzjv24Ayk0dlGxPJxMEz5BvpALpvy3H80ElskzrZBVTqIr3/Fq I9k+pqNXmmNTZrOUM2iEKpUM9P91M8+pkfXdrGze+g5bSIjGbTtqIeLTumGGF1upN6+AuzfQxkL wd/fWhaRoN7lzdg== 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 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767160808774117810?= X-GMAIL-MSGID: =?utf-8?q?1767160808774117810?= Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: b08fbf241064 ("selftests: add test-cases for MPTCP MP_JOIN") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 4f3fe45f8f71..96f63172b8fe 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -10,6 +10,8 @@ # because it's invoked by variable name, see how the "tests" array is used #shellcheck disable=SC2317 +. "$(dirname "${0}")/mptcp_lib.sh" + ret=0 sin="" sinfail="" @@ -137,6 +139,8 @@ cleanup_partial() check_tools() { + mptcp_lib_check_mptcp + if ! ip -Version &> /dev/null; then echo "SKIP: Could not run test without ip tool" exit $ksft_skip From patchwork Sun May 28 17:35:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 99916 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1068789vqr; Sun, 28 May 2023 10:37:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4SxFAKjHXkw2ZXrv5z6A5ifCfg0XPXT5Xi6T6h4jhz764mRGc2azVYcTkTlKaN69x14VQF X-Received: by 2002:a17:902:e80b:b0:1b0:38d2:3ce1 with SMTP id u11-20020a170902e80b00b001b038d23ce1mr2812258plg.58.1685295454778; Sun, 28 May 2023 10:37:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685295454; cv=none; d=google.com; s=arc-20160816; b=n5f6JVUyEW/NPPrx5mBOHsJItgNRmZXqaJCVfT66ArfFPN8Fr8KKgxZuxApNE8Xziy uqPYRKHUWG12Zq4XXdpFu/6yclXOyt1cnHDvk8RVWG53UWCOGsBv8A+emXcCLB63sWjH /sElQ5pvty9JglkDJkIUipRneMR+jI6W5S7OkyX8nogUVKdOd8uJM+bEYLHDRPlu7UAv QZxvGsIGy78nkZzeDCyh4Y8heUWPaGt5sS/twjPc1rt8fLXGdoCfa9XZWq2x2KQUpMcl Cqntexvri46MzflxLfmeeuDW0VHwE26u5ZmbNPpB5dyjtTCLvJsFFY3pMyAm3UJTsRv6 K3Rg== 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=AX0sr/PbmfXMRT0E3FKR7vPpjL8rwaKTtVDAJqhMqgY=; b=YXx4zx4fv+rHiJVhhZj/vyujIRbGIIDtIb1SJVCuQV7NHbphynChXZy7dT39kHk35u 6a4prkOHDsK1OZcg6cJm0WZgoo+HUTQeUyH+lh8icG2PRpUvBttt5nfMUOCPPPpCCB6M /ZvemZqagvBg7gF6R5tRa8ihnTVp7SQt5klwUMeg6uNq8OKyRG9/XzYgH3VRuju2yUkC LTm63RA/8h5+3XlY4ptATtN/Gpgx1x6vH1eHsy96CIM2/iVD9IdoT9TuoX7tpCu0rImD 2taEKHjENgxUUEfalLzqkHbQIqSFJAXGm8QDIsG5rxCIoo9OTodepVfTrP4Fr7gxUvAr AqJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=EY+2YTKv; 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 c11-20020a170902848b00b001a29280c544si7927852plo.263.2023.05.28.10.37.20; Sun, 28 May 2023 10:37:34 -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=EY+2YTKv; 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 S229764AbjE1Rg3 (ORCPT + 99 others); Sun, 28 May 2023 13:36:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229673AbjE1RgT (ORCPT ); Sun, 28 May 2023 13:36:19 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5866BFE for ; Sun, 28 May 2023 10:36:09 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-30a1fdde3d6so2492036f8f.0 for ; Sun, 28 May 2023 10:36:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1685295368; x=1687887368; 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=AX0sr/PbmfXMRT0E3FKR7vPpjL8rwaKTtVDAJqhMqgY=; b=EY+2YTKvShTyvWZoi+qEzRbIh7STaLYSxenN389oH5pyQ3B+M6jSpEI8GNpm5CpraP 09RcCudi4w5jNwK0MOlckZAwUlm3hacHFR2OmuNNhyTHNaHquEseO6Ua2wNKnOf7z8vk 0CQjiXnQ/ulYYqxXYEuZqqg3QynYsLTFWrf+qBfEj5MMiGGAuDhGJOato0aChAVOWYmY FBAXMmloa0jrqH7V01MYLn0CyzCw0qOqqxWAvMCn/A76Wmh19/J4Z3BLwlcTCizWspqZ bp9zeWc+d9MSA1swO9j8agu031xbqLLEpAZC/aHWFh5TUsD1PZUELh/BQfcLoWRRoXif Nhyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685295368; x=1687887368; 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=AX0sr/PbmfXMRT0E3FKR7vPpjL8rwaKTtVDAJqhMqgY=; b=SeBIUM2mkEgFTi5ddG3KVWDgqGPVJyU6gL6Km/A2xu6k5rqa3uRYfm4pC3eD+G7bTB 7y22r4fAXlbfFIE9Fh7y9pc5k8R00oRcItB4BGzofRmwEhxRhJWN5HXe8Q7UkckxEgBv 3b7AEYCJeOvrJKObUKMbe7zEU796O3e9ABY/l8XHxTqz7xyCm1EGNhOpL55CYamMrbJf ZBzq5CN1rSB/oEDPqNfPuOpSpx3z5a0+0sjJDjLeY9H97yABelDnCvzD8ugg6vpwRKFT tYq+W0cNGyPErmlcaF79byz+TVWcxvWASGGI4xJ8OvuT+lMgXZIJS6J2zbRza7FU3Dqf m3vQ== X-Gm-Message-State: AC+VfDz2OCVl61SFr8usXMilhWptTKSKz2JPnlSL294I/wgS77HiNO5h JKWpOcH05e1S6HQ6D5vFvdWK+g== X-Received: by 2002:a5d:4ac6:0:b0:309:54b6:33b0 with SMTP id y6-20020a5d4ac6000000b0030954b633b0mr7315737wrs.44.1685295367931; Sun, 28 May 2023 10:36:07 -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 z10-20020a7bc7ca000000b003f602e2b653sm15334523wmk.28.2023.05.28.10.36.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 10:36:07 -0700 (PDT) From: Matthieu Baerts Date: Sun, 28 May 2023 19:35:30 +0200 Subject: [PATCH net 5/8] selftests: mptcp: diag: skip if MPTCP is not supported MIME-Version: 1.0 Message-Id: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-5-a32d85577fc6@tessares.net> References: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> In-Reply-To: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Christoph Paasch , Florian Westphal , Davide Caratti , Kishen Maloor Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1203; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=2XieG7aH+1H6UjQufr7rYq3MJt3yeF3n93mM9qxyF/k=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkc5EBVsy9726j4G9jjMrxnRAZd2w+eAda1JbfZ BSSWuPepeaJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZHORAQAKCRD2t4JPQmmg c90rEADZxBUPh9w2TPif0/EokmXKrf1ty8a3RmkE20WglnJTTAowpUPzIxTQnA2mMH6G4T+iD50 f/vCtbr8xigVWUf2mFE8RY+ijac4XnuctSmaj1SY8L3xTE+3+1k6G/XC8COwJrpcQVE9o5i98Z7 gO/j8Oh47+FMeaUB/xyXEO8T14bbG8w8JnRpy6n3olvwbvMqtuVGEre7BoyuvWpV05Nqmz1DLA0 S5fYqrf1BHCmobd7JGoiFlIiYkuaxee9qm/fi/dEIw0QUgVMq8NSVouzi4kIp6WbPvmn4lMJdre iiAvIO84IN7unWkXg9nVefl8u0x22W7IYsPAByQUSRyIBYAghF0S1UouHO952bCpC0ZF+Nczx25 Rzs5Q2vJgOAdZR3hutsfSeO5YGeS897blfYpL8xW7EDY+CKDvzHaVnFHDvyt2Mc5dcOWXgPUhoE 71AfIOvO+8qs6f57QGqn8T/Kg8EvtrWYXxVbx1iIqi6Q/CkqNlvaLi/KenhiXDOQyO8Fza6Y8KC WBcZvy3JNBOGQA9VZ6d+05SB9vJta8QyZkiSoO6zkVwjsYt1NLobmuv2nkXCHYpaRJzetj3tC7u tW3xlwCtqwXYOAnOPq65RmKtfv73nLWaJ/lsB1GwqXXfxjIwvmrfAXaM4B6eVAunAEM6sNY84Bj VbNoHru1F33zdYw== 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 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767160366807285292?= X-GMAIL-MSGID: =?utf-8?q?1767160366807285292?= Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/diag.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh index ef628b16fe9b..4eacdb1ab962 100755 --- a/tools/testing/selftests/net/mptcp/diag.sh +++ b/tools/testing/selftests/net/mptcp/diag.sh @@ -1,6 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +. "$(dirname "${0}")/mptcp_lib.sh" + sec=$(date +%s) rndh=$(printf %x $sec)-$(mktemp -u XXXXXX) ns="ns1-$rndh" @@ -31,6 +33,8 @@ cleanup() ip netns del $ns } +mptcp_lib_check_mptcp + ip -Version > /dev/null 2>&1 if [ $? -ne 0 ];then echo "SKIP: Could not run test without ip tool" From patchwork Sun May 28 17:35:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 99917 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1068802vqr; Sun, 28 May 2023 10:37:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4kJdkXcKQbsqXdQayhzrFKAYHLex9TFDxnkUIG1kEnuQZIxym6bjampoMw5tGpvPLGmUp/ X-Received: by 2002:a17:90a:4590:b0:247:26da:5de2 with SMTP id v16-20020a17090a459000b0024726da5de2mr8134619pjg.20.1685295456257; Sun, 28 May 2023 10:37:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685295456; cv=none; d=google.com; s=arc-20160816; b=aRhcV99Gis/4X+YfkTkgEfihq9XfJex+hfJ5lMp6XHEZ1eLHNNOH5KoAL9ugbAwmBz f291jh2K1tmUlsXWd1HmXYVZVM3NF2mfMJDQTQVaq5zJ/fvi2zMhZsL8mYb/DrTCpSGS x25FtC2z4nHFU0UcUp5QeZ7jVgO1pvTsfzjCtPF+HhPlDs4kvclMqbzUyROIH4N4luwU jdo6v+S0XnhBcb8IrZNNzzF7AvZVDlo9T5OsSQnK+TD4+QnxNXnCH68ndT1dHtwN6tnI 5AsZUUGLiFNJ/X6DOtHDJbcAhk3rP4zY8+zu00y3s5vb/QVmjp0oYiPGfZEnRSQH4tfr iHlw== 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=1iFsQSoektVWo2hESWKZtZkktu5l6M6gOCDs+m+CLio=; b=s1Afk07Qz3U5Wr9ME6wGlRiM+AYDRXKdMY6eLMXxJR944ZbOMB9eI0FRqVo1dbchyt c7PTMFFzfHetKMSpSNlZwSofwnAAmr2nbYOXWnUBw+M8oHPvWsR3f9ST1scAOD46t2hQ GyCuHPneWdSIlhM1UTu4Z7QRo0mJyYmj2w2KyDmBIB8you+nNvS+8TS3J+dcxUDTrSXG /I4dtkmrcRGjXjKh4ZOO8zgB+1xben/vJZuGprkbhj2lhwKYFKXVwU7vISPwXF1s1Ja1 y2aoEcGNt7HchaXzuqYjaOEQ+YaKs1VpB1EZqnmyc32aiVu9jqLCGz8gDA7k3wE4wJjZ cdKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b="a4tjax/M"; 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 w11-20020a17090abc0b00b002535adfa0e4si4992549pjr.65.2023.05.28.10.37.22; Sun, 28 May 2023 10:37:36 -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="a4tjax/M"; 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 S229770AbjE1Rgc (ORCPT + 99 others); Sun, 28 May 2023 13:36:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229679AbjE1RgU (ORCPT ); Sun, 28 May 2023 13:36:20 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B187BE for ; Sun, 28 May 2023 10:36:10 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3093eb8cd1fso1526721f8f.1 for ; Sun, 28 May 2023 10:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1685295369; x=1687887369; 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=1iFsQSoektVWo2hESWKZtZkktu5l6M6gOCDs+m+CLio=; b=a4tjax/M037J4XbF6dF2XBpbWlJBX6yjwE0k5qXuPWPE3SMUGoct7HZBuY2/j7YKo7 zLaS9ywinq8EuJ+wSZMD7GvdeeNbqs53v22RL7OUxgDe4WJR9rR61MwgR9gFi9qn+nIi BWCiu5P4s3+1xSaP3j3qyLhYbXx9vgnbh7l58Gb0jvS2kFUxNQrAZmJ2YdmT4in6rfy5 iNVmvTr4ybYda6DiBx56ZvNxFsTsMN+zgV+R7HnIq5zmY7eVsZpQLklhLvqBX9nOCWG4 5nd5O0mNuu0OtvOfOztIvPUOxBWgPFVfXgB+6S73fYwzEjGV5Vk1LkijAX4gsKKdaQjG lipQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685295369; x=1687887369; 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=1iFsQSoektVWo2hESWKZtZkktu5l6M6gOCDs+m+CLio=; b=E3OxY8tJ+qLzIk9w3KoZyhxWo7YII1/k1lyxUMoC07RgM/p2c8qvDDT9Ft3bQ/PlcE KgBUbT37Y+tqxbbVwGd3E3RWsDFYpJmNjiudcRsxx+BnzA+7e56dDP199VmfpqYo7d3M VgaW6sXmx8EwjDMq+bAr4Ms4Pb8ZtVL3/znA5z+4jhP37Gj9pmaRvsmWYD/g+BeK9SV8 9wyu3IDhQXtDPD1PgJSH1S1SelxPZMqIcI9i+OoxNDxOv33rDcdKRIgA/Ui0SvU4tIu5 hEHxKarADIa9gl4Gfxede81zbzn0Zrdn1deqTLZ3POvsixl+vYFTjmbsyuEoH8atgINZ isJQ== X-Gm-Message-State: AC+VfDzl3nfPChp0FzBt9Vl0DKn5UIIgfmcbgxD26R66efzsqvQXbljM aqEya8zcAlkVOJwAsOKgAF8ROg== X-Received: by 2002:adf:d089:0:b0:307:9f8:4f30 with SMTP id y9-20020adfd089000000b0030709f84f30mr5825464wrh.70.1685295368987; Sun, 28 May 2023 10:36:08 -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 z10-20020a7bc7ca000000b003f602e2b653sm15334523wmk.28.2023.05.28.10.36.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 10:36:08 -0700 (PDT) From: Matthieu Baerts Date: Sun, 28 May 2023 19:35:31 +0200 Subject: [PATCH net 6/8] selftests: mptcp: simult flows: skip if MPTCP is not supported MIME-Version: 1.0 Message-Id: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-6-a32d85577fc6@tessares.net> References: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> In-Reply-To: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Christoph Paasch , Florian Westphal , Davide Caratti , Kishen Maloor Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1220; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=v3FXhGp3rLA92fFtVw6q1d5taMCbFn424ZxPvKCJnwY=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkc5EBEEKka3mFHa3kBEbaRn4dGVLd1UAKUl96L 82Sf1dCsKqJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZHORAQAKCRD2t4JPQmmg c1fiEACI6DNewO2JBxnZ2diUvafyiEsds+h9elQVCf6sS6J1NOthez6aPSn+CBp8SNYjQ/13MRX RdktsaoaNMf69NKQGm1zIaTlU1e3AJaiwqx6bJcCAnMqEc+BlP+RuV51/AB8F6hc5ORiSHKvzqd sGvFwhICaF8eEbYv+Mew0fqSQexJdcHy9ABHQJEvsWJa5pdSv8Ojl7OWPakE3ldqpSH0L16oBxs ipY3qO+0JkBdpmCBLCbUE6ilkjovLurvmkXpK0k0t4e3aRpk0FhH1mUiTnlj4uaByZHJH53UTwU xuGvAcxiFpg9GCkVQAf8A4peVDReZUlLhw91ftPg/uJJSGly4gfKvaopDA5K9U8+Uj/El4tOQag vVToFZ4asX/o9rThmFzMXJHakRmiufxZG9midl0dScVB0EzsJgaYdPT0LB8h2i19vJUttGkvREo pwfLpSrKgdgwBpK79NU/1JHINZwBJ/qdlPuRjl1bA7rUiYl5e8c1+p9ZoYUCSIX11tdgh4HXsja nU+qmEV4i3xAn0QQwjWSKhPE9atWttMQrl7MC+TtdmRm1stdLJu4NgSPzfGOt8hjWVnac4h3Afk O4dOniWiXgsNnzp1IUflixhjCQ0gnqP+aujJEtMtUPRRgp4dWgLTIFvLWcyVttkK/O/RqFzhnEF 5YxSNMA7W66gO2w== 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 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767160367958620905?= X-GMAIL-MSGID: =?utf-8?q?1767160367958620905?= Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 1a418cb8e888 ("mptcp: simult flow self-tests") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/simult_flows.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh index 9f22f7e5027d..36a3c9d92e20 100755 --- a/tools/testing/selftests/net/mptcp/simult_flows.sh +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh @@ -1,6 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +. "$(dirname "${0}")/mptcp_lib.sh" + sec=$(date +%s) rndh=$(printf %x $sec)-$(mktemp -u XXXXXX) ns1="ns1-$rndh" @@ -34,6 +36,8 @@ cleanup() done } +mptcp_lib_check_mptcp + ip -Version > /dev/null 2>&1 if [ $? -ne 0 ];then echo "SKIP: Could not run test without ip tool" From patchwork Sun May 28 17:35:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 99918 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1068814vqr; Sun, 28 May 2023 10:37:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5BRwbHTgTF8vXrB2TPEu4VSXhVyZsPsTTv19MRRlCWFp3WzbhGjlllYCWEqa81Ql1LUDHg X-Received: by 2002:a05:6a20:8425:b0:111:2a64:83e7 with SMTP id c37-20020a056a20842500b001112a6483e7mr1241727pzd.22.1685295459853; Sun, 28 May 2023 10:37:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685295459; cv=none; d=google.com; s=arc-20160816; b=Eog3ImM7wrvZqsm4qHjjbSfRcKwN9XYsSFboTXpDuIRRlBSeb9RkqajaAUH6mWgy9V 8VNg0Ep+bqvTAX2x9Bq9E8qz37w3kG6tx9+YIwqZkmuotvDmUNEzNchfF/unVschUSQr JXJuE0+AALN9C8zEkqAe+XYqZASH90i8rijk24/LRPrxXTos8j7/Kdu7UwKEtXADd8Ox I3ewrM7QFoc6cBgy1ILbzHAp5sm1Q2PxOxfTEHljFndwonS5cNFTlkJZIiidC/YWRK0j 8bWfUJHXoeKdr008pN57kv8ICvfmWA5h0/pr6X96vbmnxi3CDxcf14Qd5DXP3eVyYYRe wr0A== 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=XVE6CUkf5Xm7j0hYIyU7Kgv2NM/UdT9FCbmvgEasBPI=; b=mKxZywztEaHgk3ajx8M2rgmdW7jPZbwvf00q+2ThJUM7UI6YElIncDBHDIJHaYUfAN Vl/I+CH2BwWmcLedH7SI3aLMBOexz3IJphYaH/QijuoTSYObTJ32o0iK9ZkJPQjNQr2v LCaCpE4m42JaFHhy05jJG3D1f+S+vBOLp7zyoZTWtSW26a+giHfZaj5PWC0vpC5snTeX T0WdfU+bTYgNu6g0vSts+0X96ck1MRHD3hh3Z76V5t27/fuhSZn14pNbBTYZIz6egUGc jOwy0EuZoOb35nyJWxLfKDTwxbwOI4b8Iciqxvc+oIhpfCvW+yfWIDWn2adAqTXmNff2 4nUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=sOOtbh6Q; 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 h69-20020a638348000000b0052cad19f77dsi1047065pge.0.2023.05.28.10.37.26; Sun, 28 May 2023 10:37:39 -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=sOOtbh6Q; 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 S229775AbjE1Rgg (ORCPT + 99 others); Sun, 28 May 2023 13:36:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229695AbjE1RgU (ORCPT ); Sun, 28 May 2023 13:36:20 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA8F9D9 for ; Sun, 28 May 2023 10:36:11 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f6ef9a928fso13968795e9.3 for ; Sun, 28 May 2023 10:36:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1685295370; x=1687887370; 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=XVE6CUkf5Xm7j0hYIyU7Kgv2NM/UdT9FCbmvgEasBPI=; b=sOOtbh6QGU3DQCiv9d4ZMoWHoWFR3uzyNpT20ytEIvDUyU7IoNvnpydAyXUas08CKz wxsfgex3RPYnXg3k/pNhwTkfhP+PH+wNA5kexFQNwjwxx8s4DH96CFjblCAcqrY/p7+X FGR4E3sLUku8nfsqo8Rc1GH1FexmX6o7yj/DtO51suggyy7LBUkqXxfyEgrPuN9sUQV8 3Uc+S0hih4LfPo/SLQO4mKMZu1cXIt37yN8LJEQ0XxLWP9QRH5OEYGtg+o/UQj3V8gFN GP3MKE2n46ffENt2yrP8ql1GeVcT887QagZPwmGmtBEqvMviEpB/a+bpd4WA0uLFwajM mXUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685295370; x=1687887370; 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=XVE6CUkf5Xm7j0hYIyU7Kgv2NM/UdT9FCbmvgEasBPI=; b=jYToi8n2iLt/3eqcx/6AEEtE0P8CmE+s2o+fGdVTuYn1e2E5LOs1XJzcaqbduGDugY fI8r+1SiZ4+gGUabVoXKkXldA0m4dDRc/W3rLcNBnS0NKkwpgrq0kQoLEUaS6sgU8Ylh oImQRV/muBmfYRjVAsTpaSlEBWcu7iVc1m7fNA5ACfGkKKtE3GGYgp366j1I9ugVz77T o6dRdRlbe9ZRpdVhIiVIInkcIR7rH9GKgY0mfzIhYAMSutNeQw2CYuRXQLlDj5mNNW81 1m9l4/9xH7N35XgrSlO60a8VDCH50Ifa/e8bn7Lazrh4ZE/xP4u+kG2OJyO+4t/cc6sR Qfwg== X-Gm-Message-State: AC+VfDzdCLhSptqqPkF/asl9u7TRI/b8P9kERwdfrrzCz2IBMVToK6QA a3/nzpS9pKUr6rTT3uCWZG2sQA== X-Received: by 2002:a1c:7918:0:b0:3f6:50e:315f with SMTP id l24-20020a1c7918000000b003f6050e315fmr6423871wme.41.1685295370010; Sun, 28 May 2023 10:36:10 -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 z10-20020a7bc7ca000000b003f602e2b653sm15334523wmk.28.2023.05.28.10.36.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 10:36:09 -0700 (PDT) From: Matthieu Baerts Date: Sun, 28 May 2023 19:35:32 +0200 Subject: [PATCH net 7/8] selftests: mptcp: sockopt: skip if MPTCP is not supported MIME-Version: 1.0 Message-Id: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-7-a32d85577fc6@tessares.net> References: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> In-Reply-To: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Christoph Paasch , Florian Westphal , Davide Caratti , Kishen Maloor Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1201; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=kQKfxu33/TKdTEp2HTz906dbSPVxanbcCaiMbKwHsos=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkc5EBYuuTgrHoIKtcSjWHisgGd2VcKMhrcPB/r J/SupQ1t2yJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZHORAQAKCRD2t4JPQmmg c9oxEACk8oAjyDKsO7XkrztBSp9DjP71JXrYQMhuHsaRWRfCUnlJf1XvAxwksDYdf+AwwLNVoNB Zk6yMPVrszOYV03Rp/aPxCevecbjJXhCnzd+hbeiHzLz/D+U6gMgLKRNwFLq6suWTKgksWEHOfY h9386U3a5bnxL3it7jE7NXvekXx8PZ3m/wCrdGytfvysLIjJb63V9nxSshqJKIipA4Q3IASsiJ7 vZDhGDyIsCp452zgkrH8bakL4zN/DtcoyQHVUQEZelaZbCLPxAvGYSbRhgNacDTEQrHYY4x5CT+ vfEk9j9WSqRTnotl+soNfihWaqGQEPpvNo4mo1Akv2JRZZ7ePxRB90726pYMHWODSCzcw1GEuU5 peXNW2tx+J2tNXeDjWn/Ru8T2cRHL4FJ6+WeYclKCMqJ8YDW0ulrndN1nspDyogGNapP5w4Viyj iqknPH5QeqKaopFjseboxZJf3rmCrm/KjvktZFdbvVmKHFq/1psM0wIAOGCzABovl190qk2pxSL GWsEkRo7hfOQReuuTN+CbWVBvpK9LXAuOdHAw1F8IjkdQ68t1IVs82gSDgGVOcbAOW7elWi8FwJ ta+cxiig6K8yGmpWQCqTNF0PnX/uQhWB4pYBH71HpOI6+wUFPx67avvioOH+xUybWhxuqgUykOl HrKhZvkKQuoLEcg== 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 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767160371748055745?= X-GMAIL-MSGID: =?utf-8?q?1767160371748055745?= Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: dc65fe82fb07 ("selftests: mptcp: add packet mark test case") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh index 1b70c0a304ce..ff5adbb9c7f2 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh @@ -1,6 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +. "$(dirname "${0}")/mptcp_lib.sh" + ret=0 sin="" sout="" @@ -84,6 +86,8 @@ cleanup() rm -f "$sin" "$sout" } +mptcp_lib_check_mptcp + ip -Version > /dev/null 2>&1 if [ $? -ne 0 ];then echo "SKIP: Could not run test without ip tool" From patchwork Sun May 28 17:35:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 99919 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1068845vqr; Sun, 28 May 2023 10:37:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4FmTgYmplKsvzjRpvhcwsW85+ATV9jvPSR1t/LTkFNvUXC6YNXX1Gu0uS6O3Bd1BArgDYA X-Received: by 2002:a17:902:f693:b0:1ac:aac1:e344 with SMTP id l19-20020a170902f69300b001acaac1e344mr11238304plg.36.1685295466959; Sun, 28 May 2023 10:37:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685295466; cv=none; d=google.com; s=arc-20160816; b=xCfiMtZ1Fw+9e318HPaCKyMpqN4jWp2udHBk/u+PyEycvAFmPXANh9fcRmrnDFT8fQ 7MFGf6uVh3kJoCKm6EcYUasLX4z6VGKle30VHKP+B+IcQsdAD/Vn6KCgr505HX4s6vif UArHy9ctzi3m0UEuiGYlXKTVJrI1hXSDS7ggmxC1qM107+ooGOrprxqcUbDGdC+RmHWO He9Q1XyktOaz6jJiHdJkYXnX8Cr93GsiNuvSJlPinK+WMSQSrb431QZLR0LCFNXrfBeR kXuB2+eB57ATfa8/LE9B4UX0UYxdgFgZFGfmDbxi8xj7ywdNU7JLUrWKsrTlcBL30lKi +ywg== 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=Dv/yh1ez4MwkuLkx8esU0Cb+ZDlD0gjn5YXP4X/VzdA=; b=zFB+VBuHG+THtkgL+8QgrdzOFlbJlHtaw2xv8I3zFVm2E4JTpNRzhlxTvukOGaju8g fGOjvVWZ5Et4ETfAbpdZQsY3RVcPWH/iDOGLoODHGqgzyByI4qGgFVnR4Wnkx401/lBI 6Wrck4iJmHEexQZ7mIK7AJSxMVCgD1lSzQrU4R6FkQfjljradO3gH5c2SdCi9CyZqYSq CBKkK5XcgAr1Itc14x2fko43jOQEsygZ2sFdaVnkp4j3xE4x4xdFvgssDUWC5KjMKLb/ UWozpm51wxn7FRmhhxEV9hSIJIZLHQIskvrkF8I2pwfDXCd9b2LE6WXuI/VWm0r9hAqc rYFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=20jbrVmG; 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 t3-20020a170902bc4300b001ae4a01a7e0si6122923plz.236.2023.05.28.10.37.32; Sun, 28 May 2023 10:37:46 -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=20jbrVmG; 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 S229792AbjE1Rgj (ORCPT + 99 others); Sun, 28 May 2023 13:36:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229708AbjE1RgV (ORCPT ); Sun, 28 May 2023 13:36:21 -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 13928109 for ; Sun, 28 May 2023 10:36:12 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3f6077660c6so16188625e9.0 for ; Sun, 28 May 2023 10:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1685295371; x=1687887371; 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=Dv/yh1ez4MwkuLkx8esU0Cb+ZDlD0gjn5YXP4X/VzdA=; b=20jbrVmGwi4TuTnfu3xvKOsXYIn/VTHSr6q3sVvyvPG/QkjR4Sw/MXRUzH6Rmwghcd doEj7GBVjVH51Zc4lQmCSAn/fuiZ7VMfzMK3+UTH42K1e8BrbrjvouachZzT3PRKp+mO v7E1gV3hzGxur+ZKqPjaKd2yAOL8x4xeAPV5ZbUMR4YiER/Yn3IfTW/XvVbJnegONSwJ N4dfiTvbeBslFAvsdlqWhN8iuzfaPgMkdkt7CN6u8AioTwyLTL+8SvZfeazFHFTlC1OV WGDZGJwtaWec+oNCU0ZWnvile3cHge48sWDdf1xAUXf1HsfR5vEfG1ZqJip/VOMnAvdI psyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685295371; x=1687887371; 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=Dv/yh1ez4MwkuLkx8esU0Cb+ZDlD0gjn5YXP4X/VzdA=; b=DV3ppd08eiqeqvipng2eTRryLmh0FBlwcr/I63JYGl+a5RwVvydjuwo/AN+ikRWAyH g0ZylFUKvWbLVwDf2CIygKvD7W29KQWz30t6tdc4cqY5Fyzh54IK/jZ6d2nHqcKNBAIT YaK77wlG5393InlZ3bg1Ulete8iLBEWCEzXEtI/WpaRNbLHW2MKzSxu7RNXfz0OVBGs5 ZIY+qEnOvk4fyeh/Axyz53HZn7E57UJBzvRTfhb14kfIagXIOqsFO4FcULdKByMzvioN Su23+x80b+Z54BaWIHsVps2m92uL/EnQIDfdNigvij4iagUL6uD8CU544l1qlqAT6BQa WhqA== X-Gm-Message-State: AC+VfDz1gOHnAn+wxyxHFG8hXvoAAVfiEtx/MXINjlsjw3QZ0cSeVqxn 8CIAD3HsExjwIegAuBXZnMSWTw== X-Received: by 2002:a05:600c:2210:b0:3f4:2b13:f0fb with SMTP id z16-20020a05600c221000b003f42b13f0fbmr8320180wml.13.1685295371067; Sun, 28 May 2023 10:36:11 -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 z10-20020a7bc7ca000000b003f602e2b653sm15334523wmk.28.2023.05.28.10.36.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 10:36:10 -0700 (PDT) From: Matthieu Baerts Date: Sun, 28 May 2023 19:35:33 +0200 Subject: [PATCH net 8/8] selftests: mptcp: userspace pm: skip if MPTCP is not supported MIME-Version: 1.0 Message-Id: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-8-a32d85577fc6@tessares.net> References: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> In-Reply-To: <20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Christoph Paasch , Florian Westphal , Davide Caratti , Kishen Maloor Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts , stable@vger.kernel.org X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1128; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=KmD6FWDokOOmgvkIHaO501SBS+m5bjw9eufDZhLROe8=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkc5EB0fds7CPvvv1yzueGAxIwy+BEXWt5telsx Es9ICH7W1yJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZHORAQAKCRD2t4JPQmmg czNXEACwTRfzBsR4CqhB9CChs90m1paBf8LijwU92DYy1hFF5RRvMpgUvOagqh/ECw+XEY2yZ8r eP90H0FcEQ4vXKcwDpmArjZVLOhXW4xx/BGyEruSOKgRgS8SyUGRnatPjd/oZTPA6XCQxN6Pqi9 CfGGOhAQRZklZhx/r6yi+2aKboecxPhvtbFBBx3Ty/lRgSiWs6/05puflU7hutnlla3gCPfeq8q PXxK5bVrvkZ8hGVxKYGNdTY8/BNPseMQekCjRVLSA09UXStGVLcSHhzxB1Do4M8Dqm5pWwIIuC2 GYvxBQLWNjPtVmU8ugP+yc4YGlpPq0v/ddffac148wal1l6/SWuBZd8s9eXNZpvqT5wsF3rDss0 ZtMalRi/amRQBhAwOfpNCYM5aCGDVt7O4se99wOFU/wcdIJ8DMpBqbL3oruQ0duQHuuVg27SxpH 5AQiuQWVUK9Q36hMcMWx6qmJgwSATVaku2FGqd7vk6lobbBfO7IiG09ECwvljOChuVCh1r5HnDa pN/+I8uxTfMUEpY5qbxRW6KvTQpf7jYafL6otbyqP7L5qdi3ex5ieAHzJJbpp8NlNww5c1sh8YK R/cKXpb7vyi+2tFeF1JUGR9R7GD2oBWTb3fNVUGHb3nm++LSAMkAP2YwzTS8cnMRtGa3gzptR5X CrqQv1fsMg5Ic3Q== 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 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767160379476434644?= X-GMAIL-MSGID: =?utf-8?q?1767160379476434644?= Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 259a834fadda ("selftests: mptcp: functional tests for the userspace PM type") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/userspace_pm.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh index b1eb7bce599d..8092399d911f 100755 --- a/tools/testing/selftests/net/mptcp/userspace_pm.sh +++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh @@ -1,6 +1,10 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +. "$(dirname "${0}")/mptcp_lib.sh" + +mptcp_lib_check_mptcp + ip -Version > /dev/null 2>&1 if [ $? -ne 0 ];then echo "SKIP: Cannot not run test without ip tool"