From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AF930A0564; Sun, 22 Mar 2020 15:37:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7D7AD1BEE5; Sun, 22 Mar 2020 15:37:19 +0100 (CET) Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by dpdk.org (Postfix) with ESMTP id 9414C2C15; Sun, 22 Mar 2020 15:37:18 +0100 (CET) Received: by mail-il1-f194.google.com with SMTP id r5so5926272ilq.6; Sun, 22 Mar 2020 07:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GxmaSI/btMKWOVLVlFHWe4WbhTTYeaBqIjpOi1MrXUM=; b=tuQUqRYAvRamSIWEAo9cma8odxOq62dX+/hUIfrWwYmi2eNxLMvpYP4mQbk68/GuzC uIxq2ATQGbnQPiRw8qT9Ux/2AfJPXmzJwiD5WtDMD+y0D2zdnv0eNFxxnuL6sfeem3SE mxuXoyFDr/pYYPH2tmX4uw10a4y9IT7PHzowk1pStZxnTR/YTN1ORnVfozHBx2uHuvl/ sFfWpKGr4dbbd2/cL0aqei60NpRysWpnZ2aOGVl5s2dvo2C+OjJHYdOXKwqut9+px/jK DnEJNkOJl4Az8T6iawRZ++zumpfsU37JrNlrtMbnn4Qty3yfMgkUxmmDec5Zzfb9jjxh zNfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GxmaSI/btMKWOVLVlFHWe4WbhTTYeaBqIjpOi1MrXUM=; b=i2bYJIIxrarNbS+ywSTbf9Jy0JFCr2aZoqGS16mh3kFxKGOSsZmTGHacFBMSl0JeU+ cecLg4VA13Dk/Ub0aUAx23kUQFFV+KJoK1TQDPFhEhtJ/lyRQUPr/49uPNxGFxkzLuc+ jGXYPp6+XW9r3YbuBa3vtfEIhoK11O5E7/N+mEfl0RzfK7OgU1MSh9+/E2sGdFToiyMY +6bAi9qg7z3JWmUqlPCuuJnD8Wgy6o7lfoX3+z8Sb3e8VsLfhDMG+u64bD8Xhhg5Lqqi Pia7kL+jrX1VVtapzST+9WjOiOtdmr4JhalYDobGmfmezuAehsTpbdtblUKIv6BBSMQB oEgA== X-Gm-Message-State: ANhLgQ3/REKcw2j1RozSDvJH737xLNYPsJxogtrCUbCiK2InVbl3SXhK xXk1Iwc5jTkXHilldHhLhylpSoDjlyAtnb1ib0c= X-Google-Smtp-Source: ADFU+vsarA1QZ+WrMPrxPs/hPJ/uNuhbhH0IG/xHwI4nLvE6i23GQ5FjobGy8cp66QQN9UCbLFpp3PAeur8BUS2K4dM= X-Received: by 2002:a92:48cb:: with SMTP id j72mr17263182ilg.162.1584887837704; Sun, 22 Mar 2020 07:37:17 -0700 (PDT) MIME-Version: 1.0 References: <20200319144418.15661-1-ndabilpuram@marvell.com> In-Reply-To: <20200319144418.15661-1-ndabilpuram@marvell.com> From: Jerin Jacob Date: Sun, 22 Mar 2020 20:07:01 +0530 Message-ID: To: Nithin Dabilpuram Cc: Thomas Monjalon , David Marchand , Neil Horman , dpdk-dev , Jerin Jacob , dpdk stable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] devtools: fix check symbol change script X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Mar 19, 2020 at 8:14 PM Nithin Dabilpuram wrote: > > Fix check symbol change script to detect new diff file when > it is in between "--- /dev/null" to "b/lib/...". > Current awk line expects line to start with "a/..." > which is not always true for all diffs. > As a result if in_map was '1' earlier, it will not be changed > to '0' and we get check patch errors which are not true as the non > version.map files get interpreted as version map file. > > Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition") > Cc: nhorman@tuxdriver.com > Cc: stable@dpdk.org > > Signed-off-by: Nithin Dabilpuram Tested-by: Jerin Jacob > --- > Note: We have two examples where checkpatch errors are because of this > because the version.map file change comes earlier in the diff. Because of > this bug, any new file change that comes after version.map file diff > as "/dev/null" to "b/.." gets misdetected as version.map file. > * http://patches.dpdk.org/patch/66878/ > * https://patchwork.dpdk.org/patch/66900/ > devtools/check-symbol-change.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh > index c5434f3..19ce82f 100755 > --- a/devtools/check-symbol-change.sh > +++ b/devtools/check-symbol-change.sh > @@ -17,13 +17,13 @@ build_map_changes() > # map files are altered, and all section/symbol names > # appearing between a triggering of this rule and the > # next trigger of this rule are associated with this file > - /[-+] a\/.*\.map/ {map=$2; in_map=1} > + /[-+] [ab]\/.*\.map/ {map=$2; in_map=1} > > # Same pattern as above, only it matches on anything that > # does not end in 'map', indicating we have left the map chunk. > # When we hit this, turn off the in_map variable, which > # supresses the subordonate rules below > - /[-+] a\/.*\.[^map]/ {in_map=0} > + /[-+] [ab]\/.*\.[^map]/ {in_map=0} > > # Triggering this rule, which starts a line and ends it > # with a { identifies a versioned section. The section name is > -- > 2.8.4 >