diff --git a/tests/ip/test_ip_packet.py b/tests/ip/test_ip_packet.py index 577fe75adb6..39c65526e3d 100644 --- a/tests/ip/test_ip_packet.py +++ b/tests/ip/test_ip_packet.py @@ -708,8 +708,11 @@ def test_drop_l3_ip_packet_non_dut_mac(self, duthosts, enum_rand_one_per_hwsku_f pytest_assert(rx_ok >= self.PKT_NUM_MIN, "Received {} packets in rx, not in expected range".format(rx_ok)) - pytest_assert(rx_drp >= self.PKT_NUM_MIN, - "Dropped {} packets in rx, not in expected range".format(rx_drp)) + asic_type = duthost.facts["asic_type"] + # Packet is dropped silently on Mellanox platform if the destination MAC address is not the router MAC + if asic_type not in ["mellanox"]: + pytest_assert(rx_drp >= self.PKT_NUM_MIN, + "Dropped {} packets in rx, not in expected range".format(rx_drp)) pytest_assert(tx_ok <= self.PKT_NUM_ZERO, "Forwarded {} packets in tx, not in expected range".format(tx_ok)) pytest_assert(max(tx_drp, tx_rif_err) <= self.PKT_NUM_ZERO,