Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix error in qos_param_generator (#14715)
Description of PR Error seen when running on T2 testbed. 21:32:22 base._run L0118 DEBUG | /data/tests/common/devices/sonic.py::get_running_config_facts#1774: [sfd-lt2-lc0] AnsibleModule::config_facts done, is_failed=False, rc=None 21:32:22 __init__._fixture_generator_decorator L0088 ERROR | KeyError('DSCP_TO_TC_MAP') Traceback (most recent call last): File "/data/tests/common/plugins/log_section_start/__init__.py", line 84, in _fixture_generator_decorator res = next(it) File "/data/tests/qos/qos_sai_base.py", line 1671, in dutQosConfig qpm = qos_param_generator.QosParamCisco( File "/data/tests/qos/files/cisco/qos_param_generator.py", line 87, in __init__ self.dscp_queue0 = self.get_one_dscp_from_queue(0) File "/data/tests/qos/files/cisco/qos_param_generator.py", line 96, in get_one_dscp_from_queue dscp_to_tc_map = self.config_facts['DSCP_TO_TC_MAP']['AZURE'] KeyError: 'DSCP_TO_TC_MAP' self.config_facts['DSCP_TO_TC_MAP'] doesn't exist, since it reads the running-config for host, not for asic. Approach What is the motivation for this PR? Fix script error when running on T2 testbed. How did you do it? Read configuration for asic, also move those statements under if support_autogen. How did you verify/test it? Verified there is no error when running on T2 testbed. ---------------------------------------------- generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testParameter_2024-09-25-20-41-38.xml ----------------------------------------------- ----------------------------------------------------------------------------------- live log sessionfinish ----------------------------------------------------------------------------------- 21:08:01 __init__.pytest_terminal_summary L0067 INFO | Can not get Allure report URL. Please check logs ================================================================================== short test summary info =================================================================================== PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_asic] PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_dut_multi_asic] PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_longlink_to_shortlink] PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_shortlink_to_shortlink] PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_shortlink_to_longlink] ========================================================================= 5 passed, 1 warning in 1581.20s (0:26:21) ========================================================================== INFO:root:Can not get Allure report URL. Please check logs sonic@sonic-ucs-m6-4:/data/tests$ Verified there is no error on T0 testbed. ------------------------------------------------- generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testParameter_2024-09-25-23-05-30.xml ------------------------------------------------- ------------------------------------------------------------------------------------- live log sessionfinish -------------------------------------------------------------------------------------- 23:08:20 __init__.pytest_terminal_summary L0067 INFO | Can not get Allure report URL. Please check logs ===================================================================================== short test summary info ===================================================================================== PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_asic] SKIPPED [1] qos/test_qos_sai.py:315: single_dut_multi_asic is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:315: multi-dut is not supported on T0 topologies ====================================================================== 1 passed, 4 skipped, 2 warnings in 168.11s (0:02:48) ======================================================================= INFO:root:Can not get Allure report URL. Please check logs sonic@sonic-ucs-m5-9:/data/tests$ Any platform specific information? The error is only seen on T2. Signed-off-by: Zhixin Zhu <[email protected]>
- Loading branch information