bd1e1a9720ce4617f7d97be75cffc45e905bb791 |
|
10-Aug-2016 |
Phil Carmody <phil@dovecot.fi> |
lib-test: test-exit helper to stop valgrind complaining about fork()s
fork()s that want to _exit() will cause valgrind's full memory leak
checker to complain a lot - this performs a quick cleanup first.
Before:
phil@phil:~/repos/dovecot-core$ valgrind --trace-children=yes --leak-check=full --show-leak-kinds=all src/lib/test-lib --match unix
==19576== total heap usage: 4 allocs, 0 frees, 17,858 bytes allocated
istream unix ......................................................... : ok
0 / 1 tests failed
==19575== total heap usage: 7 allocs, 7 frees, 19,327 bytes allocated
After:
phil@phil:~/repos/dovecot-core$ valgrind --trace-children=yes --leak-check=full --show-leak-kinds=all src/lib/test-lib --match unix
istream unix ......................................................... : ok
==4993== total heap usage: 4 allocs, 4 frees, 17,858 bytes allocated
0 / 1 tests failed
==4992== total heap usage: 7 allocs, 7 frees, 19,327 bytes allocated
Signed-off-by: Phil Carmody <phil@dovecot.fi> |