basic-1.3: add basic.DefaultDrop
diff --git a/src/python/oftest/testutils.py b/src/python/oftest/testutils.py
index e87b7a0..d92f180 100644
--- a/src/python/oftest/testutils.py
+++ b/src/python/oftest/testutils.py
@@ -1596,7 +1596,10 @@
# Found a matching message
break
- test.assertTrue(msg == None, "Did not expect a packet-in message on port %d" % in_port)
+ if in_port == None:
+ test.assertTrue(msg == None, "Did not expect a packet-in message on any port")
+ else:
+ test.assertTrue(msg == None, "Did not expect a packet-in message on port %d" % in_port)
def openflow_ports(num=None):
"""
diff --git a/tests-1.3/basic.py b/tests-1.3/basic.py
index 611aacd..eeedec7 100644
--- a/tests-1.3/basic.py
+++ b/tests-1.3/basic.py
@@ -62,6 +62,19 @@
self.assertTrue(response is not None,
'Did not get features reply')
+class DefaultDrop(base_tests.SimpleDataPlane):
+ """
+ Check that an empty flowtable results in drops
+ """
+ def runTest(self):
+ in_port, = openflow_ports(1)
+ delete_all_flows(self.controller)
+
+ pkt = str(simple_tcp_packet())
+ self.dataplane.send(in_port, pkt)
+ verify_no_packet_in(self, pkt, None)
+ receive_pkt_check(self.dataplane, pkt, [], openflow_ports(), self)
+
class OutputExact(base_tests.SimpleDataPlane):
"""
Test output function for an exact-match flow