Whenever a test is executed, each daemon inside a router will run with valgrind attached. Example BGPD in r1, or r2 will run with valgrind behind, then we wait for the test to finish (ie waiting the daemon to be killed) before checking if there is memory leak.
Things to ponder on:
The implementation is for demonstration purpose;
it could be improved with a --check-memory-leak flag
we could also use gdbserver for example to check per Assertion example, Everytime we do a AssertVtysh we look at valgrind, instead of waiting for the whole test to finish.
I also saw an implementation where we use memstats-at-exit not sure how it can correlate with valgrind.
For now if there is a memory leak, it just exit with an error and display the content of valgrind, Maybe there is another way or it should be integrated inside reportato
Not sure of the behaviour of Valgrind inside a namespace (or a jail in freebsd) if there is overhead or there is false positive.
Things to ponder on:
--check-memory-leak
flaggdbserver
for example to check per Assertion example, Everytime we do aAssertVtysh
we look at valgrind, instead of waiting for the whole test to finish.memstats-at-exit
not sure how it can correlate with valgrind.reportato