[TestUtils]: fix the issue of verify_packet_any_port#69
[TestUtils]: fix the issue of verify_packet_any_port#69sihuihan88 wants to merge 2 commits intop4lang:mainfrom
Conversation
antoninbas
left a comment
There was a problem hiding this comment.
It is possible that the current implementation is not ideal, but what you are proposing is definitely wrong IMO. I don't think port_number can be an iterable object.
src/ptf/testutils.py
Outdated
| """ | ||
| 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) |
|
Could you elaborate a little bit on why the current fix is wrong? IMO To prevent having this warning when calling verify_packet_any_port, we should pass the right value to the port_number argument when it calls dp_poll. |
You pass |
Failing to include port_number when calling dp_poll in verify_packet_any_port, will result in dataplane warning as follows:
"dataplane : WARNING : Dataplane poll with exp_pkt but no port number "