diff --git a/tests/sub_port_interfaces/test_sub_port_l2_forwarding.py b/tests/sub_port_interfaces/test_sub_port_l2_forwarding.py index a2fd82d4f3..d27d3a2d5e 100644 --- a/tests/sub_port_interfaces/test_sub_port_l2_forwarding.py +++ b/tests/sub_port_interfaces/test_sub_port_l2_forwarding.py @@ -110,9 +110,9 @@ def check_no_cpu_packets(duthost, port, packet_fingerprint): def verify_no_packet_received(ptfadapter, ports, packet_fingerprint): for port in ports: for packet, _ in ptfadapter.dataplane.packet_queues[(0, port)]: - if packet_fingerprint in packet: + if packet_fingerprint in str(packet): logging.error("Received packet with fingerprint '%s' on port %s: %s\n", port, packet_fingerprint, - packet) + str(packet)) pytest.fail("Received packet on port %s" % port) duthost = duthosts[rand_one_dut_hostname]