mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
tests: detect and close leaks in unit tests.
Fixes: #288 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
5029f95066
commit
7200002773
2
Makefile
2
Makefile
@ -13,7 +13,7 @@ BOLTVERSION := master
|
||||
|
||||
ifneq ($(NO_VALGRIND),1)
|
||||
VALGRIND=valgrind -q --error-exitcode=7
|
||||
VALGRIND_TEST_ARGS = --track-origins=yes --leak-check=full --show-reachable=yes
|
||||
VALGRIND_TEST_ARGS = --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all
|
||||
endif
|
||||
|
||||
ifeq ($(COVERAGE),1)
|
||||
|
@ -268,6 +268,7 @@ int main(int argc, char **argv)
|
||||
printf("%s\n", hextemp);
|
||||
}
|
||||
secp256k1_context_destroy(secp256k1_ctx);
|
||||
opt_free_table();
|
||||
tal_free(ctx);
|
||||
return 0;
|
||||
}
|
||||
|
@ -114,6 +114,8 @@ int main(int argc, char *argv[])
|
||||
setenv("PATH", tal_strjoin(tmpctx, pathelems, ":", STR_NO_TRAIL), 1);
|
||||
assert(streq(find_my_path(tmpctx, argv0), answer));
|
||||
|
||||
assert(!taken_any());
|
||||
take_cleanup();
|
||||
tal_free(tmpctx);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user