Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp179334lqr; Wed, 5 Jun 2024 02:44:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUjysRLEH6JeRAh4oTJjoqrDatKlThdOeTF9hCxoVm7/CyQWNWzh0JPE4tX+qXVZUDzXEAvy46ct5GZLz4DZDKrQh2kZ0RpYeDvRYp0rg== X-Google-Smtp-Source: AGHT+IF/A/KPkkD7bokwRrRLlBltn8u8wSLK2XhuQgLwbfFAFsGb3bNisar3enkYEHhtlJjQkgh7 X-Received: by 2002:a81:4318:0:b0:61b:349c:817 with SMTP id 00721157ae682-62cbb4d3aefmr17560447b3.12.1717580683049; Wed, 05 Jun 2024 02:44:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717580683; cv=pass; d=google.com; s=arc-20160816; b=kbmoDJkg2Lz7u+XeqsFf1RCnFq6XqPbqcZTxs2eQ92YBQxIXfeNJUVl5MSpaEQ8OWy GrV8aUuCPIIHBp3zn/GrH2qVwvW0B3IwK5ACwI/JszXJAS9FGcz04d1P3P51oRs0VxNC k178k6ymF828Z8bGUVx1+9MN3LHjb/ZOmYvlqx3Y+G4hRcgGbeTiTKmM1oCgp9M7aNJW hIsRoREaHdRJfLiFPE+ntqln8ANU+T6Kz47dGcaQh7b9HCzjkQsYkIC02Ly7uuKyWRCc IMZ789c2esugoSa2xitL7jxMpZ6cr3MNEepMKWEUCEpq388RrrivAkY+J2gVZY1gmYJG U6Kw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gK79F04gd642egsqzJF+CSBzAbwsHZYo+7RIWwdUwAQ=; fh=GqeSzNnRO1u6FxEdICDbFJZaF78acUzw18DaYYjZ9Ok=; b=KWpS/6K+eOB75jvb+ZfJi5vOEOVWg4pgwEI7ZC1qk2SeWoTH5IwOj7QemMQcHjci1P SAsh9dirWd5olNq7721i8gLR7Twcc+fAcWAwWJTDF+sgNktAcws9Tjh6V3+0L7BiOOXF E1/7jR8mfDkhx+T8aJ2pw0yvtxOoqRKMnnwfsTN7qhz0o5soX7BKM7HDAUAnijjpV1dJ 4Cs+5hroqdBopCrYbHvW1lk9jLWLx1boW5ZAfMga4QCleTgx+GeKaHQV1+q8MslJ2//1 8JFkzKXQ9pO974atmRcWccpamlNDaJfyfSvSaCSUb4520WYyOABgQs2XTij+RNMQ/1hY kiMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VA6gr2ph; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-202138-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202138-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b4022bdsi132832056d6.227.2024.06.05.02.44.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 02:44:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202138-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VA6gr2ph; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-202138-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202138-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C38561C230C0 for ; Wed, 5 Jun 2024 09:44:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E635718FDC9; Wed, 5 Jun 2024 09:44:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VA6gr2ph" Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8FF1372; Wed, 5 Jun 2024 09:44:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717580652; cv=none; b=iwgtKGXf2+hZW3V/y0PsZdQrLbSmwLDwmtNKQNlMbFhGo2jcQYMO7fjRtc2uEXClkvaxxoDnajAd777xId7PVIo/SojBP+y6o4qji7uhxfdjU1ckq74w3KSR7TTYJan6AvaV5f0OvkG7Hg+JBwnbzuN2B+Z/dIrBFX8mRPPKeiA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717580652; c=relaxed/simple; bh=7Bgdx7IqaGbveO1omriWFiC4m25biWloVy12Zy4BeMk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JLKFKvtvmGrcZb8iXSDgacZLfl6bmba2JgMVzlwWpwzuSng6yHjmClkZ8N09ul+GEkjR3Dqm39UIdbdGJ+t52H3+TNv4COq83qTdNFsfNkDUnJiNF7OAyGdR62AuHIuUJlnMSUJodBrmRQPUZHL/wrFLMee/R8ottOKGxTheGfY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=VA6gr2ph; arc=none smtp.client-ip=209.85.167.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-3d1fd55081fso1022033b6e.2; Wed, 05 Jun 2024 02:44:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717580650; x=1718185450; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=gK79F04gd642egsqzJF+CSBzAbwsHZYo+7RIWwdUwAQ=; b=VA6gr2phDmbvpK1IXArZf4NbVn5TVc55GMSQvUyBcInQIolkpPUKREGENVXEZHeD2/ n+hDLZOiX3n3c6cijofdTBGTvn2B7r7NfJIk/KMqiXATIwTsnwxVjyuvobHoblP9Z4+T Hx/fhrkT74msDLO0tcU9LTHxT3FguylOhjR3JcysXxC4eVx0pWIhTE6k2tsDzmo0k5X0 Oc9501RhkA3zSdOLStVQztoiraNyPPdooXAoRF8c7rjU/9wQZMRX3erMHHexVokPkk7S T7u4xFuOiC/Vnyr+lwjtZ/B/FcX5ARMTCEUYh9EvQuWFMlkrbtwrmaFmstyaRhC9gYoi hktA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717580650; x=1718185450; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gK79F04gd642egsqzJF+CSBzAbwsHZYo+7RIWwdUwAQ=; b=cSOm9iuP/tZseJtUXnIbAE+kT9OOgwUya/EpdzIwP/V04YO28mLQf10YPunayG3o8a m5VsRYsx2Bpkhl/gVtDBj796XEgq2i+fRkm4Sj4OUW4tuToz1TZiYlC2KGWZb7xJsZKa w0GpIlr/GUYA5XyNrOeJUn+4nWz1ZRX4jRROP5r72x2t7n6LS/TMr9Rox8//UP5VEjrr DPHFiDa08UgTh9slvdvPflePucWzJ6AutSEfV7std8Ffafdwx3+/A9XpLZ0nK/RhbH5A Bb1btZEh/DDkOSiwQRovENGabwzuKLpSrr4FlV3WxzzAQcHMTXYVhH6zkA0hlGXLWkXF drOg== X-Forwarded-Encrypted: i=1; AJvYcCVnKdjMYzpIuvOi04TJFUIOK4sikse/+yPp1APTjXUvcR05zkl/wlY5OUoKJ+NEhQ2K+Xt30WYUqsUsZPjpXBnqJo3P6P1xwjvucXwED9/vVt7nos325Nw+0yVvnJIjwH0w7QsHrdqO3Imkt+HccYvx1zoCNDHaWPZnDshtGbrlmT3jPMzSTN35judSMkI/gDW66xtzyLHSIkysGmNx X-Gm-Message-State: AOJu0YxIKQHBpJtC0j+ANq9+kd5Vn6jeBeeItY0C+VUAAK8NKohhLgRW qQohuQ6QXNOeiuoDrXYwW0KOtko+50bDrca9iOQ9xLOSnctIOf+i2oearhX2qeU= X-Received: by 2002:a05:6870:5e14:b0:24c:b878:b515 with SMTP id 586e51a60fabf-2512208d4edmr2327156fac.49.1717580649622; Wed, 05 Jun 2024 02:44:09 -0700 (PDT) Received: from Laptop-X1 ([2409:8a02:782b:80e0:aaca:87fa:f402:cc0f]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70242aea177sm8288566b3a.110.2024.06.05.02.44.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 02:44:09 -0700 (PDT) Date: Wed, 5 Jun 2024 17:44:03 +0800 From: Hangbin Liu To: "Matthieu Baerts (NGI0)" 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 Subject: Re: [PATCH net 1/3] selftests: net: lib: support errexit with busywait Message-ID: 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240605-upstream-net-20240605-selftests-net-lib-fixes-v1-1-b3afadd368c9@kernel.org> 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. Others looks good to me. Reviewed-by: Hangbin Liu > Cc: stable@vger.kernel.org > Acked-by: Geliang Tang > Signed-off-by: Matthieu Baerts (NGI0) > --- > tools/testing/selftests/net/lib.sh | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh > index edc030e81a46..a422e10d3d3a 100644 > --- a/tools/testing/selftests/net/lib.sh > +++ b/tools/testing/selftests/net/lib.sh > @@ -67,9 +67,7 @@ loopy_wait() > while true > do > local out > - out=$("$@") > - local ret=$? > - if ((!ret)); then > + if out=$("$@"); then > echo -n "$out" > return 0 > fi > > -- > 2.43.0 >