Skip to content

Commit

Permalink
update skip condition for cisco T2 (sonic-net#11553)
Browse files Browse the repository at this point in the history
1, testQosSaiLosslessVoq requires split-voq or fair-voq, skip vanguard(cisco Q200 longlink) since it uses default-voq.
2. testQosSaiSharedReservationSize, skip gibraltar(cisco Q200 linecard) since not enough ports.
Skip shared_res_size_2 for pacific(cisco Q100 linecard) since on pacific, SQG thresholds have no impact on XOFF thresholds.
  • Loading branch information
zhixzhu authored Feb 6, 2024
1 parent 497baa5 commit fb92b91
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
10 changes: 10 additions & 0 deletions tests/qos/qos_sai_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2243,3 +2243,13 @@ def populate_arp_entries(
self.runPtfTest(
ptfhost, testCase=saiQosTest, testParams=testParams
)

@pytest.fixture(scope="function", autouse=False)
def skip_longlink(self, dutQosConfig):
portSpeedCableLength = dutQosConfig["portSpeedCableLength"]
match = re.search("_([0-9]*)m", portSpeedCableLength)
if match and int(match.group(1)) > 2000:
pytest.skip(
"This test is skipped for longlink.")
yield
return
10 changes: 9 additions & 1 deletion tests/qos/test_qos_sai.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ def testQosSaiPfcXonLimit(
"lossless_voq_3", "lossless_voq_4"])
def testQosSaiLosslessVoq(
self, LosslessVoqProfile, ptfhost, dutTestParams, dutConfig,
dutQosConfig, get_src_dst_asic_and_duts
dutQosConfig, get_src_dst_asic_and_duts, skip_longlink
):
"""
Test QoS SAI XOFF limits for various voq mode configurations
Expand Down Expand Up @@ -883,6 +883,14 @@ def testQosSaiSharedReservationSize(
Raises:
RunAnsibleModuleFail if ptf test fails
"""
if ('modular_chassis' in get_src_dst_asic_and_duts['src_dut'].facts and
get_src_dst_asic_and_duts['src_dut'].facts["modular_chassis"] == "True"):
if dutConfig['dstDutAsic'] != "pac":
pytest.skip("This test is skipped since not enough ports on cisco-8000 "
"T2 Q200.")
if "shared_res_size_2" in sharedResSizeKey:
pytest.skip("This test is skipped since on cisco-8000 Q100, "
"SQG thresholds have no impact on XOFF thresholds.")

qosConfig = dutQosConfig["param"]
src_dut_index = get_src_dst_asic_and_duts['src_dut_index']
Expand Down

0 comments on commit fb92b91

Please sign in to comment.