Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

topotato: add valgrind support and check for memory leaks #148

Open
wants to merge 1 commit into
base: topotato-base
Choose a base branch
from

Conversation

eznix86
Copy link

@eznix86 eznix86 commented Dec 21, 2023

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant