Skip to content

Bug: test_snmp_interfaces.py failed with AssertionError: tx_err value is 0 not set to 5000 #22107

@manish1-arista

Description

@manish1-arista

Is it platform specific

generic

Importance or Severity

Medium

Description of the bug

The test case test_snmp_interfaces.py::test_snmp_interfaces_error_discard fails with the following assertion error:

AssertionError: tx_err value is 0 not set to 5000

This issue is only seen on dualtor systems.

Steps to Reproduce

Run the testcase test_snmp_interfaces.py::test_snmp_interfaces_error_discard on a dualtor testbed

Actual Behavior and Expected Behavior

Expected Behavior: Both test instances pass (one for each DUT)
Actual Behaviour: First DUT passes, second DUT fails with tx_err value is 0 not set to 5000

Relevant log output

"21/01/2026 08:13:34 test_snmp_interfaces.test_snmp_interface L0405 INFO   | Compare rif counters in COUNTERS DB and counters get from SONiC CLI\n",
        "21/01/2026 08:13:34 test_snmp_interfaces.test_snmp_interface L0411 INFO   | Compare port counters in COUNTERS DB and counters get from SONiC CLI\n",
        "21/01/2026 08:13:34 __init__.pytest_runtest_call             L0040 ERROR  | Traceback (most recent call last):\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/_pytest/python.py\", line 1788, in runtest\n",
        "    self.ihook.pytest_pyfunc_call(pyfuncitem=self)\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/pluggy/_hooks.py\", line 513, in __call__\n",
        "    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/pluggy/_manager.py\", line 120, in _hookexec\n",
        "    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/pluggy/_callers.py\", line 139, in _multicall\n",
        "    raise exception.with_traceback(exception.__traceback__)\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/pluggy/_callers.py\", line 103, in _multicall\n",
        "    res = hook_impl.function(*args)\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/_pytest/python.py\", line 194, in pytest_pyfunc_call\n",
        "    result = testfunction(**testargs)\n",
        "  File \"/data/tests/snmp/test_snmp_interfaces.py\", line 412, in test_snmp_interfaces_error_discard\n",
        "    assert int(port_counters['tx_err']) == COUNTER_VALUE, \\\n",
        "AssertionError: tx_err value is 0 not set to 5000\n",

Output of show version

Attach files (if any)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions