From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 197F6464EB; Thu, 3 Apr 2025 03:25:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A5F64065D; Thu, 3 Apr 2025 03:25:41 +0200 (CEST) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id 37EBA4065C for ; Thu, 3 Apr 2025 03:25:39 +0200 (CEST) Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-2ff694d2d4dso350713a91.0 for ; Wed, 02 Apr 2025 18:25:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1743643538; x=1744248338; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qg9PqB8M5xJynOfNQYRPMytue7pePkO6A91g8lN1Sz4=; b=HxcSvH1goK3jcQh3AuTVvY9VNS/8x0Ps610gMsGTsYPmohevzBDFVOHtmGglvY58NK OErrrt6QIIqLx9iePkBrIvM/uGWS8ds8etfi4LMfrFKM6yaLIXlZKjN1hQXYvYogVoCB 4g5nsVcsqJBQ9ppJHmt37R4XmNeuYmEWh75Xk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743643538; x=1744248338; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qg9PqB8M5xJynOfNQYRPMytue7pePkO6A91g8lN1Sz4=; b=vnq0HFEtbZHSYnwzcNPvRsmbhM+qa7rJXlIK6/bodgV/lMGYjTjtmH1PYK2xeyGVUm Qjy8ziAe3GMaCsLh7O7A4Rfh9XH1HUKkxtSSznFiB05zzR5FP6SKYAfdeCFRuL01BVFT PXBJnd/6BqwpLtJtn7rvycr2ctd4kOgX/nISnIBGCji9xmu6NInLOzKXSTqcuTtwkHLz 3Ai8afOASTg2WKRECP+WUttCJCksOJgKHRKOECD2ThLluR3b4nEhEpDk2YLwQJCNeevU zg720/YmBTjDJh61T2cA6YFW2WAXSRzEk7R7p2KMCnAOed7qCwXD5STHEoeNb2NzXdKH 6d9g== X-Gm-Message-State: AOJu0YyiXIUPH60kkqXtfwh1elYDQFeKiH6w0YL/Lo5hjjyHHSlhWacj Ijt0iqst8ra7Ila5Dk6b7wSDtCRVO7mew8WOQ6m228bFM3qNLemndhyuZTPxYjHhy0zk2w7hPem AWfgrvJF2xZBevp1I/JaHwbQTKSg7Nh42RbM0Ww== X-Gm-Gg: ASbGncueiUsX8zEanX/bWzdwXQtv7xcX8zsJYFwmVIlSgAAVCPZ4AtN9TSkuaGzxwWL gk5DzRXqLGCH6szgBt7TFLadlKp+HBjEl7IwMdhgkmiz3jVXuxKnqdlQvtjuS3cMs6GL0tuaxSC h9PdsENjsb8h71RBjekG/vgasRjjZxNipBO3eRG208 X-Google-Smtp-Source: AGHT+IHrywUOnh7/fQuJwRztLEveUL83PbEHacrDqJuEi+CM3t3cBZmams/N/IlRSU1nWF4hmpXY0aYLrs9d/6GsywA= X-Received: by 2002:a17:90a:e706:b0:2fe:8282:cb9d with SMTP id 98e67ed59e1d1-30532154804mr28909554a91.28.1743643538120; Wed, 02 Apr 2025 18:25:38 -0700 (PDT) MIME-Version: 1.0 References: <20240529233811.663211-1-stephen@networkplumber.org> <20250402232441.440346-1-stephen@networkplumber.org> <20250402232441.440346-8-stephen@networkplumber.org> In-Reply-To: <20250402232441.440346-8-stephen@networkplumber.org> From: Patrick Robb Date: Wed, 2 Apr 2025 21:21:37 -0400 X-Gm-Features: AQ5f1Jq_Zf2aA8Mh8OcDlOTZOeFnb1awaCsFu5vp5nolEkPXtx-IeEqT8cccSg0 Message-ID: Subject: Re: [PATCH v12 07/10] dts: replace use of sanity check in comment To: Stephen Hemminger Cc: dev@dpdk.org, Paul Szczepanek Content-Type: multipart/alternative; boundary="000000000000b476910631d5a536" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --000000000000b476910631d5a536 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Unfortunately I do find myself saying sanity check often... something to cut out from my vocabulary. From a quick google it looks like many are using coherence check in its place, or just explicitly writing out what the check is as you did. It would also probably be fine to just remove the comment entirely given the assert immediately following it also contains its own explanation of the check. But, I guess the original author thought it was useful to have the comment, so we can keep it. Reviewed-by: Patrick Robb On Wed, Apr 2, 2025 at 7:24=E2=80=AFPM Stephen Hemminger wrote: > Replace with better words. > > Signed-off-by: Stephen Hemminger > --- > dts/tests/TestSuite_blocklist.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/dts/tests/TestSuite_blocklist.py > b/dts/tests/TestSuite_blocklist.py > index ce7da1cc8f..82109f72a1 100644 > --- a/dts/tests/TestSuite_blocklist.py > +++ b/dts/tests/TestSuite_blocklist.py > @@ -22,7 +22,7 @@ def verify_blocklisted_ports(self, ports_to_block: > list[Port]): > allowlisted_ports =3D {port.device_name for port in > testpmd.show_port_info_all()} > blocklisted_ports =3D {port.pci for port in ports_to_block} > > - # sanity check > + # ensure at least one port is allowed > allowed_len =3D len(allowlisted_ports - blocklisted_ports) > self.verify(allowed_len > 0, "At least one port should have > been allowed") > > -- > 2.47.2 > > --000000000000b476910631d5a536 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Unfortunately I do find myself saying sanity=C2=A0check of= ten... something to cut out from my vocabulary. From a quick google it look= s like many are using coherence check in its place, or just explicitly writ= ing out what the check is as you did.=C2=A0

It would=C2= =A0also probably=C2=A0be fine to just remove the comment entirely given the= assert immediately following it also contains its own explanation of the c= heck. But, I guess the original author thought it was useful to have the co= mment, so we can keep it.=C2=A0

Reviewed-by: Patri= ck Robb <probb@iol.unh.edu><= /div>

On Wed, Apr 2, 2025 at 7:24=E2=80=AFPM Stephen H= emminger <stephen@networkp= lumber.org> wrote:
Replace with better words.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
=C2=A0dts/tests/TestSuite_blocklist.py | 2 +-
=C2=A01 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dts/tests/TestSuite_blocklist.py b/dts/tests/TestSuite_blockli= st.py
index ce7da1cc8f..82109f72a1 100644
--- a/dts/tests/TestSuite_blocklist.py
+++ b/dts/tests/TestSuite_blocklist.py
@@ -22,7 +22,7 @@ def verify_blocklisted_ports(self, ports_to_block: list[P= ort]):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0allowlisted_ports =3D {port= .device_name for port in testpmd.show_port_info_all()}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0blocklisted_ports =3D {port= .pci for port in ports_to_block}

-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # sanity check
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # ensure at least one port is al= lowed
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0allowed_len =3D len(allowli= sted_ports - blocklisted_ports)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.verify(allowed_len >= ; 0, "At least one port should have been allowed")

--
2.47.2

--000000000000b476910631d5a536--