From e6a202489593645a43a94b34388f46f3b5c6fe72 Mon Sep 17 00:00:00 2001 From: Jibin Bao Date: Thu, 31 Oct 2024 05:03:00 +0800 Subject: [PATCH] Update qos sai tests (#14342) 1. update qos sai test for sn5400 according to the two PRs below a. https://github.com/sonic-net/sonic-mgmt/pull/9583 b. https://github.com/sonic-net/sonic-mgmt/pull/12848 2. To stabilize testQosSaiQSharedWatermark[single_asic-wm_q_shared_lossy], update margin from 4 to 5 for spc4 Change-Id: Ic3919a9123cd968fb9d89013687cf31791684208 --- tests/qos/files/mellanox/special_qos_config.yml | 1 + tests/qos/qos_sai_base.py | 4 +++- tests/saitests/py3/sai_qos_tests.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/qos/files/mellanox/special_qos_config.yml b/tests/qos/files/mellanox/special_qos_config.yml index 2f1668cf891..23581fb8230 100644 --- a/tests/qos/files/mellanox/special_qos_config.yml +++ b/tests/qos/files/mellanox/special_qos_config.yml @@ -33,5 +33,6 @@ qos_params: pkts_num_margin: 7 wm_pg_shared_lossy: packet_size: 600 + pkts_num_margin: 5 wm_q_shared_lossy: packet_size: 600 diff --git a/tests/qos/qos_sai_base.py b/tests/qos/qos_sai_base.py index dea7ef0faea..7787e83eee9 100644 --- a/tests/qos/qos_sai_base.py +++ b/tests/qos/qos_sai_base.py @@ -352,7 +352,9 @@ def __getBufferProfile(self, request, dut_asic, os_version, table, port, priorit # Update profile static threshold value if profile threshold is dynamic if "dynamic_th" in list(bufferProfile.keys()): - if dut_asic.sonichost.facts['platform'] == "x86_64-nvidia_sn5600-r0": + platform_support_nvidia_new_algorithm_cal_buffer_thr = ["x86_64-nvidia_sn5600-r0", + "x86_64-nvidia_sn5400-r0"] + if dut_asic.sonichost.facts['platform'] in platform_support_nvidia_new_algorithm_cal_buffer_thr: self.__compute_buffer_threshold_for_nvidia_device(dut_asic, table, port, bufferProfile) else: self.__computeBufferThreshold(dut_asic, bufferProfile) diff --git a/tests/saitests/py3/sai_qos_tests.py b/tests/saitests/py3/sai_qos_tests.py index 779b48196de..86369ffff56 100755 --- a/tests/saitests/py3/sai_qos_tests.py +++ b/tests/saitests/py3/sai_qos_tests.py @@ -5113,7 +5113,7 @@ def runTest(self): if pkts_num_fill_min: assert (q_wm_res[queue] == 0) - elif 'cisco-8000' in asic_type or "SN5600" in hwsku: + elif 'cisco-8000' in asic_type or "SN5600" in hwsku or "SN5400" in hwsku: assert (q_wm_res[queue] <= (margin + 1) * cell_size) else: if platform_asic and platform_asic == "broadcom-dnx":