From patchwork Mon Jul 17 13:21:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 121334 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1125750vqt; Mon, 17 Jul 2023 06:55:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlGOo4kDBKwjcESUtnjiM27dagu8EiByE65zMpq7p+pRLynZVcYGgzdSQk0YEt89ufc6Co0e X-Received: by 2002:a2e:b04b:0:b0:2b8:3ff3:cd93 with SMTP id d11-20020a2eb04b000000b002b83ff3cd93mr7979919ljl.7.1689602136575; Mon, 17 Jul 2023 06:55:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689602136; cv=none; d=google.com; s=arc-20160816; b=hCrb8gSs13+D5HGdsHviUGBHKUUy+E4l0dEKMok1Xxpttkc8+VyWgoAvsuVKRtqHbd sfpvnEYGonapZKJlZe1pX984Jm0XhUFbNxaNoNH3qogZDNFVsZ4RTSqbNO0ltl6yHa+b hKmspQV7ghXs9RElMkZ/Asp7tbuZgdUJ0ePCtygDbWiP3PWpI0d5BkmArvDaJ9p2hwBc FnBqVN8p+mIYAmYRt4Xe4czJheZgHvSU4micd2OLKyrqEmXuf75oya1rNwTdtKyd/vxN NYBSy3MizGNtmgO4nPELGWvcZ/xmqDvTvt/swR0G1Ia5nojNJGkbKCyVZFv9w9eY728b 64Aw== 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=C19OOQjys4g0HZbyxfn1tMfB0ZlUmaAeplCvwpV4yU8=; fh=9UgnUdzL30oFh+UbzKj4E7u1+buBgKOqdJJe+xVkJ8Q=; b=xP7oll4L7RUlYw2GnmpTr+u6j33axpsS27g8SgTOuy3ZDVZ+AiqA5P7JRVwYYUJjBd 9YIbsbfhD1WDhC4aRoJLQtrYvKn+4JSJpe499fkjZkmdweDJBGCg7hPWF1lBJplLjRLF OCXWyVSow4znYmOzgrTsRd6+Crwr1vV3fysnin0nMjgp0VX6cMoVr6lmLM0Ze4xcz04S kokrF9qSJ8/QiytaedC1FC+RRCYKksHpCidI8rBpmI5V5KWkZYs/vkLKS+A1P7/qNxGc tJ7PfnJzjzIpcVjBHF3OqfaKjcefrVLjuE9XkpZUbrac3ZdJT03AAxbTSV+OVYFmqASn ep3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares.net header.s=google header.b=kV3uMPCm; 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 b18-20020a1709063f9200b00992e0f4e85fsi12930708ejj.229.2023.07.17.06.55.11; Mon, 17 Jul 2023 06:55: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=kV3uMPCm; 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 S231637AbjGQNWS (ORCPT + 99 others); Mon, 17 Jul 2023 09:22:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231663AbjGQNVs (ORCPT ); Mon, 17 Jul 2023 09:21:48 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ED8A1985 for ; Mon, 17 Jul 2023 06:21:38 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3143ccb0f75so4611387f8f.0 for ; Mon, 17 Jul 2023 06:21:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1689600096; x=1692192096; 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=C19OOQjys4g0HZbyxfn1tMfB0ZlUmaAeplCvwpV4yU8=; b=kV3uMPCmfenfR9XYgoBJYMtkwY8ae2Sutqmrw4sXe3sPEP8pTMFjy7PI7baLLsfvgc dXTXoxmIpYMlr2reVA1Qrvgk0f5QSWbLj2Sm4BpCE59Dxz+TDRQgVFWOKvB4wg38oZ5Q sDCBgG0J4Q3zHhffNPUcQF/idNBhKv+D5/oLeZqCgD/baMgZEIrWSLrR3QMuDdvr1wp2 M+B/Q1Ve8LvnFq7zBfDH84TCDi5gRixEbHKY/VdZk6mTdq4Kf1CKK477mopgA4w9Ga1o pU4zieiE9n5DtoJ2MzZLCKkb/lCb3YOFQ/kT3ar70cWRAVp9r1HgZa3H4aghcEUgVgA/ XXiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689600096; x=1692192096; 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=C19OOQjys4g0HZbyxfn1tMfB0ZlUmaAeplCvwpV4yU8=; b=L2A+azefE/GNxBdO4Up/IyLZ3v8IWmreNJ4JiEHxFOUXeXnVUfH4H6JD10yn9beud9 LaQKiAJkjoeGWsAdhqcSU8dMBoxR57XZoUDGnLBeYLyYN/rWLfYL6oewwl8hZKlBIzAQ +WtLo3SpeO62s+A4zTHrJ2G6JT66dSc9JZU4ax/VV7hmycSYBnZPhrVw0+XWftjeu3fg 1BaU2UkA9oj3dkYfnKY+LQaTP9Wft/Lpxp7je+tNe/hw4ZTYxrA22OV+vgJuTobnoNfS cYyXoMenHYHm8Z/MdyXk8P/1qv6bUxSmAqOGTNuZXswZD6Oqw91H8T0VsmVX6crMBSj3 f/JQ== X-Gm-Message-State: ABy/qLbnGcK22M6gKA14lN1N1IFMWE0SofCv1x9dUGN8mNNSbwhA6Npt VrY2mKAGwRdRb7nB9l2YRPIjvQ== X-Received: by 2002:adf:fd4a:0:b0:30f:c012:b529 with SMTP id h10-20020adffd4a000000b0030fc012b529mr12388036wrs.56.1689600096776; Mon, 17 Jul 2023 06:21:36 -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 r8-20020a056000014800b0030fa3567541sm19249836wrx.48.2023.07.17.06.21.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 06:21:36 -0700 (PDT) From: Matthieu Baerts Date: Mon, 17 Jul 2023 15:21:22 +0200 Subject: [PATCH net-next 02/13] selftests: mptcp: userspace pm: don't stop if error MIME-Version: 1.0 Message-Id: <20230717-upstream-net-next-20230712-selftests-mptcp-subtests-v1-2-695127e0ad83@tessares.net> References: <20230717-upstream-net-next-20230712-selftests-mptcp-subtests-v1-0-695127e0ad83@tessares.net> In-Reply-To: <20230717-upstream-net-next-20230712-selftests-mptcp-subtests-v1-0-695127e0ad83@tessares.net> To: mptcp@lists.linux.dev, Mat Martineau , "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 X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2583; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=qss0q7bvLOJAvB4X0z+6G5X/nAHFAPMEdRnJxgxYDi0=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBktUBdufpDnSGqM9fSwPxtyCcCBIzkSdpT4xGDp XwYzeG8l7yJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZLVAXQAKCRD2t4JPQmmg c9fzD/oDC4yV0L9hFbGiam/FWu7nxOXtN2xdtkmY+MNIPQYe3BtWmpYD6y03J2zZ4z5WzQhViOp x9Il8IxPjm2XVWBcGkAOO+h4lAsDcUGNv1sLK1tLykizSAEWZvbjASAVE0dYy9pDWdgcb2AT7BL Fz4xADpq0O2ex6NMkR1RLVJmBhJ5vBeOrbsViqPtXR+RdwUgA88nWFHIjTmnyNYvMSJUa5j/aXb OLk2YKq5QSNI1OrBjbET8n7OVEQ7BVYmQJZiGYNH6i2d1eYy9CfnOaC9I041wY0LQtIm49y+oje iy1f0sE8JUoDG/x3Dd4f3NG3YKTf9C3QMx2dNBJPrg4e1k7peDIW8RwGGFLagF1PSwhv0Uu44Fk /kWcfN04R8DtWwe2TIDftL/IkM5fjXS3N+d7aPJikIiFKi7o6jRx2ZrukO9gHLdhPIqfjNXcNxV +8JoMBlDRBtLq0rx944pZ0GQmH7UfrvjuKg0VDOMlSooP6AUE8Aqww4p0s4sIeI9/K8MfeWTo7G nHw/JSRtHj7IbJL7OWipVnFQkm1IisbBmF6buS3Qb6h+R9ATb5qUeu5OsHNzASX7jsvo20dQKGd fnFyWABiXb0v88frMjC4BLtwSedc6kgOZ/sRDVYsPmmsO0IQ7Sk01ICT9ZcpikZod+9HfqESPxC GViUa3FGaVlxcng== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771676249427514752 X-GMAIL-MSGID: 1771676249427514752 No more tests were executed after a failure but it is still interesting to get results for all the tests to better understand what's still OK and what's not after a modification. Now we only exit earlier if the two connections cannot be established. Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- tools/testing/selftests/net/mptcp/userspace_pm.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh index b180133a30af..c57ce4df4973 100755 --- a/tools/testing/selftests/net/mptcp/userspace_pm.sh +++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh @@ -52,6 +52,7 @@ sec=$(date +%s) rndh=$(printf %x "$sec")-$(mktemp -u XXXXXX) ns1="ns1-$rndh" ns2="ns2-$rndh" +ret=0 print_title() { @@ -257,21 +258,21 @@ check_expected_one() # $@: all var names to check check_expected() { - local ret=0 + local rc=0 local var for var in "${@}" do - check_expected_one "${var}" "${ret}" || ret=1 + check_expected_one "${var}" "${rc}" || rc=1 done - if [ ${ret} -eq 0 ] + if [ ${rc} -eq 0 ] then stdbuf -o0 -e0 printf "[OK]\n" return 0 fi - exit 1 + ret=1 } verify_announce_event() @@ -323,7 +324,7 @@ test_announce() stdbuf -o0 -e0 printf "[OK]\n" else stdbuf -o0 -e0 printf "[FAIL]\n\ttype defined: %s\n" "${type}" - exit 1 + ret=1 fi # ADD_ADDR from the client to server machine reusing the subflow port @@ -423,7 +424,7 @@ test_remove() stdbuf -o0 -e0 printf "[OK]\n" else stdbuf -o0 -e0 printf "[FAIL]\n" - exit 1 + ret=1 fi # RM_ADDR using an invalid addr id should result in no action @@ -438,7 +439,7 @@ test_remove() stdbuf -o0 -e0 printf "[OK]\n" else stdbuf -o0 -e0 printf "[FAIL]\n" - exit 1 + ret=1 fi # RM_ADDR from the client to server machine @@ -859,7 +860,7 @@ test_prio() [ -z "$count" ] && count=0 if [ $count != 1 ]; then stdbuf -o0 -e0 printf "[FAIL]\n\tCount != 1: %d\n" "${count}" - exit 1 + ret=1 else stdbuf -o0 -e0 printf "[OK]\n" fi @@ -870,7 +871,7 @@ test_prio() [ -z "$count" ] && count=0 if [ $count != 1 ]; then stdbuf -o0 -e0 printf "[FAIL]\n\tCount != 1: %d\n" "${count}" - exit 1 + ret=1 else stdbuf -o0 -e0 printf "[OK]\n" fi @@ -961,4 +962,4 @@ test_subflows_v4_v6_mix test_prio test_listener -exit 0 +exit ${ret}