This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoid backtrace tests matching filenames when searching for functionnames


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]