delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/05/08/06:30:51

X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs
Date: Tue, 8 May 2001 12:08:17 +0200 (MET DST)
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
X-Sender: broeker AT acp3bf
To: djgpp-workers AT delorie DOT com
Subject: Re: snprintf?
In-Reply-To: <Pine.SUN.3.91.1010508104711.3965T-100000@is>
Message-ID: <Pine.LNX.4.10.10105081203500.9177-100000@acp3bf>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019