Running unit tests under valgrind

Donald Allen donaldcallen at
Tue May 22 10:32:46 EDT 2012

On Tue, May 22, 2012 at 10:23 AM, Derek Atkins <warlord at> wrote:
> Donald,
> Donald Allen <donaldcallen at> writes:
>>>> Do you guys run the whole system under valgrind (John is obviously
>>>> right about tests on the parts don't necessarily say anything about
>>>> the whole) prior to release as part of your QA process?
>>> Not routinely. Every so often someone will get motivated and run under valgrind for a while and chase down some of the leaks, but there are too many execution paths and not yet enough tests to be sure of exercising even a significant percentage of the program. We'll get that sorted eventually.
>> I would argue that waiting until you have what you think is adequate
>> test coverage is not a good strategy. Releases don't happen that often
>> and it sounds like running the whole thing under valgrind isn't that
>> difficult, so the cost of doing it is not high. And it just might turn
>> up something important, even without comprehensive test coverage. You
>> could make the gnucash+valgrind package available to some volunteers
>> whever you see fit during the release cycle (I'd be happy to be one of
>> them) to exercise the system and report the problems it turns up. So I
>> think it makes sense from a cost-benefit standpoint not to wait.
>> I would also argue that the comprehensive test suite, especially on a
>> volunteer project like this, could be a pipe dream. I've been involved
>> in projects where people were being paid for their work and all the
>> right things were said, but not done, about test coverage. It's like
>> documentation. Programmers like to program, not write tests, not write
>> documentation. I'm not saying it never happens, but its a lot more
>> difficult to make it happen than to get reams of code written.
> Are you offering to help do this periodic testing!?   If so, thank you!

Yes, I said so above. Make a valgrind+gnucash executable available to
me (or tell me how to build one), and I will put it through the kind
of paces that I use gnucash for normally. I've got a very fast box
with 8 Gb of memory and SSDs running Linux that should make the
performance hit tolerable. I can easily test both the db (postgresql)
and xml backends.


>> /Don
>>> Regards,
>>> John Ralls
> -derek
> --
>       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
>       Member, MIT Student Information Processing Board  (SIPB)
>       URL:    PP-ASEL-IA     N1NWH
>       warlord at MIT.EDU                        PGP key available

More information about the gnucash-devel mailing list