Subject: Re: Unit test suite for c-ares

Re: Unit test suite for c-ares

From: David Drysdale <drysdale_at_google.com>
Date: Wed, 25 Nov 2015 10:11:38 +0000

On Fri, Oct 30, 2015 at 9:33 AM, David Drysdale <drysdale_at_google.com> wrote:
> On Fri, Oct 30, 2015 at 8:53 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>> On Thu, 22 Oct 2015, David Drysdale wrote:
>>> 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!
>>
>> Cool!

Er, two now -- one more tiny buglet below.

>>> 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.
>>
>> I agree with that, go ahead!
>
> Sorry, I wasn't sure -- did you get a chance to look over the other changes that affect the library itself? And if so, do you want me to merge daviddrysdale/test into bagder/master?

I've added a few more tests (coverage now up to >80%) but there are
now also a few more changes to the library itself, which someone else
should cast an eye over.

 - Fix double-free from ares__read_line() failure case
https://github.com/daviddrysdale/c-ares/commit/d91d731636f5

 - Extend the injection of malloc/free to cover realloc too:
https://github.com/daviddrysdale/c-ares/commit/492a1cc5e4fa

 - Add ares_set_sortlist() to allow manual specification (and
therefore testing) of the sort list for ares_gethostbyname()
https://github.com/daviddrysdale/c-ares/commit/79c719270fb6

(And it would also still be good to have someone else look at the
earlier list of non-test changes.)
Received on 2015-11-25