testutils: add new functions to check for dataplane packets
`receive_pkt_check` and `receive_pkt_verify` had slightly different
functionality and neither were sufficient for complex tests. This change
deprecates them and adds new functions.
The high level `verify_packets` function is sufficient for most tests. When
more complex logic is needed the primitive functions `verify_packet`,
`verify_no_packet`, and `verify_no_other_packets` should be used directly.
All OpenFlow 1.0/1.3 tests are updated to use the new functions. The old
functions are left around for compatibility with out of tree tests.
diff --git a/tests/bsn_mirror.py b/tests/bsn_mirror.py
index 4e4343d..7f40534 100644
--- a/tests/bsn_mirror.py
+++ b/tests/bsn_mirror.py
@@ -87,6 +87,4 @@
logging.info("Checking that packet was received from output port %s, "
"mirror ports %s and %s" % (
ports[1], mirror_ports[0], mirror_ports[1]))
- receive_pkt_check(self.dataplane, pkt,
- [ports[1], mirror_ports[0], mirror_ports[1]], [],
- self)
+ verify_packets(self, pkt, [ports[1], mirror_ports[0], mirror_ports[1]])