Skip to content

Commit

Permalink
[tests/stress]: Fix loganalyzer checks for stress test (sonic-net#12431)
Browse files Browse the repository at this point in the history
* Ensure errors in ignoreRegex are ignored for all DUTs

* In dual TOR testbeds, loganalyzer analyzes both DUTs for errors, so errors
  need to be ignored on both or else it can cause tests to error out.

Signed-off-by: Prabhat Aravind <[email protected]>
  • Loading branch information
prabhataravind authored and mssonicbld committed May 16, 2024
1 parent 8b00589 commit 4c671bd
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/stress/test_stress_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,17 @@ def announce_withdraw_routes(duthost, localhost, ptf_ip, topo_name):
logger.info("ipv6 route used {}".format(get_crm_resources(duthost, "ipv6_route", "used")))


def test_announce_withdraw_route(duthost, localhost, tbinfo, get_function_conpleteness_level,
withdraw_and_announce_existing_routes, loganalyzer):
def test_announce_withdraw_route(duthosts, localhost, tbinfo, get_function_conpleteness_level,
withdraw_and_announce_existing_routes, loganalyzer,
enum_rand_one_per_hwsku_frontend_hostname):
ptf_ip = tbinfo["ptf_ip"]
topo_name = tbinfo["topo"]["name"]
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]

if loganalyzer:
ignoreRegex = [
".*ERR route_check.py:.*",
".*ERR.* \'routeCheck\' status failed.*",
".*ERR.* 'routeCheck' status failed.*",
".*Process \'orchagent\' is stuck in namespace \'host\'.*",
".*ERR rsyslogd: .*"
]
Expand All @@ -54,7 +57,10 @@ def test_announce_withdraw_route(duthost, localhost, tbinfo, get_function_conple
ignoreRegex.append(".*ERR memory_threshold_check:.*")
ignoreRegex.append(".*ERR monit.*memory_check.*")
ignoreRegex.append(".*ERR monit.*mem usage of.*matches resource limit.*")
loganalyzer[duthost.hostname].ignore_regex.extend(ignoreRegex)

# Ignore errors in ignoreRegex for *all* DUTs
for dut in duthosts:
loganalyzer[dut.hostname].ignore_regex.extend(ignoreRegex)

normalized_level = get_function_conpleteness_level
if normalized_level is None:
Expand Down

0 comments on commit 4c671bd

Please sign in to comment.