diff --git a/tests/common/plugins/loganalyzer/__init__.py b/tests/common/plugins/loganalyzer/__init__.py index 1e58f50ebdb..c7340574e96 100644 --- a/tests/common/plugins/loganalyzer/__init__.py +++ b/tests/common/plugins/loganalyzer/__init__.py @@ -111,3 +111,28 @@ def loganalyzer(duthosts, request, log_rotate_modular_chassis): ) consolidated_bughandler = get_bughandler_instance({"type": "consolidated"}) consolidated_bughandler.bug_handler_wrapper(analyzers, duthosts, la_results) + + +@pytest.fixture(autouse=True) +def ignore_pkt_trim_errors(duthosts, loganalyzer): + ASIC_LIST = ["th5"] + if loganalyzer: + for duthost in duthosts: + platform_asic = duthost.facts["platform_asic"].lower() + asic_name = duthost.get_asic_name().lower() + if platform_asic == "broadcom" and asic_name not in ASIC_LIST: + # We should cleanup this code once CSP12420291 is fixed. + loganalyzer[duthost.hostname].ignore_regex.extend( + [ + r".*ERR syncd#syncd: .* SAI_API_SWITCH:" + r"_brcm_sai_xgs_pkt_trim_get_mapped_counter:[\d]+ Packet trim feature is not supported.*", + r".*ERR syncd#syncd: .* SAI_API_QUEUE:" + r"_brcm_sai_xgs_queue_pkt_trim_get_clear_ctr:[\d]+ " + r"Get Trim mapped counter failed with error -2.*", + r".*ERR syncd#syncd: .* SAI_API_QUEUE:" + r"_brcm_sai_cosq_stat_get:[\d]+ Get Trim stats packets failed with error -2.*", + r".*ERR syncd#syncd: .* SAI_API_SWITCH:" + r"sai_query_switch_attribute_enum_values_capability:[\d]+ " + r"packet trim Enum Capability values get for [\d]+ failed with error -2.*" + ] + ) diff --git a/tests/dhcp_relay/test_dhcp_relay.py b/tests/dhcp_relay/test_dhcp_relay.py index 0fd69c4434b..13329acefe1 100644 --- a/tests/dhcp_relay/test_dhcp_relay.py +++ b/tests/dhcp_relay/test_dhcp_relay.py @@ -187,7 +187,7 @@ def verify_acl_drop_on_standby_tor(rand_unselected_dut, dut_dhcp_relay_data, tes if testing_mode == DUAL_TOR_MODE and "dualtor-aa" not in tbinfo["topo"]["name"]: for client_interface_name, item in pre_client_dhcp_acl_counts.items(): after_count = get_acl_count_by_mark(rand_unselected_dut, item["mark"]) - pytest_assert(after_count == item["count"] + 3, "Drop count of {} {} is unexpected, pre: {}, after: {}" + pytest_assert(after_count == item["count"] + 7, "Drop count of {} {} is unexpected, pre: {}, after: {}" .format(client_interface_name, item["mark"], item["count"], after_count))