Skip to content

Commit b0fda68

Browse files
Skip swss events in telemetry/test_events.py for m* topos (#19872)
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 in the test which was being used for mx and m0 topos to include m1 and m2. How did you verify/test it? Ran test with and without change, test was passing with the change.
1 parent 5afe66f commit b0fda68

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

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
@@ -14,6 +14,7 @@
1414

1515
LOSSY_ONLY_HWSKUS = ['Mellanox-SN5600-C256S1', 'Mellanox-SN5600-C224O8', 'Mellanox-SN5640-C512S2',
1616
'Mellanox-SN5640-C448O16']
17+
NO_QOS_HWSKUS = []
1718

1819
PSU_CAPABILITIES = [
1920
['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", "m1"]:
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)