Re: [PATCH] Generated SBuf::find() test cases

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 26 Feb 2013 11:45:41 +1300

On 26/02/2013 11:06 a.m., Alex Rousskov wrote:
> Hello,
>
> The attached patch adds about 700'000 test cases for eight
> SBuf::find() methods. Needless to say, they are generated rather than
> manually written. They take a couple of seconds to run. Configuration
> options allow us to increase or decrease the number of test cases if needed.

Why do we need so many tests? the CppUnit model when done right is to do
fine-grained state assert and pinpoint exactly what operation is failing
and how.

Surely a selection of lengths from the middle, and specific scans of all
the edge-boundary tests would be enough?
That can't be more than a few hundred - which is few enough to run each
as a separate CppUnit case.

Also, using fuzzing with a random input leaves us open to the rare
occasions when a single byte octet value at a specific location is the
cause of a bug. Think \0 at octet 5 when doing 32-bit chunk comparisions
in some buggy implementation checking against !*p. That type of failure
appears intermittently and inspires confusion rather than a fix.

Amos
Received on Mon Feb 25 2013 - 22:45:45 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 26 2013 - 12:00:07 MST