From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 326972B83 for ; Wed, 15 Aug 2018 12:49:43 +0200 (CEST) Received: from cpe-2606-a000-111b-40fe-f1c6-eb46-ccca-fca5.dyn6.twc.com ([2606:a000:111b:40fe:f1c6:eb46:ccca:fca5] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1fptMq-0005kX-6D; Wed, 15 Aug 2018 06:49:34 -0400 Date: Wed, 15 Aug 2018 06:48:59 -0400 From: Neil Horman To: Nikhil Rao Cc: dev@dpdk.org, thomas@monjalon.net, john.mcnamara@intel.com, bruce.richardson@intel.com, ferruh.yigit@intel.com, stephen@networkplumber.org, toggle-mailboxes@hmswarspite.think-freely.org Message-ID: <20180815104859.GA3846@hmswarspite.think-freely.org> References: <20180814105208.GA24870@hmswarspite.think-freely.org> <1534313442-26927-1-git-send-email-nikhil.rao@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1534313442-26927-1-git-send-email-nikhil.rao@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Score: -2.9 (--) X-Spam-Status: No Subject: Re: [dpdk-dev] [PATCH v9] checkpatches.sh: Add checks for ABI symbol addition 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: , X-List-Received-Date: Wed, 15 Aug 2018 10:49:43 -0000 On Wed, Aug 15, 2018 at 11:40:42AM +0530, Nikhil Rao wrote: > > -----Original Message----- > > From: Neil Horman [mailto:nhorman@tuxdriver.com] > > I was about to say that its because you've not got enough context to let the > > awk file figure out what your section name is, but that doesn't appear to be > > the case. Can you provide the exact command line you are running to do your > > symbol check, as well as the full patch that you are checking? I'd like to try > > recreate the issue here > > > > Best > > Neil > > > > Complete patch is below > > Thanks, I think I made a mistake in how I detect section names in the awk script. The rule assumes that the entire section is getting added (i.e. we are adding the EXPERIMENTAL section as a whole unit, hence the starting a line with + to id the section name, and thats not the case here. I think the rule needs to be any line in a map file that ends with a { (based on our coding practice), is a section start, and the section name is the next to the last field in the line (i.e. $(NF-1) ). Please apply the patch below and confirm that this works for you. Best Neil diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh index daaf45e14..cf9cfc745 100755 --- a/devtools/check-symbol-change.sh +++ b/devtools/check-symbol-change.sh @@ -25,14 +25,14 @@ build_map_changes() # supresses the subordonate rules below /[-+] a\/.*\.^(map)/ {in_map=0} - # Triggering this rule, which starts a line with a + and ends it + # Triggering this rule, which starts a line and ends it # with a { identifies a versioned section. The section name is # the rest of the line with the + and { symbols remvoed. # Triggering this rule sets in_sec to 1, which actives the # symbol rule below - /+.*{/ {gsub("+",""); + /^.*{/ { if (in_map == 1) { - sec=$1; in_sec=1; + sec=$(NF-1); in_sec=1; } }