From 6e42e80fcda0c158855830a02d127dc307fabfc4 Mon Sep 17 00:00:00 2001 From: Xu Chen <112069142+XuChen-MSFT@users.noreply.github.com> Date: Tue, 11 Jul 2023 00:28:08 +0800 Subject: [PATCH] fix test_tunnel_decap_dscp_to_pg_mapping failure caused by unknonw asic name (#8862) --- tests/common/devices/sonic.py | 2 +- tests/qos/test_tunnel_qos_remap.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/common/devices/sonic.py b/tests/common/devices/sonic.py index 3d01fc0362..6c24891762 100644 --- a/tests/common/devices/sonic.py +++ b/tests/common/devices/sonic.py @@ -1655,7 +1655,7 @@ def get_asic_name(self): if ("Broadcom Limited Device b960" in output or "Broadcom Limited Broadcom BCM56960" in output): asic = "th" - elif "Broadcom Limited Device b971" in output: + elif "Device b971" in output: asic = "th2" elif ("Broadcom Limited Device b850" in output or "Broadcom Limited Broadcom BCM56850" in output): diff --git a/tests/qos/test_tunnel_qos_remap.py b/tests/qos/test_tunnel_qos_remap.py index 4eefddec78..ff6191396f 100644 --- a/tests/qos/test_tunnel_qos_remap.py +++ b/tests/qos/test_tunnel_qos_remap.py @@ -500,6 +500,7 @@ def test_tunnel_decap_dscp_to_pg_mapping(rand_selected_dut, ptfhost, dut_config, """ toggle_mux_to_host(rand_selected_dut) asic = rand_selected_dut.get_asic_name() + pytest_assert(asic != 'unknown', 'Get unknown asic name') # TODO: Get the cell size for other ASIC if asic == 'th2': cell_size = 208