From 4f943dc6dbacee78cff0a09a81fc9ed2371f484f Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Wed, 15 Jul 2020 21:40:48 +0000 Subject: [PATCH] [test_vrf][pytest] Terminate all processes with 'exabgp' in the command line --- tests/test_vrf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_vrf.py b/tests/test_vrf.py index 394e998ad3d..82f1016a041 100644 --- a/tests/test_vrf.py +++ b/tests/test_vrf.py @@ -842,8 +842,8 @@ def setup_bgp_with_loopback(self, duthost, ptfhost, cfg_facts): # deploy start script ptfhost.template(src="vrf/bgp_speaker/start.j2", dest="%s/%s" % (exabgp_dir, 'start.sh'), mode="u+rwx") - # kill exabgp if any - ptfhost.shell("pkill exabgp || true") + # Send SIGTERM to exabgp processes if any + ptfhost.shell("pkill -f exabgp || true") # start exabgp instance ptfhost.shell("bash %s/start.sh" % exabgp_dir) @@ -864,8 +864,8 @@ def setup_bgp_with_loopback(self, duthost, ptfhost, cfg_facts): for (vrf, vlan_peer_port), ips in g_vars['vlan_peer_ips'].iteritems(): duthost.shell("vtysh -c 'configure terminal' -c 'no ip route {} {} vrf {}'".format(peer_range, ips['ipv4'][0], vrf)) - # kill exabgp - ptfhost.shell("pkill exabgp || true") + # Send SIGTERM to exabgp processes if any + ptfhost.shell("pkill -f exabgp || true") # del speaker ips from ptf ports for vrf, vlan_peer_port in g_vars['vlan_peer_ips']: