Subject: Re: Unit test suite for c-ares

Re: Unit test suite for c-ares

From: David Drysdale <>
Date: Thu, 22 Oct 2015 16:03:37 +0100

On Fri, Oct 9, 2015 at 2:56 PM, Daniel Stenberg <> wrote:
> On Fri, 9 Oct 2015, David Drysdale wrote:
>> I've made a start on a unit test suite for c-ares, and I'd be interested
>> in any feedback.
> In one word? AWESOME.


> I'm not a big C++ guy myself so I'm not overly thrilled with that choice,
> but I'm also much more *for* progress than letting my personal preference
> stand in the way and you're the driver here!
> As a project, c-ares will benefit greatly from a proper test suite.

By the way, I should observe that so far I've only seen one thing that
might count as a bug, even running with sanitizers/fuzzers etc -- so kudos
for the quality of the code!

That one thing is in this change:
which polices the top 2 bits of a label length to be (only) 00 or 11
-- seem sensible?

More generally, what's the best way to proceed with these changes?
Given that test/
is independent, it seems like it would probably be OK for me to push
things in there
without getting a second opinion, but the things that affect the main
library itself should
have someone else take a look.

As well as the fix above, I think those things are (so far):
 - minor changes to align docs with the code:
 - a change to allow repeated "-s searchdomain" options to ahost:
 - changes to expose more internal functionality for the tests:
     - expose ares_library_initialized()
     - allow malloc/free override:
 - convert README to
 - extra options to configure:
 - I assumed this should trigger a bump in the version number for next release:

> --
> /
Received on 2015-10-22