tests: Limit run of config_timing when building with --enable-address-sanitizer

Building FRR with --enable-address-sanitizer and then running the
config_timing test makes the test run for over an hour on my machine.
The goal of this test is to ensure that the test runs 10000 routes
in/out in a reasonable amount of time.  We cannot test this with
address-sanitizer enabled.  So just make the test meaningless
from a timing perspective but keep it `alive` from a it might
catch some address sanitizer issue with 50 -vs- 10000 routes

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2022-12-14 12:53:53 -05:00
parent 478c62e21d
commit 9a5602b8ed

View File

@ -161,8 +161,17 @@ def test_static_timing():
return tot_delta return tot_delta
# Number of static routes # Number of static routes
router = tgen.gears["r1"]
output = router.run("vtysh -h | grep address-sanitizer")
if output == "":
logger.info("No Address Sanitizer, generating 10000 routes")
prefix_count = 10000 prefix_count = 10000
else:
logger.info("Address Sanitizer build, only testing 50 routes")
prefix_count = 50
prefix_base = [ prefix_base = [
[u"10.0.0.0/8", u"11.0.0.0/8"], [u"10.0.0.0/8", u"11.0.0.0/8"],
[u"2100:1111:2220::/44", u"2100:3333:4440::/44"], [u"2100:1111:2220::/44", u"2100:3333:4440::/44"],