On 5/6/2013 12:10 PM, Mike Frysinger wrote:
> On Monday 06 May 2013 11:21:13 Chris Metcalf wrote:
>> -LC_ALL=C grep -x 'stat\(64\)\?("sample", {st_mode=S_IFREG|0644,
>> st_size=46118400000, \.\.\.}) \+= 0' check.log > /dev/null ||
>> +LC_ALL=C grep -x 'f\?stat\(at\)\?\(64\)\?(\(AT_FDCWD, \)\?"sample",
>> {st_mode=S_IFREG|0644, st_size=46118400000, \.\.\.}\(,
> 0\)\?) \+= 0' check.log > /dev/null ||
>
> i know it's not a new issue w/your patch, but could you change this to use
> grep -E instead ? that will require a escaping the plain ( and ), but i think
> that's better since the current syntax is not in POSIX afaik and you end up
> with less total escapes ...
>
> LC_ALL=C grep -x 'f?stat(at)?(64)?\(((AT_FDCWD, )?"sample", .........
The regexp I modified certainly gets better, but the others get a little worse
due to the syscall parens and the pipe symbol in "S_IFREG|0644". (Also,
following the advice in the grep info page, I use "[{]" to indicate a non-meta
curly bracket, so that's a little clunky too.) But it's still probably better
on balance to use egrep syntax.
We could switch only the one I modified to use '-E', but that feels really
confusing to future folks who come and modify.
I think the same risk of confusion is true of the fact that only one of the
tests doesn't use "-x"; I think it's better to add leading and trailing ".*" to
the regexps and use "-x" for that one too. In the spirit of general cleanup I
added that to my patch as well. See following email; I tested the result on
tilegx and x86_64.
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel