Skip to content

Commit

Permalink
[Qos]Loganalyser ignore_regex update for all nodes in test_qos (sonic…
Browse files Browse the repository at this point in the history
…-net#16513)

The test_qos_sai ignore_regex list is added only to loganalyzer ignore_list of the DUT which is selected as a src_dut/dst_dut.

Adding the error "SAI_API_SWITCH:brcm_sai_set_switch_attribute:5089 updating switch mac addr failed with error -2" to all the front-end nodes irrespective of the selected DUT for qos run.
Summary:
Fixes # (issue)
Lately saw this error (above) got delayed logging into syslog by 5 mins. In the meantime, the test run moved to new test and started with a different front-end node due to random selection of dut. In this case the ignore_regex got added to loganalyzer ignore_list of a different dut than the previous one. But the error logged later got caught by loganalyzer for the previous dut.

Adding this error regex to all the dut's loganalyzer ignore_list to avoid above case to happen.
  • Loading branch information
ansrajpu-git authored Feb 4, 2025
1 parent 3793429 commit 0f597a0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/qos/test_qos_sai.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@


@pytest.fixture(autouse=True)
def ignore_expected_loganalyzer_exception(get_src_dst_asic_and_duts, loganalyzer):
def ignore_expected_loganalyzer_exception(get_src_dst_asic_and_duts, loganalyzer, duthosts):
"""ignore the syslog ERR syncd0#syncd: [03:00.0] brcm_sai_set_switch_
attribute:1920 updating switch mac addr failed with error -2"""
ignore_regex = [
Expand All @@ -82,6 +82,13 @@ def ignore_expected_loganalyzer_exception(get_src_dst_asic_and_duts, loganalyzer
# ERR memory_threshold_check: Free memory 381608 is less then free memory threshold 400382.4
ignore_regex.append(".*ERR memory_threshold_check: Free memory .* is less then free memory threshold.*")
loganalyzer[a_dut.hostname].ignore_regex.extend(ignore_regex)
if 't2' in duthosts.tbinfo['topo']['name']:
for duthost in duthosts.frontend_nodes:
if (duthost.sonichost.facts['platform_asic'] == 'broadcom-dnx'
and duthost not in get_src_dst_asic_and_duts['all_duts']):
igx = [".*ERR syncd[0-9]*#syncd.*brcm_sai_set_switch_attribute.*updating switch mac addr"
" failed with error.*"]
loganalyzer[duthost.hostname].ignore_regex.extend(igx)


@pytest.fixture(autouse=False)
Expand Down

0 comments on commit 0f597a0

Please sign in to comment.