testutils: add verify_packet_in and verify_no_packet_in
Checking that the controller received a packet-in message is surprisingly
complicated to do correctly. Because the switch may send unexpected packet-ins
(Linux IP stack on IVS's OFPP_LOCAL, for example) each test needs logic to
match the packet data, in_port, etc to figure out if this is the packet-in
message it's looking for.
This change adds two testutils functions that automate this, and replaces all
the other implementations in tests.
9 files changed