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 B0F2E45AD9; Mon, 7 Oct 2024 22:41:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 50A0340285; Mon, 7 Oct 2024 22:41:43 +0200 (CEST) Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by mails.dpdk.org (Postfix) with ESMTP id 78A984026C for ; Mon, 7 Oct 2024 22:41:42 +0200 (CEST) Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-7e9ff6fb4c6so2880512a12.3 for ; Mon, 07 Oct 2024 13:41:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728333701; x=1728938501; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=bMKKAfGBxJKcJTgeZ0UFx0c7LQ/lPxLfUGgBzlAbKEY=; b=kSrI3AcIslRgZzL1yrn/YXk753Uqbc/1uC37/Cu3EiN5Ltz3VtYEf5XJFn/jydX02g tTb3gZSTduPNuo6gED7+h6PWix6H8f9CGOrSI8qt3RK59t7vmOHiEHknoZX7O8mVnKsD r+ZU4n8z3rXqxxvR5Qjw9dQORjN8n1hI4z9Ihsn6t7TQKq7Ul9iMFp9/7QAbUSF/xtId aRqR4kHKCCr9oYWlDJowRbAKyAcG8OWSZ4vXxRUUBh9fr3jsmvZqsSDTX5+5pWxqy6a+ +5wvhPF3AK7SrSSucQIrGkBrAd6Dr3X5e8v5QEh/rmPTU08RIQQzYCpafNXqAaG9c1q3 7NLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728333701; x=1728938501; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bMKKAfGBxJKcJTgeZ0UFx0c7LQ/lPxLfUGgBzlAbKEY=; b=hVlegWXy9IrzMHIdyFGtWOPfS6pfkVXotAXyuHaAPqhY3xTswoI+rz3uK18H4LG8L3 EzLcx7QWkwd/DHtIUAB2/cFUkXUCUtJzQUw/07Oim9KCCicZpVFMu9tvxO/XFSyFidEs 0A7+06PjytoqhJPPiD4jI6RfhxqUP3DyT63pFz9LFBv6KlQtlL+ZR9OgVqwRU00E9k14 rD8KAXpgxrt3MYpRMmtOUTn9dlFqPPch1MyLW03Q88rlji9eYDzHS5qg29u4ERKsGz3a dO+FPmI0kQ9f+L73ts5QL7E1re7MHA4n5Qc3ahWECsgmkugJdjEfd2r1CFrgXaho0NbW dqSA== X-Gm-Message-State: AOJu0YwsbpOcqQ9eVGrIEkSreB9y4TFD/mxOvCcqEjWnJd4joqwHBDS+ ILifNOEPfonCGzFlhbJ+Tg0lOT3aa1X6PB4dB6vs78RDwy1sOUllkIHLrixQgS8yK1SmuOHil+b qyCk= X-Google-Smtp-Source: AGHT+IHFPY8TaRu5RPZfIVkfeSTgh0XmZZ60a9HPSTNb85XKOklH7+KZaQwhn9XWO1AvjG6THZeNHg== X-Received: by 2002:a17:90a:a96:b0:2e0:a77e:82f7 with SMTP id 98e67ed59e1d1-2e1e63c1679mr16188284a91.36.1728333701626; Mon, 07 Oct 2024 13:41:41 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e281af6603sm36160a91.0.2024.10.07.13.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2024 13:41:41 -0700 (PDT) Date: Mon, 7 Oct 2024 13:41:39 -0700 From: Stephen Hemminger To: Robin Jarry Cc: dev@dpdk.org, Thomas Monjalon Subject: Re: [PATCH] checkpatches: verify in-reply-to header when possible Message-ID: <20241007134139.6ad8f94b@hermes.local> In-Reply-To: <20240705153532.563199-2-rjarry@redhat.com> References: <20240705153532.563199-2-rjarry@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Fri, 5 Jul 2024 17:35:33 +0200 Robin Jarry wrote: > When using checkpatches.sh locally, verify that there is an In-Reply-To > header when the patch is a respin (i.e. v2, v3, etc.). This is currently > only enforced by the upstream CI but cannot be verified locally. > > This cannot be verified when checking commit ids since --in-reply-to is > a git-format-patch option which is not specified by checkpatches.sh when > generating temporary files. > > Here is an example: > > $ git format-patch -v6 -1 --stdout | devtools/checkpatches.sh > warning: [PATCH v6] graph: expose node context as pointers > warning: respins must be --in-reply-to=. > 0/1 valid patch > > $ git format-patch -v6 -1 --stdout --in-reply-to=foo | \ > devtools/checkpatches.sh > 1/1 valid patch > > Link: https://git.dpdk.org/tools/dpdk-ci/commit/?id=070b31649e48460b3 > Signed-off-by: Robin Jarry > --- > devtools/checkpatches.sh | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh > index bfacd77f398a..cb1c9972a71f 100755 > --- a/devtools/checkpatches.sh > +++ b/devtools/checkpatches.sh > @@ -405,11 +405,13 @@ status=0 > check () { # > local ret=0 > local subject='' > + local check_in_reply_to=false > headline_printed=false > > total=$(($total + 1)) > if [ -n "$1" ] ; then > tmpinput=$1 > + check_in_reply_to=true > else > tmpinput=$(mktemp -t dpdk.checkpatches.XXXXXX) > trap "rm -f '$tmpinput'" INT > @@ -419,6 +421,7 @@ check () { # > --no-stat --stdout -1 $commit > "$tmpinput" > else > cat > "$tmpinput" > + check_in_reply_to=true > fi > fi > > @@ -426,6 +429,16 @@ check () { # > subject=$(sed '/^Subject: */!d;s///;N;s,\n[[:space:]]\+, ,;s,\n.*,,;q' "$tmpinput") > ! $verbose || print_headline "$subject" > > + # check In-Reply-To for version > 1 > + if [ "$check_in_reply_to" = true ] \ > + && echo "$subject" | grep -qi 'v[2-9].*\]' \ Your regex won't work for v10 etc.