Page MenuHomePhabricator

[backport#17633] tests: Add option --valgrind to run the functional tests under Valgrind

Authored by majcosta on Jul 29 2020, 18:08.



Add option --valgrind to run nodes under valgrind in the functional tests (practicalswift)

Pull request description:

What is better than fixing bugs? Fixing entire bug classes of course! :)

Add option `--valgrind` to run the functional tests under Valgrind.

Regular functional testing under Valgrind would have caught many of the uninitialized reads we've seen historically.

Let's kill this bug class once and for all: let's never use an uninitialized value ever again. Or at least not one that would be triggered by running the functional tests! :)

My hope is that this addition will make it super-easy to run the functional tests under Valgrind and thus increase the probability of people making use of it :)

Hopefully `test/functional/ --valgrind` will become a natural part of the pre-release QA process.


$ test/functional/ --help
  --valgrind            run nodes under the valgrind memory error detector:
                        expect at least a ~10x slowdown, valgrind 3.14 or
                        later required

Depends on D7083

Backport of Core PR17633

Test Plan

Have valgrind >3.14 installed

ninja --valgrind

notice that tests run 10x slower

Diff Detail

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

This revision is now accepted and ready to land.Jul 29 2020, 21:18