[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] debugging daemon-conf failure



Daniel P. Berrange wrote:
...
> To be honest this whole test is complete overkill for checking the config
> file. The config file syntax allow 3 data types, integer, string and
> array. There is no need for us to be running the libvirtd daemon, and
> munging each possible setting in turn - we just need to test the edge

On the contrary, I think it is useful to get test coverage of as much
of the code as possible, and especially of as many *failing* cases
as possible.  Each of those failures goes through a slightly different
error path in the code.  When I wrote it initially, it triggered a few
problems, and that's why I extended it to cover all of the cases.

Since then, the presence of that test has helped me avoid introducing
at least one bug, that would have been a double free.

> cases for the different data types. This test also completely misses
> testing of the config file writing code, and things like escaping of
> quotes, etc. I'd rather we just kill this test and write a better unit
> test directly against the virConfPtr APIs in  src/util/conf.c to validate
> all the parser edge cases

Please don't remove it until there's a replacement with better coverage.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]