[Dnsmasq-discuss] [PATCH] unittests

Simon Kelley simon at thekelleys.org.uk
Wed Apr 14 21:57:32 UTC 2021


The Makefile stuff looks good to me.

Will play with the tests soon.

de-duplication patch applied.


Cheers,

Simon.

On 14/04/2021 18:35, Petr Menšík wrote:
> Hi Simon and other dnsmasq friends,
> 
> after some struggling with Makefile support, I am sending my dnsmasq
> unit tests. It uses another directory with tests specific code. I moved
> some common parts to Makefile.config, in order to be able to reuse them.
> Unit tests are under tests directory with own Makefile.
> 
> New target make check should work also from top directory. Some checks
> would work only from tests directory (make kyua). Current coverage is
> rather poor, but I hope can be used as a building block to better tests.
> Especially option parsing tests are easy to write. Testing of sending
> and receiving packets seems to be difficult, it should be tested by
> different kind of test IMHO.
> 
> First is attempt to refactor, the second is what evolved into more
> complex set of tests.
> 
> Original separate commits are still available on github [1].
> 
> What do you think?
> 
> PS: sending this message again, because patch #2 were big enough to
> require moderator's approval. Compressed it as a workaround.
> 
> Cheers,
> Petr
> 
> 1. https://github.com/InfrastructureServices/dnsmasq/tree/unittests
> 
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
> 



More information about the Dnsmasq-discuss mailing list