Skip to content

Commit d28f241

Browse files
Skip pfc storm event based on hwsku (sonic-net#989)
### Description of PR Summary: Skipping swss event verification in telemetry/test_events.py for m1 and m2 topos as this testing is out of scope for the deployment. Fixes # (issue) ### Type of change - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [ ] New Test case - [x] Skipped for non-supported platforms - [ ] Test case improvement ### Approach #### What is the motivation for this PR? We were seeing failures while trying to verify the pfc storm event on m1 topos. This is because there is no QoS config. After inquiring with Microsoft we decided to skip this part of the test since QoS is not needed for the deployment. #### How did you do it? Refactored existing skip logic to use a list of hwsku's for skipping instead of topology. #### How did you verify/test it? Verified the expected hwsku's were being skipped for broadcom. #### Any platform specific information? #### Supported testbed topology if it's a new test case? ### Documentation
1 parent 96cd595 commit d28f241

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

tests/common/broadcom_data.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ def is_broadcom_device(dut):
44

55
LOSSY_ONLY_HWSKUS = ['Arista-7060X6-64PE-C256S2', 'Arista-7060X6-64PE-C224O8',
66
'Arista-7060X6-64PE-B-C512S2', 'Arista-7060X6-64PE-B-C448O16']
7+
NO_QOS_HWSKUS = ['Arista-7050CX3-32C-C28S16', 'Arista-7050CX3-32C-S128',
8+
'Arista-7050CX3-32C-C6S104', 'Arista-720DT-G48S4',
9+
'Arista-720DT-48S']

tests/common/mellanox_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
LOSSY_ONLY_HWSKUS = ['Mellanox-SN5600-C256S1', 'Mellanox-SN5600-C224O8', 'Mellanox-SN5640-C512S2',
1515
'Mellanox-SN5640-C448O16']
16+
NO_QOS_HWSKUS = []
1617

1718
PSU_CAPABILITIES = [
1819
['psu{}_curr', 'psu{}_curr_in', 'psu{}_power', 'psu{}_power_in', 'psu{}_volt', 'psu{}_volt_in', 'psu{}_volt_out'],

tests/telemetry/events/swss_events.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
import re
77

88
from run_events_test import run_test
9-
from tests.common.mellanox_data import LOSSY_ONLY_HWSKUS
9+
from tests.common.mellanox_data import LOSSY_ONLY_HWSKUS as MELLANOX_LOSSY_ONLY_HWSKUS
10+
from tests.common.broadcom_data import LOSSY_ONLY_HWSKUS as BROADCOM_LOSSY_ONLY_HWSKUS
11+
from tests.common.mellanox_data import NO_QOS_HWSKUS as MELLANOX_NO_QOS_HWSKUS
12+
from tests.common.broadcom_data import NO_QOS_HWSKUS as BROADCOM_NO_QOS_HWSKUS
1013
from tests.common.utilities import wait_until
1114

1215
random.seed(10)
@@ -30,15 +33,22 @@
3033

3134

3235
def test_event(duthost, gnxi_path, ptfhost, ptfadapter, data_dir, validate_yang):
33-
if duthost.topo_type.lower() in ["m0", "mx"]:
34-
logger.info("Skipping swss events test on MGFX topologies")
35-
return
3636
logger.info("Beginning to test swss events")
3737
run_test(duthost, gnxi_path, ptfhost, data_dir, validate_yang, shutdown_interface,
3838
"if_state.json", "sonic-events-swss:if-state", tag)
39-
if duthost.facts["hwsku"] not in LOSSY_ONLY_HWSKUS:
39+
40+
asic_type = duthost.facts["asic_type"]
41+
if asic_type == "mellanox":
42+
skip_pfc_hwskus = [*MELLANOX_LOSSY_ONLY_HWSKUS, *MELLANOX_NO_QOS_HWSKUS]
43+
elif asic_type == "broadcom":
44+
skip_pfc_hwskus = [*BROADCOM_LOSSY_ONLY_HWSKUS, *BROADCOM_NO_QOS_HWSKUS]
45+
else:
46+
skip_pfc_hwskus = []
47+
48+
if duthost.facts["hwsku"] not in skip_pfc_hwskus:
4049
run_test(duthost, gnxi_path, ptfhost, data_dir, validate_yang, generate_pfc_storm,
4150
"pfc_storm.json", "sonic-events-swss:pfc-storm", tag)
51+
4252
run_test(duthost, gnxi_path, ptfhost, data_dir, validate_yang, trigger_crm_threshold_exceeded,
4353
"chk_crm_threshold.json", "sonic-events-swss:chk_crm_threshold", tag)
4454

0 commit comments

Comments
 (0)