From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E5F5344C3 for ; Fri, 17 Aug 2018 05:03:57 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2018 20:03:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,249,1531810800"; d="scan'208";a="249517474" Received: from nikhilr-mobl1.amr.corp.intel.com (HELO [10.252.162.26]) ([10.252.162.26]) by orsmga005.jf.intel.com with ESMTP; 16 Aug 2018 20:03:55 -0700 To: Neil Horman , dev@dpdk.org Cc: thomas@monjalon.net, nikhil.rao@intel.com References: <20180816110801.5378-1-nhorman@tuxdriver.com> From: "Rao, Nikhil" Message-ID: <954d81fa-e977-ac7e-8c5f-fbe2fd186bf4@intel.com> Date: Fri, 17 Aug 2018 08:33:53 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180816110801.5378-1-nhorman@tuxdriver.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] check-symbol-change: relax rule for identifying a section 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: Fri, 17 Aug 2018 03:03:58 -0000 On 8/16/2018 4:38 PM, Neil Horman wrote: > It was reported recently that some patches that add symbols to an > existing EXPERIMENTAL section of a version map file generate errors > because the check-symbol-change script was identifying the section as > "@@" rather than EXPERIMENTAL. This was fairly clearly due to the fact > that the rule identifying the version section expected the whole section > to be added, rather than having it already exist, with only new symbols > being added to the existing section. This led the match rule to misread > the format of that line and pull the wrong word out of it. > > The fix is to relax the rule slightly. Rather than assume that the > section must exist on a line that was added, allow the section name to > be set by any line that ends in a '{', which should be correct, given > our coding practices. The section name is then extracted as the next to > the last word on the line ( $(NF-1) ). > > Tested by the reporter with good results > > Reported-by: nikhil.rao@intel.com > Signed-off-by: Neil Horman > CC: thomas@monjalon.net > CC: nikhil.rao@intel.com > --- > devtools/check-symbol-change.sh | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > 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; > } > } > > Tested-by: Nikhil Rao