From 52ee36c595005cba1be1eb77c5273e8002cdc6f9 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 11 Apr 2017 23:52:57 -0700 Subject: [PATCH] tests: run valgrind on children. This fails on the old dev-restart tests, so we need to only enable it for the new tests: rusty@rusty-XPS-13-9360:~/devel/cvs/lightning (guilt/ping-pong)$ daemon/test/test-basic --restart --verbose ... { } RESTARTING dev-restart failed! valgrind: mmap(0x38000000, 2265088) failed in UME with error 22 (Invalid argument). valgrind: this can be caused by executables with very large text, data or bss segments. Signed-off-by: Rusty Russell --- daemon/test/scripts/vars.sh | 2 +- lightningd/test/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/test/scripts/vars.sh b/daemon/test/scripts/vars.sh index c07c82ef0..0fe3147b7 100644 --- a/daemon/test/scripts/vars.sh +++ b/daemon/test/scripts/vars.sh @@ -16,7 +16,7 @@ PREFIX=$EATMYDATA # Always use valgrind if available (unless NO_VALGRIND=1 set) if which valgrind >/dev/null; then :; else NO_VALGRIND=1; fi -[ -n "$NO_VALGRIND" ] || PREFIX="$EATMYDATA valgrind -q --error-exitcode=7" +[ -n "$NO_VALGRIND" ] || PREFIX="$EATMYDATA valgrind -q $VG_TRACE_CHILDREN --trace-children-skip=*bitcoin-cli* --error-exitcode=7" # We inject 0.01 bitcoin, but then fees (estimatefee fails and we use a # fee rate as per the default). diff --git a/lightningd/test/Makefile b/lightningd/test/Makefile index 3f5d55165..ea71bca5a 100644 --- a/lightningd/test/Makefile +++ b/lightningd/test/Makefile @@ -18,7 +18,7 @@ lightningd/tests: $(LIGHTNINGD_TEST_PROGRAMS:%=unittest/%) lightningd-test-0-basic: lightningd-test-setup-0 lightningd-test-0-%: - NO_VALGRIND=$(NO_VALGRIND) VARIANT=0 lightningd/test/test-$* + NO_VALGRIND=$(NO_VALGRIND) VG_TRACE_CHILDREN="--trace-children=yes" VARIANT=0 lightningd/test/test-$* # We shutdown first in case something is left over. lightningd-test-setup-%: lightningd-all daemon/lightning-cli