From patchwork Thu Mar 19 14:44:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Dabilpuram X-Patchwork-Id: 66937 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8DEBAA0583; Thu, 19 Mar 2020 15:44:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2FD80F94; Thu, 19 Mar 2020 15:44:36 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id C6ADFCF3; Thu, 19 Mar 2020 15:44:34 +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 02JEdaw3023682; Thu, 19 Mar 2020 07:44:34 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=upnye5XhG/5wpH6DaewtskoIpekQ146LfKjGgxtvSCo=; b=jbWV/r46qDW9C6ewe9YNJen/KJZ6Ii6evsW5rkkPMmS5ZFpGDhXWpvAXAuKzj61UdOcz aXFCOY7AmUImkacCw9q3T/ycROpJG4GHjur27RyfYkLlXw9s2SCuPxyRwYvdhc6vorAo 98ILLxJ8eTz3+q9mIoa8b38x5Pkb4NKSfTWCdaG66OWMxNp5RUCsfkTnA7OyOCWaBo2l Kc57CCyJlEHSmYF9+jYYRTogfEMzPgY+R0yp9fi6Oc6zc7LrdrqrF4VJr8GZY59YZ3Rj L+KnhEFZ4A9PALl6H3zBwSEom6JUU1RDMoJDyTdl3H6Qi2ifTQk+wy1f9YmJ8sUnogwu wA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2yu9rpfsgm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 19 Mar 2020 07:44:34 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 19 Mar 2020 07:44:31 -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; Thu, 19 Mar 2020 07:44:31 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id AE2DD3F7040; Thu, 19 Mar 2020 07:44:29 -0700 (PDT) From: Nithin Dabilpuram To: , , Neil Horman CC: , , Nithin Dabilpuram , Date: Thu, 19 Mar 2020 20:14:18 +0530 Message-ID: <20200319144418.15661-1-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645 definitions=2020-03-19_05:2020-03-19, 2020-03-19 signatures=0 Subject: [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" 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 Acked-by: Neil Horman 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