Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pfcwd] Fix test_pfcwd_mmu_change IndexError (sonic-net#4465)
Signed-off-by: Andrii-Yosafat Lozovyi <andrii-yosafatx.lozovyi@intel.com> Summary: test_pfcwd_mmu_change fails with IndexError asic = dut.get_port_asic_instance(port) if PfcCmd.isBufferInApplDb(asic): db = "0" pg_pattern = "BUFFER_PG_TABLE:{}:3-4" else: db = "4" pg_pattern = "BUFFER_PG|{}|3-4" pg_profile = asic.run_redis_cmd( argv = [ "redis-cli", "-n", db, "HGET", pg_pattern.format(port), "profile" ] )[0].encode("utf-8")[1:-1] alpha = asic.run_redis_cmd( argv = [ "redis-cli", "-n", db, "HGET", pg_profile, "dynamic_th" ] > )[0].encode("utf-8") E IndexError: list index out of range Looks like after PR - 1626 values in DB for QOS has changed. Example of change on different Sonic images below: redis-cli -n 4 hget 'BUFFER_PG|Ethernet24|3-4' 'profile' "[BUFFER_PROFILE|pg_lossless_100000_300m_profile]" - on SONiC.master.31701-dirty-20210827.084520 "pg_lossless_100000_300m_profile" - on SONiC.master.42584-dirty-20211011.014318 This PR should solve this issue. How did you verify/test it? Run TC on SONiC.master.42584-dirty-20211011.014318 and SONiC.master.31701-dirty-20210827.084520 pfcwd/test_pfcwd_function.py::TestPfcwdFunc::test_pfcwd_actions[None] PASSED pfcwd/test_pfcwd_function.py::TestPfcwdFunc::test_pfcwd_mmu_change[None] PASSED pfcwd/test_pfcwd_function.py::TestPfcwdFunc::test_pfcwd_port_toggle[None] PASSED
- Loading branch information