@@ -175,6 +175,11 @@ def check_skip_xon_hysteresis_test(xonHysteresisKey, dutQosConfig,
175
175
" Pls see qos.yaml for the port idx's that are needed." )
176
176
177
177
178
+ def skip_test_on_no_lossless_pg (portSpeedCableLength ):
179
+ if portSpeedCableLength == "0_0m" :
180
+ pytest .skip ("skip the test due to no buffer lossless pg" )
181
+
182
+
178
183
class TestQosSai (QosSaiBase ):
179
184
"""TestQosSai derives from QosSaiBase and contains collection of QoS SAI test cases.
180
185
@@ -411,6 +416,7 @@ def testQosSaiPfcXoffLimit(
411
416
"Additional DSCPs are not supported on non-dual ToR ports" )
412
417
413
418
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
419
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
414
420
if dutTestParams ['hwsku' ] in self .BREAKOUT_SKUS and 'backend' not in dutTestParams ['topo' ]:
415
421
qosConfig = dutQosConfig ["param" ][portSpeedCableLength ]["breakout" ]
416
422
else :
@@ -508,6 +514,7 @@ def testPfcStormWithSharedHeadroomOccupancy(
508
514
pytest .skip ("Shared Headroom has to be enabled for this test" )
509
515
510
516
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
517
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
511
518
if xonProfile in list (dutQosConfig ["param" ][portSpeedCableLength ].keys ()):
512
519
qosConfig = dutQosConfig ["param" ][portSpeedCableLength ]
513
520
else :
@@ -681,6 +688,7 @@ def testQosSaiPfcXonLimit(
681
688
"Additional DSCPs are not supported on non-dual ToR ports" )
682
689
683
690
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
691
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
684
692
if xonProfile in list (dutQosConfig ["param" ][portSpeedCableLength ].keys ()):
685
693
qosConfig = dutQosConfig ["param" ][portSpeedCableLength ]
686
694
else :
@@ -858,6 +866,7 @@ def testQosSaiHeadroomPoolSize(
858
866
"""
859
867
860
868
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
869
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
861
870
qosConfig = dutQosConfig ["param" ][portSpeedCableLength ]
862
871
testPortIps = dutConfig ["testPortIps" ]
863
872
@@ -1616,6 +1625,7 @@ def testQosSaiDwrr(
1616
1625
RunAnsibleModuleFail if ptf test fails
1617
1626
"""
1618
1627
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
1628
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
1619
1629
qosConfig = dutQosConfig ["param" ]
1620
1630
if "wrr" in qosConfig [portSpeedCableLength ]:
1621
1631
qosConfigWrr = qosConfig [portSpeedCableLength ]["wrr" ]
@@ -1695,6 +1705,9 @@ def testQosSaiPgSharedWatermark(
1695
1705
"""
1696
1706
1697
1707
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
1708
+ if pgProfile == "wm_pg_shared_lossless" :
1709
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
1710
+
1698
1711
if pgProfile in list (dutQosConfig ["param" ][portSpeedCableLength ].keys ()):
1699
1712
qosConfig = dutQosConfig ["param" ][portSpeedCableLength ]
1700
1713
else :
@@ -1798,6 +1811,7 @@ def testQosSaiPgHeadroomWatermark(
1798
1811
RunAnsibleModuleFail if ptf test fails
1799
1812
"""
1800
1813
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
1814
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
1801
1815
if dutTestParams ['hwsku' ] in self .BREAKOUT_SKUS and 'backend' not in dutTestParams ['topo' ]:
1802
1816
qosConfig = dutQosConfig ["param" ][portSpeedCableLength ]["breakout" ]
1803
1817
else :
@@ -1910,6 +1924,8 @@ def testQosSaiQSharedWatermark(
1910
1924
RunAnsibleModuleFail if ptf test fails
1911
1925
"""
1912
1926
portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
1927
+ if queueProfile == "wm_q_shared_lossless" :
1928
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
1913
1929
1914
1930
if queueProfile == "wm_q_shared_lossless" :
1915
1931
if dutTestParams ["basicParams" ]["sonic_asic_type" ] == 'cisco-8000' :
@@ -1972,7 +1988,7 @@ def testQosSaiQSharedWatermark(
1972
1988
1973
1989
def testQosSaiDscpToPgMapping (
1974
1990
self , get_src_dst_asic_and_duts , duthost , request , ptfhost , dutTestParams , dutConfig , dut_qos_maps , # noqa F811
1975
- change_lag_lacp_timer ):
1991
+ change_lag_lacp_timer , dutQosConfig ):
1976
1992
"""
1977
1993
Test QoS SAI DSCP to PG mapping ptf test
1978
1994
@@ -1990,6 +2006,8 @@ def testQosSaiDscpToPgMapping(
1990
2006
RunAnsibleModuleFail if ptf test fails
1991
2007
"""
1992
2008
disableTest = request .config .getoption ("--disable_test" )
2009
+ portSpeedCableLength = dutQosConfig ["portSpeedCableLength" ]
2010
+ skip_test_on_no_lossless_pg (portSpeedCableLength )
1993
2011
if dutTestParams ["basicParams" ]["sonic_asic_type" ] == 'cisco-8000' or \
1994
2012
('platform_asic' in dutTestParams ["basicParams" ] and
1995
2013
dutTestParams ["basicParams" ]["platform_asic" ] in ["broadcom-dnx" , "mellanox" ]):
0 commit comments