From ec8f360f2dc2c1c4686877d48cea96d460bb4ec9 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 22 Apr 2021 15:47:37 -0400 Subject: [PATCH] tests: Remove kill_mininet_router_process This function kills all processes that happen to have the same name to frr processes and it was only ever used in the setup. Setup should not be used to kill old runs. That should be a separate process. Signed-off-by: Donald Sharp --- .../test_bgp_gr_functionality_topo1.py | 4 ---- .../test_bgp_gr_functionality_topo2.py | 1 - .../test_bgp_multi_vrf_topo1.py | 4 ---- .../test_bgp_multi_vrf_topo2.py | 4 ---- ...test_bgp_recursive_route_ebgp_multi_hop.py | 1 - tests/topotests/lib/common_config.py | 24 ------------------- 6 files changed, 38 deletions(-) diff --git a/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py b/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py index 524da05875..ee57b9c479 100644 --- a/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py +++ b/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py @@ -134,7 +134,6 @@ from lib.common_config import ( check_router_status, shutdown_bringup_interface, step, - kill_mininet_routers_process, get_frr_ipv6_linklocal, create_route_maps, required_linux_kernel_version, @@ -204,9 +203,6 @@ def setup_module(mod): tgen = Topogen(GenerateTopo, mod.__name__) # ... and here it calls Mininet initialization functions. - # Kill stale mininet routers and process - kill_mininet_routers_process(tgen) - # Starting topology, create tmp files which are loaded to routers # to start deamons and then start routers start_topology(tgen) diff --git a/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py b/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py index 9438b90ef8..b6f8bf4cd9 100644 --- a/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py +++ b/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py @@ -133,7 +133,6 @@ from lib.common_config import ( check_router_status, shutdown_bringup_interface, step, - kill_mininet_routers_process, get_frr_ipv6_linklocal, create_route_maps, required_linux_kernel_version, diff --git a/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py b/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py index 1b62d986bd..7ea5a24fd7 100644 --- a/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py +++ b/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py @@ -128,7 +128,6 @@ from lib.common_config import ( create_static_routes, create_prefix_lists, create_interface_in_kernel, - kill_mininet_routers_process, create_bgp_community_lists, check_router_status, apply_raw_config, @@ -229,9 +228,6 @@ def setup_module(mod): tgen = Topogen(CreateTopo, mod.__name__) # ... and here it calls Mininet initialization functions. - # Kill stale mininet routers and process - kill_mininet_routers_process(tgen) - # Starting topology, create tmp files which are loaded to routers # to start deamons and then start routers start_topology(tgen) diff --git a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py index 90356ec173..37da53fc31 100644 --- a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py +++ b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py @@ -87,7 +87,6 @@ from lib.common_config import ( create_vrf_cfg, create_interfaces_cfg, create_interface_in_kernel, - kill_mininet_routers_process, get_frr_ipv6_linklocal, check_router_status, apply_raw_config, @@ -182,9 +181,6 @@ def setup_module(mod): tgen = Topogen(CreateTopo, mod.__name__) # ... and here it calls Mininet initialization functions. - # Kill stale mininet routers and process - kill_mininet_routers_process(tgen) - # Starting topology, create tmp files which are loaded to routers # to start deamons and then start routers start_topology(tgen) diff --git a/tests/topotests/bgp_recursive_route_ebgp_multi_hop/test_bgp_recursive_route_ebgp_multi_hop.py b/tests/topotests/bgp_recursive_route_ebgp_multi_hop/test_bgp_recursive_route_ebgp_multi_hop.py index 2a98cb341d..c758c31dc1 100644 --- a/tests/topotests/bgp_recursive_route_ebgp_multi_hop/test_bgp_recursive_route_ebgp_multi_hop.py +++ b/tests/topotests/bgp_recursive_route_ebgp_multi_hop/test_bgp_recursive_route_ebgp_multi_hop.py @@ -71,7 +71,6 @@ from lib.common_config import ( shutdown_bringup_interface, addKernelRoute, delete_route_maps, - kill_mininet_routers_process, ) from lib.topolog import logger from lib.bgp import ( diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index ead593d2ca..ba6004861e 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -401,30 +401,6 @@ def start_router_daemons(tgen, router, daemons): return res -def kill_mininet_routers_process(tgen): - """ - Kill all mininet stale router' processes - * `tgen` : topogen object - """ - - router_list = tgen.routers() - for rname, router in router_list.items(): - daemon_list = [ - "zebra", - "ospfd", - "ospf6d", - "bgpd", - "ripd", - "ripngd", - "isisd", - "pimd", - "ldpd", - "staticd", - ] - for daemon in daemon_list: - router.run("killall -9 {}".format(daemon)) - - def check_router_status(tgen): """ Check if all daemons are running for all routers in topology -- 2.39.5