From b0e3fcfe8c2a1562af5146737718853491395cf4 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 28 Jul 2023 10:31:30 -0400 Subject: [PATCH] tests: zebra_netlink ensure the address is installed Ran test under high load and system rejected the sharp install of routes. Only reason that that would happen would be if the address had not been set by the kernel yet. The test log files had timestamp precision and the addition of the sharp routes was under 1/10 of a second after the address was attempted to be installed. Signed-off-by: Donald Sharp --- tests/topotests/zebra_netlink/test_zebra_netlink.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/topotests/zebra_netlink/test_zebra_netlink.py b/tests/topotests/zebra_netlink/test_zebra_netlink.py index 5a30f79279..522c390c39 100644 --- a/tests/topotests/zebra_netlink/test_zebra_netlink.py +++ b/tests/topotests/zebra_netlink/test_zebra_netlink.py @@ -22,7 +22,6 @@ from lib import topotest from lib.topogen import Topogen, TopoRouter from lib.topolog import logger - pytestmark = [pytest.mark.sharpd] @@ -68,6 +67,10 @@ def test_zebra_netlink_batching(tgen): # Reduce the size of the buffer to hit the limit. r1.vtysh_cmd("conf t\nzebra kernel netlink batch-tx-buf 256 256") + entry = {"r1-eth0": {"addresses": ["192.168.1.1/24"]}} + ok = topotest.router_json_cmp_retry(r1, "show int brief json", entry, False, 30) + assert ok, '"r1" Address not installed yet' + count = 100 r1.vtysh_cmd("sharp install routes 2.1.3.7 nexthop 192.168.1.1 " + str(count)) -- 2.39.5