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 B09F5A057A for ; Mon, 23 Mar 2020 12:56:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7CAE11C06A; Mon, 23 Mar 2020 12:56:40 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id AF71D1C037; Mon, 23 Mar 2020 12:56:37 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02NBofwh002108; Mon, 23 Mar 2020 04:56:37 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=MKGS8zptjKBamlggnz/uhTZhxxf1nwcM0KafIMY+Q6s=; b=rxz9Zga7/dsWyJEIdTvKjgevPX5P3vS2Wpjyb1nByytQw1mCiDa/IG548fN0G6f9LM2c yWA31BUzrc3GV9oAl8kx8c4whOr/qXtAmwoLbkUIYOS1tMzM5IG2yZYr7MyG5hXa5ELu 8ZnxO0Emmy6eMuBWeYIuOawU3u2qxIemg+k9ShCv+ZBeXvCiZeqF9kyFCBa5XK9lzBUW krLoN7fUHXspKyn/B+fNvc1D0LmSpX0oR31oM3AsGMF62VVShrIY3YjAEryB+BtJ2TJG ASKhAEhF0KVdeEC10fibG0JQwk7S3a1nMXZMK+M4mss4cmGFzQnWGzsrFKQ9S9IZnFtc ew== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2ywvkqme19-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 23 Mar 2020 04:56:36 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 23 Mar 2020 04:56:34 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 23 Mar 2020 04:56:34 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 4222D3F704C; Mon, 23 Mar 2020 04:56:32 -0700 (PDT) From: Nithin Dabilpuram To: , , Neil Horman CC: , , , "Nithin Dabilpuram" , Date: Mon, 23 Mar 2020 17:26:13 +0530 Message-ID: <20200323115613.29677-1-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20200319144418.15661-1-ndabilpuram@marvell.com> References: <20200319144418.15661-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645 definitions=2020-03-23_04:2020-03-21, 2020-03-23 signatures=0 Subject: [dpdk-stable] [PATCH v2] devtools: fix check symbol change script X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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. Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition") Cc: nhorman@tuxdriver.com Cc: stable@dpdk.org Signed-off-by: David Marchand Signed-off-by: Nithin Dabilpuram Acked-by: Neil Horman Tested-by: Jerin Jacob --- v2: - Updated logic from David to fix "not map" check devtools/check-symbol-change.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh index c5434f3..ed2178e 100755 --- a/devtools/check-symbol-change.sh +++ b/devtools/check-symbol-change.sh @@ -17,13 +17,11 @@ 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; next} - # 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} + # The previous rule catches all .map files, anything else + # indicates we left the map chunk. + /[-+] [ab]\// {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