diff --git a/src/python/oftest/testutils.py b/src/python/oftest/testutils.py
index 0e37485..9558bcb 100644
--- a/src/python/oftest/testutils.py
+++ b/src/python/oftest/testutils.py
@@ -566,6 +566,43 @@
         exp_pkt = pkt
     receive_pkt_verify(parent, egr_ports, exp_pkt, ing_port)
 
+def flow_match_test_pktout(parent, ing_port, egr_ports,
+                           dl_vlan=-1, pkt=None, exp_pkt=None,
+                           action_list=None):
+    """
+    Packet-out test on single TCP packet
+    @param egr_ports A single port or list of ports
+
+    Run test sending packet-out to egr_ports. The goal is to test the actions
+    taken on the packet, not the matching which is of course irrelevant.
+    See flow_match_test for parameter descriptions
+    """
+
+    if pkt is None:
+        pkt = simple_tcp_packet(dl_vlan_enable=(dl_vlan >= 0), dl_vlan=dl_vlan)
+
+    msg = message.packet_out()
+    msg.in_port = ing_port
+    msg.data = str(pkt)
+    if action_list is not None:
+        for act in action_list:
+            assert(msg.actions.add(act))
+
+    # Set up output action
+    if egr_ports is not None:
+        for egr_port in egr_ports:
+            act = action.action_output()
+            act.port = egr_port
+            assert(msg.actions.add(act))
+
+    logging.debug(msg.show())
+    rv = parent.controller.message_send(msg)
+    parent.assertTrue(rv == 0, "Error sending out message")
+
+    if exp_pkt is None:
+        exp_pkt = pkt
+    receive_pkt_verify(parent, egr_ports, exp_pkt, ing_port)
+
 def get_egr_list(parent, of_ports, how_many, exclude_list=[]):
     """
     Generate a list of ports avoiding those in the exclude list
@@ -594,7 +631,7 @@
                     exp_pkt=None, action_list=None,
                     max_test=0, egr_count=1, ing_port=False):
     """
-    Run flow_match_test_port_pair on all port pairs
+    Run flow_match_test_port_pair on all port pairs and packet-out
 
     @param max_test If > 0 no more than this number of tests are executed.
     @param parent Must implement controller, dataplane, assertTrue, assertEqual
@@ -632,7 +669,18 @@
         test_count += 1
         if (max_test > 0) and (test_count > max_test):
             logging.info("Ran " + str(test_count) + " tests; exiting")
-            return
+            break
+
+
+    ingress_port = of_ports[0]
+    egr_ports = get_egr_list(parent, of_ports, egr_count,
+                             exclude_list=[ingress_port])
+    if ing_port:
+        egr_ports.append(ofp.OFPP_IN_PORT)
+    flow_match_test_pktout(parent, ingress_port, egr_ports,
+                           dl_vlan=dl_vlan,
+                           pkt=pkt, exp_pkt=exp_pkt,
+                           action_list=action_list)
 
 def test_param_get(key, default=None):
     """
