Running unit tests under valgrind

Donald Allen donaldcallen at
Tue May 22 10:48:59 EDT 2012

On Tue, May 22, 2012 at 10:42 AM, John Ralls <jralls at> wrote:
> On May 21, 2012, at 8:23 PM, Donald Allen wrote:
>> On Mon, May 21, 2012 at 11:10 PM, John Ralls <jralls at> wrote:
>>> On May 21, 2012, at 3:41 PM, Donald Allen wrote:
>>>> On Mon, May 21, 2012 at 6:22 PM, Phil Longstaff <phil.longstaff at> wrote:
>>>>> Yes.  A lot of the leaks are in the unit test code.  But I've found 2 legitimate leaks as well.
>>>> 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.
> Pay closer attention to what I wrote, please. Merely launching Gnucash and doing a few basic operations under Valgrind won't accomplish much -- but it will take a long time, because Valgrind slows execution by a factor of 20-30x, according to their own documentation.
> As for the comprehensive testing, I'm plugging away at that in the engine, and Phil started this thread by noting that he was finding leaks with tests -- which is what he's working on (in the backend code).
> As a more general observation, your constant carping about a process that *you don't participate in* is annoying and unhelpful.
> Please restrain yourself.

You urge me above to "pay closer attention to what I wrote, please".
Now do the same with my message. I made a suggestion to you, based on
many years of experience in software development as a manager and as
an individual participant, and then I VOLUNTEERED TO HELP. Instead, I
get this absurdly rude response from you. Look in the mirror before
you start spouting about restraint. My offer of help is withdrawn.

More information about the gnucash-devel mailing list