On Thu, May 22, 2008 at 12:49:04AM +0100, Daniel P. Berrange wrote:
I found a couple more small bugs in the qparams code
- In the qparam_query_parse() method, after appending each (name,value) pair of params, it failed to free the temporary buffers for the (name,value) pair. - Did not allow for ';' as a valid query parameter separator - In a couple of OOM cleanup scenarios it failed to free buffers allocated earlier on
In looking at this I decide we ought to have a test suite for this code so I'm also including one. It has 100% coverage of all the non-OOM code paths. The test case now passes when run under valgrind
Great, +1 How do you assert coverage ? gcov ? I think I used one of the KDE valgrind skins in the past to check those graphically but it was a long time ago and not for libvirt. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/