This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Improve performance of strstr


On 10/3/18 11:06 AM, Wilco Dijkstra wrote:
Eric Blake wrote:

Passing the glibc testsuite isn't all that reassuring, as they just
barely had to squash a strstr bug this year that was not caught by their
testsuite at the time:

It's better than nothing given newlib doesn't have any testsuite at all...
Do you know of a proper test for strstr by any chance?

Nothing that was written from the grounds of code coverage, but between the glibc test, the gnulib test [1] (which was also recently enhanced to catch the glibc failure), and your testing (if you want to make that public), we're probably doing fairly well. A testsuite written for 100% coverage as determined by gcov, or performed by a fuzzer that aims to get to the same results, might be even more reassuring; but I'm not asking you to tackle that. I'm just pointing out that a passing test does not always imply a passing implementation, if the test was not written with exact knowledge of every possible branch in the code.

[1] https://git.savannah.gnu.org/cgit/gnulib.git/tree/tests/test-strstr.c

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]