From e0deef4327e41ab9fce6d0538f4e134147da84b9 Mon Sep 17 00:00:00 2001 From: xwjiang-ms <96218837+xwjiang-ms@users.noreply.github.com> Date: Tue, 3 Sep 2024 09:48:02 +0800 Subject: [PATCH] Ignore `missed_in_asic_db_routes` error in `vxlan/test_vxlan_crm.py` test for KVM (#14365) What is the motivation for this PR? When running vxlan/test_vxlan_crm.py, there is a chance to get missed_in_asic_db_routes error in log analyzer for KVM How did you do it? Since missed_in_asic_db_routes has been ignored in other test scripts in vxlan module, ignore in vxlan/test_vxlan_crm.py test for KVM Remove conditional mark xfail but keep mgmt issue #14311 open How did you verify/test it? Test in KVM --- .../tests_mark_conditions.yaml | 20 ------------------- tests/vxlan/test_vxlan_crm.py | 14 +++++++++++++ 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/tests/common/plugins/conditional_mark/tests_mark_conditions.yaml b/tests/common/plugins/conditional_mark/tests_mark_conditions.yaml index 44b1f0aab7b..63f71aa3e8f 100644 --- a/tests/common/plugins/conditional_mark/tests_mark_conditions.yaml +++ b/tests/common/plugins/conditional_mark/tests_mark_conditions.yaml @@ -1890,50 +1890,30 @@ vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_128_group_members[v6_in_v6]: reason: "On Mellanox spc1 platform, due to HW limitation, vxlan ipv6 tunnel is not supported" conditions: - "asic_gen == 'spc1'" - xfail: - reason: "Vnet route missed in ASIC DB for KVM platform, xfail for unblocking PR test" - conditions: - - "(asic_type in ['vs']) and https://github.com/sonic-net/sonic-mgmt/issues/14311" vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_16k_routes[v4_in_v6]: skip: reason: "On Mellanox spc1 platform, due to HW limitation, vxlan ipv6 tunnel is not supported" conditions: - "asic_gen == 'spc1'" - xfail: - reason: "Vnet route missed in ASIC DB for KVM platform, xfail for unblocking PR test" - conditions: - - "(asic_type in ['vs']) and https://github.com/sonic-net/sonic-mgmt/issues/14311" vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_16k_routes[v6_in_v6]: skip: reason: "On Mellanox spc1 platform, due to HW limitation, vxlan ipv6 tunnel is not supported" conditions: - "asic_gen == 'spc1'" - xfail: - reason: "Vnet route missed in ASIC DB for KVM platform, xfail for unblocking PR test" - conditions: - - "(asic_type in ['vs']) and https://github.com/sonic-net/sonic-mgmt/issues/14311" vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_512_nexthop_groups[v4_in_v6]: skip: reason: "On Mellanox spc1 platform, due to HW limitation, vxlan ipv6 tunnel is not supported" conditions: - "asic_gen == 'spc1'" - xfail: - reason: "Vnet route missed in ASIC DB for KVM platform, xfail for unblocking PR test" - conditions: - - "(asic_type in ['vs']) and https://github.com/sonic-net/sonic-mgmt/issues/14311" vxlan/test_vxlan_crm.py::Test_VxLAN_Crm::test_crm_512_nexthop_groups[v6_in_v6]: skip: reason: "On Mellanox spc1 platform, due to HW limitation, vxlan ipv6 tunnel is not supported" conditions: - "asic_gen == 'spc1'" - xfail: - reason: "Vnet route missed in ASIC DB for KVM platform, xfail for unblocking PR test" - conditions: - - "(asic_type in ['vs']) and https://github.com/sonic-net/sonic-mgmt/issues/14311" vxlan/test_vxlan_ecmp.py: skip: diff --git a/tests/vxlan/test_vxlan_crm.py b/tests/vxlan/test_vxlan_crm.py index 66e9bd03e87..ae57007e4f3 100644 --- a/tests/vxlan/test_vxlan_crm.py +++ b/tests/vxlan/test_vxlan_crm.py @@ -21,6 +21,20 @@ ecmp_utils = Ecmp_Utils() +@pytest.fixture(autouse=True) +def _ignore_route_sync_errlogs(duthosts, rand_one_dut_hostname, loganalyzer): + """Ignore expected failures logs during test execution.""" + if loganalyzer: + # Ignore in KVM test + KVMIgnoreRegex = [ + ".*missed_in_asic_db_routes.*", + ] + duthost = duthosts[rand_one_dut_hostname] + if duthost.facts["asic_type"] == "vs": + loganalyzer[rand_one_dut_hostname].ignore_regex.extend(KVMIgnoreRegex) + return + + def uniq(lst): last = object() for item in sorted(lst):