Mail Archives: djgpp-workers/2001/05/08/06:30:51
On Tue, 8 May 2001, Eli Zaretskii wrote:
[...]
> didn't cope well with this (setting a pointer to NULL is looking for
> SIGSEGV's ;-), and IIRC the test harness didn't test all of the
> possible cases (I forget the details). The case of n == 0 is very
> important for snprintf, so it must be rock-solid.
As a reminder, let me point out that we do have tools to check whether a
test case exercised all of the special cases in a given function: that's
exactly what gcov is for. E.g. compiling snprintf.c separately from the
libc, with -ftest-coverage -fprofile-arcs turned on, and doing the test
run with that .o file in use, you can then run
gcov -b -f snprintf.c
and scan the resulting snprintf.c.gcov file for occurences of lines
where the execution count is '###########' --> never executed. Also
check for branches never executed.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -