From ab4a8e29a1d4c24b3152dcd4e2143821e9d58385 Mon Sep 17 00:00:00 2001 From: Raghavendran Ramanathan Date: Fri, 1 Sep 2023 15:35:36 -0700 Subject: [PATCH 1/3] Skip AllPortQueueWaterMark test for multi-DUT cases. --- tests/qos/qos_sai_base.py | 12 ++++++++++++ tests/qos/test_qos_sai.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/qos/qos_sai_base.py b/tests/qos/qos_sai_base.py index aea45db197..c5d3f97cae 100644 --- a/tests/qos/qos_sai_base.py +++ b/tests/qos/qos_sai_base.py @@ -1944,3 +1944,15 @@ def select_port_ids_for_mellnaox_device(self, duthost, mgFacts, testPortIds): max_port_num = len(port_list) logger.info(f"Test ports ids is{test_port_ids}") return test_port_ids + + def _skip_allportQWM_multi_DUT( + self, + get_src_dst_asic_and_duts, + dutQosConfig): + if (get_src_dst_asic_and_duts['src_dut'] != + get_src_dst_asic_and_duts['dst_dut']): + pytest.skip( + "AllportQueueWaterMark is skipped for multiDUT scenarios.") + + yield + return diff --git a/tests/qos/test_qos_sai.py b/tests/qos/test_qos_sai.py index 1247aa6763..4f1c2f83d5 100644 --- a/tests/qos/test_qos_sai.py +++ b/tests/qos/test_qos_sai.py @@ -1819,7 +1819,7 @@ def testQosSaiDwrrWeightChange( @pytest.mark.parametrize("queueProfile", ["wm_q_wm_all_ports"]) def testQosSaiQWatermarkAllPorts( self, queueProfile, ptfhost, dutTestParams, dutConfig, dutQosConfig, - resetWatermark + resetWatermark, _skip_allportQWM_multi_DUT ): """ Test QoS SAI Queue watermark test for lossless/lossy traffic on all ports From ba1ddf9f1b576ba2e7fc50c07ed2151f73905bbb Mon Sep 17 00:00:00 2001 From: Raghavendran Ramanathan Date: Fri, 1 Sep 2023 18:08:41 -0700 Subject: [PATCH 2/3] Add the fixture line to the new function. --- tests/qos/qos_sai_base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qos/qos_sai_base.py b/tests/qos/qos_sai_base.py index c5d3f97cae..e2b36c6451 100644 --- a/tests/qos/qos_sai_base.py +++ b/tests/qos/qos_sai_base.py @@ -1945,6 +1945,7 @@ def select_port_ids_for_mellnaox_device(self, duthost, mgFacts, testPortIds): logger.info(f"Test ports ids is{test_port_ids}") return test_port_ids + @pytest.fixture(scope="function", autouse=False) def _skip_allportQWM_multi_DUT( self, get_src_dst_asic_and_duts, From 9d0485b50f85c709eabbd5961c889319855c3913 Mon Sep 17 00:00:00 2001 From: Raghavendran Ramanathan Date: Wed, 6 Sep 2023 11:27:18 -0700 Subject: [PATCH 3/3] Change the skip for all watermarks, and cisco-8000 only. --- tests/qos/qos_sai_base.py | 7 +++++-- tests/qos/test_qos_sai.py | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/qos/qos_sai_base.py b/tests/qos/qos_sai_base.py index e2b36c6451..ee474247ee 100644 --- a/tests/qos/qos_sai_base.py +++ b/tests/qos/qos_sai_base.py @@ -1946,14 +1946,17 @@ def select_port_ids_for_mellnaox_device(self, duthost, mgFacts, testPortIds): return test_port_ids @pytest.fixture(scope="function", autouse=False) - def _skip_allportQWM_multi_DUT( + def _skip_watermark_multi_DUT( self, get_src_dst_asic_and_duts, dutQosConfig): + if not is_cisco_device(get_src_dst_asic_and_duts['src_dut']): + yield + return if (get_src_dst_asic_and_duts['src_dut'] != get_src_dst_asic_and_duts['dst_dut']): pytest.skip( - "AllportQueueWaterMark is skipped for multiDUT scenarios.") + "All WM Tests are skipped for multiDUT for cisco platforms.") yield return diff --git a/tests/qos/test_qos_sai.py b/tests/qos/test_qos_sai.py index 4f1c2f83d5..7b6465f2fa 100644 --- a/tests/qos/test_qos_sai.py +++ b/tests/qos/test_qos_sai.py @@ -889,7 +889,7 @@ def testQosSaiHeadroomPoolWatermark( @pytest.mark.parametrize("bufPool", ["wm_buf_pool_lossless", "wm_buf_pool_lossy"]) def testQosSaiBufferPoolWatermark( self, request, get_src_dst_asic_and_duts, bufPool, ptfhost, dutTestParams, dutConfig, dutQosConfig, - ingressLosslessProfile, egressLossyProfile, resetWatermark, + ingressLosslessProfile, egressLossyProfile, resetWatermark, _skip_watermark_multi_DUT ): """ Test QoS SAI Queue buffer pool watermark for lossless/lossy traffic @@ -1365,7 +1365,7 @@ def testQosSaiDwrr( @pytest.mark.parametrize("pgProfile", ["wm_pg_shared_lossless", "wm_pg_shared_lossy"]) def testQosSaiPgSharedWatermark( self, pgProfile, ptfhost, get_src_dst_asic_and_duts, dutTestParams, dutConfig, dutQosConfig, - resetWatermark + resetWatermark, _skip_watermark_multi_DUT ): """ Test QoS SAI PG shared watermark test for lossless/lossy traffic @@ -1565,7 +1565,7 @@ def testQosSaiPGDrop( @pytest.mark.parametrize("queueProfile", ["wm_q_shared_lossless", "wm_q_shared_lossy"]) def testQosSaiQSharedWatermark( self, get_src_dst_asic_and_duts, queueProfile, ptfhost, dutTestParams, dutConfig, dutQosConfig, - resetWatermark + resetWatermark, _skip_watermark_multi_DUT ): """ Test QoS SAI Queue shared watermark test for lossless/lossy traffic @@ -1819,7 +1819,7 @@ def testQosSaiDwrrWeightChange( @pytest.mark.parametrize("queueProfile", ["wm_q_wm_all_ports"]) def testQosSaiQWatermarkAllPorts( self, queueProfile, ptfhost, dutTestParams, dutConfig, dutQosConfig, - resetWatermark, _skip_allportQWM_multi_DUT + resetWatermark, _skip_watermark_multi_DUT ): """ Test QoS SAI Queue watermark test for lossless/lossy traffic on all ports