Testing of memcmp(). Possible patch to tester.c
Mike Frysinger
vapier at gentoo.org
Sat Jan 5 09:21:44 UTC 2008
On Saturday 27 October 2007, Mats Erik Andersson wrote:
> the attached difference file addresses the problem of
> better detecting a malfunctioning memcmp() call. It concerns
> the file
>
> uClibc-0.9.29/test/string/tester.c
we blatantly steal this test from glibc ... any enhancements ive made i pushed
back upstream as appropriate.
> in the test suite. Where possible the old test cases were
> rebuilt to avoid the return values (from memcmp) +1 and -1,
> but still only positivity and negativity are tested for.
> This was done in order to better disclose problems with
> the optimized and architecture specific implementations.
> In addition, there are some new test cases gleaned from
> Dropbear, and which conduct tests with shifting alignment.
> Of course, not all of these twenty test cases are independent,
> but in more verbose forms they were instrumental when I
> debugged architecture specific assembly code for an embedded
> system (not yet incorporated into the code base of uClibc).
going by your description, it sounds like this would be something the glibc
guys would accept. can you please resend this entire e-mail to
libc-alpha at sourceware.org ? i'll take care of merging it into uClibc's copy.
> It was also essential to use a flag "-fno-builtin" to detect the
> failures, both for the old test cases and these new ones.
which should already be happening ... the string Makefile makes sure to add
this flag
> Based I on this recent experience, I have begun developing
> a modified testing machinery that better would issue warnings
> for false positives. The effort to avoid return values +1 and -1
> is an afterglow of this methodology. Since the present test
> suite is somewhat awkward to use in cross compiled settings,
> I might come back to that issue another time.
the test framework should be converted to dejagnu ... ive spent a little time
on this, but much more is needed
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20080105/6861ef77/attachment-0002.pgp
More information about the uClibc
mailing list