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 99ED3A0583; Thu, 19 Mar 2020 16:49:57 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C2A6FEB; Thu, 19 Mar 2020 16:49:56 +0100 (CET) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80057.outbound.protection.outlook.com [40.107.8.57]) by dpdk.org (Postfix) with ESMTP id E16C9CF3; Thu, 19 Mar 2020 16:49:54 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bEjGu2uK1CXyzdvWhb4sol/2CYfQIEuvX6r7u5PYZ+pSxXazKnsj8ilO8QgC1H0zzehE4NBB7MOZaEgomsUHwWPaTe+hr2RiC2FYSvoMaiaoOJXILhSlw+ZYHqqXU87+EvyWw7dp1matbgvc0kcbwSL0rZ8bn+FLqqI2fc7TurO7u1bWPtIUUvX3GfWdGRZmBkYXi1r8mrjKqqd+V4M2avpM8o2AFHSTKeLQ9j1N2acDq6MtMtxGCO7o5sKuaOb9g6GdSLHEPaZ4awIK0JCPrmZsYiVxqz0+fEU5q8Sd+simtc2GrFb11wHohqaV2yvdVdAG7wq9J1DB6x9gd9m7Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7+hvN/arLJ2hO0qzdEI09gs9O84pI2x0mZoyN18hl1M=; b=h7JrxJfshF3R1P2CGoGLkmZKArVHjSIeB0dBlgTk6rf49QiQBJRJzh1mRF/cmgFgr+7UDmDrnhHFYgJ76NfG/QfYJhT2WFtOua6quedp8jybYY1kA7QgGRxMuqBzDTLVb+AIr0vnDD0yAjY3d+WxdyPyMd/Dnom7WHC4mq/FiB9vlQQBSHcig00s2noW/PYB1hXOkilS8vhiggXhQNDP7fisHmcBPePtvb/htHmOBHQ+KDcwTUbdrn7z9re5RN9ObKhKdqUT1btGTsC/wWRh9aG//nOGY0qovgdljJ9kySuEuye++ctKkwIvMcQE+ToiPC/IlXWV6oXRhqoDwnjYuQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7+hvN/arLJ2hO0qzdEI09gs9O84pI2x0mZoyN18hl1M=; b=cyG33mAOAZPS+zqDiaHmhyKScNTJjopx/boLBqpsx7oY/VRiXx9VioY8ovKQbx+/8ErCgp34XGwAF/ptQ51nd+NFVUQf+cvpBrQz/hpRvSISskqq4gY/OP1vPdMY/zgzLgTtXUJ6FlM/lUl1jhfTTE1+l85VN4pNNzc3FrHYnuA= Received: from VI1PR05MB4192.eurprd05.prod.outlook.com (10.171.183.18) by VI1PR05MB4797.eurprd05.prod.outlook.com (20.176.2.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.13; Thu, 19 Mar 2020 15:49:53 +0000 Received: from VI1PR05MB4192.eurprd05.prod.outlook.com ([fe80::e5c2:8505:424f:b28e]) by VI1PR05MB4192.eurprd05.prod.outlook.com ([fe80::e5c2:8505:424f:b28e%7]) with mapi id 15.20.2835.017; Thu, 19 Mar 2020 15:49:52 +0000 From: Bing Zhao To: Neil Horman , David Marchand CC: Thomas Monjalon , dev , Jerin Jacob Kollanukkaran , Nithin Dabilpuram , dpdk stable Thread-Topic: [PATCH] devtools: fix check symbol change script Thread-Index: AQHV/f6OBBr7Mi3MqEix7cUKYpBGGqhQDX2AgAAAsTA= Date: Thu, 19 Mar 2020 15:49:52 +0000 Message-ID: References: <20200319144418.15661-1-ndabilpuram@marvell.com> <20200319154039.GA2864286@hmswarspite.think-freely.org> In-Reply-To: <20200319154039.GA2864286@hmswarspite.think-freely.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=bingz@mellanox.com; x-originating-ip: [183.156.38.210] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 1b8ae976-75d9-44dc-0873-08d7cc1d2a1f x-ms-traffictypediagnostic: VI1PR05MB4797: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0347410860 x-forefront-antispam-report: SFV:NSPM; SFS:(10001)(10009020)(4636009)(366004)(136003)(346002)(39860400002)(376002)(396003)(199004)(110136005)(45080400002)(9686003)(478600001)(55016002)(2906002)(66446008)(66476007)(66556008)(64756008)(7696005)(52536014)(76116006)(71200400001)(66946007)(6506007)(53546011)(86362001)(81166006)(4326008)(966005)(316002)(54906003)(186003)(26005)(5660300002)(33656002)(8676002)(81156014)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB4797; H:VI1PR05MB4192.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: URCdqMsG5I5cSy7Wo5ZKa1pU8gyUxJXnR+gn0qkKvlOQDvQmj78O0ymlQW0q+0Cx7UUV9wrwrxmUNLzYYuniB/Yj1tAWokAq5VWSz32aXGb5L7UkDxesbhxCU3UJHhl1Maoc4DGhyoShetBvYUPcVkl+3EckPwRNhUaU1MGrjJLf0i1tBTKH0lNHZNTtU+6LcP0hcoOv7SyCXu2kL9WCP0MEhEWuBhEE5CMZ/jjDVHSu34Na2rm42R2PTDjojtgh67FLg/1xcH9HjKEuD78Qw00zrPcpvsUbsqaXhpWmEML89y8xfT1YqWPxDZ5FYNq6iqQynMx/oJIVXcEe925af0ZFXIdUkScL0MSBVKTsWHBYT8H/Uqgp4A1gcl5t70Ls+sRxYRPgUs6Avrf1qbtmTH+vXY1R6rkBc4hJxkhvm6EjDyA5BnAwqSJelbJfOyYYkr+uSbBquLBWVJtGPthcoWP19PYUwXC8F4sBauShAUbk/KPn2ci09Sc24fnMsxaBqTtqWnKAA9aRurGgktcPVdU5rO0jkRUGSdGGZTnujZqv5yKiEAXeXWlgeWrgkQMEPHjZiSlZCYL2H992xPzKDA== x-ms-exchange-antispam-messagedata: h47/mh34l8OjzclTsDdTQ874FqGXdQ6ODXXwBjgQjKcX451BFCw2SUyC/MnF2MIU9HdJu8x1Nu5Yo4MIkA7w08IBs3QuXb4jDVyrETFyzkoeP35enp9lXE9qEuiUeeJpaaze952p47o1gDtblIfOkg== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b8ae976-75d9-44dc-0873-08d7cc1d2a1f X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2020 15:49:52.7700 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: kVgNkmQlerGi9oiiVYgBNpC6tIdqIGKUStcoIuFgAEVDRGH2oo92rGkCQqNsd8/gMah7EKVjg+kB3M0P5AUeaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4797 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" > -----Original Message----- > From: Neil Horman > Sent: Thursday, March 19, 2020 11:41 PM > To: David Marchand > Cc: Thomas Monjalon ; dev ; > Jerin Jacob Kollanukkaran ; Nithin Dabilpuram > ; dpdk stable ; Bing > Zhao > Subject: Re: [PATCH] devtools: fix check symbol change script >=20 > On Thu, Mar 19, 2020 at 03:56:03PM +0100, David Marchand wrote: > > On Thu, Mar 19, 2020 at 3:44 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 > > > > There was a previous attempt at fixing this that did not get a review. > > > https://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2F > patch > > > work.dpdk.org%2Fpatch%2F56303%2F&data=3D02%7C01%7Cbingz > %40mellanox.c > > > om%7C19a838a81f4f4649f40f08d7cc1be78a%7Ca652971c7d2e4d9ba6 > a4d149256f46 > > > 1b%7C0%7C0%7C637202292556475544&sdata=3Dwgz8LssuucgrWlY > xsf978%2ByRVg > > 83btxZIm9aD56nekY%3D&reserved=3D0 > > > > I prefer the last submitted patch as it is simpler, but maybe I missed > > something in Bing patch. > > > > Neil, wdyt? > > > I'm not sure why I didn't review the previous patch you refrenced, > apologies for that. >=20 > That said, I'm not sure how this patch detects /dev/null patterns. It > looks like you still expect all lines to start with [+-] [ab]... >=20 > Neil Hi David & Neil, The cause and the fixing are almost the same for the two patches. Nithin's is simpler. When matching on "/dev/null", it just needs to continue. While in my patch, I think I also fix the [^map] matching even though it wo= rks. The behavior of RE in awk does not work as expected, .c and .h files don't = match on the "NOT map" at the end of the line, but match on the signle letter not among = the "m/a/p". (Correct me if anything wrong).=20 Thanks Bing >=20 > > > > -- > > David Marchand > > > > > > > > > > Signed-off-by: Nithin Dabilpuram > > > --- > > > 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. > > > * > > > > https://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2F > pat > > > > ches.dpdk.org%2Fpatch%2F66878%2F&data=3D02%7C01%7Cbingz% > 40mellanox > > > .com%7C19a838a81f4f4649f40f08d7cc1be78a%7Ca652971c7d2e4d > 9ba6a4d14925 > > > > 6f461b%7C0%7C0%7C637202292556475544&sdata=3DElLbgB9IJ7B6 > kuNTAjKAFr > > > WpNy8Jdq5%2BmfoRTxN72tI%3D&reserved=3D0 > > > * > > > > https://eur03.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2F > pa > > > > tchwork.dpdk.org%2Fpatch%2F66900%2F&data=3D02%7C01%7Cbin > gz%40mella > > > > nox.com%7C19a838a81f4f4649f40f08d7cc1be78a%7Ca652971c7d2e4d > 9ba6a4d14 > > > > 9256f461b%7C0%7C0%7C637202292556475544&sdata=3DiT%2Ft9os > A4HFTQ2kh3 > > > baWClvD3B%2FFdGzIrQgTvB5SfqU%3D&reserved=3D0 > > > 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=3D$2; in_map=3D1} > > > + /[-+] [ab]\/.*\.map/ {map=3D$2; in_map=3D1} > > > > > > # 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, whi= ch > > > # supresses the subordonate rules below > > > - /[-+] a\/.*\.[^map]/ {in_map=3D0} > > > + /[-+] [ab]\/.*\.[^map]/ {in_map=3D0} > > > > > > # Triggering this rule, which starts a line and ends = it > > > # with a { identifies a versioned section. The > > > section name is > > > -- > > > 2.8.4 > > > > > > >