summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1-3.py9
-rw-r--r--tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1-4.py9
-rw-r--r--tests/topotests/bgp_unique_rid/test_bgp_unique_rid.py2
-rwxr-xr-xtools/frr-reload.py8
4 files changed, 25 insertions, 3 deletions
diff --git a/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1-3.py b/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1-3.py
index 6388295c95..f8a01a1c9d 100644
--- a/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1-3.py
+++ b/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1-3.py
@@ -2142,6 +2142,9 @@ def test_BGP_GR_TC_43_p1(request):
tc_name, result
)
+ # restart the daemon or we get warnings in the follow-on tests
+ start_router_daemons(tgen, "r1", ["bgpd"])
+
write_test_footer(tc_name)
@@ -2432,6 +2435,9 @@ def test_BGP_GR_TC_44_p1(request):
result = verify_rib(tgen, addr_type, dut, input_topo, next_hop, protocol)
assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+ # restart the daemon or we get warnings in the follow-on tests
+ start_router_daemons(tgen, "r2", ["bgpd"])
+
write_test_footer(tc_name)
@@ -2727,6 +2733,9 @@ def test_BGP_GR_TC_45_p1(request):
result = verify_rib(tgen, addr_type, dut, input_topo, next_hop, protocol)
assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+ # restart the daemon or we get warnings in the follow-on tests
+ start_router_daemons(tgen, "r1", ["bgpd"])
+
write_test_footer(tc_name)
diff --git a/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1-4.py b/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1-4.py
index 1166cdc0ef..31aaa0b8a6 100644
--- a/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1-4.py
+++ b/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1-4.py
@@ -763,6 +763,9 @@ def test_BGP_GR_TC_46_p1(request):
tc_name, result
)
+ # restart the daemon or we get warnings in the follow-on tests
+ start_router_daemons(tgen, "r1", ["bgpd"])
+
write_test_footer(tc_name)
@@ -1023,6 +1026,9 @@ def test_BGP_GR_TC_47_p1(request):
tc_name, result
)
+ # restart the daemon or we get warnings in the follow-on tests
+ start_router_daemons(tgen, "r1", ["bgpd"])
+
write_test_footer(tc_name)
@@ -1300,6 +1306,9 @@ def test_BGP_GR_TC_48_p1(request):
tc_name, result
)
+ # restart the daemon or we get warnings in the follow-on tests
+ start_router_daemons(tgen, "r1", ["bgpd"])
+
write_test_footer(tc_name)
diff --git a/tests/topotests/bgp_unique_rid/test_bgp_unique_rid.py b/tests/topotests/bgp_unique_rid/test_bgp_unique_rid.py
index 47b2452b81..f89f3378fb 100644
--- a/tests/topotests/bgp_unique_rid/test_bgp_unique_rid.py
+++ b/tests/topotests/bgp_unique_rid/test_bgp_unique_rid.py
@@ -847,8 +847,6 @@ def test_bgp_unique_rid_chaos4_p2():
for intf in topo["routers"][rtr]["links"].keys():
topo1["routers"][rtr]["links"][intf].pop("ipv4")
topo1["routers"][rtr]["links"][intf].pop("ipv6")
- if intf is "lo":
- topo1["routers"][rtr]["links"][intf].pop("ipv4")
build_config_from_json(tgen, topo1, save_bkup=False)
diff --git a/tools/frr-reload.py b/tools/frr-reload.py
index 490e519ae9..0e0aec9839 100755
--- a/tools/frr-reload.py
+++ b/tools/frr-reload.py
@@ -788,6 +788,8 @@ def bgp_delete_nbr_remote_as_line(lines_to_add):
# remote-as config.
pg_dict = dict()
+ found_pg_cmd = False
+
# Find all peer-group commands; create dict of each peer-group
# to store assoicated neighbor as value
for ctx_keys, line in lines_to_add:
@@ -809,6 +811,10 @@ def bgp_delete_nbr_remote_as_line(lines_to_add):
}
found_pg_cmd = True
+ # Do nothing if there is no any "peer-group"
+ if found_pg_cmd is False:
+ return
+
# Find peer-group with remote-as command, also search neighbor
# associated to peer-group and store into peer-group dict
for ctx_keys, line in lines_to_add:
@@ -850,7 +856,7 @@ def bgp_delete_nbr_remote_as_line(lines_to_add):
for pg in pg_dict[ctx_keys[0]]:
if pg_dict[ctx_keys[0]][pg]["remoteas"] == True:
for nbr in pg_dict[ctx_keys[0]][pg]["nbr"]:
- if re_nbr_rmtas.group(1) in nbr:
+ if re_nbr_rmtas.group(1) == nbr:
lines_to_del_from_add.append((ctx_keys, line))
for ctx_keys, line in lines_to_del_from_add: