From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <nhorman@tuxdriver.com>
Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58])
 by dpdk.org (Postfix) with ESMTP id 55ECF568A
 for <dev@dpdk.org>; Thu,  1 Nov 2018 14:54:33 +0100 (CET)
Received: from [107.15.85.130] (helo=hmswarspite.think-freely.org)
 by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63)
 (envelope-from <nhorman@tuxdriver.com>)
 id 1gHxXF-000057-6h; Wed, 31 Oct 2018 16:56:24 -0400
Received: from hmswarspite.think-freely.org (localhost [127.0.0.1])
 by hmswarspite.think-freely.org (8.15.2/8.15.2) with ESMTP id wA1DsGLc015993; 
 Thu, 1 Nov 2018 09:54:16 -0400
Received: (from nhorman@localhost)
 by hmswarspite.think-freely.org (8.15.2/8.15.2/Submit) id wA1DsF4b015992;
 Thu, 1 Nov 2018 09:54:15 -0400
From: Neil Horman <nhorman@tuxdriver.com>
To: dev@dpdk.org
Cc: Neil Horman <nhorman@tuxdriver.com>, thomas@monjalon.net, doucette@bu.edu
Date: Thu,  1 Nov 2018 09:54:10 -0400
Message-Id: <20181101135410.15945-1-nhorman@tuxdriver.com>
X-Mailer: git-send-email 2.17.2
X-Spam-Score: -1.5 (-)
X-Spam-Status: No
Subject: [dpdk-dev] [PATCH] check-symbol-change: fix regex to match on end
	of map file
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Nov 2018 13:54:33 -0000

the regex to determine the end of the map file chunk in a patch seems to
be wrong,  It was using perl regex syntax, which awk doesn't appear to
support (I'm still not sure how it was working previously).  Regardless,
it wasn't triggering and as a result symbols were getting added to the
mapdb that shouldn't be there.

Fix it by converting the regex to use traditional posix syntax, matching
only on the negation of the character class [^map]

Tested and shown to be working on the ip_frag patch set provided by
doucette@bu.edu

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: thomas@monjalon.net
CC: doucette@bu.edu
Reported-by: doucette@bu.edu
---
 devtools/check-symbol-change.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
index c0d2a6da1..1d21e9165 100755
--- a/devtools/check-symbol-change.sh
+++ b/devtools/check-symbol-change.sh
@@ -23,7 +23,7 @@ build_map_changes()
 		# 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}
+		/[-+] a\/.*\.[^map]/ {in_map=0}
 
 		# Triggering this rule, which starts a line and ends it
 		# with a { identifies a versioned section.  The section name is
@@ -153,7 +153,6 @@ clean_and_exit_on_sig()
 build_map_changes "$patch" "$mapfile"
 check_for_rule_violations "$mapfile"
 exit_code=$?
-
 rm -f "$mapfile"
 
 exit $exit_code
-- 
2.17.2