Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp184784lqr; Wed, 5 Jun 2024 02:59:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJs6ouepB0ckFN6pIMt+425kR6H6gVTiVkYTVvT21axh53IoufJsgXMwMkXPfkam51ga9X77fiPmNTEAtvHa1o47qGbN8pU9Clr45rZQ== X-Google-Smtp-Source: AGHT+IGUB6lFLtbUbLlT3Vnl1d2NZF05p+mJ2X4/QAbJaxLpV7i9g1UKCvzKWHmtpiRCius017DE X-Received: by 2002:a50:9f2b:0:b0:578:881e:7b77 with SMTP id 4fb4d7f45d1cf-57a8bc9c0aamr1831438a12.34.1717581575243; Wed, 05 Jun 2024 02:59:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717581575; cv=pass; d=google.com; s=arc-20160816; b=olvitRq92rx7TJ4PM9IDV1sOhFMEVENuLO7biV8DlhTchhPMn9PMMzHf2gixBI3zjT jkV5JR932kiJsUbu0u9slsgCGR69EwzThYbeet0Z5CQVHiDfEuavEpsJogO9ocspSsNN k4aiSpOcfN0obD8wY11uo11VnoN879qbdpJTYC9Wsn89qWh6CoOl6RlCcu1qXQl9WEo9 WbMIJUfN+LHoFKtMhlzXTgu3yjWwtDM9Xgz36DS6KIf5AhIWCQKC6gOkgK1LqCLsTQ+B HBf9myOqW+tdBcM3a0LPBNnZOHgpSO23j9gKC1aYc1OtayATqKUCBAnf7u65Hvl35NbC d6hA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt:from :references:cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=sZcslY503uro1Zd5F8ViYl2O9HV2lehVH9AEw901vHk=; fh=+0PM4Zbt/2Qdu/gcGb29fsxH/eSyYd14EEQBSmyJ3Uw=; b=YT+2CL6fF5+VtGMQduzlhpMgp2L4+SyFUJGLDSb7exMEIpASwwlNvU/UUrDa40tc9c gMjD+9qm+mtnwDeeIoOTkhK6jZkjphS/U1u4ADrP/hA1eJenx1yp94feFmERgPC4kAMg ttaCJV7ksh8k59PLhUFgtT4auwzLgj6mByFBhK6jDvKbYWFOtzev4m/+mRR0n0VazTAi d1Bw6odUC2VYnBgQaVyl4WZ4cYDSFYh46UzBiffWoDfvBx4z9lL/vB1Jrw9yPSBhQTxI LjHUyH/XOX0qEebeqnR3+DgKVEv/nXB9BAtLjm4NZaM3O2FsnYNddylERez6zINJp/NH qxgw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Zk6XJy90; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202160-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202160-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31c62f1dsi6160466a12.272.2024.06.05.02.59.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 02:59:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202160-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Zk6XJy90; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202160-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202160-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 am.mirrors.kernel.org (Postfix) with ESMTPS id D0C331F22D0B for ; Wed, 5 Jun 2024 09:59:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A3E019004A; Wed, 5 Jun 2024 09:58:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Zk6XJy90" 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 8E9804963B; Wed, 5 Jun 2024 09:58:47 +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=1717581527; cv=none; b=GADZMAnk8fPmCQxE7NYlpkqYCtAhop2gKDisfkn3N3WiS6wo0+rFuvn8OfkoiAap8WYAIxXu9ClFynx02lDlv3cPCs2PvOkZoHqNPEYBmggv2UPCNtTpv8uGx+OWA5XMb4HRrWuzI/WBVEPM9eXlXG9Kv9SSl4jFttlOcFoC4q0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717581527; c=relaxed/simple; bh=VsCLmW5NRHHHf6eHKMLnWQqhmdGm5TQVaJcQ/lKbH6Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VXEVs8spyaK7q/FqCvcOJZ+Y5gL5cXaLometRX0ESeGIvWaRO3mRg5DAhBSwBIpA9/dsoweFPaIqQ0t85was7a5603dnsvhY9Mp/eVJnv0bMRmbjMoo3o4RUL3gSk6nEvuQ59bPiuZhme4rXdeV4suCfYsZklonq/Zj4q5a9Y7I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Zk6XJy90; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 937C4C3277B; Wed, 5 Jun 2024 09:58:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717581527; bh=VsCLmW5NRHHHf6eHKMLnWQqhmdGm5TQVaJcQ/lKbH6Y=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Zk6XJy90IzWtKMAnZpJSpHRLfwpS8wExCNavaW6/qwV0gsO00A2JkyEscF2LUGRVs YzhXyf12Ph3umFHHW2ACQ727HzeHOWkFSiU9DnHoA6KQVUewVr4cyqZyYzQ78X9oK4 YECYQ/Q9xsKDoGK7SXd8TEa1nxaa/SoBikPo2MGk4UU0U1XbG94uziszaUX4w+RiDs XHhRFr/3lrQ7JImMGCnlGOalpGnM0IM+38I7sKK+cXJmTUG1HnGQExlEk8G7j8nZno 75qBl3TxYdI5jugR+CrwxY3JtNEfPkGUpPQOvEPNyj50ZfOrp7K7z6RPAaojn66hUT XgmIoEpAiRLRQ== Message-ID: <9c32a07a-9af0-479d-92d3-1d3076f76e15@kernel.org> Date: Wed, 5 Jun 2024 11:58:41 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH net 1/3] selftests: net: lib: support errexit with busywait Content-Language: en-GB To: Hangbin Liu Cc: mptcp@lists.linux.dev, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Petr Machata , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Geliang Tang References: <20240605-upstream-net-20240605-selftests-net-lib-fixes-v1-0-b3afadd368c9@kernel.org> <20240605-upstream-net-20240605-selftests-net-lib-fixes-v1-1-b3afadd368c9@kernel.org> From: Matthieu Baerts Autocrypt: addr=matttbe@kernel.org; keydata= xsFNBFXj+ekBEADxVr99p2guPcqHFeI/JcFxls6KibzyZD5TQTyfuYlzEp7C7A9swoK5iCvf YBNdx5Xl74NLSgx6y/1NiMQGuKeu+2BmtnkiGxBNanfXcnl4L4Lzz+iXBvvbtCbynnnqDDqU c7SPFMpMesgpcu1xFt0F6bcxE+0ojRtSCZ5HDElKlHJNYtD1uwY4UYVGWUGCF/+cY1YLmtfb WdNb/SFo+Mp0HItfBC12qtDIXYvbfNUGVnA5jXeWMEyYhSNktLnpDL2gBUCsdbkov5VjiOX7 CRTkX0UgNWRjyFZwThaZADEvAOo12M5uSBk7h07yJ97gqvBtcx45IsJwfUJE4hy8qZqsA62A nTRflBvp647IXAiCcwWsEgE5AXKwA3aL6dcpVR17JXJ6nwHHnslVi8WesiqzUI9sbO/hXeXw TDSB+YhErbNOxvHqCzZEnGAAFf6ges26fRVyuU119AzO40sjdLV0l6LE7GshddyazWZf0iac nEhX9NKxGnuhMu5SXmo2poIQttJuYAvTVUNwQVEx/0yY5xmiuyqvXa+XT7NKJkOZSiAPlNt6 VffjgOP62S7M9wDShUghN3F7CPOrrRsOHWO/l6I/qJdUMW+MHSFYPfYiFXoLUZyPvNVCYSgs 3oQaFhHapq1f345XBtfG3fOYp1K2wTXd4ThFraTLl8PHxCn4ywARAQABzSRNYXR0aGlldSBC YWVydHMgPG1hdHR0YmVAa2VybmVsLm9yZz7CwZEEEwEIADsCGwMFCwkIBwIGFQoJCAsCBBYC AwECHgECF4AWIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZUDpDAIZAQAKCRD2t4JPQmmgcz33 EACjROM3nj9FGclR5AlyPUbA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yKyXEfG+0rrVseZSEssKmY01IsgwwbmN9ZcqUKYNhjv67WMX7tNwiVbSrGLZoqf Xlgw4aAdnIMQyTW8nE6hH/Iwqay4S2str4HZtWwyWLitk7N+e+vxuK5qto4AxtB7VdimvKUs x6kQO5F3YWcC3vCXCgPwyV8133+fIR2L81R1L1q3swaEuh95vWj6iskxeNWSTyFAVKYYVskG V+OTtB71P1XCnb6AJCW9cKpC25+zxQqD2Zy0dK3u2RuKErajKBa/YWzuSaKAOkneFxG3LJIv Hl7iqPF+JDCjB5sAEQEAAcLBXwQYAQIACQUCVeP56QIbDAAKCRD2t4JPQmmgc5VnD/9YgbCr HR1FbMbm7td54UrYvZV/i7m3dIQNXK2e+Cbv5PXf19ce3XluaE+wA8D+vnIW5mbAAiojt3Mb 6p0WJS3QzbObzHNgAp3zy/L4lXwc6WW5vnpWAzqXFHP8D9PTpqvBALbXqL06smP47JqbyQxj Xf7D2rrPeIqbYmVY9da1KzMOVf3gReazYa89zZSdVkMojfWsbq05zwYU+SCWS3NiyF6QghbW voxbFwX1i/0xRwJiX9NNbRj1huVKQuS4W7rbWA87TrVQPXUAdkyd7FRYICNW+0gddysIwPoa KrLfx3Ba6Rpx0JznbrVOtXlihjl4KV8mtOPjYDY9u+8x412xXnlGl6AC4HLu2F3ECkamY4G6 UxejX+E6vW6Xe4n7H+rEX5UFgPRdYkS1TA/X3nMen9bouxNsvIJv7C6adZmMHqu/2azX7S7I vrxxySzOw9GxjoVTuzWMKWpDGP8n71IFeOot8JuPZtJ8omz+DZel+WCNZMVdVNLPOd5frqOv mpz0VhFAlNTjU1Vy0CnuxX3AM51J8dpdNyG0S8rADh6C8AKCDOfUstpq28/6oTaQv7QZdge0 JY6dglzGKnCi/zsmp2+1w559frz4+IC7j/igvJGX4KDDKUs0mlld8J2u2sBXv7CGxdzQoHaz lzVbFe7fduHbABmYz9cefQpO7wDE/Q== Organization: NGI0 Core In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Hangbin, Thank you for your reply! On 05/06/2024 11:44, Hangbin Liu wrote: > On Wed, Jun 05, 2024 at 11:21:16AM +0200, Matthieu Baerts (NGI0) wrote: >> If errexit is enabled ('set -e'), loopy_wait -- or busywait and others >> using it -- will stop after the first failure. >> >> Note that if the returned status of loopy_wait is checked, and even if >> errexit is enabled, Bash will not stop at the first error. >> >> Fixes: 25ae948b4478 ("selftests/net: add lib.sh") > > Not sure if the fixes tag should be c5341bcc337c ("selftests: mlxsw: Add a > self-test for port-default priority"), so the fixes could be backported to > stable kernel for forwarding/lib.sh. Good point, I didn't notice it was coming from there. I don't think that's needed: 'net/forwarding/lib.sh' is far from being compatible with 'errexit', please look at all the utilisations of '$?'. For 'net/lib.sh', that's different: some functions explicitly check for 'errexit' support. If I'm not mistaken, I fixed the only place where it was not compatible with 'errexit'. > Others looks good to me. > > Reviewed-by: Hangbin Liu Thank you for the review! Cheers, Matt -- Sponsored by the NGI0 Core fund.