@@ -136,6 +136,11 @@ def get_portspeed_cablelen(asic_instance):
136
136
return ""
137
137
138
138
139
+ def skip_test_on_no_lossless_pg (portSpeedCableLength ):
140
+ if portSpeedCableLength == "0_0m" :
141
+ pytest .skip ("skip the test due to no buffer lossless pg" )
142
+
143
+
139
144
class TestQosSai (QosSaiBase ):
140
145
"""TestQosSai derives from QosSaiBase and contains collection of QoS SAI test cases.
141
146
@@ -371,6 +376,7 @@ def testQosSaiPfcXoffLimit(
371
376
"Additional DSCPs are not supported on non-dual ToR ports" )
372
377
373
378
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
379
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
374
380
if dutTestParams ['hwsku' ] in self .BREAKOUT_SKUS and 'backend' not in dutTestParams ['topo' ]:
375
381
qosConfig = dutQosConfig ["param" ][portSpeedCableLength ]["breakout" ]
376
382
else :
@@ -460,6 +466,7 @@ def testPfcStormWithSharedHeadroomOccupancy(
460
466
pytest .skip ("Shared Headroom has to be enabled for this test" )
461
467
462
468
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
469
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
463
470
if xonProfile in list (dutQosConfig ["param" ][portSpeedCableLength ].keys ()):
464
471
qosConfig = dutQosConfig ["param" ][portSpeedCableLength ]
465
472
else :
@@ -633,6 +640,7 @@ def testQosSaiPfcXonLimit(
633
640
"Additional DSCPs are not supported on non-dual ToR ports" )
634
641
635
642
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
643
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
636
644
if xonProfile in list (dutQosConfig ["param" ][portSpeedCableLength ].keys ()):
637
645
qosConfig = dutQosConfig ["param" ][portSpeedCableLength ]
638
646
else :
@@ -802,6 +810,7 @@ def testQosSaiHeadroomPoolSize(
802
810
"""
803
811
804
812
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
813
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
805
814
qosConfig = dutQosConfig ["param" ][portSpeedCableLength ]
806
815
testPortIps = dutConfig ["testPortIps" ]
807
816
@@ -1560,6 +1569,7 @@ def testQosSaiDwrr(
1560
1569
RunAnsibleModuleFail if ptf test fails
1561
1570
"""
1562
1571
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
1572
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
1563
1573
qosConfig = dutQosConfig ["param" ]
1564
1574
if "wrr" in qosConfig [portSpeedCableLength ]:
1565
1575
qosConfigWrr = qosConfig [portSpeedCableLength ]["wrr" ]
@@ -1639,6 +1649,9 @@ def testQosSaiPgSharedWatermark(
1639
1649
"""
1640
1650
1641
1651
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
1652
+ if pgProfile == "wm_pg_shared_lossless" :
1653
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
1654
+
1642
1655
if pgProfile in list (dutQosConfig ["param" ][portSpeedCableLength ].keys ()):
1643
1656
qosConfig = dutQosConfig ["param" ][portSpeedCableLength ]
1644
1657
else :
@@ -1734,6 +1747,7 @@ def testQosSaiPgHeadroomWatermark(
1734
1747
RunAnsibleModuleFail if ptf test fails
1735
1748
"""
1736
1749
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
1750
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
1737
1751
if dutTestParams ['hwsku' ] in self .BREAKOUT_SKUS and 'backend' not in dutTestParams ['topo' ]:
1738
1752
qosConfig = dutQosConfig ["param" ][portSpeedCableLength ]["breakout" ]
1739
1753
else :
@@ -1846,6 +1860,8 @@ def testQosSaiQSharedWatermark(
1846
1860
RunAnsibleModuleFail if ptf test fails
1847
1861
"""
1848
1862
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
1863
+ if queueProfile == "wm_q_shared_lossless" :
1864
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
1849
1865
1850
1866
if queueProfile == "wm_q_shared_lossless" :
1851
1867
if dutTestParams ["basicParams" ]["sonic_asic_type" ] == 'cisco-8000' :
@@ -1907,7 +1923,8 @@ def testQosSaiQSharedWatermark(
1907
1923
)
1908
1924
1909
1925
def testQosSaiDscpToPgMapping (
1910
- self , get_src_dst_asic_and_duts , duthost , request , ptfhost , dutTestParams , dutConfig , dut_qos_maps # noqa F811
1926
+ self , get_src_dst_asic_and_duts , duthost , request , ptfhost ,
1927
+ dutTestParams , dutConfig , dut_qos_maps , dutQosConfig # noqa F811
1911
1928
):
1912
1929
"""
1913
1930
Test QoS SAI DSCP to PG mapping ptf test
@@ -1926,6 +1943,8 @@ def testQosSaiDscpToPgMapping(
1926
1943
RunAnsibleModuleFail if ptf test fails
1927
1944
"""
1928
1945
disableTest = request .config .getoption ("--disable_test" )
1946
+ portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
1947
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
1929
1948
if dutTestParams ["basicParams" ]["sonic_asic_type" ] == 'cisco-8000' or \
1930
1949
('platform_asic' in dutTestParams ["basicParams" ] and
1931
1950
dutTestParams ["basicParams" ]["platform_asic" ] in ["broadcom-dnx" , "mellanox" ]):
0 commit comments