This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Untested symbols
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 26 Jul 2013 16:11:29 +0200
- Subject: Re: Untested symbols
- References: <Pine dot LNX dot 4 dot 64 dot 1307192154240 dot 14156 at digraph dot polyomino dot org dot uk> <20130720034539 dot GA5718 at domone> <Pine dot LNX dot 4 dot 64 dot 1307201043040 dot 3231 at digraph dot polyomino dot org dot uk>
On Sat, Jul 20, 2013 at 11:03:57AM +0000, Joseph S. Myers wrote:
>
> Anyway, you can ignore the reserved-namespace symbols if you wish. That
> reduces 1493 untested symbols (some in more than one library) to 916.
> The bulk of those are symbols that could have genuine, meaningful tests of
> their functionality added. It's extremely easy for people interested in
> adding tests to find good functions to test in the list - we're a very
> long way from the point where it's largely adding skeleton tests that
> confirm that functions such as chown, delete_module, reboot or setuid
> exist without being able to verify much more about those functions. (But
> I still wouldn't recommend *removing* such functions from the list -
> better to add the minimal tests to verify that calls compile and link, so
> that no-one creates a glibc port that's accidentally missing them. Such a
> minimal test of a root-only function is quick to add.)
>
The 916 tests is still too much to add manually. You need some
automation to reduce it. Best way is find some classes that can be
handled uniformly.
As you mentioned only test if they compile and link it should be
possible to get prototype and supply default arguments for each type.
Something like:
git grep "^$SYMBOL (" | sed -e"s/float[^,]*,/0.0,/g" | sed -e"s/char *[^,]*,/NULL,/g" ...
I wonder how many of testcases generated in this way would actually run
and do not crash.
> --
> Joseph S. Myers
> joseph@codesourcery.com