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 <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2023-07-28 10:31:30 -04:00
parent 49e9bb2819
commit b0e3fcfe8c

View File

@ -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))