diff --git a/tests/common/devices.py b/tests/common/devices.py index 0f5cfd166b..e367ac5037 100644 --- a/tests/common/devices.py +++ b/tests/common/devices.py @@ -544,6 +544,16 @@ def check_bgp_session_nsf(self, neighbor_ip): return True return False + def get_version(self): + """ + Gets the SONiC version this device is running. + + Returns: + str: the firmware version number (e.g. 20181130.31) + """ + output = dut.command("sonic-cfggen -y /etc/sonic/sonic_version.yml -v build_version") + return output["stdout_lines"][0].strip() + class EosHost(AnsibleHostBase): """ @summary: Class for Eos switch diff --git a/tests/copp/test_copp.py b/tests/copp/test_copp.py index 20dce63fc3..186201f690 100644 --- a/tests/copp/test_copp.py +++ b/tests/copp/test_copp.py @@ -60,7 +60,9 @@ def test_policer(self, protocol, duthost, ptfhost, _copp_testbed): that have a set rate limit. """ - if protocol == "ARP" and is_broadcom_device(duthost): + if protocol == "ARP" \ + and is_broadcom_device(duthost) \ + and "201811" not in duthost.get_version(): pytest.xfail("ARP policy disabled on BRCM devices due to SAI bug") if protocol in ["IP2ME", "SNMP", "SSH"] and _copp_testbed.topo == "t1-lag":