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 F0184436E8; Thu, 14 Dec 2023 03:37:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9B0942F57; Thu, 14 Dec 2023 03:37:06 +0100 (CET) Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mails.dpdk.org (Postfix) with ESMTP id 4DDE440283 for ; Thu, 14 Dec 2023 03:37:05 +0100 (CET) Received: from loongson.cn (unknown [10.20.42.74]) by gateway (Coremail) with SMTP id _____8CxO+lOanplb+UAAA--.5272S3; Thu, 14 Dec 2023 10:37:03 +0800 (CST) Received: from [10.20.42.74] (unknown [10.20.42.74]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Ax_OBJanpls34DAA--.20193S3; Thu, 14 Dec 2023 10:36:59 +0800 (CST) Subject: Re: [PATCH v1] tools: fix parsing message-id in the headers of email To: Aaron Conole Cc: ci@dpdk.org, msantana@redhat.com, dmarchan@redhat.com, thomas@monjalon.net, probb@iol.unh.edu, dceara@redhat.com, alialnu@nvidia.com References: <20231204025246.14779-1-zhoumin@loongson.cn> <6814760d-e5b3-5d70-7fd2-58137038dd81@loongson.cn> From: zhoumin Message-ID: <17ce7bbc-e5e3-039f-a5fa-c9c8990bdee3@loongson.cn> Date: Thu, 14 Dec 2023 02:36:34 +0000 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID: AQAAf8Ax_OBJanpls34DAA--.20193S3 X-CM-SenderInfo: 52kr3ztlq6z05rqj20fqof0/1tbiAQAFAWV5FK0IEQBVss X-Coremail-Antispam: 1Uk129KBj93XoWxJFWUCF47uFy3AFy5G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X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org On Wed, Dec 13, 2023 at 12:53PM, Aaron Conole wrote: > zhoumin writes: > >> Hi Aaron, >> >> Thanks for your reply. >> >> On Thur, Dec 7, 2023 7:07PM, Aaron Conole wrote: >>> Min Zhou writes: >>> >>>> Some email has the message-id header named "Message-id", like this: >>>> https://patches.dpdk.org/project/dpdk/patch/20230930010024.34377-1-rdna@apple.com/. >>>> So add the parsing for this kind of email. >>>> >>>> Signed-off-by: Min Zhou >>>> --- >>> Hi Min, >>> >>> I wonder - we will keep having this issue of these header fields being >>> incorrectly matched based on case issues. >>> >>> Maybe we should make getheader have the ability to ignore case, or pass >>> something like Message-[iI][dD] as the header argument. >>> >>> WDYT? >> Yes, making getheader have the ability to ignore case is simple and >> does work for this case as following: >> >> diff --git a/tools/parse-email.sh b/tools/parse-email.sh >> index 9ab627b..1e3008a 100755 >> --- a/tools/parse-email.sh >> +++ b/tools/parse-email.sh >> @@ -29,7 +29,7 @@ fi >> >>  getheader () # >>  { >> -       sed "/^$1: */!d;s///;N;s,\n[[:space:]]\+, ,;s,\n.*,,;q" "$2" | >> +       sed "/^$1: */I!d;s///;N;s,\n[[:space:]]\+, ,;s,\n.*,,;q" "$2" | >>         sed 's,",\\",g' >> >>  } >> >> But, I think we might get a false-positive when matching header field >> by this way. Because we are handling the whole patch file which could >> have same words in somewhere if we ignore the case. >> >> Passing Message-[iI][dD] also works for this case and I tend to use >> this method. What do you think? If you agree with this method I will >> send the V2 patch. > ACK by me - sounds good. That means we can just modify the existing > getheader check for message id. Yes, thanks! I will send the V2 patch. Best regards, Min >> Best regards, >> >> Min >> >> >>>> tools/parse-email.sh | 1 + >>>> 1 file changed, 1 insertion(+) >>>> >>>> diff --git a/tools/parse-email.sh b/tools/parse-email.sh >>>> index 9cb9583..fbe038a 100755 >>>> --- a/tools/parse-email.sh >>>> +++ b/tools/parse-email.sh >>>> @@ -35,6 +35,7 @@ subject=$(getheader Subject "$1") >>>> from=$(getheader From "$1") >>>> msgid=$(getheader Message-Id "$1") >>>> [ -n "$msgid" ] || msgid=$(getheader Message-ID "$1") >>>> +[ -n "$msgid" ] || msgid=$(getheader Message-id "$1") >>>> pwid=$(getheader X-Patchwork-Id "$1") >>>> listid=$(getheader List-Id "$1") >>>> reply=$(getheader In-Reply-To "$1")