diff options
author | Donald Sharp <sharpd@nvidia.com> | 2022-05-19 21:54:59 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2022-05-20 16:31:48 +0200 |
commit | 6ec742d95fc444457d27f5d5b59c6045550fe722 (patch) | |
tree | 3dc400e7da479ceea7f8cf3874a18fca46b549af /tests/topotests/lib/common_config.py | |
parent | Merge pull request #11008 from patrasar/sec_addr_list_pimv6 (diff) | |
download | frr-6ec742d95fc444457d27f5d5b59c6045550fe722.tar.xz frr-6ec742d95fc444457d27f5d5b59c6045550fe722.zip |
tests: Ensure routes are not queued when calling verify_rib
Lots of tests call verify_rib that takes a list of routes that
need to be verified in some fashion. This verify_rib functionality
will try up to 12 seconds before failing the check that zebra
has the route and has installed it.
Unfortunately the verify_rib code was not looking to see if
the route was queued for installation and was then allowing
tests to immediately do subsuquent steps that depended on
that route actually being installed sometimes causing tests
to fail.
Write a bit of additional code that looks at the queued
status and allows the test to wait a bit longer for zebra
to finish processing before allowing the test to move on
to the next bit.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'tests/topotests/lib/common_config.py')
-rw-r--r-- | tests/topotests/lib/common_config.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index 5a5c7e3df..5c8b76054 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -3383,6 +3383,10 @@ def verify_rib( st_found = True found_routes.append(st_rt) + if "queued" in rib_routes_json[st_rt][0]: + errormsg = "Route {} is queued\n".format(st_rt) + return errormsg + if fib and next_hop: if type(next_hop) is not list: next_hop = [next_hop] @@ -3607,6 +3611,10 @@ def verify_rib( st_found = True found_routes.append(st_rt) + if "queued" in rib_routes_json[st_rt][0]: + errormsg = "Route {} is queued\n".format(st_rt) + return errormsg + if next_hop: if type(next_hop) is not list: next_hop = [next_hop] |