From b46d3a1a4224564f05a51a73b5932c33ddec0bad Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 8 Jan 2025 09:41:21 -0500 Subject: [PATCH 1/2] tests: bgp_srv6_sid_reachability should give more time The test starts right in on check_pings with a 10 second time out. Any type of delay on startup is going to cause problems. Give the first check_ping significant time for the test to be fully brought up. Signed-off-by: Donald Sharp --- .../bgp_srv6_sid_reachability/test_bgp_srv6_sid_reachability.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/topotests/bgp_srv6_sid_reachability/test_bgp_srv6_sid_reachability.py b/tests/topotests/bgp_srv6_sid_reachability/test_bgp_srv6_sid_reachability.py index f8385401c5..cf590ad01d 100755 --- a/tests/topotests/bgp_srv6_sid_reachability/test_bgp_srv6_sid_reachability.py +++ b/tests/topotests/bgp_srv6_sid_reachability/test_bgp_srv6_sid_reachability.py @@ -99,7 +99,7 @@ def teardown_module(mod): def test_ping(): tgen = get_topogen() - check_ping("c11", "192.168.2.1", True, 10, 1) + check_ping("c11", "192.168.2.1", True, 120, 1) check_ping("c11", "192.168.3.1", True, 10, 1) check_ping("c12", "192.168.2.1", True, 10, 1) check_ping("c12", "192.168.3.1", True, 10, 1) From 414bc26bc0537945679b499625eb81f173f52395 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 8 Jan 2025 09:42:49 -0500 Subject: [PATCH 2/2] tests: bgp_srv6l3vpn_to_bgp_vrf3 needs more time The test starts with checking for rib insertion of routes that may take some time after system startup to come up. Under heavy load this may cause this test to just fail. Give it more time. Signed-off-by: Donald Sharp --- .../test_bgp_srv6l3vpn_to_bgp_vrf3.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py index bba0061858..530537646b 100644 --- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py +++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py @@ -95,7 +95,7 @@ def open_json_file(filename): assert False, "Could not read file {}".format(filename) -def check_rib(name, cmd, expected_file): +def check_rib(name, cmd, expected_file, count=30, wait=0.5): def _check(name, dest_addr, match): logger.info("polling") tgen = get_topogen() @@ -107,12 +107,12 @@ def check_rib(name, cmd, expected_file): logger.info('[+] check {} "{}" {}'.format(name, cmd, expected_file)) tgen = get_topogen() func = functools.partial(_check, name, cmd, expected_file) - _, result = topotest.run_and_expect(func, None, count=10, wait=0.5) + _, result = topotest.run_and_expect(func, None, count, wait) assert result is None, "Failed" def test_rib(): - check_rib("r1", "show bgp ipv4 vpn json", "r1/vpnv4_rib.json") + check_rib("r1", "show bgp ipv4 vpn json", "r1/vpnv4_rib.json", 120, 1) check_rib("r2", "show bgp ipv4 vpn json", "r2/vpnv4_rib.json") check_rib("r1", "show ip route vrf vrf10 json", "r1/vrf10v4_rib.json") check_rib("r1", "show ip route vrf vrf20 json", "r1/vrf20v4_rib.json")