Page MenuHomePhabricator

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

Authored by majcosta on Wed, Jul 29, 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
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

majcosta created this revision.Wed, Jul 29, 18:08
Herald added a reviewer: Restricted Project. · View Herald TranscriptWed, Jul 29, 18:08
majcosta requested review of this revision.Wed, Jul 29, 18:08
teamcity edited the summary of this revision. (Show Details)Wed, Jul 29, 18:08

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

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