Skip to content

Commit

Permalink
Ignore log error in test_pfcwd_status for Clearlake (sonic-net#11350)
Browse files Browse the repository at this point in the history
What is the motivation for this PR?
The test failed in the log checking stage for the errors below:
Jan 4 22:44:30.824770 ck304 ERR syncd#syncd: [none] SAI_API_QUEUE:_brcm_sai_cosq_stat_get:1972 cosq stat get failed with error Invalid parameter (0xfffffffc).
Jan 4 22:44:30.824919 ck304 ERR syncd#syncd: [none] SAI_API_SWITCH:sai_bulk_object_get_stats:670 get bulk queue stats failed with error -5.

How did you do it?
The error is from running checkBulkCapability(https://github.com/sonic-net/sonic-sairedis/blob/master/syncd/FlexCounter.cpp#L463), the program can continue even returning false as it will use the none-bulk way to create counters thereafter. We could safely ignore the log. We are told that the sai_bulk_object_get_stats used by checkBulkCapability is not supported on TD2 now, so the change here will be applied to all TD2 platforms.

How did you verify/test it?
The test can pass with this change.

Any platform specific information?
The change will apply to all TD2 platforms
  • Loading branch information
byu343 authored Jan 30, 2024
1 parent ec05032 commit 63fd6c1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/common/devices/sonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,8 @@ def get_asic_name(self):
elif "Device b971" in output:
asic = "th2"
elif ("Broadcom Limited Device b850" in output or
"Broadcom Limited Broadcom BCM56850" in output):
"Broadcom Limited Broadcom BCM56850" in output or
"Broadcom Inc. and subsidiaries Broadcom BCM56850" in output):
asic = "td2"
elif ("Broadcom Limited Device b870" in output or
"Broadcom Inc. and subsidiaries Device b870" in output):
Expand Down
18 changes: 18 additions & 0 deletions tests/generic_config_updater/test_pfcwd_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@
READ_FLEXDB_INTERVAL = 5


@pytest.fixture(autouse=True)
def ignore_expected_loganalyzer_exceptions(duthosts, loganalyzer):
if not loganalyzer:
return

for duthost in duthosts:
asic_name = duthost.get_asic_name()
if asic_name in ['td2']:
loganalyzer[duthost.hostname].ignore_regex.extend(
[
'.*ERR syncd#syncd:.*SAI_API_QUEUE:_brcm_sai_cosq_stat_get:.* ',
'.*ERR syncd#syncd:.*SAI_API_SWITCH:sai_bulk_object_get_stats.* ',
]
)

return


@pytest.fixture(scope="module", autouse=True)
def set_default_pfcwd_config(duthost):
"""
Expand Down

0 comments on commit 63fd6c1

Please sign in to comment.