This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Consensus on unit tests?
- From: Florian Weimer <fweimer at redhat dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 1 Jul 2016 08:43:17 +0200
- Subject: Re: Consensus on unit tests?
- Authentication-results: sourceware.org; auth=none
- References: <92609f90-7a53-a455-ca72-b9baae224a38 at redhat dot com>
On 06/25/2016 01:59 AM, Carlos O'Donell wrote:
I would like to remove the superfluous condition and add a
unit test for all the cases that define the way the interface
should behave.
Since Florian asked for pretty diagrams, I have included them.
I can't quote your patch due to the way it is included in the message
(inline text after the signature).
What's unclear based on the documentation if the address has to fall in
the range covered by the link map (i.e., if there are indeed only three
cases, or five). If there is indeed a precondition that the address is
in some special range, you should add it to the comment.
There is also a stray comment in the function itself.
Should we allow unit tests for the dynamic loader?
I expect unit tests which look like this to be noncontroversial.
Things are more interesting if you have to add testing hooks to the
code, or export additional symbols.
Thanks,
Florian