Skip to content

Tests_pass_valgrind

rustyrussell edited this page Sep 29, 2011 · 2 revisions

ccanlint's tests_pass_valgrind test runs each test under valgrind.

Running tests under valgrind is the slowest part of ccanlint, so it's common to disable it using '-x tests_pass_valgrind' for doing a quick check.

Also, valgrind isn't perfect, and can complain on valid code. You can specify options for valgrind in the ccanlint: section of _info, such as:

Ccanlint:
    // Valgrind needs suppressions for our code
    tests_pass_valgrind --suppressions=test/valgrind-suppressions

The option "FAIL" means not to run valgrind at all.

You can also specify valgrind options for specific test files only, like so:

Ccanlint:
    // We do tricky things, but it's OK...
    tests_pass_valgrind	run-tricky.c:--partial-loads-ok=yes
Clone this wiki locally