Avoid backtrace tests matching filenames when searching for function names

Roland McGrath roland@hack.frob.com
Wed Jan 23 22:49:00 GMT 2013


You could put some other repeated bits into the shared header file,
such as the NO_INLINE and FAIL macros.

What's the reason for putting NO_INLINE on do_test?

Make the function return bool since its only callers are testing its result
only as a Boolean.  Don't use implicit coercion to Boolean in the function.
The explanation of what kind of matching it does and the rationale for that
belongs in the comment on the function itself, not just in the posting.

The matching is technically still not robust.  The file name could contain
a '('.  Robust matching would look back from the last ')' or something like
that, or else use regex.  This all might be simpler if the test programs
themselves just generated output and the matching was done in an awk script
or something like that.  But the exactness of this part of the test
probably doesn't merit all that much fritter and effort.


Thanks,
Roland



More information about the Libc-alpha mailing list