From 7c86e729eac101dfa9ba208d8025f4ca4bc26781 Mon Sep 17 00:00:00 2001 From: Sihui Han Date: Tue, 6 Jun 2017 22:49:33 +0000 Subject: [PATCH 1/2] [TestUtils]: fix the issue of verify_packet_any_port --- src/ptf/testutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ptf/testutils.py b/src/ptf/testutils.py index fae5a03..6d66ff1 100644 --- a/src/ptf/testutils.py +++ b/src/ptf/testutils.py @@ -2356,7 +2356,7 @@ def verify_packet_any_port(test, pkt, ports=[], device_number=0): Returns the index of the port on which the packet is received and the packet. """ logging.debug("Checking for pkt on device %d, port %r", device_number, ports) - result = dp_poll(test, device_number=device_number, exp_pkt=pkt, timeout=1) + result = dp_poll(test, device_number=device_number, exp_pkt=pkt, timeout=1, port_number= ports) verify_no_other_packets(test, device_number=device_number) if isinstance(result, test.dataplane.PollSuccess): From d4d91ce93ac23ec697dff34e75879a132572f7f3 Mon Sep 17 00:00:00 2001 From: Sihui Han Date: Wed, 7 Jun 2017 16:52:06 +0000 Subject: [PATCH 2/2] fix the whitespace --- src/ptf/testutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ptf/testutils.py b/src/ptf/testutils.py index 6d66ff1..d6c1a9d 100644 --- a/src/ptf/testutils.py +++ b/src/ptf/testutils.py @@ -2356,7 +2356,7 @@ def verify_packet_any_port(test, pkt, ports=[], device_number=0): Returns the index of the port on which the packet is received and the packet. """ logging.debug("Checking for pkt on device %d, port %r", device_number, ports) - result = dp_poll(test, device_number=device_number, exp_pkt=pkt, timeout=1, port_number= ports) + result = dp_poll(test, device_number=device_number, exp_pkt=pkt, timeout=1, port_number=ports) verify_no_other_packets(test, device_number=device_number) if isinstance(result, test.dataplane.PollSuccess):