From ca5c6dc01604b96c5029109b9e30a6aaa2318410 Mon Sep 17 00:00:00 2001 From: bingwang Date: Tue, 29 Oct 2024 21:52:54 +0000 Subject: [PATCH] Skip RX_DRP check on Mellanox platform in test_drop_l3_ip_packet_non_dut_mac --- tests/ip/test_ip_packet.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/ip/test_ip_packet.py b/tests/ip/test_ip_packet.py index ac0ad5ef303..d4e7fdefb3c 100644 --- a/tests/ip/test_ip_packet.py +++ b/tests/ip/test_ip_packet.py @@ -725,8 +725,11 @@ def test_drop_l3_ip_packet_non_dut_mac(self, duthosts, enum_rand_one_per_hwsku_f return 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,