DPDK patches and discussions
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, doucette@bu.edu
Subject: Re: [dpdk-dev] [PATCH] check-symbol-change: fix regex to match on end of map file
Date: Fri, 2 Nov 2018 07:50:45 -0400	[thread overview]
Message-ID: <20181102115045.GA31972@hmswarspite.think-freely.org> (raw)
In-Reply-To: <3649242.bmXl2ZTEod@xps>

On Thu, Nov 01, 2018 at 11:53:00PM +0100, Thomas Monjalon wrote:
> 01/11/2018 14:54, Neil Horman:
> > 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
> 
> You could use these lines:
> 
> Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
> 
> Reported-by: Cody Doucette <doucette@bu.edu>
> 
I'm fine with the second line, and the first is fine I guess, but I'm not sure
there is an exact correlation

> > --- a/devtools/check-symbol-change.sh
> > +++ b/devtools/check-symbol-change.sh
> > -		/[-+] a\/.*\.^(map)/ {in_map=0}
> > +		/[-+] a\/.*\.[^map]/ {in_map=0}
> 
> Not sure this is what you intend:
> [^map] means any character except "m", "a" and "p".
> 
Its not 100%, but its pretty close.  The regex for exact matching on not a
specific string is pretty large and complex.  Since we have no files that that
end in .m .a or .p, this should give us what we want for the forseeable future.

> I don't know whether awk supports this syntax: (?!foo)
> 
It unfortunately doesn't, thats perl syntax, and while grep I think supports it,
awk is more strictly posix compliant.

Neil

> 
> 

  reply	other threads:[~2018-11-02 11:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01 13:54 Neil Horman
2018-11-01 22:53 ` Thomas Monjalon
2018-11-02 11:50   ` Neil Horman [this message]
2018-11-18 22:25     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181102115045.GA31972@hmswarspite.think-freely.org \
    --to=nhorman@tuxdriver.com \
    --cc=dev@dpdk.org \
    --cc=doucette@bu.edu \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).