mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-11-02 11:01:16 +00:00
tests: reduce scale of the route scale test
Reduce the number of routes used in the route-scale test: we're having memory troubles, and this may help the CI run with fewer false failures. Also re-orged the route-scale test code a bit so it can be driven from the json file, with fewer hard-coded values. Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
parent
3d73df359a
commit
d6a75b53e7
@ -6,11 +6,11 @@
|
||||
"type":"connected"
|
||||
},
|
||||
{
|
||||
"fib":1000000,
|
||||
"rib":1000000,
|
||||
"fib":200000,
|
||||
"rib":200000,
|
||||
"type":"sharp"
|
||||
}
|
||||
],
|
||||
"routesTotal":1000032,
|
||||
"routesTotalFib":1000032
|
||||
"routesTotal":200032,
|
||||
"routesTotalFib":200032
|
||||
}
|
||||
|
||||
@ -122,15 +122,20 @@ def run_one_setup(r1, s):
|
||||
expected_installed = s["expect_in"]
|
||||
expected_removed = s["expect_rem"]
|
||||
|
||||
count = s["count"]
|
||||
retries = s["retries"]
|
||||
wait = s["wait"]
|
||||
|
||||
logger.info("Testing 1 million routes X {} ecmp".format(s["ecmp"]))
|
||||
for d in expected_installed["routes"]:
|
||||
if d["type"] == "sharp":
|
||||
count = d["rib"]
|
||||
break
|
||||
|
||||
logger.info("Testing {} routes X {} ecmp".format(count, s["ecmp"]))
|
||||
|
||||
r1.vtysh_cmd(
|
||||
"sharp install route 1.0.0.0 \
|
||||
nexthop-group {} 1000000".format(
|
||||
s["nhg"]
|
||||
nexthop-group {} {}".format(
|
||||
s["nhg"], count
|
||||
),
|
||||
isjson=False,
|
||||
)
|
||||
@ -138,21 +143,21 @@ def run_one_setup(r1, s):
|
||||
test_func = partial(
|
||||
topotest.router_json_cmp, r1, "show ip route summary json", expected_installed
|
||||
)
|
||||
success, result = topotest.run_and_expect(test_func, None, count, wait)
|
||||
success, result = topotest.run_and_expect(test_func, None, retries, wait)
|
||||
assert success, "Route scale test install failed:\n{}".format(result)
|
||||
|
||||
output = r1.vtysh_cmd("sharp data route", isjson=False)
|
||||
logger.info("1 million routes X {} ecmp installed".format(s["ecmp"]))
|
||||
logger.info("{} routes X {} ecmp installed".format(count, s["ecmp"]))
|
||||
logger.info(output)
|
||||
r1.vtysh_cmd("sharp remove route 1.0.0.0 1000000", isjson=False)
|
||||
r1.vtysh_cmd("sharp remove route 1.0.0.0 {}".format(count), isjson=False)
|
||||
test_func = partial(
|
||||
topotest.router_json_cmp, r1, "show ip route summary json", expected_removed
|
||||
)
|
||||
success, result = topotest.run_and_expect(test_func, None, count, wait)
|
||||
success, result = topotest.run_and_expect(test_func, None, retries, wait)
|
||||
assert success, "Route scale test remove failed:\n{}".format(result)
|
||||
|
||||
output = r1.vtysh_cmd("sharp data route", isjson=False)
|
||||
logger.info("1 million routes x {} ecmp removed".format(s["ecmp"]))
|
||||
logger.info("{} routes x {} ecmp removed".format(count, s["ecmp"]))
|
||||
logger.info(output)
|
||||
|
||||
|
||||
@ -174,7 +179,7 @@ def test_route_install():
|
||||
|
||||
# dict keys of params: ecmp number, corresponding nhg name, timeout,
|
||||
# number of times to wait
|
||||
scale_keys = ["ecmp", "nhg", "wait", "count", "expect_in", "expect_rem"]
|
||||
scale_keys = ["ecmp", "nhg", "wait", "retries", "expect_in", "expect_rem"]
|
||||
|
||||
# Table of defaults, used for timeout values and 'expected' objects
|
||||
scale_defaults = dict(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user