From 622cc178c70342f348cf621022da0aa5432413ca Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Thu, 22 Jun 2017 16:07:13 -0300 Subject: [PATCH] ospf: add memory leak test Standard memory leak test/report. --- tests/topotests/ospf-topo1/test_ospf_topo1.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/topotests/ospf-topo1/test_ospf_topo1.py b/tests/topotests/ospf-topo1/test_ospf_topo1.py index 352e6dde66..884cb33e6b 100755 --- a/tests/topotests/ospf-topo1/test_ospf_topo1.py +++ b/tests/topotests/ospf-topo1/test_ospf_topo1.py @@ -154,6 +154,14 @@ def test_ospf_link_down(): count=20, wait=3) assert result, 'OSPF did not converge on {}:\n{}'.format(router, diff) +def test_memory_leak(): + "Run the memory leak test and report results." + tgen = get_topogen() + if not tgen.is_memleak_enabled(): + pytest.skip('Memory leak test/report is disabled') + + tgen.report_memory_leaks() + if __name__ == '__main__': args = ["-s"] + sys.argv[1:] sys.exit(pytest.main(args)) -- 2.39.5