Subject: Re: Unit test suite for c-ares

Re: Unit test suite for c-ares

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 25 Nov 2015 11:16:33 +0100 (CET)

On Wed, 25 Nov 2015, David Drysdale wrote:

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

+1

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

This modifies the public API though so it'll break existing applications. I
would suggest this is introduced with a new API function to allow new
applications to use it and yet keep the old ones functional.

> - 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

Fine by me, but if you only want it for testing purposes I'm less convinced.
For testing, you could do a separate build that allows you to link and use
private functions as well.

-- 
  / daniel.haxx.se
Received on 2015-11-25