]> git.puffer.fish Git - mirror/frr.git/commit
tests: Fix ospf[6]_gr_topo1 tests to work better under load
authorDonald Sharp <sharpd@nvidia.com>
Fri, 8 Oct 2021 11:37:15 +0000 (07:37 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 8 Oct 2021 12:35:16 +0000 (08:35 -0400)
commit6255aad0bc78c1b110d72988f62427a057c1a80f
treecb37df0a3ffe0ccf1278b926e38bb754eb23965d
parent76ab1a97021a7a6f00de9e87643d589c844a3421
tests: Fix ospf[6]_gr_topo1 tests to work better under load

2 things:

a) Each test was setting up for graceful restart with calls to
`graceful-restart prepare ip[v6] ospf`, then sleeping for
3 or 5 seconds.  Then killing the ospf process.  Under heavy
load there is no guarantee that zebra has received/processed
this signal.  Write some code to ensure that this happens

b) Tests are issuing commands in this order:
   1) issue gr prepare command
   2) kill router
   3) <ensure routes were still installed in zebra>
   4) start router
   5) <ensure routes were stil installed in zebra>

Imagine that the system is under some load and there is
a small amount of time before step 5 happens.  In this
case ospf could have come up and started neighbor relations
and also started installing routes.  If zebra receives
a new route before step 5 is issued then the route could
be in a state where it is not installed, because it is
being sent to the kernel for installation.  This would
fail the test because it would only look 1 time.  This
is fixed by giving time on restart for the routes to
be in the installed state.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests/topotests/ospf6_gr_topo1/test_ospf6_gr_topo1.py
tests/topotests/ospf_gr_topo1/test_ospf_gr_topo1.py