From 1629c05924fe96ab487d3ba6bafbe7f11679274c Mon Sep 17 00:00:00 2001 From: "G. Paul Ziemba" Date: Sun, 30 Mar 2025 15:43:04 -0700 Subject: bgpd: rfapi: track outstanding rib and import timers, free mem at exit While here, also make "VPN SAFI clear" test wait for clear result (tests/topotests/bgp_rfapi_basic_sanity{,_config2}) Original RFAPI code relied on the frr timer system to remember various allocations that were supposed to be freed at future times rather than manage a parallel database. However, if bgpd is terminated before the times expire, those pending allocations are marked as memory leaks, even though they wouldn't be leaks under normal operation. This change adds some hash tables to track these outstanding allocations that are associated with pending timers, and uses those tables to free the allocations when bgpd exits. Signed-off-by: G. Paul Ziemba --- tests/topotests/bgp_rfapi_basic_sanity/scripts/cleanup_all.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/topotests/bgp_rfapi_basic_sanity/scripts/cleanup_all.py') diff --git a/tests/topotests/bgp_rfapi_basic_sanity/scripts/cleanup_all.py b/tests/topotests/bgp_rfapi_basic_sanity/scripts/cleanup_all.py index 7201ac8111..aaa43d5a7e 100644 --- a/tests/topotests/bgp_rfapi_basic_sanity/scripts/cleanup_all.py +++ b/tests/topotests/bgp_rfapi_basic_sanity/scripts/cleanup_all.py @@ -91,10 +91,10 @@ luCommand( ) num = "0 exist" -luCommand("r1", 'vtysh -c "show bgp ipv4 vpn"', num, "pass", "VPN SAFI clear") -luCommand("r2", 'vtysh -c "show bgp ipv4 vpn"', num, "pass", "VPN SAFI clear") -luCommand("r3", 'vtysh -c "show bgp ipv4 vpn"', num, "pass", "VPN SAFI clear") -luCommand("r4", 'vtysh -c "show bgp ipv4 vpn"', num, "pass", "VPN SAFI clear") +luCommand("r1", 'vtysh -c "show bgp ipv4 vpn"', num, "wait", "VPN SAFI clear") +luCommand("r2", 'vtysh -c "show bgp ipv4 vpn"', num, "wait", "VPN SAFI clear") +luCommand("r3", 'vtysh -c "show bgp ipv4 vpn"', num, "wait", "VPN SAFI clear") +luCommand("r4", 'vtysh -c "show bgp ipv4 vpn"', num, "wait", "VPN SAFI clear") luCommand( "r1", -- cgit v1.2.3