diff options
author | Donald Sharp <sharpd@nvidia.com> | 2022-06-14 18:21:19 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2022-06-14 18:21:19 +0200 |
commit | 853585a7cd6eeb527fbd8a9ed02c86eb8c7aafa1 (patch) | |
tree | 5196076b9dd21c8ee18b98569ecf26a6f6a8b16b /tests/topotests/lib | |
parent | Merge pull request #11344 from opensourcerouting/feature/wrap_ipv4_unicast_valid (diff) | |
download | frr-853585a7cd6eeb527fbd8a9ed02c86eb8c7aafa1.tar.xz frr-853585a7cd6eeb527fbd8a9ed02c86eb8c7aafa1.zip |
tests: Fix verify_rib such that it will look at the selected route
When you have a static route with multiple different admin
distances there exists a chance that route will have been
installed multiple times due to system load when inserted
at about the same time. If this is the case then the
verify_rib function can and will select the wrong route
that happens to have a nexthop group that is still installed.
Modify verify_rib to ensure that the route that is going to
be looked at for nexthop correctness is the actual installed
route, not a previous version of it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'tests/topotests/lib')
-rw-r--r-- | tests/topotests/lib/common_config.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index a7d8b2c9b..26113b72b 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -3384,6 +3384,9 @@ def verify_rib( next_hop = [next_hop] for mnh in range(0, len(rib_routes_json[st_rt])): + if not "selected" in rib_routes_json[st_rt][mnh]: + continue + if ( "fib" in rib_routes_json[st_rt][mnh]["nexthops"][0] |