[ccan] Valgrind + tests

Rusty Russell rusty at rustcorp.com.au
Tue Mar 24 23:30:08 EST 2009


On Tuesday 24 March 2009 20:08:02 Tim Post wrote:
> Hi,
> 
> I was looking at TAP as well as wiki entries discussing running tests
> under valgrind. valgrind/valgrind.h provides a very useful macro,
> RUNNING_ON_VALGRIND which if > 0 provides the valgrind instance.
> 
> This means, modules can be a bit more specific when complaining to
> stderr if running under valgrind, at least conveying the valgrind
> instance.
> 
> What comes to mind is modifying tap to see if HAVE_VALGRIND_VALGRIND_H
> is high, and printing the resulting instance in messages.
> 
> If this was defined in config.h, it would allow modules to be more
> verbose if running under valgrind, turn asserts back on, etc,  of course
> only if HAVE_VALGRIND is defined.
> 
> So, how welcome are changes to config.h?

Sure.  Or you can submit something that uses it, and it'll break my compile
(-Wundef) and I'll update config.h automatically :)

Thanks!
Rusty.



More information about the ccan mailing list