[ovs-dev] [PATCH ovn] tests: Remove non OVN test files

nusiddiq at redhat.com nusiddiq at redhat.com
Thu May 9 16:32:52 UTC 2019


From: Numan Siddique <nusiddiq at redhat.com>

This patch cleans up the tests folder and removes the non OVN
test files.

Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
---
 TODO_SPLIT.rst                                |     5 +-
 tests/MockXenAPI.py                           |   117 -
 tests/aes128.at                               |   146 -
 tests/appctl.py                               |    74 -
 tests/auto-attach.at                          |     7 -
 tests/automake.mk                             |   301 +-
 tests/bfd.at                                  |  1102 --
 tests/bridge.at                               |   105 -
 tests/bundle.at                               |   454 -
 tests/cfm.at                                  |   510 -
 tests/check-structs.at                        |    56 -
 tests/checkpatch.at                           |   330 -
 tests/classifier.at                           |   308 -
 tests/completion.at                           |   794 --
 tests/daemon-py.at                            |   252 -
 tests/daemon.at                               |   228 -
 tests/dpctl.at                                |    87 -
 tests/dpdk/ring_client.c                      |   200 -
 tests/dpif-netdev.at                          |   422 -
 tests/file_name.at                            |   125 -
 tests/flowgen.py                              |   239 -
 tests/fuzz-regression-list.at                 |    23 -
 tests/fuzz-regression.at                      |    21 -
 .../flow_extract_fuzzer-5112775280951296      |   Bin 54 -> 0 bytes
 .../flow_extract_fuzzer-5457710546944000      |   Bin 227 -> 0 bytes
 .../json_parser_fuzzer-4790908707930112       |   Bin 43 -> 0 bytes
 .../ofp_print_fuzzer-4584019764183040         |   Bin 128 -> 0 bytes
 .../ofp_print_fuzzer-4730143510626304         |   Bin 12 -> 0 bytes
 .../ofp_print_fuzzer-4854119633256448         |   Bin 48 -> 0 bytes
 .../ofp_print_fuzzer-5070973479944192         |   Bin 112 -> 0 bytes
 .../ofp_print_fuzzer-5072291707748352         |   Bin 112 -> 0 bytes
 .../ofp_print_fuzzer-5147430386401280         |   Bin 128 -> 0 bytes
 .../ofp_print_fuzzer-5168455220199424         |   Bin 80 -> 0 bytes
 .../ofp_print_fuzzer-5190507327127552         |   Bin 113 -> 0 bytes
 .../ofp_print_fuzzer-5204186701496320         |   Bin 80 -> 0 bytes
 .../ofp_print_fuzzer-5394482341085184         |   Bin 128 -> 0 bytes
 .../ofp_print_fuzzer-5395207246839808         |   Bin 156 -> 0 bytes
 .../ofp_print_fuzzer-5647458888581120         |   Bin 48 -> 0 bytes
 .../ofp_print_fuzzer-5674119268925440         |   Bin 96 -> 0 bytes
 .../ofp_print_fuzzer-5674419757252608         |   Bin 112 -> 0 bytes
 .../ofp_print_fuzzer-5677588436484096         |   Bin 128 -> 0 bytes
 .../ofp_print_fuzzer-5706562554298368         |   Bin 72 -> 0 bytes
 .../ofp_print_fuzzer-5722747668791296         |   Bin 120 -> 0 bytes
 .../ofp_print_fuzzer-6285128790704128         |   Bin 128 -> 0 bytes
 .../ofp_print_fuzzer-6470117922701312         |   Bin 256 -> 0 bytes
 .../ofp_print_fuzzer-6502620041576448         |   Bin 128 -> 0 bytes
 tests/heap.at                                 |    13 -
 tests/idltest.ann                             |     9 -
 tests/idltest.ovsschema                       |   184 -
 tests/idltest2.ovsschema                      |   144 -
 tests/interface-reconfigure.at                |  1052 --
 tests/json.at                                 |   412 -
 tests/jsonrpc-py.at                           |    46 -
 tests/jsonrpc.at                              |    29 -
 tests/lacp.at                                 |  1013 --
 tests/learn.at                                |   838 --
 tests/lib.at                                  |     9 -
 tests/library.at                              |   258 -
 tests/lockfile.at                             |    54 -
 tests/mcast-snooping.at                       |   218 -
 tests/mpls-xlate.at                           |   209 -
 tests/multipath.at                            |   582 -
 tests/netdev-type.at                          |    24 -
 tests/nsh.at                                  |   823 --
 tests/odp.at                                  |   406 -
 tests/ofp-actions.at                          |   912 --
 tests/ofp-errors.at                           |   232 -
 tests/ofp-print.at                            |  4060 ------
 tests/ofp-util.at                             |    95 -
 tests/ofproto-dpif.at                         | 10668 ----------------
 tests/ofproto.at                              |  6641 ----------
 tests/ovs-ofctl.at                            |  3225 -----
 tests/ovs-router.at                           |    83 -
 tests/ovs-vsctl.at                            |  1444 ---
 tests/ovs-vswitchd.at                         |   265 -
 tests/ovs-xapi-sync.at                        |    75 -
 tests/ovsdb-client.at                         |   173 -
 tests/ovsdb-cluster-testsuite.at              |    10 -
 tests/ovsdb-cluster.at                        |   450 -
 tests/ovsdb-column.at                         |    13 -
 tests/ovsdb-condition.at                      |   970 --
 tests/ovsdb-data.at                           |   928 --
 tests/ovsdb-execution.at                      |  1140 --
 tests/ovsdb-idl.at                            |  1924 ---
 tests/ovsdb-lock.at                           |    73 -
 tests/ovsdb-log.at                            |   388 -
 tests/ovsdb-monitor-sort.py                   |    85 -
 tests/ovsdb-monitor.at                        |   958 --
 tests/ovsdb-mutation.at                       |   827 --
 tests/ovsdb-query.at                          |   543 -
 tests/ovsdb-rbac.at                           |   375 -
 tests/ovsdb-replication.at                    |   190 -
 tests/ovsdb-row.at                            |   271 -
 tests/ovsdb-schema.at                         |   120 -
 tests/ovsdb-server.at                         |  1905 ---
 tests/ovsdb-table.at                          |    76 -
 tests/ovsdb-tool.at                           |   461 -
 tests/ovsdb-transaction.at                    |   410 -
 tests/ovsdb-trigger.at                        |   187 -
 tests/ovsdb-types.at                          |   167 -
 tests/ovsdb.at                                |    21 -
 tests/packet-type-aware.at                    |  1041 --
 tests/pmd.at                                  |   720 --
 tests/reconnect.at                            |  1283 --
 tests/rstp.at                                 |   255 -
 tests/run-oftest                              |    94 -
 tests/run-ryu                                 |   150 -
 tests/sendpkt.py                              |    96 -
 tests/stp.at                                  |   662 -
 tests/system-dpdk-macros.at                   |    65 -
 tests/system-dpdk-testsuite.at                |    25 -
 tests/system-dpdk.at                          |   234 -
 tests/system-interface.at                     |    65 -
 tests/system-kmod-testsuite.at                |     3 -
 tests/system-layer3-tunnels.at                |    99 -
 tests/system-offloads-testsuite.at            |    25 -
 tests/system-offloads-traffic.at              |    68 -
 tests/system-traffic.at                       |  5932 ---------
 tests/system-userspace-testsuite.at           |     4 -
 tests/test-aa.c                               |   289 -
 tests/test-aes128.c                           |    71 -
 tests/test-atomic.c                           |   434 -
 tests/test-bitmap.c                           |   169 -
 tests/test-bundle.c                           |   268 -
 tests/test-byte-order.c                       |    55 -
 tests/test-ccmap.c                            |   292 -
 tests/test-classifier.c                       |  1909 ---
 tests/test-cmap.c                             |   652 -
 tests/test-conntrack.c                        |   278 -
 tests/test-csum.c                             |   321 -
 tests/test-daemon.py                          |    61 -
 tests/test-flows.c                            |   101 -
 tests/test-hash.c                             |   319 -
 tests/test-heap.c                             |   489 -
 tests/test-hindex.c                           |   327 -
 tests/test-hmap.c                             |   339 -
 tests/test-json.c                             |   159 -
 tests/test-json.py                            |   102 -
 tests/test-jsonrpc.c                          |   348 -
 tests/test-jsonrpc.py                         |   223 -
 tests/test-lib.c                              |    94 -
 tests/test-list.c                             |   245 -
 tests/test-lockfile.c                         |   318 -
 tests/test-multipath.c                        |   137 -
 tests/test-netflow.c                          |   304 -
 tests/test-netlink-conntrack.c                |   186 -
 tests/test-odp.c                              |   256 -
 tests/test-ofpbuf.c                           |    66 -
 tests/test-ovsdb.c                            |  3139 -----
 tests/test-ovsdb.py                           |   965 --
 tests/test-packets.c                          |   186 -
 tests/test-random.c                           |    79 -
 tests/test-rcu.c                              |    51 -
 tests/test-reconnect.c                        |   307 -
 tests/test-reconnect.py                       |   231 -
 tests/test-rstp.c                             |   715 --
 tests/test-sflow.c                            |   814 --
 tests/test-sha1.c                             |   154 -
 tests/test-skiplist.c                         |   211 -
 tests/test-stopwatch.c                        |   195 -
 tests/test-stp.c                              |   672 -
 tests/test-stream.c                           |    46 -
 tests/test-stream.py                          |    32 -
 tests/test-strtok_r.c                         |    38 -
 tests/test-type-props.c                       |    70 -
 tests/test-unix-socket.c                      |    64 -
 tests/test-unix-socket.py                     |    59 -
 tests/test-unixctl.c                          |   186 -
 tests/test-unixctl.py                         |    90 -
 tests/test-util.c                             |  1230 --
 tests/test-uuid.c                             |    42 -
 tests/test-vconn.c                            |   461 -
 tests/test-vlog.py                            |    50 -
 tests/testsuite.at                            |    56 -
 tests/tunnel-push-pop-ipv6.at                 |   394 -
 tests/tunnel-push-pop.at                      |   603 -
 tests/tunnel.at                               |   922 --
 tests/unixctl-py.at                           |   192 -
 tests/uuid.at                                 |    39 -
 tests/vconn.at                                |    22 -
 tests/vlog.at                                 |   515 -
 tests/vtep-ctl.at                             |   948 --
 182 files changed, 6 insertions(+), 85999 deletions(-)
 delete mode 100644 tests/MockXenAPI.py
 delete mode 100644 tests/aes128.at
 delete mode 100644 tests/appctl.py
 delete mode 100644 tests/auto-attach.at
 delete mode 100644 tests/bfd.at
 delete mode 100644 tests/bridge.at
 delete mode 100644 tests/bundle.at
 delete mode 100644 tests/cfm.at
 delete mode 100644 tests/check-structs.at
 delete mode 100755 tests/checkpatch.at
 delete mode 100644 tests/classifier.at
 delete mode 100644 tests/completion.at
 delete mode 100644 tests/daemon-py.at
 delete mode 100644 tests/daemon.at
 delete mode 100644 tests/dpctl.at
 delete mode 100644 tests/dpdk/ring_client.c
 delete mode 100644 tests/dpif-netdev.at
 delete mode 100644 tests/file_name.at
 delete mode 100755 tests/flowgen.py
 delete mode 100644 tests/fuzz-regression-list.at
 delete mode 100644 tests/fuzz-regression.at
 delete mode 100644 tests/fuzz-regression/flow_extract_fuzzer-5112775280951296
 delete mode 100644 tests/fuzz-regression/flow_extract_fuzzer-5457710546944000
 delete mode 100644 tests/fuzz-regression/json_parser_fuzzer-4790908707930112
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-4584019764183040
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-4730143510626304
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-4854119633256448
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-5070973479944192
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-5072291707748352
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-5147430386401280
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-5168455220199424
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-5190507327127552
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-5204186701496320
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-5394482341085184
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-5395207246839808
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-5647458888581120
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-5674119268925440
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-5674419757252608
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-5677588436484096
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-5706562554298368
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-5722747668791296
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-6285128790704128
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-6470117922701312
 delete mode 100644 tests/fuzz-regression/ofp_print_fuzzer-6502620041576448
 delete mode 100644 tests/heap.at
 delete mode 100644 tests/idltest.ann
 delete mode 100644 tests/idltest.ovsschema
 delete mode 100644 tests/idltest2.ovsschema
 delete mode 100644 tests/interface-reconfigure.at
 delete mode 100644 tests/json.at
 delete mode 100644 tests/jsonrpc-py.at
 delete mode 100644 tests/jsonrpc.at
 delete mode 100644 tests/lacp.at
 delete mode 100644 tests/learn.at
 delete mode 100644 tests/lib.at
 delete mode 100644 tests/library.at
 delete mode 100644 tests/lockfile.at
 delete mode 100644 tests/mcast-snooping.at
 delete mode 100644 tests/mpls-xlate.at
 delete mode 100644 tests/multipath.at
 delete mode 100644 tests/netdev-type.at
 delete mode 100644 tests/nsh.at
 delete mode 100644 tests/odp.at
 delete mode 100644 tests/ofp-actions.at
 delete mode 100644 tests/ofp-errors.at
 delete mode 100644 tests/ofp-print.at
 delete mode 100644 tests/ofp-util.at
 delete mode 100644 tests/ofproto-dpif.at
 delete mode 100644 tests/ofproto.at
 delete mode 100644 tests/ovs-ofctl.at
 delete mode 100644 tests/ovs-router.at
 delete mode 100644 tests/ovs-vsctl.at
 delete mode 100644 tests/ovs-vswitchd.at
 delete mode 100644 tests/ovs-xapi-sync.at
 delete mode 100644 tests/ovsdb-client.at
 delete mode 100644 tests/ovsdb-cluster-testsuite.at
 delete mode 100644 tests/ovsdb-cluster.at
 delete mode 100644 tests/ovsdb-column.at
 delete mode 100644 tests/ovsdb-condition.at
 delete mode 100644 tests/ovsdb-data.at
 delete mode 100644 tests/ovsdb-execution.at
 delete mode 100644 tests/ovsdb-idl.at
 delete mode 100644 tests/ovsdb-lock.at
 delete mode 100644 tests/ovsdb-log.at
 delete mode 100755 tests/ovsdb-monitor-sort.py
 delete mode 100644 tests/ovsdb-monitor.at
 delete mode 100644 tests/ovsdb-mutation.at
 delete mode 100644 tests/ovsdb-query.at
 delete mode 100644 tests/ovsdb-rbac.at
 delete mode 100644 tests/ovsdb-replication.at
 delete mode 100644 tests/ovsdb-row.at
 delete mode 100644 tests/ovsdb-schema.at
 delete mode 100644 tests/ovsdb-server.at
 delete mode 100644 tests/ovsdb-table.at
 delete mode 100644 tests/ovsdb-tool.at
 delete mode 100644 tests/ovsdb-transaction.at
 delete mode 100644 tests/ovsdb-trigger.at
 delete mode 100644 tests/ovsdb-types.at
 delete mode 100644 tests/ovsdb.at
 delete mode 100644 tests/packet-type-aware.at
 delete mode 100644 tests/pmd.at
 delete mode 100644 tests/reconnect.at
 delete mode 100644 tests/rstp.at
 delete mode 100755 tests/run-oftest
 delete mode 100755 tests/run-ryu
 delete mode 100755 tests/sendpkt.py
 delete mode 100644 tests/stp.at
 delete mode 100644 tests/system-dpdk-macros.at
 delete mode 100644 tests/system-dpdk-testsuite.at
 delete mode 100644 tests/system-dpdk.at
 delete mode 100644 tests/system-interface.at
 delete mode 100644 tests/system-layer3-tunnels.at
 delete mode 100644 tests/system-offloads-testsuite.at
 delete mode 100644 tests/system-offloads-traffic.at
 delete mode 100644 tests/system-traffic.at
 delete mode 100644 tests/test-aa.c
 delete mode 100644 tests/test-aes128.c
 delete mode 100644 tests/test-atomic.c
 delete mode 100644 tests/test-bitmap.c
 delete mode 100644 tests/test-bundle.c
 delete mode 100644 tests/test-byte-order.c
 delete mode 100644 tests/test-ccmap.c
 delete mode 100644 tests/test-classifier.c
 delete mode 100644 tests/test-cmap.c
 delete mode 100644 tests/test-conntrack.c
 delete mode 100644 tests/test-csum.c
 delete mode 100644 tests/test-daemon.py
 delete mode 100644 tests/test-flows.c
 delete mode 100644 tests/test-hash.c
 delete mode 100644 tests/test-heap.c
 delete mode 100644 tests/test-hindex.c
 delete mode 100644 tests/test-hmap.c
 delete mode 100644 tests/test-json.c
 delete mode 100644 tests/test-json.py
 delete mode 100644 tests/test-jsonrpc.c
 delete mode 100644 tests/test-jsonrpc.py
 delete mode 100644 tests/test-lib.c
 delete mode 100644 tests/test-list.c
 delete mode 100644 tests/test-lockfile.c
 delete mode 100644 tests/test-multipath.c
 delete mode 100644 tests/test-netflow.c
 delete mode 100644 tests/test-netlink-conntrack.c
 delete mode 100644 tests/test-odp.c
 delete mode 100644 tests/test-ofpbuf.c
 delete mode 100644 tests/test-ovsdb.c
 delete mode 100644 tests/test-ovsdb.py
 delete mode 100644 tests/test-packets.c
 delete mode 100644 tests/test-random.c
 delete mode 100644 tests/test-rcu.c
 delete mode 100644 tests/test-reconnect.c
 delete mode 100644 tests/test-reconnect.py
 delete mode 100644 tests/test-rstp.c
 delete mode 100644 tests/test-sflow.c
 delete mode 100644 tests/test-sha1.c
 delete mode 100644 tests/test-skiplist.c
 delete mode 100644 tests/test-stopwatch.c
 delete mode 100644 tests/test-stp.c
 delete mode 100644 tests/test-stream.c
 delete mode 100644 tests/test-stream.py
 delete mode 100644 tests/test-strtok_r.c
 delete mode 100644 tests/test-type-props.c
 delete mode 100644 tests/test-unix-socket.c
 delete mode 100644 tests/test-unix-socket.py
 delete mode 100644 tests/test-unixctl.c
 delete mode 100644 tests/test-unixctl.py
 delete mode 100644 tests/test-util.c
 delete mode 100644 tests/test-uuid.c
 delete mode 100644 tests/test-vconn.c
 delete mode 100644 tests/test-vlog.py
 delete mode 100644 tests/tunnel-push-pop-ipv6.at
 delete mode 100644 tests/tunnel-push-pop.at
 delete mode 100644 tests/tunnel.at
 delete mode 100644 tests/unixctl-py.at
 delete mode 100644 tests/uuid.at
 delete mode 100644 tests/vconn.at
 delete mode 100644 tests/vlog.at
 delete mode 100644 tests/vtep-ctl.at

diff --git a/TODO_SPLIT.rst b/TODO_SPLIT.rst
index 29e7e5c75..5d32c4b9e 100644
--- a/TODO_SPLIT.rst
+++ b/TODO_SPLIT.rst
@@ -28,10 +28,7 @@ OVN/OVS Split To-do List
 Immediate tasks
 ---------------------------
 
-* The tests/ directory currently contains a lot of irrelevant test files. Many
-  .at files can be outright removed since they test OVS code rather than OVN.
-
-* Similarly, there are likely many other unused files throughout the source tree
+* There are likely many unused files throughout the source tree
   since they pertain to OVS rather than OVN. These can also be removed from the
   repo.
 
diff --git a/tests/MockXenAPI.py b/tests/MockXenAPI.py
deleted file mode 100644
index b8de4ee71..000000000
--- a/tests/MockXenAPI.py
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright (c) 2011, 2012 Nicira, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import re
-
-
-def xapi_local():
-    return Session()
-
-
-class Session(object):
-    def __init__(self):
-        self.xenapi = XenAPI()
-
-
-class Failure(Exception):
-    pass
-
-
-class XenAPI(object):
-    def __init__(self):
-        self.network = Network()
-        self.pool = Pool()
-        self.VIF = VIF()
-        self.VM = VM()
-
-    def login_with_password(self, unused_username, unused_password):
-        pass
-
-
-class RecordRef(object):
-    def __init__(self, attrs):
-        self.attrs = attrs
-
-
-class Table(object):
-    def __init__(self, records):
-        self.records = records
-
-    def get_all(self):
-        return [RecordRef(rec) for rec in self.records]
-
-    def get_all_records_where(self, condition):
-        k, v = re.match(r'field "([^"]*)"="([^"]*)"$', condition).groups()
-        d = {}
-
-        # I'm sure that the keys used in the dictionary below are wrong
-        # but I can't find any documentation on get_all_records_where
-        # and this satisfies the current test case.
-        i = 0
-        for rec in self.records:
-            if rec[k] == v:
-                d[i] = rec
-                i += 1
-        return d
-
-    def get_by_uuid(self, uuid):
-        recs = [rec for rec in self.records if rec["uuid"] == uuid]
-        if len(recs) != 1:
-            raise Failure("No record with UUID %s" % uuid)
-        return RecordRef(recs[0])
-
-    def get_record(self, record_ref):
-        return record_ref.attrs
-
-
-class Network(Table):
-    __records = ({"uuid": "9b66c68b-a74e-4d34-89a5-20a8ab352d1e",
-                  "bridge": "xenbr0",
-                  "other_config":
-                      {"vswitch-controller-fail-mode": "secure",
-                       "nicira-bridge-id": "custom bridge ID"}},
-                 {"uuid": "e1c9019d-375b-45ac-a441-0255dd2247de",
-                  "bridge": "xenbr1",
-                  "other_config":
-                      {"vswitch-disable-in-band": "true"}})
-
-    def __init__(self):
-        Table.__init__(self, Network.__records)
-
-
-class Pool(Table):
-    __records = ({"uuid": "7a793edf-e5f4-4994-a0f9-cee784c0cda3",
-                  "other_config":
-                      {"vswitch-controller-fail-mode": "secure"}},)
-
-    def __init__(self):
-        Table.__init__(self, Pool.__records)
-
-
-class VIF(Table):
-    __records = ({"uuid": "6ab1b260-398e-49ba-827b-c7696108964c",
-                  "other_config":
-                      {"nicira-iface-id": "custom iface ID"}},)
-
-    def __init__(self):
-        Table.__init__(self, VIF.__records)
-
-
-class VM(Table):
-    __records = ({"uuid": "fcb8a3f6-dc04-41d2-8b8a-55afd2b755b8",
-                  "other_config":
-                      {"nicira-vm-id": "custom vm ID"}},)
-
-    def __init__(self):
-        Table.__init__(self, VM.__records)
diff --git a/tests/aes128.at b/tests/aes128.at
deleted file mode 100644
index 6876dd23a..000000000
--- a/tests/aes128.at
+++ /dev/null
@@ -1,146 +0,0 @@
-AT_BANNER([AES-128 unit tests])
-
-m4_define([AES128_CHECK], 
-  [AT_SETUP([$1])
-   AT_KEYWORDS([aes128])
-   AT_CHECK([ovstest test-aes128 $2 $3], [0], [$4
-], [])
-   AT_CLEANUP])
-
-AES128_CHECK(
-  [wikipedia test vector 1],
-  [00010203050607080a0b0c0d0f101112],
-  [506812a45f08c889b97f5980038b8359],
-  [d8f532538289ef7d06b506a4fd5be9c9])
-
-AES128_CHECK(
-  [wikipedia test vector 2],
-  [95A8EE8E89979B9EFDCBC6EB9797528D],
-  [4ec137a426dabf8aa0beb8bc0c2b89d6],
-  [d9b65d1232ba0199cdbd487b2a1fd646])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 0],
-  [10a58869d74be5a374cf867cfb473859],
-  [00000000000000000000000000000000],
-  [6d251e6944b051e04eaa6fb4dbf78465])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 1],
-  [caea65cdbb75e9169ecd22ebe6e54675],
-  [00000000000000000000000000000000],
-  [6e29201190152df4ee058139def610bb])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 2],
-  [a2e2fa9baf7d20822ca9f0542f764a41],
-  [00000000000000000000000000000000],
-  [c3b44b95d9d2f25670eee9a0de099fa3])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 3],
-  [b6364ac4e1de1e285eaf144a2415f7a0],
-  [00000000000000000000000000000000],
-  [5d9b05578fc944b3cf1ccf0e746cd581])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 4],
-  [64cf9c7abc50b888af65f49d521944b2],
-  [00000000000000000000000000000000],
-  [f7efc89d5dba578104016ce5ad659c05])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 5],
-  [47d6742eefcc0465dc96355e851b64d9],
-  [00000000000000000000000000000000],
-  [0306194f666d183624aa230a8b264ae7])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 6],
-  [3eb39790678c56bee34bbcdeccf6cdb5],
-  [00000000000000000000000000000000],
-  [858075d536d79ccee571f7d7204b1f67])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 7],
-  [64110a924f0743d500ccadae72c13427],
-  [00000000000000000000000000000000],
-  [35870c6a57e9e92314bcb8087cde72ce])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 8],
-  [18d8126516f8a12ab1a36d9f04d68e51],
-  [00000000000000000000000000000000],
-  [6c68e9be5ec41e22c825b7c7affb4363])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 9],
-  [f530357968578480b398a3c251cd1093],
-  [00000000000000000000000000000000],
-  [f5df39990fc688f1b07224cc03e86cea])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 10],
-  [da84367f325d42d601b4326964802e8e],
-  [00000000000000000000000000000000],
-  [bba071bcb470f8f6586e5d3add18bc66])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 11],
-  [e37b1c6aa2846f6fdb413f238b089f23],
-  [00000000000000000000000000000000],
-  [43c9f7e62f5d288bb27aa40ef8fe1ea8])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 12],
-  [6c002b682483e0cabcc731c253be5674],
-  [00000000000000000000000000000000],
-  [3580d19cff44f1014a7c966a69059de5])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 13],
-  [143ae8ed6555aba96110ab58893a8ae1],
-  [00000000000000000000000000000000],
-  [806da864dd29d48deafbe764f8202aef])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 14],
-  [b69418a85332240dc82492353956ae0c],
-  [00000000000000000000000000000000],
-  [a303d940ded8f0baff6f75414cac5243])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 15],
-  [71b5c08a1993e1362e4d0ce9b22b78d5],
-  [00000000000000000000000000000000],
-  [c2dabd117f8a3ecabfbb11d12194d9d0])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 16],
-  [e234cdca2606b81f29408d5f6da21206],
-  [00000000000000000000000000000000],
-  [fff60a4740086b3b9c56195b98d91a7b])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 17],
-  [13237c49074a3da078dc1d828bb78c6f],
-  [00000000000000000000000000000000],
-  [8146a08e2357f0caa30ca8c94d1a0544])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 18],
-  [3071a2a48fe6cbd04f1a129098e308f8],
-  [00000000000000000000000000000000],
-  [4b98e06d356deb07ebb824e5713f7be3])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 19],
-  [90f42ec0f68385f2ffc5dfc03a654dce],
-  [00000000000000000000000000000000],
-  [7a20a53d460fc9ce0423a7a0764c6cf2])
-
-AES128_CHECK(
-  [NIST KAT ECBKeySbox128e vector 20],
-  [febd9a24d8b65c1c787d50a4ed3619a9],
-  [00000000000000000000000000000000],
-  [f4a70d8af877f9b02b4c40df57d45b17])
diff --git a/tests/appctl.py b/tests/appctl.py
deleted file mode 100644
index b85b364fa..000000000
--- a/tests/appctl.py
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright (c) 2012 Nicira, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import argparse
-import sys
-
-import ovs.daemon
-import ovs.unixctl
-import ovs.unixctl.client
-import ovs.util
-import ovs.vlog
-from ovs.fatal_signal import signal_alarm
-
-
-def connect_to_target(target):
-    error, str_result = ovs.unixctl.socket_name_from_target(target)
-    if error:
-        ovs.util.ovs_fatal(error, str_result)
-    else:
-        socket_name = str_result
-
-    error, client = ovs.unixctl.client.UnixctlClient.create(socket_name)
-    if error:
-        ovs.util.ovs_fatal(error, "cannot connect to \"%s\"" % socket_name)
-
-    return client
-
-
-def main():
-    parser = argparse.ArgumentParser(description="Python Implementation of"
-                                     " ovs-appctl.")
-    parser.add_argument("-t", "--target", default="ovs-vswitchd",
-                        help="pidfile or socket to contact")
-
-    parser.add_argument("command", metavar="COMMAND",
-                        help="Command to run.")
-    parser.add_argument("argv", metavar="ARG", nargs="*",
-                        help="Arguments to the command.")
-    parser.add_argument("-T", "--timeout", metavar="SECS",
-                        help="wait at most SECS seconds for a response")
-    args = parser.parse_args()
-
-    signal_alarm(int(args.timeout) if args.timeout else None)
-
-    ovs.vlog.Vlog.init()
-    target = args.target
-    client = connect_to_target(target)
-    err_no, error, result = client.transact(args.command, args.argv)
-    client.close()
-
-    if err_no:
-        ovs.util.ovs_fatal(err_no, "%s: transaction error" % target)
-    elif error is not None:
-        sys.stderr.write(error)
-        ovs.util.ovs_error(0, "%s: server returned an error" % target)
-        sys.exit(2)
-    else:
-        assert result is not None
-        sys.stdout.write(result)
-
-
-if __name__ == '__main__':
-    main()
diff --git a/tests/auto-attach.at b/tests/auto-attach.at
deleted file mode 100644
index ded1126a8..000000000
--- a/tests/auto-attach.at
+++ /dev/null
@@ -1,7 +0,0 @@
-AT_BANNER([auto-attach unit tests])
-
-AT_SETUP([auto-attach - packets])
-AT_KEYWORDS([auto-attach])
-AT_CHECK(ovstest test-aa, [], [ignore], [ignore])
-
-AT_CLEANUP
diff --git a/tests/automake.mk b/tests/automake.mk
index 0d113ff0e..210aab964 100644
--- a/tests/automake.mk
+++ b/tests/automake.mk
@@ -4,15 +4,9 @@ EXTRA_DIST += \
 	$(SYSTEM_TESTSUITE_AT) \
 	$(SYSTEM_KMOD_TESTSUITE_AT) \
 	$(SYSTEM_USERSPACE_TESTSUITE_AT) \
-	$(SYSTEM_OFFLOADS_TESTSUITE_AT) \
-	$(SYSTEM_DPDK_TESTSUITE_AT) \
-	$(OVSDB_CLUSTER_TESTSUITE_AT) \
 	$(TESTSUITE) \
 	$(SYSTEM_KMOD_TESTSUITE) \
 	$(SYSTEM_USERSPACE_TESTSUITE) \
-	$(SYSTEM_OFFLOADS_TESTSUITE) \
-	$(SYSTEM_DPDK_TESTSUITE) \
-	$(OVSDB_CLUSTER_TESTSUITE) \
 	tests/atlocal.in \
 	$(srcdir)/package.m4 \
 	$(srcdir)/tests/testsuite \
@@ -25,127 +19,12 @@ COMMON_MACROS_AT = \
 
 TESTSUITE_AT = \
 	tests/testsuite.at \
-	tests/completion.at \
-	tests/checkpatch.at \
-	tests/library.at \
-	tests/heap.at \
-	tests/bundle.at \
-	tests/classifier.at \
-	tests/check-structs.at \
-	tests/daemon.at \
-	tests/daemon-py.at \
-	tests/ofp-actions.at \
-	tests/ofp-print.at \
-	tests/ofp-util.at \
-	tests/ofp-errors.at \
-	tests/ovs-ofctl.at \
-	tests/fuzz-regression.at \
-	tests/fuzz-regression-list.at \
-	tests/odp.at \
-	tests/mpls-xlate.at \
-	tests/multipath.at \
-	tests/bfd.at \
-	tests/cfm.at \
-	tests/lacp.at \
-	tests/lib.at \
-	tests/learn.at \
-	tests/vconn.at \
-	tests/file_name.at \
-	tests/aes128.at \
-	tests/unixctl-py.at \
-	tests/uuid.at \
-	tests/json.at \
-	tests/jsonrpc.at \
-	tests/jsonrpc-py.at \
-	tests/pmd.at \
-	tests/tunnel.at \
-	tests/tunnel-push-pop.at \
-	tests/tunnel-push-pop-ipv6.at \
-	tests/ovs-router.at \
-	tests/lockfile.at \
-	tests/reconnect.at \
-	tests/ovs-vswitchd.at \
-	tests/dpif-netdev.at \
-	tests/dpctl.at \
-	tests/ofproto-dpif.at \
-	tests/bridge.at \
-	tests/ofproto.at \
-	tests/netdev-type.at \
-	tests/ovsdb.at \
-	tests/ovsdb-log.at \
-	tests/ovsdb-types.at \
-	tests/ovsdb-data.at \
-	tests/ovsdb-column.at \
-	tests/ovsdb-table.at \
-	tests/ovsdb-row.at \
-	tests/ovsdb-schema.at \
-	tests/ovsdb-condition.at \
-	tests/ovsdb-mutation.at \
-	tests/ovsdb-query.at \
-	tests/ovsdb-transaction.at \
-	tests/ovsdb-execution.at \
-	tests/ovsdb-trigger.at \
-	tests/ovsdb-tool.at \
-	tests/ovsdb-replication.at \
-	tests/ovsdb-server.at \
-	tests/ovsdb-client.at \
-	tests/ovsdb-monitor.at \
-	tests/ovsdb-idl.at \
-	tests/ovsdb-lock.at \
-	tests/ovsdb-rbac.at \
-	tests/ovs-vsctl.at \
-	tests/ovs-xapi-sync.at \
-	tests/stp.at \
-	tests/rstp.at \
-	tests/interface-reconfigure.at \
-	tests/vlog.at \
-	tests/vtep-ctl.at \
-	tests/auto-attach.at \
 	tests/ovn.at \
 	tests/ovn-northd.at \
 	tests/ovn-nbctl.at \
 	tests/ovn-sbctl.at \
 	tests/ovn-controller.at \
-	tests/ovn-controller-vtep.at \
-	tests/mcast-snooping.at \
-	tests/packet-type-aware.at \
-	tests/nsh.at
-
-EXTRA_DIST += $(FUZZ_REGRESSION_TESTS)
-FUZZ_REGRESSION_TESTS = \
-	tests/fuzz-regression/flow_extract_fuzzer-5112775280951296 \
-	tests/fuzz-regression/flow_extract_fuzzer-5457710546944000 \
-	tests/fuzz-regression/json_parser_fuzzer-4790908707930112 \
-	tests/fuzz-regression/ofp_print_fuzzer-4584019764183040 \
-	tests/fuzz-regression/ofp_print_fuzzer-4730143510626304 \
-	tests/fuzz-regression/ofp_print_fuzzer-4854119633256448 \
-	tests/fuzz-regression/ofp_print_fuzzer-5070973479944192 \
-	tests/fuzz-regression/ofp_print_fuzzer-5072291707748352 \
-	tests/fuzz-regression/ofp_print_fuzzer-5147430386401280 \
-	tests/fuzz-regression/ofp_print_fuzzer-5168455220199424 \
-	tests/fuzz-regression/ofp_print_fuzzer-5190507327127552 \
-	tests/fuzz-regression/ofp_print_fuzzer-5204186701496320 \
-	tests/fuzz-regression/ofp_print_fuzzer-5394482341085184 \
-	tests/fuzz-regression/ofp_print_fuzzer-5395207246839808 \
-	tests/fuzz-regression/ofp_print_fuzzer-5647458888581120 \
-	tests/fuzz-regression/ofp_print_fuzzer-5674119268925440 \
-	tests/fuzz-regression/ofp_print_fuzzer-5674419757252608 \
-	tests/fuzz-regression/ofp_print_fuzzer-5677588436484096 \
-	tests/fuzz-regression/ofp_print_fuzzer-5706562554298368 \
-	tests/fuzz-regression/ofp_print_fuzzer-5722747668791296 \
-	tests/fuzz-regression/ofp_print_fuzzer-6285128790704128 \
-	tests/fuzz-regression/ofp_print_fuzzer-6470117922701312 \
-	tests/fuzz-regression/ofp_print_fuzzer-6502620041576448
-$(srcdir)/tests/fuzz-regression-list.at: tests/automake.mk
-	$(AM_V_GEN)for name in $(FUZZ_REGRESSION_TESTS); do \
-            basename=`echo $$name | sed 's,^.*/,,'`; \
-	    echo "TEST_FUZZ_REGRESSION([$$basename])"; \
-	done > $@.tmp && mv $@.tmp $@
-
-OVSDB_CLUSTER_TESTSUITE_AT = \
-	tests/ovsdb-cluster-testsuite.at \
-	tests/ovsdb-execution.at \
-	tests/ovsdb-cluster.at
+	tests/ovn-controller-vtep.at
 
 SYSTEM_KMOD_TESTSUITE_AT = \
 	tests/system-common-macros.at \
@@ -160,21 +39,7 @@ SYSTEM_USERSPACE_TESTSUITE_AT = \
 
 SYSTEM_TESTSUITE_AT = \
 	tests/system-common-macros.at \
-	tests/system-ovn.at \
-	tests/system-layer3-tunnels.at \
-	tests/system-traffic.at \
-	tests/system-interface.at
-
-SYSTEM_OFFLOADS_TESTSUITE_AT = \
-	tests/system-common-macros.at \
-	tests/system-offloads-traffic.at \
-	tests/system-offloads-testsuite.at
-
-SYSTEM_DPDK_TESTSUITE_AT = \
-	tests/system-common-macros.at \
-	tests/system-dpdk-macros.at \
-	tests/system-dpdk-testsuite.at \
-	tests/system-dpdk.at
+	tests/system-ovn.at
 
 check_SCRIPTS += tests/atlocal
 
@@ -182,9 +47,6 @@ TESTSUITE = $(srcdir)/tests/testsuite
 TESTSUITE_PATCH = $(srcdir)/tests/testsuite.patch
 SYSTEM_KMOD_TESTSUITE = $(srcdir)/tests/system-kmod-testsuite
 SYSTEM_USERSPACE_TESTSUITE = $(srcdir)/tests/system-userspace-testsuite
-SYSTEM_OFFLOADS_TESTSUITE = $(srcdir)/tests/system-offloads-testsuite
-SYSTEM_DPDK_TESTSUITE = $(srcdir)/tests/system-dpdk-testsuite
-OVSDB_CLUSTER_TESTSUITE = $(srcdir)/tests/ovsdb-cluster-testsuite
 DISTCLEANFILES += tests/atconfig tests/atlocal
 
 AUTOTEST_PATH = ovs/utilities:ovs/vswitchd:ovs/ovsdb:ovs/vtep:tests:$(PTHREAD_WIN32_DIR_DLL):$(SSL_DIR):controller-vtep:northd:utilities:controller
@@ -267,18 +129,6 @@ check-valgrind: all $(valgrind_wrappers) $(check_DATA)
 	@echo '----------------------------------------------------------------------'
 	@echo 'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
 	@echo '----------------------------------------------------------------------'
-check-ovsdb-cluster-valgrind: all $(valgrind_wrappers) $(check_DATA)
-	$(SHELL) '$(OVSDB_CLUSTER_TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS) -j1
-	@echo
-	@echo '----------------------------------------------------------------------'
-	@echo 'Valgrind output can be found in tests/ovsdb-cluster-testsuite.dir/*/valgrind.*'
-	@echo '----------------------------------------------------------------------'
-check-kernel-valgrind: all $(valgrind_wrappers) $(check_DATA)
-	$(SHELL) '$(SYSTEM_KMOD_TESTSUITE)' -C tests VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS) -j1
-	@echo
-	@echo '----------------------------------------------------------------------'
-	@echo 'Valgrind output can be found in tests/system-kmod-testsuite.dir/*/valgrind.*'
-	@echo '----------------------------------------------------------------------'
 check-userspace-valgrind: all $(valgrind_wrappers) $(check_DATA)
 	$(SHELL) '$(SYSTEM_USERSPACE_TESTSUITE)' -C tests VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS) -j1
 	@echo
@@ -288,49 +138,18 @@ check-userspace-valgrind: all $(valgrind_wrappers) $(check_DATA)
 check-helgrind: all $(valgrind_wrappers) $(check_DATA)
 	-$(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(HELGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS)
 
-
-# OFTest support.
-
-check-oftest: all
-	$(AM_V_at)srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-oftest
-EXTRA_DIST += tests/run-oftest
-
-# Ryu support.
-check-ryu: all
-	$(AM_V_at)srcdir='$(srcdir)' $(SHELL) $(srcdir)/tests/run-ryu
-EXTRA_DIST += tests/run-ryu
-
 # Run kmod tests. Assume kernel modules has been installed or linked into the kernel
 check-kernel: all
 	set $(SHELL) '$(SYSTEM_KMOD_TESTSUITE)' -C tests  AUTOTEST_PATH='$(AUTOTEST_PATH)'; \
 	"$$@" $(TESTSUITEFLAGS) -j1 || (test X'$(RECHECK)' = Xyes && "$$@" --recheck)
 
-# Testing the out of tree Kernel module
-check-kmod: all
-	$(MAKE) modules_install
-	modprobe -r -a vport-geneve vport-gre vport-lisp vport-stt vport-vxlan openvswitch
-	$(MAKE) check-kernel
-
-check-system-userspace: all
+check-system-userspace: all
 	set $(SHELL) '$(SYSTEM_USERSPACE_TESTSUITE)' -C tests  AUTOTEST_PATH='$(AUTOTEST_PATH)'; \
 	"$$@" $(TESTSUITEFLAGS) -j1 || (test X'$(RECHECK)' = Xyes && "$$@" --recheck)
 
-check-offloads: all
-	set $(SHELL) '$(SYSTEM_OFFLOADS_TESTSUITE)' -C tests  AUTOTEST_PATH='$(AUTOTEST_PATH)'; \
-	"$$@" $(TESTSUITEFLAGS) -j1 || (test X'$(RECHECK)' = Xyes && "$$@" --recheck)
-
-check-dpdk: all
-	set $(SHELL) '$(SYSTEM_DPDK_TESTSUITE)' -C tests  AUTOTEST_PATH='$(AUTOTEST_PATH)'; \
-	"$$@" $(TESTSUITEFLAGS) -j1 || (test X'$(RECHECK)' = Xyes && "$$@" --recheck)
-
 clean-local:
 	test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
 
-# Run OVSDB cluster tests.
-check-ovsdb-cluster: all
-	set $(SHELL) '$(OVSDB_CLUSTER_TESTSUITE)' -C tests  AUTOTEST_PATH='$(AUTOTEST_PATH)'; \
-	"$$@" $(TESTSUITEFLAGS) -j1 || (test X'$(RECHECK)' = Xyes && "$$@" --recheck)
-
 AUTOTEST = $(AUTOM4TE) --language=autotest
 
 if WIN32
@@ -352,18 +171,6 @@ $(SYSTEM_USERSPACE_TESTSUITE): package.m4 $(SYSTEM_TESTSUITE_AT) $(SYSTEM_USERSP
 	$(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
 	$(AM_V_at)mv $@.tmp $@
 
-$(SYSTEM_OFFLOADS_TESTSUITE): package.m4 $(SYSTEM_TESTSUITE_AT) $(SYSTEM_OFFLOADS_TESTSUITE_AT) $(COMMON_MACROS_AT)
-	$(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
-	$(AM_V_at)mv $@.tmp $@
-
-$(SYSTEM_DPDK_TESTSUITE): package.m4 $(SYSTEM_TESTSUITE_AT) $(SYSTEM_DPDK_TESTSUITE_AT) $(COMMON_MACROS_AT)
-	$(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
-	$(AM_V_at)mv $@.tmp $@
-
-$(OVSDB_CLUSTER_TESTSUITE): package.m4 $(OVSDB_CLUSTER_TESTSUITE_AT) $(COMMON_MACROS_AT)
-	$(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
-	$(AM_V_at)mv $@.tmp $@
-
 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
 	$(AM_V_GEN):;{ \
@@ -375,117 +182,19 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
 	  echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
 	} >'$(srcdir)/package.m4'
 
-noinst_PROGRAMS += tests/test-ovsdb
-tests_test_ovsdb_SOURCES = tests/test-ovsdb.c
-nodist_tests_test_ovsdb_SOURCES = tests/idltest.c tests/idltest.h
-tests_test_ovsdb_LDADD = $(OVSDB_LIBDIR)/libovsdb.la $(OVS_LIBDIR)/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-lib
-tests_test_lib_SOURCES = \
-	tests/test-lib.c
-tests_test_lib_LDADD = $(OVS_LIBDIR)/libopenvswitch.la
-
-# idltest schema and IDL
-OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl
-IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann
-EXTRA_DIST += $(IDLTEST_IDL_FILES) tests/idltest2.ovsschema
-tests/idltest.ovsidl: $(IDLTEST_IDL_FILES)
-	$(AM_V_GEN)$(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp && \
-	mv $@.tmp $@
-
-tests/idltest.c: tests/idltest.h
-
-if DPDK_NETDEV
-noinst_PROGRAMS += tests/test-dpdkr
-tests_test_dpdkr_SOURCES = \
-	tests/dpdk/ring_client.c
-tests_test_dpdkr_LDADD = $(OVS_LIBDIR)/libopenvswitch.la $(LIBS)
-endif
 
 noinst_PROGRAMS += tests/ovstest
 tests_ovstest_SOURCES = \
 	tests/ovstest.c \
 	tests/ovstest.h \
-	tests/test-aes128.c \
-	tests/test-atomic.c \
-	tests/test-bundle.c \
-	tests/test-byte-order.c \
-	tests/test-classifier.c \
-	tests/test-ccmap.c \
-	tests/test-cmap.c \
-	tests/test-conntrack.c \
-	tests/test-csum.c \
-	tests/test-flows.c \
-	tests/test-hash.c \
-	tests/test-heap.c \
-	tests/test-hindex.c \
-	tests/test-hmap.c \
-	tests/test-json.c \
-	tests/test-jsonrpc.c \
-	tests/test-list.c \
-	tests/test-lockfile.c \
-	tests/test-multipath.c \
-	tests/test-netflow.c \
-	tests/test-odp.c \
-	tests/test-ofpbuf.c \
-	tests/test-ovn.c \
-	tests/test-packets.c \
-	tests/test-random.c \
-	tests/test-rcu.c \
-	tests/test-reconnect.c \
-	tests/test-rstp.c \
-	tests/test-sflow.c \
-	tests/test-sha1.c \
-	tests/test-skiplist.c \
-	tests/test-stp.c \
-	tests/test-unixctl.c \
-	tests/test-util.c \
-	tests/test-uuid.c \
-	tests/test-bitmap.c \
-	tests/test-vconn.c \
-	tests/test-aa.c \
-	tests/test-stopwatch.c
-
-if !WIN32
-tests_ovstest_SOURCES += \
-	tests/test-unix-socket.c
-endif
-
-if LINUX
-tests_ovstest_SOURCES += \
-	tests/test-netlink-conntrack.c
-endif
+	tests/test-ovn.c
 
 tests_ovstest_LDADD = $(OVS_LIBDIR)/libopenvswitch.la lib/libovn.la
 
-noinst_PROGRAMS += tests/test-stream
-tests_test_stream_SOURCES = tests/test-stream.c
-tests_test_stream_LDADD = $(OVS_LIBDIR)/libopenvswitch.la
-
-noinst_PROGRAMS += tests/test-strtok_r
-tests_test_strtok_r_SOURCES = tests/test-strtok_r.c
-
-noinst_PROGRAMS += tests/test-type-props
-tests_test_type_props_SOURCES = tests/test-type-props.c
-
 # Python tests.
 CHECK_PYFILES = \
-	tests/appctl.py \
-	tests/flowgen.py \
-	tests/ovsdb-monitor-sort.py \
-	tests/test-daemon.py \
-	tests/test-json.py \
-	tests/test-jsonrpc.py \
 	tests/test-l7.py \
-	tests/test-ovsdb.py \
-	tests/test-reconnect.py \
-	tests/test-stream.py \
-	tests/MockXenAPI.py \
-	tests/test-unix-socket.py \
-	tests/test-unixctl.py \
-	tests/test-vlog.py \
-	tests/uuidfilt.py \
-	tests/sendpkt.py
+	tests/uuidfilt.py
 
 EXTRA_DIST += $(CHECK_PYFILES)
 PYCOV_CLEAN_FILES += $(CHECK_PYFILES:.py=.py,cover) .coverage
diff --git a/tests/bfd.at b/tests/bfd.at
deleted file mode 100644
index 7af7be54a..000000000
--- a/tests/bfd.at
+++ /dev/null
@@ -1,1102 +0,0 @@
-AT_BANNER([bfd])
-
-m4_define([BFD_CHECK], [
-AT_CHECK([ovs-appctl bfd/show $1 | sed -e '/Time:/d' | sed -e '/Discriminator/d' | sed -e '/Interval:/d'| sed -e '/Multiplier/d'],[0],
-[dnl
-  Forwarding: $2
-  Concatenated Path Down: $3
-
-  Local Flags: $4
-  Local Session State: $5
-  Local Diagnostic: $6
-
-  Remote Flags: $7
-  Remote Session State: $8
-  Remote Diagnostic: $9
-])
-])
-
-m4_define([BFD_CHECK_TX], [
-AT_CHECK([ovs-appctl bfd/show $1 | sed -n '/TX Interval/p'],[0],
-[dnl
-  TX Interval: Approx $2
-  Local Minimum TX Interval: $3
-  Remote Minimum TX Interval: $4
-])
-])
-
-m4_define([BFD_CHECK_RX], [
-AT_CHECK([ovs-appctl bfd/show $1 | sed -n '/RX Interval/p'],[0],
-[dnl
-  RX Interval: Approx $2
-  Local Minimum RX Interval: $3
-  Remote Minimum RX Interval: $4
-])
-])
-
-m4_define([BFD_VSCTL_LIST_IFACE], [
-AT_CHECK([ovs-vsctl list interface $1 | sed -n $2],[0],
-[dnl
-$3
-])
-])
-
-m4_define([BFD_CHECK_MULT], [
-AT_CHECK([ovs-appctl bfd/show $1 | sed -n '/Detect Multiplier/p'],[0],
-[dnl
-  Detect Multiplier: $2
-  Remote Detect Multiplier: $3
-])
-])
-
-AT_SETUP([bfd - basic config on different bridges])
-#Create 2 bridges connected by patch ports and enable BFD
-OVS_VSWITCHD_START(
-   [add-br br1 -- \
-       set bridge br1 datapath-type=dummy \
-       other-config:hwaddr=aa:55:aa:56:00:00 -- \
-    add-port br1 p1 -- set Interface p1 type=patch \
-       options:peer=p0 -- \
-    add-port br0 p0 -- set Interface p0 type=patch \
-       options:peer=p1 -- \
-    set Interface p0 bfd:enable=true -- \
-    set Interface p1 bfd:enable=true ])
-ovs-appctl time/stop
-ovs-appctl time/warp 4100 100
-
-#Verify that BFD has been enabled on both interfaces.
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-
-AT_CHECK([ ovs-vsctl set interface p0 bfd:enable=false])
-ovs-appctl time/warp 4100 100
-BFD_CHECK([p1], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-
-AT_CHECK([ ovs-vsctl set interface p0 bfd:enable=true])
-ovs-appctl time/warp 4100 100
-BFD_CHECK([p1], [true], [false], [none], [up], [Control Detection Time Expired], [none], [up], [No Diagnostic])
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [Control Detection Time Expired])
-
-ovs-vsctl del-br br0
-AT_CHECK([ovs-appctl bfd/show p0], [2],[ignore], [no such bfd object
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-ovs-vsctl del-br br1
-#Check that the entries are gone.
-AT_CHECK([ovs-appctl bfd/show p1], [2],[ignore], [no such bfd object
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([bfd - Verify tunnel down detection])
-#Create 3 bridges - br-bfd0, br-bfd1 and br-sw which is midway between the two. br-sw is
-#connected to br-bfd0 and br-bfd1 through patch ports p0-sw and p1-sw. Enable BFD on
-#interfaces in br-bfd0 and br-bfd1. When br-sw is dropping all packets, BFD should detect
-# that the tunnel is down, and come back up when br-sw is working fine.
-
-OVS_VSWITCHD_START(
-   [add-br br-bfd0 -- \
-       set bridge br-bfd0 datapath-type=dummy \
-       other-config:hwaddr=aa:55:aa:56:00:00 -- \
-    add-br br-bfd1 -- \
-       set bridge br-bfd1 datapath-type=dummy \
-       other-config:hwaddr=aa:55:aa:57:00:00 -- \
-    add-br br-sw -- \
-       set bridge br-sw datapath-type=dummy \
-       other-config:hwaddr=aa:55:aa:58:00:00 -- \
-    add-port br-sw p1-sw -- set Interface p1-sw type=patch \
-       options:peer=p1 ofport_request=2 -- \
-    add-port br-sw p0-sw -- set Interface p0-sw type=patch \
-       options:peer=p0 ofport_request=1 -- \
-    add-port br-bfd1 p1 -- set Interface p1 type=patch \
-       options:peer=p1-sw bfd:enable=true -- \
-    add-port br-bfd0 p0 -- set Interface p0 type=patch \
-       options:peer=p0-sw bfd:enable=true --])
-
-ovs-appctl time/stop
-
-#Create 2 bridges connected by patch ports and enable BFD
-
-AT_CHECK([ovs-ofctl add-flow br-sw 'priority=0,actions=NORMAL'])
-#Verify that BFD is enabled.
-ovs-appctl time/warp 4100 100
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-
-#Drop all packets in the br-sw bridge so that the tunnel is down.
-AT_CHECK([ ovs-ofctl add-flow br-sw 'priority=5,actions=drop' ])
-ovs-appctl time/warp 4100 100
-BFD_CHECK([p1], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-
-#Delete the added flow
-AT_CHECK([ovs-ofctl del-flows br-sw], [0])
-AT_CHECK([ovs-ofctl add-flow br-sw 'priority=0,actions=NORMAL'])
-#Verify that BFD is back up again.
-ovs-appctl time/warp 4100 100
-
-BFD_CHECK([p1], [true], [false], [none], [up], [Control Detection Time Expired], [none], [up], [Control Detection Time Expired])
-BFD_CHECK([p0], [true], [false], [none], [up], [Control Detection Time Expired], [none], [up], [Control Detection Time Expired])
-
-#Now, Verify one-side tunnel down detection
-#When br-sw is dropping packets from one end, BFD should detect
-# that the tunnel is down, and come back up when br-sw is working fine.
-
-#Bring down the br-bfd1 - br-sw link. So BFD packets will be sent from p0,
-# but not received by p1. p0 will receive all BFD packets from p1.
-
-AT_CHECK([ ovs-ofctl add-flow br-sw 'in_port=1,priority=5,actions=drop'])
-ovs-appctl time/warp 4100 100
-# Make sure p1 BFD state is down since it received no BFD packets.
-BFD_CHECK([p1], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-ovs-appctl time/warp 4100 100
-
-# p0 will be in init state once it receives "down" BFD message from p1.
-BFD_CHECK([p0], [false], [false], [none], [init], [Neighbor Signaled Session Down], [none], [down], [Control Detection Time Expired])
-
-AT_CHECK([ovs-ofctl del-flows br-sw])
-AT_CHECK([ovs-ofctl add-flow br-sw 'priority=0,actions=NORMAL'])
-#Ensure that BFD is back up again.
-
-ovs-appctl time/warp 1100 100
-#Bring down the br-bfd0 - br-sw link
-AT_CHECK([ ovs-ofctl add-flow br-sw 'in_port=2,priority=5,actions=drop'])
-ovs-appctl time/warp 4100 100
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-ovs-appctl time/warp 4100 100
-BFD_CHECK([p1], [false], [false], [none], [init], [Neighbor Signaled Session Down], [none], [down], [Control Detection Time Expired])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([bfd - concatenated path down])
-#Create 2 bridges connected by patch ports and enable BFD
-OVS_VSWITCHD_START()
-ovs-appctl time/stop
-AT_CHECK([ ovs-vsctl -- add-br br1 -- \
-           set bridge br1 datapath-type=dummy \
-           other-config:hwaddr=aa:55:aa:56:00:00 ])
-AT_CHECK([ ovs-vsctl -- add-port br1 p1 -- set Interface p1 type=patch \
-           options:peer=p0 ])
-AT_CHECK([ ovs-vsctl -- add-port br0 p0 -- set Interface p0 type=patch \
-           options:peer=p1 ])
-AT_CHECK([ ovs-vsctl -- set interface p0 bfd:enable=true ])
-AT_CHECK([ ovs-vsctl -- set interface p1 bfd:enable=true ])
-ovs-appctl time/warp 4100 100
-
-#Verify that BFD has been enabled on both interfaces.
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-
-#Set cpath_down to true on one interface, make sure the remote interface updates its values.
-AT_CHECK([ovs-vsctl set interface p0 bfd:cpath_down=true])
-ovs-appctl time/warp 4100 100
-BFD_CHECK([p1], [false], [false], [none], [up], [No Diagnostic], [none], [up], [Concatenated Path Down])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([bfd - Edit the Min Tx/Rx values])
-#Create 2 bridges connected by patch ports and enable BFD
-OVS_VSWITCHD_START()
-ovs-appctl time/stop
-AT_CHECK([ ovs-vsctl -- add-br br1 -- \
-           set bridge br1 datapath-type=dummy ])
-AT_CHECK([ ovs-vsctl -- add-port br1 p1 -- set Interface p1 type=patch \
-           options:peer=p0 ])
-AT_CHECK([ ovs-vsctl -- add-port br0 p0 -- set Interface p0 type=patch \
-           options:peer=p1 ])
-AT_CHECK([ ovs-vsctl -- set interface p0 bfd:enable=true ])
-AT_CHECK([ ovs-vsctl -- set interface p1 bfd:enable=true ])
-ovs-appctl time/warp 3100 100
-#Verify that BFD has been enabled on both interfaces.
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-#Edit the min Tx value.
-AT_CHECK([ovs-vsctl set interface p0 bfd:min_tx=200])
-ovs-appctl time/warp 2100 100
-BFD_CHECK_TX([p0], [1000ms], [200ms], [100ms])
-BFD_CHECK_TX([p1], [1000ms], [100ms], [200ms])
-
-#Edit the min Rx value.
-AT_CHECK([ovs-vsctl set interface p1 bfd:min_rx=300])
-ovs-appctl time/warp 2100 100
-BFD_CHECK_RX([p1], [300ms], [300ms], [1000ms])
-BFD_CHECK_RX([p0], [1000ms], [1000ms], [300ms])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([bfd - check_tnl_key])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
-                    options:remote_ip=2.2.2.2 options:key=1 ofport_request=1 -- \
-                    set interface p1 bfd:enable=true -- \
-                    set bridge br0 fail-mode=standalone])
-
-# by default check_tnl_key is false. so we should process a bfd packet with tun_id=1.
-AT_CHECK([ovs-appctl ofproto/trace --l7-len 0 ovs-dummy 'tunnel(tun_id=0x1,src=2.2.2.2,dst=2.2.2.1,tos=0x0,ttl=64,tp_src=0,tp_dst=0,flags(key)),in_port(1),skb_mark(0/0),eth(src=00:11:22:33:44:55,dst=00:23:20:00:00:01),eth_type(0x0800),ipv4(src=169.254.1.0/0.0.0.0,dst=169.254.1.1/0.0.0.0,proto=17/0xff,tos=0/0,ttl=255/0,frag=no),udp(src=49152/0,dst=3784/0xffff)' -generate], [0], [stdout])
-# check that the packet should be handled as BFD packet.
-AT_CHECK([tail -2 stdout], [0], [dnl
-This flow is handled by the userspace slow path because it:
-  - Consists of BFD packets.
-], [])
-
-# turn on the check_tnl_key.
-AT_CHECK([ovs-vsctl set interface p1 bfd:check_tnl_key=true])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x1,src=2.2.2.2,dst=2.2.2.1,tos=0x0,ttl=64,tp_src=0,tp_dst=0,flags(key)),in_port(1),skb_mark(0/0),eth(src=00:11:22:33:44:55,dst=00:23:20:00:00:01),eth_type(0x0800),ipv4(src=169.254.1.0/0.0.0.0,dst=169.254.1.1/0.0.0.0,proto=17/0xff,tos=0/0,ttl=255/0,frag=no),udp(src=49152/0,dst=3784/0xffff)' -generate], [0], [stdout])
-# check that the packet should be handled as normal packet.
-AT_CHECK([tail -1 stdout], [0],[dnl
-Datapath actions: 100
-], [])
-
-# set the tunnel key to 0.
-AT_CHECK([ovs-vsctl set interface p1 options:key=0])
-AT_CHECK([ovs-appctl ofproto/trace --l7-len 0 ovs-dummy 'tunnel(tun_id=0x0,src=2.2.2.2,dst=2.2.2.1,tos=0x0,ttl=64,tp_src=0,tp_dst=0,flags(key)),in_port(1),skb_mark(0/0),eth(src=00:11:22:33:44:55,dst=00:23:20:00:00:01),eth_type(0x0800),ipv4(src=169.254.1.0/0.0.0.0,dst=169.254.1.1/0.0.0.0,proto=17/0xff,tos=0/0,ttl=255/0,frag=no),udp(src=49152/0,dst=3784/0xffff)' -generate], [0], [stdout])
-# check that the packet should be handled as BFD packet.
-AT_CHECK([tail -2 stdout], [0], [dnl
-This flow is handled by the userspace slow path because it:
-  - Consists of BFD packets.
-], [])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# Tests below are for bfd decay features.
-AT_SETUP([bfd - bfd decay])
-OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
-                    add-port br1 p1 -- set Interface p1 type=patch \
-                    options:peer=p0 ofport_request=2 -- \
-                    add-port br0 p0 -- set Interface p0 type=patch \
-                    options:peer=p1 ofport_request=1 -- \
-                    set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
-                    set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
-
-ovs-appctl time/stop
-
-# wait for a while to stablize everything.
-ovs-appctl time/warp 10000 500
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-BFD_CHECK_RX([p0], [500ms], [300ms], [500ms])
-
-# Test-1 BFD decay: decay to decay_min_rx
-AT_CHECK([ovs-vsctl set interface p0 bfd:decay_min_rx=3000])
-# bfd:decay_min_rx is set to 3000ms after the local state of p0 goes up,
-# so for the first 2000ms, there should be no change.
-ovs-appctl time/warp 2000 500
-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-BFD_CHECK_RX([p0], [500ms], [300ms], [500ms])
-
-# advance the clock by 5000ms.
-ovs-appctl time/warp 5000 500
-# now, min_rx should decay to 3000ms.
-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-BFD_CHECK_RX([p0], [3000ms], [3000ms], [500ms])
-
-# advance clock by 5000ms and check the flags are all 'none'.
-ovs-appctl time/warp 5000 500
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-BFD_CHECK_RX([p0], [3000ms], [3000ms], [500ms])
-# End of Test-1 ###############################################################
-
-
-# Test-2 BFD decay: go back to min_rx when there is traffic
-# receive packet at 1/100ms rate for 5000ms.
-for i in `seq 0 49`
-do
-    ovs-appctl time/warp 100
-    AT_CHECK([ovs-ofctl packet-out br1 "in_port=3 packet=90e2ba01475000101856b2e80806000108000604000100101856b2e80202020300000000000002020202 actions=2"],
-             [0], [stdout], [])
-done
-# after a decay interval (3000ms), the p0 min_rx will go back to
-# min_rx.
-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-BFD_CHECK_RX([p0], [500ms], [300ms], [500ms])
-# End of Test-2 ###############################################################
-
-
-# Test-3 BFD decay: set decay_min_rx to 1000ms.
-# this should firstly reset the min_rx and then re-decay to 1000ms.
-AT_CHECK([ovs-vsctl set Interface p0 bfd:decay_min_rx=1000])
-# advance the clock by 10000ms, decay should have happened.
-ovs-appctl time/warp 10000 500
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-BFD_CHECK_RX([p0], [1000ms], [1000ms], [500ms])
-# End of Test-3 ###############################################################
-
-
-# Test-4 BFD decay: set decay_min_rx to 0 to disable bfd decay.
-AT_CHECK([ovs-vsctl set Interface p0 bfd:decay_min_rx=0])
-# advance the clock by 5000ms.
-ovs-appctl time/warp 10000 500
-# min_rx is reset.
-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-BFD_CHECK_RX([p0], [500ms], [300ms], [500ms])
-
-for i in `seq 0 20`
-do
-    ovs-appctl time/warp 500
-    BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-    BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-    BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-    BFD_CHECK_RX([p0], [500ms], [300ms], [500ms])
-done
-# End of Test-4 ################################################################
-
-
-# Test-5 BFD decay: rmt_min_tx is greater than decay_min_rx
-AT_CHECK([ovs-vsctl set Interface p0 bfd:decay_min_rx=3000 -- set interface p1 bfd:min_tx=5000])
-# advance the clock by 10000ms to stable everything.
-ovs-appctl time/warp 10000 500
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-# p0 rx should show 5000ms even if it is in decay.
-BFD_CHECK_TX([p0], [500ms], [300ms], [5000ms])
-BFD_CHECK_RX([p0], [5000ms], [3000ms], [500ms])
-# then, there should be no change of status,
-for i in `seq 0 19`
-do
-    ovs-appctl time/warp 500
-    BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-    BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-    BFD_CHECK_TX([p0], [500ms], [300ms], [5000ms])
-    BFD_CHECK_RX([p0], [5000ms], [3000ms], [500ms])
-done
-# reset the p1's min_tx to 500ms.
-AT_CHECK([ovs-vsctl set Interface p1 bfd:min_tx=500])
-# advance the clock by 20000ms to stable everything.
-# since p0 has been in decay, now the RX will show 3000ms.
-ovs-appctl time/warp 20000 500
-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-BFD_CHECK_RX([p0], [3000ms], [3000ms], [500ms])
-# End of Test-5 ###############################################################
-
-
-# Test-6 BFD decay: state up->down->up.
-# turn bfd off on p1
-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
-
-# advance the clock by 15000ms to stable everything.
-ovs-appctl time/warp 15000 1000
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-BFD_CHECK_TX([p0], [1000ms], [1000ms], [0ms])
-BFD_CHECK_RX([p0], [300ms], [300ms], [1ms])
-
-# resume the bfd on p1. the bfd should not go to decay mode direclty.
-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
-ovs-appctl time/warp 1500 500
-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-BFD_CHECK_RX([p0], [500ms], [300ms], [500ms])
-
-# since the decay_min_rx is still 3000ms, so after 5000ms, p0 should have decayed.
-ovs-appctl time/warp 5000 500
-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-BFD_CHECK_RX([p0], [3000ms], [3000ms], [500ms])
-# End of Test-6 ################################################################
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# Tests below are for bfd forwarding_if_rx feature.
-
-# forwarding_if_rx Test1
-# Test1 tests the case when bfd is only enabled on one end of the link.
-# Under this situation, the forwarding flag should always be false, even
-# though there is data packet received, since there is no bfd control
-# packet received during the demand_rx_bfd interval.
-AT_SETUP([bfd - bfd forwarding_if_rx - bfd on one side])
-OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
-                    add-port br1 p1 -- set Interface p1 type=patch \
-                    options:peer=p0 ofport_request=2 -- \
-                    add-port br0 p0 -- set Interface p0 type=patch \
-                    options:peer=p1 ofport_request=1 -- \
-                    set Interface p0 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500 -- \
-                    add-port br1 p2 -- set Interface p2 type=internal ofport_request=3])
-
-ovs-appctl time/stop
-# check the inital status.
-BFD_CHECK([p0], [false], [false], [none], [down], [No Diagnostic], [none], [down], [No Diagnostic])
-BFD_CHECK_TX([p0], [1000ms], [1000ms], [0ms])
-BFD_CHECK_RX([p0], [500ms], [500ms], [1ms])
-
-# enable forwarding_if_rx.
-AT_CHECK([ovs-vsctl set Interface p0 bfd:forwarding_if_rx=true], [0])
-
-# there should be no change of forwarding flag, since
-# there is no traffic.
-for i in `seq 0 3`
-do
-    ovs-appctl time/warp 500
-    BFD_CHECK([p0], [false], [false], [none], [down], [No Diagnostic], [none], [down], [No Diagnostic])
-done
-
-# receive packet at 1/100ms rate for 2000ms.
-for i in `seq 0 19`
-do
-    ovs-appctl time/warp 100
-    AT_CHECK([ovs-ofctl packet-out br1 "in_port=3 packet=90e2ba01475000101856b2e80806000108000604000100101856b2e80202020300000000000002020202 actions=2"],
-             [0], [stdout], [])
-done
-# the forwarding flag should be false, due to the demand_rx_bfd.
-BFD_CHECK([p0], [false], [false], [none], [down], [No Diagnostic], [none], [down], [No Diagnostic])
-
-AT_CHECK([ovs-vsctl del-br br1], [0], [ignore])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-# forwarding_if_rx Test2
-# Test2 is for testing that the enable of forwarding_if_rx will not
-# affect the normal bfd communication.  bfd is enabled on both ends of
-# the link.
-AT_SETUP([bfd - bfd forwarding_if_rx - bfd on both sides])
-OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
-                    add-port br1 p1 -- set Interface p1 type=patch \
-                    options:peer=p0 ofport_request=2 -- \
-                    add-port br0 p0 -- set Interface p0 type=patch \
-                    options:peer=p1 ofport_request=1 -- \
-                    set Interface p0 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500 -- \
-                    set Interface p1 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
-                    add-port br1 p2 -- set Interface p2 type=internal ofport_request=3])
-
-ovs-appctl time/stop
-# advance the clock, to stablize the states.
-ovs-appctl time/warp 5000 500
-
-# enable forwarding_if_rx.
-AT_CHECK([ovs-vsctl set Interface p0 bfd:forwarding_if_rx=true], [0])
-
-# there should be no change of the forwarding flag, since
-# the bfd on both ends is already up.
-for i in `seq 0 5`
-do
-    ovs-appctl time/warp 500
-    BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-done
-
-# stop the bfd on one side.
-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false], [0])
-# for within 1500ms, the detection timer is not out.
-# there is no change to status.
-for i in `seq 0 1`
-do
-    ovs-appctl time/warp 500
-    BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-    for i in `seq 0 4`
-    do
-        AT_CHECK([ovs-ofctl packet-out br1 "in_port=3 packet=90e2ba01475000101856b2e80806000108000604000100101856b2e80202020300000000000002020202 actions=2"],
-                 [0], [stdout], [])
-    done
-done
-
-# at 1500ms, the STATE should go DOWN, due to Control Detection Time Expired.
-# but forwarding flag should be still true.
-ovs-appctl time/warp 500
-BFD_CHECK([p0], [true], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-
-# reset bfd forwarding_if_rx.
-AT_CHECK([ovs-vsctl set Interface p0 bfd:forwarding_if_rx=false], [0])
-# forwarding flag should turn to false since the STATE is DOWN.
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-
-# re-enable bfd on the other end. the states should be up.
-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300])
-# advance the clock, to stablize the states.
-ovs-appctl time/warp 5000 500
-BFD_CHECK([p0], [true], [false], [none], [up], [Control Detection Time Expired], [none], [up], [No Diagnostic])
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [Control Detection Time Expired])
-BFD_CHECK_TX([p0], [500ms], [500ms], [300ms])
-BFD_CHECK_RX([p0], [500ms], [500ms], [300ms])
-
-AT_CHECK([ovs-vsctl del-br br1], [0], [ignore])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# forwarding_if_rx Test3
-# Test3 is for testing that the enable of forwarding_if_rx will not
-# affect the bfd decay feature.  bfd is enabled on both ends of the link.
-AT_SETUP([bfd - bfd forwarding_if_rx - with bfd decay])
-OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
-                    add-port br1 p1 -- set Interface p1 type=patch \
-                    options:peer=p0 ofport_request=2 -- \
-                    add-port br0 p0 -- set Interface p0 type=patch \
-                    options:peer=p1 ofport_request=1 -- \
-                    set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 bfd:decay_min_rx=3000 -- \
-                    set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
-
-ovs-appctl time/stop
-# advance the clock, to stablize the states.
-ovs-appctl time/warp 10000 500
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-BFD_CHECK_RX([p0], [3000ms], [3000ms], [500ms])
-
-# enable forwarding_if_rx.
-AT_CHECK([ovs-vsctl set Interface p0 bfd:forwarding_if_rx=true], [0])
-
-# there should be no change of the forwarding flag, since
-# the bfd on both ends is already up.
-for i in `seq 0 9`
-do
-    ovs-appctl time/warp 500
-    BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-done
-
-# reconfigure the decay_min_rx to 1000ms.
-AT_CHECK([ovs-vsctl set interface p0 bfd:decay_min_rx=1000])
-
-# wait for 5000ms to decay.
-ovs-appctl time/warp 5000 500
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-BFD_CHECK_RX([p0], [1000ms], [1000ms], [500ms])
-
-# stop the bfd on one side.
-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false], [0])
-
-# advance clock by 4000ms, while receiving packets.
-# the STATE should go DOWN, due to Control Detection Time Expired.
-# but forwarding flag should be still true.
-for i in `seq 0 7`
-do
-    ovs-appctl time/warp 500
-    AT_CHECK([ovs-ofctl packet-out br1 "in_port=3 packet=90e2ba01475000101856b2e80806000108000604000100101856b2e80202020300000000000002020202 actions=2"],
-             [0], [stdout], [])
-done
-BFD_CHECK([p0], [true], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-
-# receive packet at 1/100ms rate for 1000ms.
-for i in `seq 0 9`
-do
-    AT_CHECK([ovs-ofctl packet-out br1 "in_port=3 packet=90e2ba01475000101856b2e80806000108000604000100101856b2e80202020300000000000002020202 actions=2"],
-             [0], [stdout], [])
-    ovs-appctl time/warp 100
-    # the forwarding flag should always be true during this time.
-    BFD_CHECK([p0], [true], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-done
-
-# stop receiving for 5000ms.
-ovs-appctl time/warp 5000 100
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-
-# reset bfd forwarding_if_rx.
-AT_CHECK([ovs-vsctl set Interface p0 bfd:forwarding_if_rx=false])
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-# re-enable bfd forwarding_if_rx.
-AT_CHECK([ovs-vsctl set Interface p0 bfd:forwarding_if_rx=true])
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-
-# re-enable bfd on the other end. the states should be up.
-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300])
-# advance the clock, to stablize the states.
-ovs-appctl time/warp 10000 500
-BFD_CHECK([p0], [true], [false], [none], [up], [Control Detection Time Expired], [none], [up], [No Diagnostic])
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [Control Detection Time Expired])
-BFD_CHECK_TX([p0], [300ms], [300ms], [300ms])
-BFD_CHECK_RX([p0], [1000ms], [1000ms], [300ms])
-
-AT_CHECK([ovs-vsctl del-br br1], [0], [ignore])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# forwarding_if_rx Test4
-# Test4 is for testing the demand_rx_bfd feature.
-# bfd is enabled on both ends of the link.
-AT_SETUP([bfd - bfd forwarding_if_rx - demand_rx_bfd])
-OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
-                    add-port br1 p1 -- set Interface p1 type=patch \
-                    options:peer=p0 ofport_request=2 -- \
-                    add-port br0 p0 -- set Interface p0 type=patch \
-                    options:peer=p1 ofport_request=1 -- \
-                    set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 bfd:forwarding_if_rx=true -- \
-                    set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
-
-ovs-appctl time/stop
-# advance the clock, to stablize the states.
-ovs-appctl time/warp 10000 500
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-
-# disable the bfd on p1.
-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false], [0])
-
-# advance clock by 4000ms, while receiving packets.
-# the STATE should go DOWN, due to Control Detection Time Expired.
-# but forwarding flag should be still true.
-for i in `seq 0 7`
-do
-    ovs-appctl time/warp 500
-    AT_CHECK([ovs-ofctl packet-out br1 "in_port=3 packet=90e2ba01475000101856b2e80806000108000604000100101856b2e80202020300000000000002020202 actions=2"],
-             [0], [stdout], [])
-done
-BFD_CHECK([p0], [true], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-
-# advance clock long enough to trigger the demand_bfd_rx interval
-# (100 * bfd->cfm_min_rx), forwarding flag should go down since there
-# is no bfd control packet received during the demand_rx_bfd.
-for i in `seq 0 120`
-do
-    ovs-appctl time/warp 300
-    AT_CHECK([ovs-ofctl packet-out br1 "in_port=3 packet=90e2ba01475000101856b2e80806000108000604000100101856b2e80202020300000000000002020202 actions=2"],
-             [0], [stdout], [])
-done
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-
-# now enable the bfd on p1 again.
-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true], [0])
-# advance clock by 5000ms.  and p1 and p0 should be all up.
-ovs-appctl time/warp 5000 500
-BFD_CHECK([p0], [true], [false], [none], [up], [Control Detection Time Expired], [none], [up], [No Diagnostic])
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [Control Detection Time Expired])
-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
-
-# disable the bfd on p1 again.
-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false], [0])
-# advance clock long enough to trigger the demand_rx_bfd,
-# forwarding flag should go down since there is no bfd control packet
-# received during the demand_rx_bfd.
-for i in `seq 0 120`
-do
-    ovs-appctl time/warp 300
-    AT_CHECK([ovs-ofctl packet-out br1 "in_port=3 packet=90e2ba01475000101856b2e80806000108000604000100101856b2e80202020300000000000002020202 actions=2"],
-             [0], [stdout], [])
-done
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-
-AT_CHECK([ovs-vsctl del-br br1], [0], [ignore])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# test bfd:flap_count.
-# This test contains three part:
-# part 1. tests the flap_count on normal bfd monitored link.
-# part 2. tests the flap_count when forwarding override is used.
-# part 3. tests the flap_count when forwarding_if_rx is enabled.
-AT_SETUP([bfd - flap_count])
-#Create 2 bridges connected by patch ports and enable bfd
-OVS_VSWITCHD_START([add-br br1 -- \
-                    set bridge br1 datapath-type=dummy \
-                    other-config:hwaddr=aa:55:aa:56:00:00 -- \
-                    add-port br1 p1 -- set Interface p1 type=patch \
-                    options:peer=p0 ofport_request=2 -- \
-                    add-port br0 p0 -- set Interface p0 type=patch \
-                    options:peer=p1 ofport_request=1 -- \
-                    set Interface p0 bfd:enable=true bfd:min_tx=100 bfd:min_rx=100 -- \
-                    set Interface p1 bfd:enable=true bfd:min_tx=100 bfd:min_rx=100])
-
-ovs-appctl time/stop
-# Disable the stats update to prevent the race between ovsdb updating
-# stats and ovs-vsctl cmd closing the jsonrpc session.
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:stats-update-interval=50000000])
-
-# Part-1 wait for a while to stablize bfd.
-ovs-appctl time/warp 10100 100
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK_TX([p0], [100ms], [100ms], [100ms])
-BFD_CHECK_RX([p0], [100ms], [100ms], [100ms])
-# both p0 and p1 should have flap_count = "1". since down->up.
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-
-# turn bfd on p1 off, should increment the bfd:flap_count on p0.
-AT_CHECK([ovs-vsctl set interface p1 bfd:enable=false])
-ovs-appctl time/warp 5000 100
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["2"])
-AT_CHECK([ovs-vsctl list interface p1 | sed -n "s/^.*flap_count=\(.*\), forwarding.*$/\1/p"])
-
-# turn bfd on p1 on again, should increment the bfd:flap_count on p0.
-# p1 should still have flap_count = "1", since it is reset.
-AT_CHECK([ovs-vsctl set interface p1 bfd:enable=true])
-ovs-appctl time/warp 5000 100
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["3"])
-BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-
-
-# Part-2 now turn on the forwarding_override.
-AT_CHECK([ovs-appctl bfd/set-forwarding p0 true], [0], [dnl
-OK
-])
-
-# turn bfd on p1 off, should not increment the bfd:flap_count on p0, since forwarding_override is on.
-AT_CHECK([ovs-vsctl set interface p1 bfd:enable=false])
-ovs-appctl time/warp 5000 100
-BFD_CHECK([p0], [true], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["3"])
-AT_CHECK([ovs-vsctl list interface p1 | sed -n "s/^.*flap_count=\(.*\), forwarding.*$/\1/p"])
-
-# turn bfd on p1 on again, should not increment the bfd:flap_count on p0, since forwarding override is on.
-# p1 should still have flap_count = "1", since it is reset.
-AT_CHECK([ovs-vsctl set interface p1 bfd:enable=true])
-ovs-appctl time/warp 5000 100
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["3"])
-BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-
-# turn the forwarding_override back to normal.
-AT_CHECK([ovs-appctl bfd/set-forwarding p0 normal], [0], [dnl
-OK
-])
-
-# turn bfd on p1 off and on, should increment the bfd:flap_count on p0.
-AT_CHECK([ovs-vsctl set interface p1 bfd:enable=false])
-ovs-appctl time/warp 5000 100
-AT_CHECK([ovs-vsctl set interface p1 bfd:enable=true])
-ovs-appctl time/warp 5000 100
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["5"])
-BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-
-# Part-3 now turn on forwarding_if_rx.
-AT_CHECK([ovs-vsctl set Interface p0 bfd:forwarding_if_rx=true], [0])
-ovs-appctl time/warp 1100 100
-# disable the bfd on p1.
-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false], [0])
-
-# advance clock by 4000ms, while receiving packets.
-# the STATE should go DOWN, due to Control Detection Time Expired.
-# but forwarding flag should be true.
-for i in `seq 0 39`
-do
-    ovs-appctl time/warp 100
-    AT_CHECK([ovs-ofctl packet-out br1 "in_port=3 packet=90e2ba01475000101856b2e80806000108000604000100101856b2e80202020300000000000002020202 actions=2"],
-             [0], [stdout], [])
-done
-BFD_CHECK([p0], [true], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-# flap_count should remain unchanged.
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["5"])
-
-# stop the traffic for more than 100 * bfd->cfm_min_rx ms, the forwarding flag of p0 should turn false.
-# and there should be the increment of flap_count.
-ovs-appctl time/warp 12100 100
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["6"])
-
-# advance clock by 4000ms, and resume the traffic.
-for i in `seq 0 39`
-do
-    ovs-appctl time/warp 100
-    AT_CHECK([ovs-ofctl packet-out br1 "in_port=3 packet=90e2ba01475000101856b2e80806000108000604000100101856b2e80202020300000000000002020202 actions=2"],
-             [0], [stdout], [])
-done
-# forwarding should be false, since there is still no bfd control packet received.
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["6"])
-
-# turn on the bfd on p1.
-AT_CHECK([ovs-vsctl set interface p1 bfd:enable=true])
-ovs-appctl time/warp 5000 100
-# even though there is no data traffic, since p1 bfd is on again, should increment the flap_count.
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["7"])
-BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([bfd - check that BFD works together with RSTP])
-# Create br0 with interfaces p1
-#    and br1 with interfaces p2
-# with p1 and p2 connected via unix domain socket
-OVS_VSWITCHD_START(
-  [set bridge br0 rstp_enable=true -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy -- \
-   set bridge br1 rstp_enable=true -- \
-])
-
-AT_CHECK([ovs-vsctl add-port br0 p1 -- \
-   set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p0.sock bfd:enable=true -- \
-])
-
-AT_CHECK([ovs-vsctl add-port br1 p2 -- \
-   set interface p2 type=dummy options:stream=unix:$OVS_RUNDIR/p0.sock bfd:enable=true -- \
-])
-
-ovs-appctl time/stop
-ovs-appctl time/warp 4100 100
-
-# Forwarding should be true
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p2], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-
-# Disable bfd on p2, forwarding on p1 should go to false
-AT_CHECK([ovs-vsctl set interface p2 bfd:enable=false])
-
-ovs-appctl time/warp 5000 100
-BFD_CHECK([p1], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# test bfd: liveness propagation - OF1.3.
-AT_SETUP([bfd - liveness propagation - OF1.3])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow13 -P standard monitor br0 --detach --no-chdir --pidfile])
-check_liveness () {
-    printf '\n\n--- check_liveness %d ---\n\n\n' $1
-    shift
-
-        echo >>expout "OFPT_PORT_STATUS (OF1.3): MOD: 1(p0): addr:
-     config:     0
-     state:      $1
-     speed: 0 Mbps now, 0 Mbps max"
-
-        AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/ *duration.*//
-s/addr:[0-9a-fA-F:]*/addr:/' < monitor.log|grep -A3 "MOD: 1(p0)"|grep -ve --]],
-      [0], [expout])
-}
-: > expout
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-# Set miss_send_len to 128, enabling port_status messages to our service connection.
-ovs-appctl -t ovs-ofctl ofctl/send 0409000c0123456700000080
-#Create 2 bridges connected by patch ports and enable bfd
-AT_CHECK([ovs-vsctl add-br br1 -- \
-          set bridge br1 datapath-type=dummy \
-          other-config:hwaddr=aa:55:aa:56:00:00 -- \
-          add-port br1 p1 -- set Interface p1 type=patch \
-          options:peer=p0 ofport_request=2 -- \
-          add-port br0 p0 -- set Interface p0 type=patch \
-          options:peer=p1 ofport_request=1 -- \
-          set Interface p0 bfd:enable=true bfd:min_tx=100 bfd:min_rx=100 -- \
-          set Interface p1 bfd:enable=true bfd:min_tx=100 bfd:min_rx=100])
-
-ovs-appctl time/stop
-# Disable the stats update to prevent the race between ovsdb updating
-# stats and ovs-vsctl cmd closing the jsonrpc session.
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:stats-update-interval=50000000])
-
-# wait for a while to stablize bfd.
-ovs-appctl time/warp 10100 100
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK_TX([p0], [100ms], [100ms], [100ms])
-BFD_CHECK_RX([p0], [100ms], [100ms], [100ms])
-# both p0 and p1 should have flap_count = "1". since down->up.
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-check_liveness 1 LIVE
-
-# turn bfd on p1 off, should increment the bfd:flap_count on p0.
-AT_CHECK([ovs-vsctl set interface p1 bfd:enable=false])
-ovs-appctl time/warp 5000 100
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["2"])
-AT_CHECK([ovs-vsctl list interface p1 | sed -n "s/^.*flap_count=\(.*\), forwarding.*$/\1/p"])
-check_liveness 2 0
-
-# turn bfd on p1 on again, should increment the bfd:flap_count on p0.
-# p1 should still have flap_count = "1", since it is reset.
-AT_CHECK([ovs-vsctl set interface p1 bfd:enable=true])
-ovs-appctl time/warp 5000 100
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["3"])
-BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-check_liveness 3 LIVE
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# test bfd: liveness propagation - OF1.4.
-AT_SETUP([bfd - liveness propagation - OF1.4])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow14 -P standard monitor br0 --detach --no-chdir --pidfile])
-check_liveness () {
-    printf '\n\n--- check_liveness %d ---\n\n\n' $1
-    shift
-
-        echo >>expout "OFPT_PORT_STATUS (OF1.4): MOD: 1(p0): addr:
-     config:     0
-     state:      $1
-     speed: 0 Mbps now, 0 Mbps max"
-
-        AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/ *duration.*//
-s/addr:[0-9a-fA-F:]*/addr:/' < monitor.log|grep -A3 "MOD: 1(p0)"|grep -ve --]],
-      [0], [expout])
-}
-: > expout
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-# Set miss_send_len to 128, enabling port_status messages to our service connection.
-ovs-appctl -t ovs-ofctl ofctl/send 0509000c0123456700000080
-#Create 2 bridges connected by patch ports and enable bfd
-AT_CHECK([ovs-vsctl add-br br1 -- \
-          set bridge br1 datapath-type=dummy \
-          other-config:hwaddr=aa:55:aa:56:00:00 -- \
-          add-port br1 p1 -- set Interface p1 type=patch \
-          options:peer=p0 ofport_request=2 -- \
-          add-port br0 p0 -- set Interface p0 type=patch \
-          options:peer=p1 ofport_request=1 -- \
-          set Interface p0 bfd:enable=true bfd:min_tx=100 bfd:min_rx=100 -- \
-          set Interface p1 bfd:enable=true bfd:min_tx=100 bfd:min_rx=100])
-
-ovs-appctl time/stop
-# Disable the stats update to prevent the race between ovsdb updating
-# stats and ovs-vsctl cmd closing the jsonrpc session.
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:stats-update-interval=50000000])
-
-# wait for a while to stablize bfd.
-ovs-appctl time/warp 10100 100
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK_TX([p0], [100ms], [100ms], [100ms])
-BFD_CHECK_RX([p0], [100ms], [100ms], [100ms])
-# both p0 and p1 should have flap_count = "1". since down->up.
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-check_liveness 1 LIVE
-
-# turn bfd on p1 off, should increment the bfd:flap_count on p0.
-AT_CHECK([ovs-vsctl set interface p1 bfd:enable=false])
-ovs-appctl time/warp 5000 100
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["2"])
-AT_CHECK([ovs-vsctl list interface p1 | sed -n "s/^.*flap_count=\(.*\), forwarding.*$/\1/p"])
-check_liveness 2 0
-
-# turn bfd on p1 on again, should increment the bfd:flap_count on p0.
-# p1 should still have flap_count = "1", since it is reset.
-AT_CHECK([ovs-vsctl set interface p1 bfd:enable=true])
-ovs-appctl time/warp 5000 100
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["3"])
-BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-check_liveness 3 LIVE
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# test bfd: liveness propagation - OF1.5.
-AT_SETUP([bfd - liveness propagation - OF1.5])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow15 -P standard monitor br0 --detach --no-chdir --pidfile])
-check_liveness () {
-    printf '\n\n--- check_liveness %d ---\n\n\n' $1
-    shift
-
-        echo >>expout "OFPT_PORT_STATUS (OF1.5): MOD: 1(p0): addr:
-     config:     0
-     state:      $1
-     speed: 0 Mbps now, 0 Mbps max"
-
-        AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/ *duration.*//
-s/addr:[0-9a-fA-F:]*/addr:/' < monitor.log|grep -A3 "MOD: 1(p0)"|grep -ve --]],
-      [0], [expout])
-}
-: > expout
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-# Set miss_send_len to 128, enabling port_status messages to our service connection.
-ovs-appctl -t ovs-ofctl ofctl/send 0609000c0123456700000080
-#Create 2 bridges connected by patch ports and enable bfd
-AT_CHECK([ovs-vsctl add-br br1 -- \
-          set bridge br1 datapath-type=dummy \
-          other-config:hwaddr=aa:55:aa:56:00:00 -- \
-          add-port br1 p1 -- set Interface p1 type=patch \
-          options:peer=p0 ofport_request=2 -- \
-          add-port br0 p0 -- set Interface p0 type=patch \
-          options:peer=p1 ofport_request=1 -- \
-          set Interface p0 bfd:enable=true bfd:min_tx=100 bfd:min_rx=100 -- \
-          set Interface p1 bfd:enable=true bfd:min_tx=100 bfd:min_rx=100])
-
-ovs-appctl time/stop
-# Disable the stats update to prevent the race between ovsdb updating
-# stats and ovs-vsctl cmd closing the jsonrpc session.
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:stats-update-interval=50000000])
-
-# wait for a while to stablize bfd.
-ovs-appctl time/warp 10100 100
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK_TX([p0], [100ms], [100ms], [100ms])
-BFD_CHECK_RX([p0], [100ms], [100ms], [100ms])
-# both p0 and p1 should have flap_count = "1". since down->up.
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-check_liveness 1 LIVE
-
-# turn bfd on p1 off, should increment the bfd:flap_count on p0.
-AT_CHECK([ovs-vsctl set interface p1 bfd:enable=false])
-ovs-appctl time/warp 5000 100
-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["2"])
-AT_CHECK([ovs-vsctl list interface p1 | sed -n "s/^.*flap_count=\(.*\), forwarding.*$/\1/p"])
-check_liveness 2 0
-
-# turn bfd on p1 on again, should increment the bfd:flap_count on p0.
-# p1 should still have flap_count = "1", since it is reset.
-AT_CHECK([ovs-vsctl set interface p1 bfd:enable=true])
-ovs-appctl time/warp 5000 100
-BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["3"])
-BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"])
-check_liveness 3 LIVE
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([bfd - Edit the Detect Mult values])
-#Create 2 bridges connected by patch ports and enable BFD
-OVS_VSWITCHD_START()
-ovs-appctl time/stop
-AT_CHECK([ ovs-vsctl -- add-br br1 -- \
-           set bridge br1 datapath-type=dummy ])
-AT_CHECK([ ovs-vsctl -- add-port br1 p1 -- set Interface p1 type=patch\
-           options:peer=p0 ])
-AT_CHECK([ ovs-vsctl -- add-port br0 p0 -- set Interface p0 type=patch\
-           options:peer=p1 ])
-AT_CHECK([ ovs-vsctl -- set interface p0 bfd:enable=true ])
-AT_CHECK([ ovs-vsctl -- set interface p1 bfd:enable=true ])
-ovs-appctl time/warp 3100 100
-#Verify that BFD has been enabled on both interfaces.
-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
-#Verify that default mult values are 3.
-BFD_CHECK_MULT([p0], [3], [3])
-BFD_CHECK_MULT([p1], [3], [3])
-#Set the mult values to valid range border mult(p0)=1 mult(p1)=255.
-AT_CHECK([ovs-vsctl set interface p0 bfd:mult=1])
-AT_CHECK([ovs-vsctl set interface p1 bfd:mult=255])
-ovs-appctl time/warp 3100 100
-BFD_CHECK_MULT([p0], [1], [255])
-BFD_CHECK_MULT([p1], [255], [1])
-
-#Set the mult values out valid range border mult(p0)=0 mult(p1)=256.
-AT_CHECK([ovs-vsctl set interface p0 bfd:mult=0])
-AT_CHECK([ovs-vsctl set interface p1 bfd:mult=256])
-ovs-appctl time/warp 3100 100
-BFD_CHECK_MULT([p0], [3], [3])
-BFD_CHECK_MULT([p1], [3], [3])
-
-#Set valid non default mult values mult(p0)=8 mult(p1)=125.
-AT_CHECK([ovs-vsctl set interface p0 bfd:mult=8])
-AT_CHECK([ovs-vsctl set interface p1 bfd:mult=125])
-ovs-appctl time/warp 3100 100
-BFD_CHECK_MULT([p0], [8], [125])
-BFD_CHECK_MULT([p1], [125], [8])
-
-#Clear mult values. Detect mult values shall be default 3 again.
-AT_CHECK([ovs-vsctl remove interface p0 bfd mult])
-AT_CHECK([ovs-vsctl remove interface p1 bfd mult])
-ovs-appctl time/warp 3100 100
-BFD_CHECK_MULT([p0], [3], [3])
-BFD_CHECK_MULT([p1], [3], [3])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/bridge.at b/tests/bridge.at
deleted file mode 100644
index d48463e26..000000000
--- a/tests/bridge.at
+++ /dev/null
@@ -1,105 +0,0 @@
-AT_BANNER([bridge])
-
-dnl When a port disappears from a datapath, e.g. because an admin used
-dnl "ovs-dpctl del-port", the bridge code should be resilient enough to
-dnl notice and add it back the next time we reconfigure.  A prior version
-dnl of the code failed to do this, so this test guards against regression.
-AT_SETUP([bridge - ports that disappear get added back])
-OVS_VSWITCHD_START
-
-# Add some ports and make sure that they show up in the datapath.
-add_of_ports br0 1 2
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (dummy)
-    p2 2/2: (dummy)
-])
-
-# Delete p1 from the datapath with "ovs-dpctl del-if"
-# and check that it disappeared.
-AT_CHECK([ovs-appctl dpctl/del-if dummy at ovs-dummy p1])
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p2 2/2: (dummy)
-])
-
-# Force reconfiguration and make sure that p1 got added back.
-AT_CHECK([ovs-vsctl del-port p2])
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (dummy)
-])
-OVS_APP_EXIT_AND_WAIT([ovs-vswitchd])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
-
-dnl When multiple bridges are connected to the same controller, make
-dnl sure their status are tracked independently.
-AT_SETUP([bridge - multiple bridges share a controller])
-OVS_VSWITCHD_START(
-   [add-br br1 -- \
-    set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-    set bridge br1 datapath-type=dummy other-config:datapath-id=1234 ])
-
-dnl Start ovs-testcontroller
-AT_CHECK([ovs-testcontroller --detach --no-chdir  punix:controller --pidfile], [0], [ignore])
-on_exit 'kill `cat ovs-testcontroller.pid`'
-OVS_WAIT_UNTIL([test -e controller])
-
-dnl Add the controller to both bridges, 5 seconds apart.
-AT_CHECK([ovs-vsctl set-controller br0 unix:controller])
-AT_CHECK([ovs-vsctl set-fail-mode br0 secure])
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-AT_CHECK([ovs-vsctl set-controller br1 unix:controller])
-AT_CHECK([ovs-vsctl set-fail-mode br1 secure])
-
-dnl Wait for the controller connectionsi to be up
-for i in `seq 0 19`
-do
-    if ovs-vsctl --columns=is_connected list controller |grep "false"; then
-        :
-    else
-        break
-    fi
-    ovs-appctl time/warp 1100
-done
-
-dnl Make sure the connection status have two records and they are different.
-dnl (The exact output contains timing information that are machine dependent.)
-AT_CHECK([ovs-vsctl --columns=status list controller | dnl
-          grep "status" | sort -u |wc -l], [0], [2
-])
-
-OVS_APP_EXIT_AND_WAIT([ovs-vswitchd])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
-
-AT_SETUP([bridge - add port after stopping controller])
-OVS_VSWITCHD_START
-
-dnl Start ovs-testcontroller
-AT_CHECK([ovs-testcontroller --no-chdir --detach punix:controller --pidfile], [0], [ignore])
-OVS_WAIT_UNTIL([test -e controller])
-
-AT_CHECK([ovs-vsctl set-controller br0 unix:controller])
-AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=internal], [0], [ignore])
-AT_CHECK([ovs-appctl -t ovs-vswitchd version], [0], [ignore])
-
-# Now kill the ovs-testcontroller
-kill `cat ovs-testcontroller.pid`
-if test "$IS_WIN32" = "yes"; then
-    AT_CHECK([rm controller], [0], [ignore])
-fi
-OVS_WAIT_UNTIL([! test -e controller])
-AT_CHECK([ovs-vsctl --no-wait add-port br0 p2 -- set Interface p2 type=internal], [0], [ignore])
-AT_CHECK([ovs-appctl -t ovs-vswitchd version], [0], [ignore])
-
-OVS_APP_EXIT_AND_WAIT([ovs-vswitchd])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
diff --git a/tests/bundle.at b/tests/bundle.at
deleted file mode 100644
index 0a4eadc1e..000000000
--- a/tests/bundle.at
+++ /dev/null
@@ -1,454 +0,0 @@
-AT_BANNER([bundle link selection])
-
-# The test-bundle program prints a lot of output on stdout, but each of the
-# tests below ignores it because it will vary a bit depending on endianness and
-# floating point precision.  test-bundle will output an error message on
-# stderr and return with exit code 1 if anything really goes wrong.  In each
-# case, we list the (approximate) expected output in a comment to aid debugging
-# if the test does fail.
-
-AT_SETUP([hrw bundle link selection])
-AT_KEYWORDS([bundle_action])
-AT_CHECK([[ovstest test-bundle 'symmetric_l4,60,hrw,ofport,NXM_NX_REG0[],slaves:1,2,3,4,5']],
-  [0], [ignore])
-# 100000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-# 110000: disruption=0.50 (perfect=0.50) 0.50 0.50 0.00 0.00 0.00 0.00
-# 010000: disruption=0.50 (perfect=0.50) 0.00 1.00 0.00 0.00 0.00 0.00
-# 011000: disruption=0.50 (perfect=0.50) 0.00 0.50 0.50 0.00 0.00 0.00
-# 111000: disruption=0.33 (perfect=0.33) 0.33 0.33 0.34 0.00 0.00 0.00
-# 101000: disruption=0.33 (perfect=0.33) 0.50 0.00 0.50 0.00 0.00 0.00
-# 001000: disruption=0.50 (perfect=0.50) 0.00 0.00 1.00 0.00 0.00 0.00
-# 001100: disruption=0.50 (perfect=0.50) 0.00 0.00 0.50 0.50 0.00 0.00
-# 101100: disruption=0.33 (perfect=0.33) 0.33 0.00 0.34 0.33 0.00 0.00
-# 111100: disruption=0.25 (perfect=0.25) 0.25 0.25 0.25 0.25 0.00 0.00
-# 011100: disruption=0.25 (perfect=0.25) 0.00 0.33 0.33 0.33 0.00 0.00
-# 010100: disruption=0.33 (perfect=0.33) 0.00 0.50 0.00 0.50 0.00 0.00
-# 110100: disruption=0.33 (perfect=0.33) 0.33 0.33 0.00 0.34 0.00 0.00
-# 100100: disruption=0.33 (perfect=0.33) 0.50 0.00 0.00 0.50 0.00 0.00
-# 000100: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 1.00 0.00 0.00
-# 000110: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 0.50 0.50 0.00
-# 100110: disruption=0.33 (perfect=0.33) 0.33 0.00 0.00 0.33 0.33 0.00
-# 110110: disruption=0.25 (perfect=0.25) 0.25 0.25 0.00 0.25 0.25 0.00
-# 010110: disruption=0.25 (perfect=0.25) 0.00 0.34 0.00 0.33 0.33 0.00
-# 011110: disruption=0.25 (perfect=0.25) 0.00 0.25 0.25 0.25 0.25 0.00
-# 111110: disruption=0.20 (perfect=0.20) 0.20 0.20 0.20 0.20 0.20 0.00
-# 101110: disruption=0.20 (perfect=0.20) 0.25 0.00 0.25 0.25 0.25 0.00
-# 001110: disruption=0.25 (perfect=0.25) 0.00 0.00 0.34 0.33 0.33 0.00
-# 001010: disruption=0.33 (perfect=0.33) 0.00 0.00 0.50 0.00 0.50 0.00
-# 101010: disruption=0.33 (perfect=0.33) 0.33 0.00 0.34 0.00 0.33 0.00
-# 111010: disruption=0.25 (perfect=0.25) 0.25 0.25 0.25 0.00 0.25 0.00
-# 011010: disruption=0.25 (perfect=0.25) 0.00 0.33 0.34 0.00 0.33 0.00
-# 010010: disruption=0.34 (perfect=0.33) 0.00 0.50 0.00 0.00 0.50 0.00
-# 110010: disruption=0.33 (perfect=0.33) 0.33 0.33 0.00 0.00 0.33 0.00
-# 100010: disruption=0.33 (perfect=0.33) 0.50 0.00 0.00 0.00 0.50 0.00
-# 000010: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 0.00 1.00 0.00
-# 000011: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 0.00 0.50 0.50
-# 100011: disruption=0.33 (perfect=0.33) 0.33 0.00 0.00 0.00 0.33 0.33
-# 110011: disruption=0.25 (perfect=0.25) 0.25 0.25 0.00 0.00 0.25 0.25
-# 010011: disruption=0.25 (perfect=0.25) 0.00 0.33 0.00 0.00 0.33 0.33
-# 011011: disruption=0.25 (perfect=0.25) 0.00 0.25 0.25 0.00 0.25 0.25
-# 111011: disruption=0.20 (perfect=0.20) 0.20 0.20 0.20 0.00 0.20 0.20
-# 101011: disruption=0.20 (perfect=0.20) 0.25 0.00 0.25 0.00 0.25 0.25
-# 001011: disruption=0.25 (perfect=0.25) 0.00 0.00 0.34 0.00 0.33 0.33
-# 001111: disruption=0.25 (perfect=0.25) 0.00 0.00 0.25 0.25 0.25 0.25
-# 101111: disruption=0.20 (perfect=0.20) 0.20 0.00 0.20 0.20 0.20 0.20
-# 111111: disruption=0.17 (perfect=0.17) 0.17 0.17 0.17 0.17 0.17 0.17
-# 011111: disruption=0.17 (perfect=0.17) 0.00 0.20 0.20 0.20 0.20 0.20
-# 010111: disruption=0.20 (perfect=0.20) 0.00 0.25 0.00 0.25 0.25 0.25
-# 110111: disruption=0.20 (perfect=0.20) 0.20 0.20 0.00 0.20 0.20 0.20
-# 100111: disruption=0.20 (perfect=0.20) 0.25 0.00 0.00 0.25 0.25 0.25
-# 000111: disruption=0.25 (perfect=0.25) 0.00 0.00 0.00 0.33 0.33 0.33
-# 000101: disruption=0.33 (perfect=0.33) 0.00 0.00 0.00 0.50 0.00 0.50
-# 100101: disruption=0.33 (perfect=0.33) 0.33 0.00 0.00 0.33 0.00 0.33
-# 110101: disruption=0.25 (perfect=0.25) 0.25 0.25 0.00 0.25 0.00 0.25
-# 010101: disruption=0.25 (perfect=0.25) 0.00 0.33 0.00 0.33 0.00 0.33
-# 011101: disruption=0.25 (perfect=0.25) 0.00 0.25 0.25 0.25 0.00 0.25
-# 111101: disruption=0.20 (perfect=0.20) 0.20 0.20 0.20 0.20 0.00 0.20
-# 101101: disruption=0.20 (perfect=0.20) 0.25 0.00 0.25 0.25 0.00 0.25
-# 001101: disruption=0.25 (perfect=0.25) 0.00 0.00 0.33 0.33 0.00 0.33
-# 001001: disruption=0.33 (perfect=0.33) 0.00 0.00 0.50 0.00 0.00 0.50
-# 101001: disruption=0.33 (perfect=0.33) 0.33 0.00 0.33 0.00 0.00 0.33
-# 111001: disruption=0.25 (perfect=0.25) 0.25 0.25 0.25 0.00 0.00 0.25
-# 011001: disruption=0.25 (perfect=0.25) 0.00 0.33 0.34 0.00 0.00 0.33
-# 010001: disruption=0.34 (perfect=0.33) 0.00 0.50 0.00 0.00 0.00 0.50
-# 110001: disruption=0.33 (perfect=0.33) 0.33 0.33 0.00 0.00 0.00 0.34
-# 100001: disruption=0.33 (perfect=0.33) 0.50 0.00 0.00 0.00 0.00 0.50
-# 000001: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 0.00 0.00 1.00
-# 000000: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 0.00 0.00 0.00
-# 100000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-AT_CLEANUP
-
-AT_SETUP([active_backup bundle link selection])
-AT_KEYWORDS([bundle_action])
-AT_CHECK([[ovstest test-bundle 'symmetric_l4,60,active_backup,ofport,NXM_NX_REG0[],slaves:1,2,3,4,5,6']],
-  [0],
-[100000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-110000: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-010000: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-011000: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-111000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-101000: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-001000: disruption=1.00 (perfect=1.00) 0.00 0.00 1.00 0.00 0.00 0.00
-001100: disruption=0.00 (perfect=0.00) 0.00 0.00 1.00 0.00 0.00 0.00
-101100: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-111100: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-011100: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-010100: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-110100: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-100100: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-000100: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 1.00 0.00 0.00
-000110: disruption=0.00 (perfect=0.00) 0.00 0.00 0.00 1.00 0.00 0.00
-100110: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-110110: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-010110: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-011110: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-111110: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-101110: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-001110: disruption=1.00 (perfect=1.00) 0.00 0.00 1.00 0.00 0.00 0.00
-001010: disruption=0.00 (perfect=0.00) 0.00 0.00 1.00 0.00 0.00 0.00
-101010: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-111010: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-011010: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-010010: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-110010: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-100010: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-000010: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 0.00 1.00 0.00
-000011: disruption=0.00 (perfect=0.00) 0.00 0.00 0.00 0.00 1.00 0.00
-100011: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-110011: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-010011: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-011011: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-111011: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-101011: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-001011: disruption=1.00 (perfect=1.00) 0.00 0.00 1.00 0.00 0.00 0.00
-001111: disruption=0.00 (perfect=0.00) 0.00 0.00 1.00 0.00 0.00 0.00
-101111: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-111111: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-011111: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-010111: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-110111: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-100111: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-000111: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 1.00 0.00 0.00
-000101: disruption=0.00 (perfect=0.00) 0.00 0.00 0.00 1.00 0.00 0.00
-100101: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-110101: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-010101: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-011101: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-111101: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-101101: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-001101: disruption=1.00 (perfect=1.00) 0.00 0.00 1.00 0.00 0.00 0.00
-001001: disruption=0.00 (perfect=0.00) 0.00 0.00 1.00 0.00 0.00 0.00
-101001: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-111001: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-011001: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-010001: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-110001: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-100001: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-000001: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 0.00 0.00 1.00
-000000: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 0.00 0.00 0.00
-100000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-])
-AT_CLEANUP
-
-AT_SETUP([hrw bundle single link selection])
-AT_KEYWORDS([bundle_action])
-AT_CHECK([[ovstest test-bundle 'symmetric_l4,60,hrw,ofport,NXM_NX_REG0[],slaves:1']],
-  [0], [ignore])
-# 1: disruption=1.00 (perfect=1.00) 1.00
-# 0: disruption=1.00 (perfect=1.00) 0.00
-# 1: disruption=1.00 (perfect=1.00) 1.00
-AT_CLEANUP
-
-AT_SETUP([hrw bundle no link selection])
-AT_KEYWORDS([bundle_action])
-AT_CHECK([[ovstest test-bundle 'symmetric_l4,60,hrw,ofport,NXM_NX_REG0[],slaves:']],
-  [0], [ignore])
-AT_CLEANUP
-#: disruption=0.00 (perfect=0.00)
-#: disruption=0.00 (perfect=0.00)
-
-AT_SETUP([bundle action missing argument])
-AT_KEYWORDS([bundle_action])
-AT_CHECK([ovs-ofctl parse-flow actions=bundle], [1], [],
-  [ovs-ofctl: : not enough arguments to bundle action
-])
-AT_CLEANUP
-
-AT_SETUP([bundle action bad fields])
-AT_KEYWORDS([bundle_action])
-AT_CHECK([ovs-ofctl parse-flow 'actions=bundle(xyzzy,60,hrw,ofport,slaves:1,2))'], [1], [],
-  [ovs-ofctl: xyzzy,60,hrw,ofport,slaves:1,2: unknown fields `xyzzy'
-])
-AT_CLEANUP
-
-AT_SETUP([bundle action bad algorithm])
-AT_KEYWORDS([bundle_action])
-AT_CHECK([ovs-ofctl parse-flow 'actions=bundle(symmetric_l4,60,fubar,ofport,slaves:1,2))'], [1], [],
-  [ovs-ofctl: symmetric_l4,60,fubar,ofport,slaves:1,2: unknown algorithm `fubar'
-])
-AT_CLEANUP
-
-AT_SETUP([bundle action bad slave type])
-AT_KEYWORDS([bundle_action])
-AT_CHECK([ovs-ofctl parse-flow 'actions=bundle(symmetric_l4,60,hrw,robot,slaves:1,2))'], [1], [],
-  [ovs-ofctl: symmetric_l4,60,hrw,robot,slaves:1,2: unknown slave_type `robot'
-])
-AT_CLEANUP
-
-AT_SETUP([bundle action bad slave delimiter])
-AT_KEYWORDS([bundle_action])
-AT_CHECK([ovs-ofctl parse-flow 'actions=bundle(symmetric_l4,60,hrw,ofport,robot:1,2))'], [1], [],
-  [ovs-ofctl: symmetric_l4,60,hrw,ofport,robot:1,2: missing slave delimiter, expected `slaves' got `robot'
-])
-AT_CLEANUP
-
-dnl Bundle actions with <= 2 ports typically align nicely within ofpbuf memory
-dnl allocation, so will not trigger reallocation codepaths. This test was
-dnl introduced to ensure that when bundle actions with a larger number of ports
-dnl are used, the encode/decode still works correctly. By placing the bundle
-dnl action deep within a list of actions, this test was able to trigger
-dnl Valgrind warnings for use-after-free bugs.
-AT_SETUP([bundle action with many ports])
-AT_KEYWORDS([bundle_action])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 'actions=set_field:0x1->metadata,set_field:0x2->metadata,set_field:0x3->metadata,set_field:0x4->metadata,bundle(symmetric_l4,0,hrw,ofport,slaves:[[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40]])'])
-AT_CHECK([ovs-ofctl dump-flows br0 --no-stats], [0], [dnl
- actions=load:0x1->OXM_OF_METADATA[[]],load:0x2->OXM_OF_METADATA[[]],load:0x3->OXM_OF_METADATA[[]],load:0x4->OXM_OF_METADATA[[]],bundle(symmetric_l4,0,hrw,ofport,slaves:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40)
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([bundle action with ports up and down])
-AT_KEYWORDS([bundle_action])
-OVS_VSWITCHD_START([dnl
-    add-port br0 p1 -- set Interface p1 type=dummy -- \
-    set Interface p1 ofport_request=1 -- \
-    add-port br0 p2 -- set Interface p2 type=dummy -- \
-    set Interface p2 ofport_request=2
-])
-AT_CHECK([ovs-ofctl add-flow br0 'actions=bundle(eth_src,50,active_backup,ofport,slaves:1,2)'])
-AT_CHECK([ovs-ofctl mod-port br0 p1 up])
-AT_CHECK([ovs-ofctl mod-port br0 p2 up])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=LOCAL,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 1
-])
-AT_CHECK([ovs-ofctl mod-port br0 p1 down])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=LOCAL,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 2
-])
-AT_CHECK([ovs-ofctl mod-port br0 p2 down])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=LOCAL,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: drop
-])
-AT_CHECK([ovs-ofctl mod-port br0 p1 up])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=LOCAL,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 1
-])
-AT_CHECK([ovs-ofctl mod-port br0 p2 up])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=LOCAL,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([bundle_load action with ports down])
-AT_KEYWORDS([bundle_action])
-OVS_VSWITCHD_START([dnl
-    add-port br0 p1 -- set Interface p1 type=dummy -- \
-    set Interface p1 ofport_request=1 -- \
-    add-port br0 p2 -- set Interface p2 type=dummy -- \
-    set Interface p2 ofport_request=2
-])
-AT_CHECK([ovs-ofctl add-flow br0 'actions=bundle_load(eth_src,50,hrw,ofport,OXM_OF_ETH_SRC[[0..15]],slaves:1,2)'])
-AT_CHECK([ovs-ofctl mod-port br0 p1 down])
-AT_CHECK([ovs-ofctl mod-port br0 p2 down])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=LOCAL,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06'], [0], [stdout])
-AT_CHECK([grep Final stdout], [0],
-  [Final flow: in_port=LOCAL,vlan_tci=0x0000,dl_src=50:54:00:00:ff:ff,dl_dst=50:54:00:00:00:06,dl_type=0x0000
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([hrw bundle symmetric_l3 link selection])
-AT_KEYWORDS([bundle_action])
-AT_CHECK([[ovstest test-bundle 'symmetric_l3,60,hrw,ofport,NXM_NX_REG0[],slaves:1,2,3,4,5']],
-  [0], [ignore])
-# 100000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-# 110000: disruption=0.50 (perfect=0.50) 0.50 0.50 0.00 0.00 0.00 0.00
-# 010000: disruption=0.50 (perfect=0.50) 0.00 1.00 0.00 0.00 0.00 0.00
-# 011000: disruption=0.50 (perfect=0.50) 0.00 0.50 0.50 0.00 0.00 0.00
-# 111000: disruption=0.33 (perfect=0.33) 0.33 0.33 0.34 0.00 0.00 0.00
-# 101000: disruption=0.33 (perfect=0.33) 0.50 0.00 0.50 0.00 0.00 0.00
-# 001000: disruption=0.50 (perfect=0.50) 0.00 0.00 1.00 0.00 0.00 0.00
-# 001100: disruption=0.50 (perfect=0.50) 0.00 0.00 0.50 0.50 0.00 0.00
-# 101100: disruption=0.33 (perfect=0.33) 0.33 0.00 0.34 0.33 0.00 0.00
-# 111100: disruption=0.25 (perfect=0.25) 0.25 0.25 0.25 0.25 0.00 0.00
-# 011100: disruption=0.25 (perfect=0.25) 0.00 0.33 0.33 0.33 0.00 0.00
-# 010100: disruption=0.33 (perfect=0.33) 0.00 0.50 0.00 0.50 0.00 0.00
-# 110100: disruption=0.33 (perfect=0.33) 0.33 0.33 0.00 0.34 0.00 0.00
-# 100100: disruption=0.33 (perfect=0.33) 0.50 0.00 0.00 0.50 0.00 0.00
-# 000100: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 1.00 0.00 0.00
-# 000110: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 0.50 0.50 0.00
-# 100110: disruption=0.33 (perfect=0.33) 0.33 0.00 0.00 0.33 0.33 0.00
-# 110110: disruption=0.25 (perfect=0.25) 0.25 0.25 0.00 0.25 0.25 0.00
-# 010110: disruption=0.25 (perfect=0.25) 0.00 0.34 0.00 0.33 0.33 0.00
-# 011110: disruption=0.25 (perfect=0.25) 0.00 0.25 0.25 0.25 0.25 0.00
-# 111110: disruption=0.20 (perfect=0.20) 0.20 0.20 0.20 0.20 0.20 0.00
-# 101110: disruption=0.20 (perfect=0.20) 0.25 0.00 0.25 0.25 0.25 0.00
-# 001110: disruption=0.25 (perfect=0.25) 0.00 0.00 0.34 0.33 0.33 0.00
-# 001010: disruption=0.33 (perfect=0.33) 0.00 0.00 0.50 0.00 0.50 0.00
-# 101010: disruption=0.33 (perfect=0.33) 0.33 0.00 0.34 0.00 0.33 0.00
-# 111010: disruption=0.25 (perfect=0.25) 0.25 0.25 0.25 0.00 0.25 0.00
-# 011010: disruption=0.25 (perfect=0.25) 0.00 0.33 0.34 0.00 0.33 0.00
-# 010010: disruption=0.34 (perfect=0.33) 0.00 0.50 0.00 0.00 0.50 0.00
-# 110010: disruption=0.33 (perfect=0.33) 0.33 0.33 0.00 0.00 0.33 0.00
-# 100010: disruption=0.33 (perfect=0.33) 0.50 0.00 0.00 0.00 0.50 0.00
-# 000010: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 0.00 1.00 0.00
-# 000011: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 0.00 0.50 0.50
-# 100011: disruption=0.33 (perfect=0.33) 0.33 0.00 0.00 0.00 0.33 0.33
-# 110011: disruption=0.25 (perfect=0.25) 0.25 0.25 0.00 0.00 0.25 0.25
-# 010011: disruption=0.25 (perfect=0.25) 0.00 0.33 0.00 0.00 0.33 0.33
-# 011011: disruption=0.25 (perfect=0.25) 0.00 0.25 0.25 0.00 0.25 0.25
-# 111011: disruption=0.20 (perfect=0.20) 0.20 0.20 0.20 0.00 0.20 0.20
-# 101011: disruption=0.20 (perfect=0.20) 0.25 0.00 0.25 0.00 0.25 0.25
-# 001011: disruption=0.25 (perfect=0.25) 0.00 0.00 0.34 0.00 0.33 0.33
-# 001111: disruption=0.25 (perfect=0.25) 0.00 0.00 0.25 0.25 0.25 0.25
-# 101111: disruption=0.20 (perfect=0.20) 0.20 0.00 0.20 0.20 0.20 0.20
-# 111111: disruption=0.17 (perfect=0.17) 0.17 0.17 0.17 0.17 0.17 0.17
-# 011111: disruption=0.17 (perfect=0.17) 0.00 0.20 0.20 0.20 0.20 0.20
-# 010111: disruption=0.20 (perfect=0.20) 0.00 0.25 0.00 0.25 0.25 0.25
-# 110111: disruption=0.20 (perfect=0.20) 0.20 0.20 0.00 0.20 0.20 0.20
-# 100111: disruption=0.20 (perfect=0.20) 0.25 0.00 0.00 0.25 0.25 0.25
-# 000111: disruption=0.25 (perfect=0.25) 0.00 0.00 0.00 0.33 0.33 0.33
-# 000101: disruption=0.33 (perfect=0.33) 0.00 0.00 0.00 0.50 0.00 0.50
-# 100101: disruption=0.33 (perfect=0.33) 0.33 0.00 0.00 0.33 0.00 0.33
-# 110101: disruption=0.25 (perfect=0.25) 0.25 0.25 0.00 0.25 0.00 0.25
-# 010101: disruption=0.25 (perfect=0.25) 0.00 0.33 0.00 0.33 0.00 0.33
-# 011101: disruption=0.25 (perfect=0.25) 0.00 0.25 0.25 0.25 0.00 0.25
-# 111101: disruption=0.20 (perfect=0.20) 0.20 0.20 0.20 0.20 0.00 0.20
-# 101101: disruption=0.20 (perfect=0.20) 0.25 0.00 0.25 0.25 0.00 0.25
-# 001101: disruption=0.25 (perfect=0.25) 0.00 0.00 0.33 0.33 0.00 0.33
-# 001001: disruption=0.33 (perfect=0.33) 0.00 0.00 0.50 0.00 0.00 0.50
-# 101001: disruption=0.33 (perfect=0.33) 0.33 0.00 0.33 0.00 0.00 0.33
-# 111001: disruption=0.25 (perfect=0.25) 0.25 0.25 0.25 0.00 0.00 0.25
-# 011001: disruption=0.25 (perfect=0.25) 0.00 0.33 0.34 0.00 0.00 0.33
-# 010001: disruption=0.34 (perfect=0.33) 0.00 0.50 0.00 0.00 0.00 0.50
-# 110001: disruption=0.33 (perfect=0.33) 0.33 0.33 0.00 0.00 0.00 0.34
-# 100001: disruption=0.33 (perfect=0.33) 0.50 0.00 0.00 0.00 0.00 0.50
-# 000001: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 0.00 0.00 1.00
-# 000000: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 0.00 0.00 0.00
-# 100000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-AT_CLEANUP
-
-AT_SETUP([active_backup bundle symmetric_l3 link selection])
-AT_KEYWORDS([bundle_action])
-AT_CHECK([[ovstest test-bundle 'symmetric_l3,60,active_backup,ofport,NXM_NX_REG0[],slaves:1,2,3,4,5,6']],
-  [0],
-[100000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-110000: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-010000: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-011000: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-111000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-101000: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-001000: disruption=1.00 (perfect=1.00) 0.00 0.00 1.00 0.00 0.00 0.00
-001100: disruption=0.00 (perfect=0.00) 0.00 0.00 1.00 0.00 0.00 0.00
-101100: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-111100: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-011100: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-010100: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-110100: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-100100: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-000100: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 1.00 0.00 0.00
-000110: disruption=0.00 (perfect=0.00) 0.00 0.00 0.00 1.00 0.00 0.00
-100110: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-110110: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-010110: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-011110: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-111110: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-101110: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-001110: disruption=1.00 (perfect=1.00) 0.00 0.00 1.00 0.00 0.00 0.00
-001010: disruption=0.00 (perfect=0.00) 0.00 0.00 1.00 0.00 0.00 0.00
-101010: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-111010: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-011010: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-010010: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-110010: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-100010: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-000010: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 0.00 1.00 0.00
-000011: disruption=0.00 (perfect=0.00) 0.00 0.00 0.00 0.00 1.00 0.00
-100011: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-110011: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-010011: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-011011: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-111011: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-101011: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-001011: disruption=1.00 (perfect=1.00) 0.00 0.00 1.00 0.00 0.00 0.00
-001111: disruption=0.00 (perfect=0.00) 0.00 0.00 1.00 0.00 0.00 0.00
-101111: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-111111: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-011111: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-010111: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-110111: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-100111: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-000111: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 1.00 0.00 0.00
-000101: disruption=0.00 (perfect=0.00) 0.00 0.00 0.00 1.00 0.00 0.00
-100101: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-110101: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-010101: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-011101: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-111101: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-101101: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-001101: disruption=1.00 (perfect=1.00) 0.00 0.00 1.00 0.00 0.00 0.00
-001001: disruption=0.00 (perfect=0.00) 0.00 0.00 1.00 0.00 0.00 0.00
-101001: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-111001: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-011001: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00
-010001: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00
-110001: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-100001: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00
-000001: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 0.00 0.00 1.00
-000000: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 0.00 0.00 0.00
-100000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00
-])
-AT_CLEANUP
-
-AT_SETUP([hrw bundle symmetric_l3 single link selection])
-AT_KEYWORDS([bundle_action])
-AT_CHECK([[ovstest test-bundle 'symmetric_l3,60,hrw,ofport,NXM_NX_REG0[],slaves:1']],
-  [0], [ignore])
-# 1: disruption=1.00 (perfect=1.00) 1.00
-# 0: disruption=1.00 (perfect=1.00) 0.00
-# 1: disruption=1.00 (perfect=1.00) 1.00
-AT_CLEANUP
-
-AT_SETUP([hrw bundle symmetric_l3 single link selection])
-AT_KEYWORDS([bundle_action])
-AT_CHECK([[ovstest test-bundle 'symmetric_l3,60,hrw,ofport,NXM_NX_REG0[],slaves:1']],
-  [0], [ignore])
-# 1: disruption=1.00 (perfect=1.00) 1.00
-# 0: disruption=1.00 (perfect=1.00) 0.00
-# 1: disruption=1.00 (perfect=1.00) 1.00
-AT_CLEANUP
-
-AT_SETUP([hrw bundle symmetric_l3 no link selection])
-AT_KEYWORDS([bundle_action])
-AT_CHECK([[ovstest test-bundle 'symmetric_l3,60,hrw,ofport,NXM_NX_REG0[],slaves:']],
-  [0], [ignore])
-AT_CLEANUP
-#: disruption=0.00 (perfect=0.00)
-#: disruption=0.00 (perfect=0.00)
-
-AT_SETUP([bundle symmetric_l3 action with many ports])
-AT_KEYWORDS([bundle_action])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 'actions=set_field:0x1->metadata,set_field:0x2->metadata,set_field:0x3->metadata,set_field:0x4->metadata,bundle(symmetric_l3,0,hrw,ofport,slaves:[[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40]])'])
-AT_CHECK([ovs-ofctl dump-flows br0 --no-stats], [0], [dnl
- actions=load:0x1->OXM_OF_METADATA[[]],load:0x2->OXM_OF_METADATA[[]],load:0x3->OXM_OF_METADATA[[]],load:0x4->OXM_OF_METADATA[[]],bundle(symmetric_l3,0,hrw,ofport,slaves:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40)
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/cfm.at b/tests/cfm.at
deleted file mode 100644
index 053be5d56..000000000
--- a/tests/cfm.at
+++ /dev/null
@@ -1,510 +0,0 @@
-AT_BANNER([cfm])
-
-m4_define([CFM_CHECK_EXTENDED], [
-AT_CHECK([ovs-appctl cfm/show $1 | sed -e '/next CCM tx:/d' | sed -e '/next fault check:/d' | sed -e  '/recv since check:/d'],[0],
-[dnl
----- $1 ----
-MPID $2: extended
-  average health: $3
-  opstate: $4
-  remote_opstate: $5
-  interval: $6
-Remote MPID $7
-  opstate: $8
-])
-])
-
-m4_define([CFM_CHECK_EXTENDED_FAULT], [
-AT_CHECK([ovs-appctl cfm/show $1 | sed -e '/next CCM tx:/d' | sed -e '/next fault check:/d' | sed -e  '/recv since check:/d'],[0],
-[dnl
----- $1 ----
-MPID $2: extended
-  fault: $3
-  average health: $4
-  opstate: $5
-  remote_opstate: $6
-  interval: $7
-])
-])
-
-m4_define([CFM_VSCTL_LIST_IFACE], [
-AT_CHECK([ovs-vsctl list interface $1 | sed -n '/$2 /p'],[0],
-[dnl
-$3
-])
-])
-
-m4_define([CFM_CHECK_DB], [
-CFM_VSCTL_LIST_IFACE([$1], [cfm_fault], [cfm_fault           : $2])
-CFM_VSCTL_LIST_IFACE([$1], [cfm_fault_status], [cfm_fault_status    : [[$3]]])
-CFM_VSCTL_LIST_IFACE([$1], [cfm_flap_count], [cfm_flap_count      : $4])
-CFM_VSCTL_LIST_IFACE([$1], [cfm_health], [cfm_health          : [[$5]]])
-CFM_VSCTL_LIST_IFACE([$1], [cfm_remote_mpids], [cfm_remote_mpids    : [[$6]]])
-CFM_VSCTL_LIST_IFACE([$1], [cfm_remote_opstate], [cfm_remote_opstate  : $7])
-])
-
-# These two tests check the update of cfm status at different scenarios.
-
-# Test cfm status update at startup and removal.
-AT_SETUP([cfm - check update ovsdb 1])
-OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=gre \
-                    options:remote_ip=1.2.3.4 -- \
-                    set Interface p0 other_config:cfm_interval=300 other_config:cfm_extended=true])
-
-ovs-appctl time/stop
-AT_CHECK([ovs-appctl ofproto/list-tunnels], [0], [dnl
-port 1: p0 (gre: ::->1.2.3.4, key=0, legacy_l2, dp port=1, ttl=64)
-])
-
-AT_CHECK([ovs-vsctl set Interface p0 cfm_mpid=1])
-# at beginning, since the first fault check timeout is not reached
-# cfm_fault should be false.
-for i in `seq 0 4`; do
-    ovs-appctl time/warp 100
-    CFM_CHECK_DB([p0], [false], [], [0], [], [], [up])
-done
-
-# advance clock to pass the fault check timeout and check cfm
-# status update in OVSDB.
-ovs-appctl time/warp 1500 100
-CFM_CHECK_DB([p0], [true], [recv], [1], [], [], [up])
-
-# remove the cfm on p0 and status should be all empty.
-AT_CHECK([ovs-vsctl remove int p0 cfm_mpid 1])
-ovs-appctl time/warp 500 100
-CFM_CHECK_DB([p0], [[[]]], [], [[[]]], [], [], [[[]]])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# Test cfm status update in normal case.
-AT_SETUP([cfm - check update ovsdb 2])
-#Create 2 bridges connected by patch ports and enable cfm
-OVS_VSWITCHD_START([add-br br1 -- \
-                    set bridge br1 datapath-type=dummy \
-                    other-config:hwaddr=aa:55:aa:56:00:00 -- \
-                    add-port br1 p1 -- set Interface p1 type=patch \
-                    options:peer=p0 -- \
-                    add-port br0 p0 -- set Interface p0 type=patch \
-                    options:peer=p1 -- \
-                    set Interface p0 other_config:cfm_interval=300 other_config:cfm_extended=true -- \
-                    set Interface p1 other_config:cfm_interval=300 other_config:cfm_extended=true])
-
-ovs-appctl time/stop
-
-AT_CHECK([ovs-vsctl set Interface p0 cfm_mpid=1])
-# check cfm status update in OVSDB.
-ovs-appctl time/warp 1500 100
-CFM_CHECK_DB([p0], [true], [recv], [1], [], [], [up])
-
-# turn cfm on p1 on, cfm status of p0 and p1 should all go up.
-AT_CHECK([ovs-vsctl set interface p1 cfm_mpid=2])
-ovs-appctl time/warp 1500 100
-CFM_CHECK_DB([p0], [false], [], [2], [], [2], [up])
-CFM_CHECK_DB([p1], [false], [], [0], [], [1], [up])
-
-# turn cfm on p1 off, cfm status of p0 should go down again.
-AT_CHECK([ovs-vsctl remove int p1 cfm_mpid 2])
-ovs-appctl time/warp 1500 100
-CFM_CHECK_DB([p0], [true], [recv], [3], [], [], [up])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# test cfm under demand mode.
-AT_SETUP([cfm - demand mode])
-#Create 2 bridges connected by patch ports and enable cfm
-OVS_VSWITCHD_START([add-br br1 -- \
-                    set bridge br1 datapath-type=dummy \
-                    other-config:hwaddr=aa:55:aa:56:00:00 -- \
-                    add-port br1 p1 -- set Interface p1 type=patch \
-                    options:peer=p0 -- \
-                    add-port br0 p0 -- set Interface p0 type=patch \
-                    options:peer=p1 -- \
-                    set Interface p0 cfm_mpid=1 other_config:cfm_interval=300 other_config:cfm_extended=true -- \
-                    set Interface p1 cfm_mpid=2 other_config:cfm_interval=300 other_config:cfm_extended=true ])
-
-ovs-appctl time/stop
-# wait for a while to stablize cfm.
-ovs-appctl time/warp 10100 100
-CFM_CHECK_EXTENDED([p0], [1], [100], [up], [up], [300ms], [2], [up])
-CFM_CHECK_EXTENDED([p1], [2], [100], [up], [up], [300ms], [1], [up])
-
-# turn on demand mode on one end.
-AT_CHECK([ovs-vsctl set interface p0 other_config:cfm_demand=true])
-
-# cfm should never go down.
-for i in `seq 0 100`
-do
-    ovs-appctl time/warp 100
-    CFM_CHECK_EXTENDED([p0], [1], [100], [up], [up], [300ms], [2], [up])
-    CFM_CHECK_EXTENDED([p1], [2], [100], [up], [up], [300ms], [1], [up])
-done
-
-# turn on demand mode on the other end.
-AT_CHECK([ovs-vsctl set interface p1 other_config:cfm_demand=true])
-for i in `seq 0 100`
-do
-    ovs-appctl time/warp 100
-    CFM_CHECK_EXTENDED([p0], [1], [100], [up], [up], [300ms], [2], [up])
-    CFM_CHECK_EXTENDED([p1], [2], [100], [up], [up], [300ms], [1], [up])
-done
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# test demand_rx_ccm under demand mode.
-AT_SETUP([cfm - demand_rx_ccm])
-#Create 2 bridges connected by patch ports and enable cfm
-OVS_VSWITCHD_START([add-br br1 -- \
-                    set bridge br1 datapath-type=dummy \
-                    other-config:hwaddr=aa:55:aa:56:00:00 -- \
-                    add-port br1 p1 -- set Interface p1 type=patch \
-                    options:peer=p0 ofport_request=2 -- \
-                    add-port br0 p0 -- set Interface p0 type=patch \
-                    options:peer=p1 ofport_request=1 -- \
-                    set Interface p0 cfm_mpid=1 other_config:cfm_interval=300 other_config:cfm_extended=true other_config:cfm_demand=true -- \
-                    set Interface p1 cfm_mpid=2 other_config:cfm_interval=300 other_config:cfm_extended=true other_config:cfm_demand=true])
-
-ovs-appctl time/stop
-# wait for a while to stablize cfm. (need a longer time, since in demand mode
-# the fault interval is (MAX(ccm_interval_ms, 500) * 3.5) ms)
-ovs-appctl time/warp 20100 100
-CFM_CHECK_EXTENDED([p0], [1], [100], [up], [up], [300ms], [2], [up])
-CFM_CHECK_EXTENDED([p1], [2], [100], [up], [up], [300ms], [1], [up])
-
-# turn off the cfm on p1.
-AT_CHECK([ovs-vsctl clear Interface p1 cfm_mpid])
-# cfm should never go down while receiving data packets.
-for i in `seq 0 200`
-do
-    ovs-appctl time/warp 100
-    AT_CHECK([ovs-ofctl packet-out br1 "in_port=3 packet=90e2ba01475000101856b2e80806000108000604000100101856b2e80202020300000000000002020202 actions=2"],
-             [0], [stdout], [])
-done
-CFM_CHECK_EXTENDED([p0], [1], [0], [up], [up], [300ms], [2], [up])
-
-# wait longer, since the demand_rx_ccm interval is 100 * 300 ms.
-# since there is no ccm received, the [recv] fault should be raised.
-for i in `seq 0 200`
-do
-    ovs-appctl time/warp 100
-    AT_CHECK([ovs-ofctl packet-out br1 "in_port=3 packet=90e2ba01475000101856b2e80806000108000604000100101856b2e80202020300000000000002020202 actions=2"],
-             [0], [stdout], [])
-done
-CFM_CHECK_EXTENDED_FAULT([p0], [1], [recv], [0], [up], [up], [300ms])
-
-# now turn on the cfm on p1 again,
-AT_CHECK([ovs-vsctl set Interface p1 cfm_mpid=2])
-# cfm should be up for both p0 and p1
-ovs-appctl time/warp 20100 100
-CFM_CHECK_EXTENDED([p0], [1], [100], [up], [up], [300ms], [2], [up])
-CFM_CHECK_EXTENDED([p1], [2], [100], [up], [up], [300ms], [1], [up])
-
-# now turn off the cfm on p1 again
-AT_CHECK([ovs-vsctl clear Interface p1 cfm_mpid])
-# since there is no ccm received, the [recv] fault should be raised.
-for i in `seq 0 400`
-do
-    ovs-appctl time/warp 100
-    AT_CHECK([ovs-ofctl packet-out br1 "in_port=3 packet=90e2ba01475000101856b2e80806000108000604000100101856b2e80202020300000000000002020202 actions=2"],
-             [0], [stdout], [])
-done
-CFM_CHECK_EXTENDED_FAULT([p0], [1], [recv], [0], [up], [up], [300ms])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# test cfm_flap_count.
-AT_SETUP([cfm - flap_count])
-#Create 2 bridges connected by patch ports and enable cfm
-OVS_VSWITCHD_START([add-br br1 -- \
-                    set bridge br1 datapath-type=dummy \
-                    other-config:hwaddr=aa:55:aa:56:00:00 -- \
-                    add-port br1 p1 -- set Interface p1 type=patch \
-                    options:peer=p0 -- \
-                    add-port br0 p0 -- set Interface p0 type=patch \
-                    options:peer=p1 -- \
-                    set Interface p0 cfm_mpid=1 other_config:cfm_interval=100 other_config:cfm_extended=true -- \
-                    set Interface p1 cfm_mpid=2 other_config:cfm_interval=100 other_config:cfm_extended=true])
-
-ovs-appctl time/stop
-
-# wait for a while to stablize cfm.
-ovs-appctl time/warp 10100 100
-CFM_CHECK_EXTENDED([p0], [1], [100], [up], [up], [100ms], [2], [up])
-CFM_CHECK_EXTENDED([p1], [2], [100], [up], [up], [100ms], [1], [up])
-
-# turn cfm on p1 off, should increment the cfm_flap_count on p0.
-AT_CHECK([ovs-vsctl remove interface p1 cfm_mpid 2])
-ovs-appctl time/warp 1100 100
-CFM_VSCTL_LIST_IFACE([p0], [cfm_flap_count], [cfm_flap_count      : 1])
-CFM_VSCTL_LIST_IFACE([p1], [cfm_flap_count], [cfm_flap_count      : [[]]])
-
-# turn cfm on p1 on again, should increment the cfm_flap_count on p0.
-AT_CHECK([ovs-vsctl set interface p1 cfm_mpid=2])
-ovs-appctl time/warp 1100 100
-CFM_VSCTL_LIST_IFACE([p0], [cfm_flap_count], [cfm_flap_count      : 2])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([cfm - fault_override])
-OVS_VSWITCHD_START([add-br br1 -- \
-                    set bridge br1 datapath-type=dummy \
-                    other-config:hwaddr=aa:55:aa:56:00:00 -- \
-                    add-port br1 p1 -- set Interface p1 type=patch \
-                    options:peer=p0 -- \
-                    add-port br0 p0 -- set Interface p0 type=patch \
-                    options:peer=p1 -- \
-                    set Interface p0 cfm_mpid=1 other_config:cfm_interval=100 other_config:cfm_extended=true -- \
-                    set Interface p1 cfm_mpid=2 other_config:cfm_interval=100 other_config:cfm_extended=true])
-
-ovs-appctl time/stop
-# wait for a while to stablize cfm.
-ovs-appctl time/warp 10100 100
-CFM_CHECK_EXTENDED([p0], [1], [100], [up], [up], [100ms], [2], [up])
-CFM_CHECK_EXTENDED([p1], [2], [100], [up], [up], [100ms], [1], [up])
-AT_CHECK([ovs-appctl cfm/show p1 | grep 'fault_override'], [1], [ignore])
-CFM_VSCTL_LIST_IFACE([p1], [cfm_fault_status], [cfm_fault_status    : [[]]])
-
-# set a fault and see that this is shown in the CFM module and the database
-AT_CHECK([ovs-appctl cfm/set-fault p1 true], [0], [OK
-])
-AT_CHECK([ovs-appctl time/warp 100], [0], [ignore])
-AT_CHECK([ovs-appctl cfm/show p1 | grep 'fault_override' | sed -e 's/MPID [[0-9]]*: extended //'], [0], [dnl
-fault_override
-])
-CFM_VSCTL_LIST_IFACE([p1], [cfm_fault_status], [cfm_fault_status    : [[override]]])
-
-# reset and see that it returned to normal
-AT_CHECK([ovs-appctl cfm/set-fault normal], [0], [OK
-])
-AT_CHECK([ovs-appctl time/warp 100], [0], [ignore])
-AT_CHECK([ovs-appctl cfm/show p1 | grep 'fault_override'], [1], [ignore])
-CFM_VSCTL_LIST_IFACE([p1], [cfm_fault_status], [cfm_fault_status    : [[]]])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([cfm - check that CFM works together with RSTP])
-# Create br0 with interfaces p1
-#    and br1 with interfaces p2
-# with p1 and p2 connected via unix domain socket
-OVS_VSWITCHD_START(
-  [set bridge br0 rstp_enable=true -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy -- \
-   set bridge br1 rstp_enable=true -- \
-])
-
-AT_CHECK([ovs-vsctl add-port br0 p0 -- \
-   set interface p0 type=dummy options:pstream=punix:$OVS_RUNDIR/p0.sock cfm_mpid=1 other_config:cfm_interval=300 other_config:cfm_extended=true -- \
-])
-
-AT_CHECK([ovs-vsctl add-port br1 p1 -- \
-   set interface p1 type=dummy options:stream=unix:$OVS_RUNDIR/p0.sock cfm_mpid=2 other_config:cfm_interval=300 other_config:cfm_extended=true -- \
-])
-
-ovs-appctl time/stop
-ovs-appctl time/warp 10100 100
-
-# Forwarding should be true
-CFM_CHECK_EXTENDED([p0], [1], [100], [up], [up], [300ms], [2], [up])
-CFM_CHECK_EXTENDED([p1], [2], [100], [up], [up], [300ms], [1], [up])
-
-# Disable cfm on p1, cfm should receive fault.
-AT_CHECK([ovs-vsctl set interface p1 other_config:cfm_extended=false])
-
-ovs-appctl time/warp 5000 100
-CFM_CHECK_EXTENDED_FAULT([p0], [1], [recv], [0], [up], [up], [300ms])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# test cfm liveness propagation - OF1.3.
-AT_SETUP([cfm - liveness propagation - OF1.3])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow13 -P standard monitor br0 --detach --no-chdir --pidfile])
-check_liveness () {
-    printf '\n\n--- check_liveness %d ---\n\n\n' $1
-    shift
-
-        echo >>expout "OFPT_PORT_STATUS (OF1.3): MOD: 1(p0): addr:
-     config:     0
-     state:      $1
-     speed: 0 Mbps now, 0 Mbps max"
-
-        AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/ *duration.*//
-s/addr:[0-9a-fA-F:]*/addr:/' < monitor.log|grep -A3 "MOD: 1(p0)"|grep -ve --]],
-      [0], [expout])
-}
-: > expout
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-# Set miss_send_len to 128, enabling port_status messages to our service connection.
-ovs-appctl -t ovs-ofctl ofctl/send 0409000c0123456700000080
-
-#Create 2 bridges connected by patch ports and enable cfm
-AT_CHECK([ovs-vsctl add-br br1 -- \
-          set bridge br1 datapath-type=dummy \
-          other-config:hwaddr=aa:55:aa:56:00:00 -- \
-          add-port br1 p1 -- set Interface p1 type=patch \
-          options:peer=p0 -- \
-          add-port br0 p0 -- set Interface p0 type=patch \
-          options:peer=p1])
-check_liveness 1 LIVE
-
-AT_CHECK([ovs-vsctl \
-          set Interface p0 cfm_mpid=1 other_config:cfm_interval=100 other_config:cfm_extended=true -- \
-          set Interface p1 cfm_mpid=2 other_config:cfm_interval=100 other_config:cfm_extended=true])
-ovs-appctl time/stop
-# wait for a while to stablize cfm.
-ovs-appctl time/warp 10100 100
-CFM_CHECK_EXTENDED([p0], [1], [100], [up], [up], [100ms], [2], [up])
-CFM_CHECK_EXTENDED([p1], [2], [100], [up], [up], [100ms], [1], [up])
-
-# turn cfm on p1 off, should increment the cfm_flap_count on p0.
-AT_CHECK([ovs-vsctl remove interface p1 cfm_mpid 2])
-ovs-appctl time/warp 1100 100
-CFM_VSCTL_LIST_IFACE([p0], [cfm_flap_count], [cfm_flap_count      : 1])
-CFM_VSCTL_LIST_IFACE([p1], [cfm_flap_count], [cfm_flap_count      : [[]]])
-check_liveness 2 0
-
-# turn cfm on p1 on again, should increment the cfm_flap_count on p0.
-AT_CHECK([ovs-vsctl set interface p1 cfm_mpid=2])
-ovs-appctl time/warp 1100 100
-check_liveness 3 LIVE
-
-CFM_VSCTL_LIST_IFACE([p0], [cfm_flap_count], [cfm_flap_count      : 2])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# test cfm liveness propagation - OF1.4.
-AT_SETUP([cfm - liveness propagation - OF1.4])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow14 -P standard monitor br0 --detach --no-chdir --pidfile])
-check_liveness () {
-    printf '\n\n--- check_liveness %d ---\n\n\n' $1
-    shift
-
-        echo >>expout "OFPT_PORT_STATUS (OF1.4): MOD: 1(p0): addr:
-     config:     0
-     state:      $1
-     speed: 0 Mbps now, 0 Mbps max"
-
-        AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/ *duration.*//
-s/addr:[0-9a-fA-F:]*/addr:/' < monitor.log|grep -A3 "MOD: 1(p0)"|grep -ve --]],
-      [0], [expout])
-}
-: > expout
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-# Set miss_send_len to 128, enabling port_status messages to our service connection.
-ovs-appctl -t ovs-ofctl ofctl/send 0509000c0123456700000080
-
-#Create 2 bridges connected by patch ports and enable cfm
-AT_CHECK([ovs-vsctl add-br br1 -- \
-          set bridge br1 datapath-type=dummy \
-          other-config:hwaddr=aa:55:aa:56:00:00 -- \
-          add-port br1 p1 -- set Interface p1 type=patch \
-          options:peer=p0 -- \
-          add-port br0 p0 -- set Interface p0 type=patch \
-          options:peer=p1])
-check_liveness 1 LIVE
-
-AT_CHECK([ovs-vsctl \
-          set Interface p0 cfm_mpid=1 other_config:cfm_interval=100 other_config:cfm_extended=true -- \
-          set Interface p1 cfm_mpid=2 other_config:cfm_interval=100 other_config:cfm_extended=true])
-ovs-appctl time/stop
-# wait for a while to stablize cfm.
-ovs-appctl time/warp 10100 100
-CFM_CHECK_EXTENDED([p0], [1], [100], [up], [up], [100ms], [2], [up])
-CFM_CHECK_EXTENDED([p1], [2], [100], [up], [up], [100ms], [1], [up])
-
-# turn cfm on p1 off, should increment the cfm_flap_count on p0.
-AT_CHECK([ovs-vsctl remove interface p1 cfm_mpid 2])
-ovs-appctl time/warp 1100 100
-CFM_VSCTL_LIST_IFACE([p0], [cfm_flap_count], [cfm_flap_count      : 1])
-CFM_VSCTL_LIST_IFACE([p1], [cfm_flap_count], [cfm_flap_count      : [[]]])
-check_liveness 2 0
-
-# turn cfm on p1 on again, should increment the cfm_flap_count on p0.
-AT_CHECK([ovs-vsctl set interface p1 cfm_mpid=2])
-ovs-appctl time/warp 1100 100
-check_liveness 3 LIVE
-
-CFM_VSCTL_LIST_IFACE([p0], [cfm_flap_count], [cfm_flap_count      : 2])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# test cfm liveness propagation - OF1.5.
-AT_SETUP([cfm - liveness propagation - OF1.5])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow15 -P standard monitor br0 --detach --no-chdir --pidfile])
-check_liveness () {
-    printf '\n\n--- check_liveness %d ---\n\n\n' $1
-    shift
-
-        echo >>expout "OFPT_PORT_STATUS (OF1.5): MOD: 1(p0): addr:
-     config:     0
-     state:      $1
-     speed: 0 Mbps now, 0 Mbps max"
-
-        AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/ *duration.*//
-s/addr:[0-9a-fA-F:]*/addr:/' < monitor.log|grep -A3 "MOD: 1(p0)"|grep -ve --]],
-      [0], [expout])
-}
-: > expout
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-# Set miss_send_len to 128, enabling port_status messages to our service connection.
-ovs-appctl -t ovs-ofctl ofctl/send 0609000c0123456700000080
-
-#Create 2 bridges connected by patch ports and enable cfm
-AT_CHECK([ovs-vsctl add-br br1 -- \
-          set bridge br1 datapath-type=dummy \
-          other-config:hwaddr=aa:55:aa:56:00:00 -- \
-          add-port br1 p1 -- set Interface p1 type=patch \
-          options:peer=p0 -- \
-          add-port br0 p0 -- set Interface p0 type=patch \
-          options:peer=p1])
-check_liveness 1 LIVE
-
-AT_CHECK([ovs-vsctl \
-          set Interface p0 cfm_mpid=1 other_config:cfm_interval=100 other_config:cfm_extended=true -- \
-          set Interface p1 cfm_mpid=2 other_config:cfm_interval=100 other_config:cfm_extended=true])
-ovs-appctl time/stop
-# wait for a while to stablize cfm.
-ovs-appctl time/warp 10100 100
-CFM_CHECK_EXTENDED([p0], [1], [100], [up], [up], [100ms], [2], [up])
-CFM_CHECK_EXTENDED([p1], [2], [100], [up], [up], [100ms], [1], [up])
-
-# turn cfm on p1 off, should increment the cfm_flap_count on p0.
-AT_CHECK([ovs-vsctl remove interface p1 cfm_mpid 2])
-ovs-appctl time/warp 1100 100
-CFM_VSCTL_LIST_IFACE([p0], [cfm_flap_count], [cfm_flap_count      : 1])
-CFM_VSCTL_LIST_IFACE([p1], [cfm_flap_count], [cfm_flap_count      : [[]]])
-check_liveness 2 0
-
-# turn cfm on p1 on again, should increment the cfm_flap_count on p0.
-AT_CHECK([ovs-vsctl set interface p1 cfm_mpid=2])
-ovs-appctl time/warp 1100 100
-check_liveness 3 LIVE
-
-CFM_VSCTL_LIST_IFACE([p0], [cfm_flap_count], [cfm_flap_count      : 2])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/check-structs.at b/tests/check-structs.at
deleted file mode 100644
index 4163c30d6..000000000
--- a/tests/check-structs.at
+++ /dev/null
@@ -1,56 +0,0 @@
-AT_BANNER([struct alignment checker unit tests])
-
-m4_define([check_structs], [$top_srcdir/build-aux/check-structs])
-m4_define([RUN_STRUCT_CHECKER], 
-  [AT_KEYWORDS([check-structs])
-   AT_SKIP_IF([test $HAVE_PYTHON = no])
-   AT_DATA([test.h], [$1
-])
-   AT_CHECK_UNQUOTED([$PYTHON check_structs test.h], [$2], [$3], [$4])])
-
-AT_SETUP([check struct tail padding])
-RUN_STRUCT_CHECKER(
-[struct xyz {
-    ovs_be16 x;
-};], 
-  [1], [], 
-  [test.h:3: warning: struct xyz needs 2 bytes of tail padding
-])
-AT_CLEANUP
-
-AT_SETUP([check struct internal alignment])
-RUN_STRUCT_CHECKER(
-[struct xyzzy {
-    ovs_be16 x;
-    ovs_be32 y;
-};], 
-  [1], [], 
-  [test.h:3: warning: struct xyzzy member y is 2 bytes short of 4-byte alignment
-])
-AT_CLEANUP
-
-AT_SETUP([check struct declared size])
-RUN_STRUCT_CHECKER(
-[struct wibble {
-    ovs_be64 z;
-};
-OFP_ASSERT(sizeof(struct wibble) == 12);
-], 
-  [1], [], 
-  [test.h:4: warning: struct wibble is 8 bytes long but declared as 12
-])
-AT_CLEANUP
-
-AT_SETUP([check wrong struct's declared size])
-RUN_STRUCT_CHECKER(
-[struct moo {
-    ovs_be64 bar;
-};
-OFP_ASSERT(sizeof(struct moo) == 8);
-struct wibble {
-    ovs_be64 z;
-};
-OFP_ASSERT(sizeof(struct moo) == 8);
-], [1], [], [test.h:8: warning: checking size of struct moo but struct wibble was most recently defined
-])
-AT_CLEANUP
diff --git a/tests/checkpatch.at b/tests/checkpatch.at
deleted file mode 100755
index 07f4b137c..000000000
--- a/tests/checkpatch.at
+++ /dev/null
@@ -1,330 +0,0 @@
-AT_BANNER([checkpatch])
-
-OVS_START_SHELL_HELPERS
-# try_checkpatch PATCH [ERRORS]
-#
-# Runs checkpatch under Python 2 and Python 3, if installed, on the given
-# PATCH, expecting the specified set of ERRORS (and warnings).
-try_checkpatch() {
-    AT_SKIP_IF([test $HAVE_PYTHON2 = no && test $HAVE_PYTHON3 = no])
-    # Take the patch to test from $1.  Remove an initial four-space indent
-    # from it and, if it is just headers with no body, add a null body.
-    echo "$1" | sed 's/^    //' > test.patch
-    if grep '---' expout >/dev/null 2>&1; then :
-    else
-        printf '\n---\n' >> test.patch
-    fi
-
-    # Take expected output from $2.
-    if test -n "$2"; then
-        echo "$2" | sed 's/^    //' > expout
-    else
-        : > expout
-    fi
-
-    try_checkpatch__ "$HAVE_PYTHON2" "$PYTHON2"
-    try_checkpatch__ "$HAVE_PYTHON3" "$PYTHON3"
-}
-try_checkpatch__() {
-    if test $1 = no; then
-        :
-    elif test -s expout; then
-        AT_CHECK([$2 $top_srcdir/utilities/checkpatch.py -q test.patch],
-                 [1], [stdout])
-        AT_CHECK([sed '/^Lines checked:/,$d' stdout], [0], [expout])
-    else
-        AT_CHECK([$2 $top_srcdir/utilities/checkpatch.py -q test.patch])
-    fi
-}
-OVS_END_SHELL_HELPERS
-
-AT_SETUP([checkpatch - sign-offs])
-
-# Sign-off for single author who is also the committer.
-try_checkpatch \
-   "Author: A
-    Commit: A
-
-    Signed-off-by: A"
-try_checkpatch \
-   "Author: A
-    Commit: A" \
-   "ERROR: Author A needs to sign off."
-
-# Single author but somehow the mailing list is the author.
-try_checkpatch \
-   "Author: Foo Bar via dev <ovs-dev at openvswitch.org>
-    Commit: A
-
-    Signed-off-by: A" \
-   "ERROR: Author should not be mailing list."
-
-# Sign-off for single author and different committer.
-try_checkpatch \
-   "Author: A
-    Commit: B
-
-    Signed-off-by: A
-    Signed-off-by: B"
-try_checkpatch \
-   "Author: A
-    Commit: B" \
-   "ERROR: Author A needs to sign off.
-    ERROR: Committer B needs to sign off."
-
-# Sign-off for multiple authors with one author also the committer.
-try_checkpatch \
-   "Author: A
-    Commit: A
-
-    Signed-off-by: A
-    Co-authored-by: B
-    Signed-off-by: B"
-try_checkpatch \
-   "Author: A
-    Commit: A
-
-    Co-authored-by: B
-    Signed-off-by: B" \
-   "ERROR: Author A needs to sign off."
-try_checkpatch \
-   "Author: A
-    Commit: A
-
-    Signed-off-by: A
-    Co-authored-by: B" \
-   "ERROR: Co-author B needs to sign off."
-try_checkpatch \
-   "Author: A
-    Commit: A
-
-    Co-authored-by: B" \
-   "ERROR: Author A needs to sign off.
-    ERROR: Co-author B needs to sign off."
-
-# Sign-off for multiple authors and separate committer.
-try_checkpatch \
-   "Author: A
-    Commit: C
-
-    Signed-off-by: A
-    Co-authored-by: B
-    Signed-off-by: B
-    Signed-off-by: C"
-try_checkpatch \
-   "Author: A
-    Commit: C
-
-    Signed-off-by: A
-    Co-authored-by: B
-    Signed-off-by: B" \
-   "ERROR: Committer C needs to sign off."
-
-# Extra sign-offs:
-#
-#    - If we know the committer, one extra sign-off raises a warning.
-#
-#    - If we do not know the committer, two extra sign-offs raise a warning.
-try_checkpatch \
-   "Author: A
-    Commit: C
-
-    Signed-off-by: A
-    Co-authored-by: B
-    Signed-off-by: B
-    Signed-off-by: C
-    Signed-off-by: D" \
-   "WARNING: Unexpected sign-offs from developers who are not authors or co-authors or committers: D"
-try_checkpatch \
-   "Author: A
-
-    Signed-off-by: A
-    Co-authored-by: B
-    Signed-off-by: B
-    Signed-off-by: C"
-try_checkpatch \
-   "Author: A
-
-    Signed-off-by: A
-    Co-authored-by: B
-    Signed-off-by: B
-    Signed-off-by: C
-    Signed-off-by: D" \
-   "WARNING: Unexpected sign-offs from developers who are not authors or co-authors or committers: C, D"
-
-# Missing committer is OK, missing author is an error.
-try_checkpatch \
-   "Author: A
-
-    Signed-off-by: A"
-try_checkpatch \
-   "Commit: A
-
-    Signed-off-by: A" \
-   "ERROR: Patch lacks author."
-
-AT_CLEANUP
-
-
-m4_define([COMMON_PATCH_HEADER], [dnl
-    Author: A
-
-    Signed-off-by: A
-    ---
-    diff --git a/A.c b/A.c
-    index 0000000..1111111 100644
-    --- a/A.c
-    +++ b/A.c
-    @@ -1,1 +1,1 @@])
-
-
-AT_SETUP([checkpatch - parenthesized constructs])
-for ctr in 'if' 'while' 'switch'; do
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     $ctr (first_run) {
-    "
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     $ctr ( first_run) {
-    " \
-    "ERROR: Improper whitespace around control block
-    #8 FILE: A.c:1:
-         $ctr ( first_run) {
-"
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     $ctr (first_run ) {
-    " \
-    "ERROR: Inappropriate bracing around statement
-    #8 FILE: A.c:1:
-         $ctr (first_run ) {
-"
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     $ctr (first_run)
-    " \
-    "ERROR: Inappropriate bracing around statement
-    #8 FILE: A.c:1:
-         $ctr (first_run)
-"
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     $ctr(first_run)
-    " \
-    "ERROR: Improper whitespace around control block
-    #8 FILE: A.c:1:
-         $ctr(first_run)
-"
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     $ctr (first_run) { /* foo */
-    "
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     $ctr (first_run) { \\
-    "
-done
-AT_CLEANUP
-
-
-AT_SETUP([checkpatch - parenthesized constructs - for])
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     for (init; condition; increment) {
-    "
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     for ( init; condition; increment) {
-    " \
-    "ERROR: Improper whitespace around control block
-    #8 FILE: A.c:1:
-         for ( init; condition; increment) {
-"
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     for (init; condition; increment ) {
-    " \
-    "ERROR: Inappropriate bracing around statement
-    #8 FILE: A.c:1:
-         for (init; condition; increment ) {
-"
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     for (init; condition; increment)
-    " \
-    "ERROR: Inappropriate bracing around statement
-    #8 FILE: A.c:1:
-         for (init; condition; increment)
-"
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     for(init; condition; increment)
-    " \
-    "ERROR: Improper whitespace around control block
-    #8 FILE: A.c:1:
-         for(init; condition; increment)
-"
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     for (init; condition; increment) { /* foo */
-    "
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     for (init; condition; increment) { \\
-    "
-
-AT_CLEANUP
-
-
-AT_SETUP([checkpatch - comments])
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     a = 1; /* C style comment. */
-    "
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     /* http://URL/inside/the/comment.html */
-    "
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     a = 1; // C99 style comment.
-    " \
-    "ERROR: C99 style comment
-    #8 FILE: A.c:1:
-         a = 1; // C99 style comment.
-"
-
-AT_CLEANUP
-
-AT_SETUP([checkpatch - whitespace around operator])
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     if (--mcs->n_refs == 0) {
-    "
-
-try_checkpatch \
-   "COMMON_PATCH_HEADER
-    +     if (--mcs->n_refs==0) {
-    " \
-    "WARNING: Line lacks whitespace around operator
-    WARNING: Line lacks whitespace around operator
-    #8 FILE: A.c:1:
-         if (--mcs->n_refs==0) {
-"
-
-AT_CLEANUP
diff --git a/tests/classifier.at b/tests/classifier.at
deleted file mode 100644
index 86f872db6..000000000
--- a/tests/classifier.at
+++ /dev/null
@@ -1,308 +0,0 @@
-AT_BANNER([flow classifier unit tests])
-m4_foreach(
-  [testname],
-  [[empty],
-   [destroy-null],
-   [single-rule],
-   [rule-replacement],
-   [many-rules-in-one-list],
-   [versioned many-rules-in-one-list],
-   [many-rules-in-one-table],
-   [versioned many-rules-in-one-table],
-   [many-rules-in-two-tables],
-   [versioned many-rules-in-two-tables],
-   [many-rules-in-five-tables],
-   [versioned many-rules-in-five-tables]],
-  [AT_SETUP([flow classifier - m4_bpatsubst(testname, [-], [ ])])
-   AT_CHECK([ovstest test-classifier m4_bpatsubst(testname, [versioned], [--versioned])], [0], [], [])
-   AT_CLEANUP])])
-
-AT_BANNER([miniflow unit tests])
-m4_foreach(
-  [testname],
-  [[miniflow],
-   [minimask_has_extra],
-   [minimask_combine]],
-  [AT_SETUP([miniflow - m4_bpatsubst(testname, [-], [ ])])
-   AT_CHECK([ovstest test-classifier testname], [0], [], [])
-   AT_CLEANUP])])
-
-AT_BANNER([flow classifier lookup segmentation])
-AT_SETUP([flow classifier - lookup segmentation])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 priority=16,tcp,nw_dst=10.1.0.0/255.255.0.0,action=output(3)
-table=0 in_port=1 priority=32,tcp,nw_dst=10.1.2.15,action=output(2)
-table=0 in_port=1 priority=33,tcp,nw_dst=10.1.2.15,tp_dst=80,action=drop
-table=0 in_port=1 priority=0,ip,action=drop
-table=0 in_port=2 priority=16,tcp,nw_dst=192.168.0.0/255.255.0.0,action=output(1)
-table=0 in_port=2 priority=0,ip,action=drop
-table=0 in_port=3 priority=16,tcp,nw_src=10.1.0.0/255.255.0.0,action=output(1)
-table=0 in_port=3 priority=0,ip,action=drop
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=2,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=80'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,tcp,in_port=2,nw_dst=192.168.0.0/16,nw_frag=no
-Datapath actions: 1
-])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=11.1.2.15,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=80'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,in_port=1,nw_dst=11.0.0.0/8,nw_frag=no
-Datapath actions: drop
-])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=10.1.2.15,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=80'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,tcp,in_port=1,nw_dst=10.1.2.15,nw_frag=no,tp_dst=80
-Datapath actions: drop
-])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=10.1.2.15,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=79'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,tcp,in_port=1,nw_dst=10.1.2.15,nw_frag=no,tp_dst=0x40/0xfff0
-Datapath actions: 2
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_BANNER([flow classifier prefix lookup])
-AT_SETUP([flow classifier - prefix lookup])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-AT_CHECK([ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- --id=@N1 create Flow_Table name=t0], [0], [ignore], [])
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 priority=16,tcp,nw_dst=10.1.0.0/255.255.0.0,action=output(3)
-table=0 in_port=1 priority=32,tcp,nw_dst=10.1.2.0/255.255.255.0,tp_src=79,action=output(2)
-table=0 in_port=1 priority=33,tcp,nw_dst=10.1.2.15,tp_dst=80,action=drop
-table=0 in_port=1 priority=33,tcp,nw_dst=10.1.2.15,tp_dst=8080,action=output(2)
-table=0 in_port=1 priority=33,tcp,nw_dst=10.1.2.15,tp_dst=192,action=output(2)
-table=0 in_port=1 priority=0,ip,action=drop
-table=0 in_port=2 priority=16,tcp,nw_dst=192.168.0.0/255.255.0.0,action=output(1)
-table=0 in_port=2 priority=0,ip,action=drop
-table=0 in_port=3 priority=16,tcp,nw_src=10.1.0.0/255.255.0.0,action=output(1)
-table=0 in_port=3 priority=0,ip,action=drop
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-# nw_dst and nw_src should be on by default
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=80'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,tcp,in_port=1,nw_dst=192.168.0.0/16,nw_frag=no
-Datapath actions: drop
-])
-
-AT_CHECK([ovs-vsctl set Flow_Table t0 prefixes=ipv6_label], [0])
-AT_CHECK([ovs-vsctl set Flow_Table t0 prefixes=nw_dst,nw_src,tun_dst,tun_src], [1], [],
-[ovs-vsctl: nw_dst,nw_src,tun_dst,tun_src: 4 value(s) specified but the maximum number is 3
-])
-AT_CHECK([ovs-vsctl set Flow_Table t0 prefixes=nw_dst,nw_dst], [1], [],
-[ovs-vsctl: nw_dst,nw_dst: set contains duplicate value
-])
-
-AT_CHECK([ovs-vsctl set Flow_Table t0 prefixes=nw_dst], [0])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=80'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,tcp,in_port=1,nw_dst=192.168.0.0/16,nw_frag=no
-Datapath actions: drop
-])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=2,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=80'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,tcp,in_port=2,nw_dst=192.168.0.0/16,nw_frag=no
-Datapath actions: 1
-])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=10.1.2.15,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=80'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,tcp,in_port=1,nw_dst=10.1.2.15,nw_frag=no,tp_dst=80
-Datapath actions: drop
-])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=10.1.2.15,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=79'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,tcp,in_port=1,nw_dst=10.1.2.15,nw_frag=no,tp_src=0x0/0xffc0,tp_dst=0x40/0xfff0
-Datapath actions: 3
-])
-AT_CHECK([ovs-vsctl set Flow_Table t0 prefixes=none], [0])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=10.1.3.16,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=79'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,tcp,in_port=1,nw_dst=10.1.3.16,nw_frag=no
-Datapath actions: 3
-])
-OVS_VSWITCHD_STOP(["/'prefixes' with incompatible field: ipv6_label/d"])
-AT_CLEANUP
-
-AT_BANNER([conjunctive match])
-
-AT_SETUP([single conjunctive match])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3 4 5
-AT_DATA([flows.txt], [dnl
-conj_id=1,actions=3
-priority=100,ip,ip_src=10.0.0.1,actions=conjunction(1,1/2)
-priority=100,ip,ip_src=10.0.0.4,actions=conjunction(1,1/2)
-priority=100,ip,ip_src=10.0.0.6,actions=conjunction(1,1/2)
-priority=100,ip,ip_src=10.0.0.7,actions=conjunction(1,1/2)
-priority=100,ip,ip_dst=10.0.0.2,actions=conjunction(1,2/2)
-priority=100,ip,ip_dst=10.0.0.5,actions=conjunction(1,2/2)
-priority=100,ip,ip_dst=10.0.0.7,actions=conjunction(1,2/2)
-priority=100,ip,ip_dst=10.0.0.8,actions=conjunction(1,2/2)
-priority=100,ip,ip_src=10.0.0.1,ip_dst=10.0.0.4,actions=4
-priority=100,ip,ip_src=10.0.0.3,ip_dst=10.0.0.5,actions=5
-
-priority=0 actions=2
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-for src in 0 1 2 3 4 5 6 7; do
-    for dst in 0 1 2 3 4 5 6 7; do
-        if test $src$dst = 14; then
-            out=4
-        elif test $src$dst = 35; then
-            out=5
-        else
-            out=2
-            case $src in [[1467]]) case $dst in [[2578]]) out=3 ;; esac ;; esac
-        fi
-        AT_CHECK([ovs-appctl ofproto/trace br0 "in_port=1,dl_type=0x0800,nw_src=10.0.0.$src,nw_dst=10.0.0.$dst"], [0], [stdout])
-        AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: $out
-])
-    done
-done
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([multiple conjunctive match])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3 4 5
-AT_DATA([flows.txt], [dnl
-conj_id=1,actions=1
-conj_id=2,actions=2
-conj_id=3,actions=3
-
-priority=5,ip,ip_src=20.0.0.0/8,actions=conjunction(1,1/2),conjunction(2,1/2)
-priority=5,ip,ip_src=10.1.0.0/16,actions=conjunction(1,1/2),conjunction(3,2/3)
-priority=5,ip,ip_src=10.2.0.0/16,actions=conjunction(1,1/2),conjunction(2,1/2)
-priority=5,ip,ip_src=10.1.3.0/24,actions=conjunction(1,1/2),conjunction(3,2/3)
-priority=5,ip,ip_src=10.1.4.5/32,actions=conjunction(1,1/2),conjunction(2,1/2)
-
-priority=5,ip,ip_dst=20.0.0.0/8,actions=conjunction(1,2/2)
-priority=5,ip,ip_dst=10.1.0.0/16,actions=conjunction(1,2/2)
-priority=5,ip,ip_dst=10.2.0.0/16,actions=conjunction(1,2/2)
-priority=5,ip,ip_dst=10.1.3.0/24,actions=conjunction(1,2/2)
-priority=5,ip,ip_dst=10.1.4.5/32,actions=conjunction(1,2/2)
-priority=5,ip,ip_dst=30.0.0.0/8,actions=conjunction(2,2/2),conjunction(3,1/3)
-priority=5,ip,ip_dst=40.5.0.0/16,actions=conjunction(2,2/2),conjunction(3,1/3)
-
-priority=5,tcp,tcp_dst=80,actions=conjunction(3,3/3)
-priority=5,tcp,tcp_dst=443,actions=conjunction(3,3/3)
-
-priority=5,tcp,tcp_src=80,actions=conjunction(3,3/3)
-priority=5,tcp,tcp_src=443,actions=conjunction(3,3/3)
-
-priority=0,actions=4
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-for a0 in \
-    '1 20.0.0.1' \
-    '2 10.1.0.1' \
-    '3 10.2.0.1' \
-    '4 10.1.3.1' \
-    '5 10.1.4.5' \
-    '6 1.2.3.4'
-do
-    for b0 in \
-        '1 20.0.0.1' \
-        '2 10.1.0.1' \
-        '3 10.2.0.1' \
-        '4 10.1.3.1' \
-        '5 10.1.4.5' \
-        '6 30.0.0.1' \
-        '7 40.5.0.1' \
-        '8 1.2.3.4'
-    do
-        for c0 in '1 80' '2 443' '3 8080'; do
-            for d0 in '1 80' '2 443' '3 8080'; do
-                set $a0; a=$1 ip_src=$2
-                set $b0; b=$1 ip_dst=$2
-                set $c0; c=$1 tcp_src=$2
-                set $d0; d=$1 tcp_dst=$2
-                case $a$b$c$d in
-                    [[12345]][[12345]]??) out=1 ;;
-                    [[135]][[67]]??) out=2 ;;
-                    [[24]][[67]][[12]]? | [[24]][[67]]?[[12]]) out=3 ;;
-                    *) out=4
-                esac
-                AT_CHECK([ovs-appctl ofproto/trace br0 "in_port=5,dl_type=0x0800,nw_proto=6,nw_src=$ip_src,nw_dst=$ip_dst,tcp_src=$tcp_src,tcp_dst=$tcp_dst"], [0], [stdout])
-                AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: $out
-])
-            done
-        done
-    done
-done
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# In conjunctive match, we can find some soft matches that turn out not to be a
-# real match.  Usually, that's the end of the road--there is no real match.
-# But if there is a flow identical to one of the flows that was a soft match,
-# except with a lower priority, then we have to try again with that lower
-# priority flow.  This test checks this special case.
-AT_SETUP([conjunctive match priority fallback])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3 4 5 6 7
-AT_DATA([flows.txt], [dnl
-conj_id=1,actions=1
-conj_id=3,actions=3
-
-priority=5,ip,ip_src=10.0.0.1,actions=conjunction(1,1/2)
-priority=5,ip,ip_src=10.0.0.2,actions=conjunction(1,1/2)
-priority=5,ip,ip_dst=10.0.0.1,actions=conjunction(1,2/2)
-priority=5,ip,ip_dst=10.0.0.2,actions=conjunction(1,2/2)
-priority=5,ip,ip_dst=10.0.0.3,actions=conjunction(1,2/2)
-
-priority=4,ip,ip_src=10.0.0.3,ip_dst=10.0.0.2,actions=2
-
-priority=3,ip,ip_src=10.0.0.1,actions=conjunction(3,1/2)
-priority=3,ip,ip_src=10.0.0.3,actions=conjunction(3,1/2)
-priority=3,ip,ip_dst=10.0.0.2,actions=conjunction(3,2/2)
-priority=3,ip,ip_dst=10.0.0.3,actions=conjunction(3,2/2)
-priority=3,ip,ip_dst=10.0.0.4,actions=conjunction(3,2/2)
-
-priority=2,ip,ip_dst=10.0.0.1,actions=4
-
-priority=1,ip,ip_src=10.0.0.1,ip_dst=10.0.0.5,actions=5
-
-priority=0,actions=6
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-for src in 0 1 2 3; do
-    for dst in 0 1 2 3 4 5; do
-        case $src$dst in
-            [[12]][[123]]) out=1 ;;
-            32) out=2 ;;
-            [[13]][[234]]) out=3 ;;
-            ?1) out=4 ;;
-            15) out=5 ;;
-            *) out=6
-        esac
-        AT_CHECK([ovs-appctl ofproto/trace br0 "in_port=7,dl_type=0x0800,nw_src=10.0.0.$src,nw_dst=10.0.0.$dst"], [0], [stdout])
-        AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: $out
-])
-    done
-done
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conjunctive match and other actions])
-OVS_VSWITCHD_START
-# It's OK to use "conjunction" actions with "note" actions.
-AT_CHECK([ovs-ofctl add-flow br0 'actions=conjunction(3,1/2),note:41.42.43.44.45.46'])
-AT_CHECK([ovs-ofctl add-flow br0 'actions=note:41.42.43.44.45.46,conjunction(3,1/2)'])
-# It's not OK to use "conjunction" actions with other types of actions.
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' add-flow br0 'actions=output:1,conjunction(3,1/2)'], [1], [], [dnl
-ofp_actions|WARN|"conjunction" actions may be used along with "note" but not any other kind of action (such as the "output" action used here)
-ovs-ofctl: Incorrect instruction ordering
-])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' add-flow br0 'actions=conjunction(3,1/2),output:1'], [1], [], [dnl
-ofp_actions|WARN|"conjunction" actions may be used along with "note" but not any other kind of action (such as the "output" action used here)
-ovs-ofctl: Incorrect instruction ordering
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/completion.at b/tests/completion.at
deleted file mode 100644
index 00e3a46b8..000000000
--- a/tests/completion.at
+++ /dev/null
@@ -1,794 +0,0 @@
-AT_BANNER([appctl bashcomp unit tests])
-
-m4_define([GET_FORMAT], [
-echo "$@" | grep -A 1 -- "Command format" | tail -n+2
-])
-
-m4_define([GET_EXPAN], [
-echo "$@" | grep -- "available completions for keyword" \
-     | sed -e 's/^[ ]*//g;s/[ ]*$//g'
-])
-
-m4_define([GET_AVAIL], [
-echo "$@" | sed -e '1,/Available/d' | tail -n+2
-])
-
-m4_define([GET_COMP_STR], [
-echo "available completions for keyword \"$1\": $2" \
-     | sed -e 's/[ ]*$//g'
-])
-
-AT_SETUP([appctl-bashcomp - basic verification])
-AT_SKIP_IF([test -z ${BASH_VERSION+x}])
-OVS_VSWITCHD_START
-
-# complete ovs-appctl [TAB]
-# complete ovs-dpctl  [TAB]
-# complete ovs-ofctl  [TAB]
-# complete ovsdb-tool [TAB]
-m4_foreach(
-[test_command],
-[[ovs-appctl],
-[ovs-dpctl],
-[ovs-ofctl],
-[ovsdb-tool]],
-[
-INPUT="$(bash ovs-appctl-bashcomp.bash debug test_command TAB 2>&1)"
-MATCH="$(test_command --option | sort | sed -n '/^--.*/p' | cut -d '=' -f1)
-$(test_command list-commands | tail -n +2 | cut -c3- | cut -d ' ' -f1 | sort)"
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})],
-[0], [dnl
-${MATCH}
-])])
-
-
-# complete ovs-appctl --tar[TAB]
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl --tar 2>&1)"
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})],
-[0], [dnl
---target
-])
-
-
-# complete ovs-appctl --target [TAB]
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl --target TAB 2>&1)"
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})],
-[0], [dnl
-ovs-ofctl
-ovs-vswitchd
-ovsdb-server
-])
-
-
-# complete ovs-appctl --target ovs-vswitchd [TAB]
-# complete ovs-appctl --target ovsdb-server [TAB]
-# complete ovs-appctl --target ovs-ofctl    [TAB]
-AT_CHECK([ovs-ofctl monitor br0 --detach --no-chdir --pidfile])
-m4_foreach(
-[target_daemon],
-[[ovs-vswitchd],
-[ovsdb-server],
-[ovs-ofctl]],
-[
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl --target target_daemon TAB 2>&1)"
-MATCH="$(ovs-appctl --option | sort | sed -n '/^--.*/p' | cut -d '=' -f1)
-$(ovs-appctl --target target_daemon list-commands | tail -n +2 | cut -c3- | cut -d ' ' -f1 | sort)"
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})],
-[0], [dnl
-${MATCH}
-])])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-# complex completion check - bfd/set-forwarding
-# bfd/set-forwarding [interface] normal|false|true
-# test expansion of 'interface'
-AT_SETUP([appctl-bashcomp - complex completion check 1])
-AT_SKIP_IF([test -z ${BASH_VERSION+x}])
-OVS_VSWITCHD_START(add-port br0 p0 -- set Interface p0 type=dummy)
-
-# check the top level completion.
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl bfd/set-forwarding TAB 2>&1)"
-MATCH="$(GET_COMP_STR([normal], [])
-GET_COMP_STR([false], [])
-GET_COMP_STR([true], [])
-GET_COMP_STR([interface], [p0]))"
-AT_CHECK_UNQUOTED([GET_EXPAN(${INPUT})],
-[0], [dnl
-${MATCH}
-])
-# check the available completions.
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})],
-[0], [dnl
-p0
-])
-
-
-# set argument to 'true', there should be no more completions.
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl bfd/set-forwarding true TAB 2>&1)"
-AT_CHECK_UNQUOTED([echo "$INPUT" | sed -e '/./,$!d'],
-[0], [dnl
-])
-
-
-# set argument to 'p1', there should still be the completion for booleans.
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl bfd/set-forwarding p1 TAB 2>&1)"
-MATCH="$(GET_COMP_STR([normal], [])
-GET_COMP_STR([false], [])
-GET_COMP_STR([true], []))"
-AT_CHECK_UNQUOTED([GET_EXPAN(${INPUT})],
-[0], [dnl
-${MATCH}
-])
-# check the available completions.
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})], [0])
-
-
-# set argument to 'p1 false', there should still no more completions.
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl bfd/set-forwarding p1 false TAB 2>&1)"
-AT_CHECK_UNQUOTED([echo "$INPUT" | sed -e '/./,$!d'],
-[0], [dnl
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-# complex completion check - lacp/show
-# lacp/show [port]
-# test expansion on 'port'
-AT_SETUP([appctl-bashcomp - complex completion check 2])
-AT_SKIP_IF([test -z ${BASH_VERSION+x}])
-OVS_VSWITCHD_START(add-port br0 p0 -- set Interface p0 type=dummy \
-                   -- add-port br0 p1 -- set Interface p1 type=dummy)
-
-# check the top level completion.
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl lacp/show TAB 2>&1)"
-MATCH="$(GET_COMP_STR([port], [br0 p0 p1]))"
-AT_CHECK_UNQUOTED([GET_EXPAN(${INPUT})],
-[0], [dnl
-${MATCH}
-])
-# check the available completions.
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})],
-[0], [dnl
-br0
-p0
-p1
-])
-
-
-# set argument to 'p1', there should be no more completions.
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl lacp/show p1 TAB 2>&1)"
-AT_CHECK_UNQUOTED([echo "$INPUT" | sed -e '/./,$!d'],
-[0], [dnl
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-# complex completion check - ofproto/trace
-# ofproto/trace {[dp_name] odp_flow | bridge br_flow} [OPTIONS] [-generate|packet]
-# test expansion on 'dp|dp_name' and 'bridge'
-AT_SETUP([appctl-bashcomp - complex completion check 3])
-AT_SKIP_IF([test -z ${BASH_VERSION+x}])
-OVS_VSWITCHD_START(add-port br0 p0 -- set Interface p0 type=dummy \
-                   -- add-port br0 p1 -- set Interface p1 type=dummy)
-
-# check the top level completion.
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl ofproto/trace TAB 2>&1)"
-MATCH="$(GET_COMP_STR([bridge], [br0])
-GET_COMP_STR([odp_flow], [])
-GET_COMP_STR([dp_name], [ovs-dummy]))"
-AT_CHECK_UNQUOTED([GET_EXPAN(${INPUT})],
-[0], [dnl
-${MATCH}
-])
-# check the available completions.
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})],
-[0], [dnl
-br0
-ovs-dummy
-])
-
-
-# set argument to 'ovs-dummy', should go to the dp-name path.
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl ofproto/trace ovs-dummy TAB 2>&1)"
-MATCH="$(GET_COMP_STR([odp_flow], []))"
-AT_CHECK_UNQUOTED([GET_EXPAN(${INPUT})],
-[0], [dnl
-${MATCH}
-])
-# check the available completions.
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})], [0])
-
-
-# set odp_flow to some random string, should go to the next level.
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl ofproto/trace ovs-dummy "in_port(123),mac(),ip,tcp" TAB 2>&1)"
-MATCH="$(GET_COMP_STR([-generate], [-generate])
-GET_COMP_STR([packet], [])
-GET_COMP_STR([OPTIONS...], []))"
-AT_CHECK_UNQUOTED([GET_EXPAN(${INPUT})],
-[0], [dnl
-${MATCH}
-])
-# check the available completions.
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})],
-[0], [dnl
--generate
-])
-
-
-# set packet to some random string, there should be no more completions.
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl ofproto/trace ovs-dummy "in_port(123),mac(),ip,tcp" "ABSJDFLSDJFOIWEQR" TAB 2>&1)"
-AT_CHECK_UNQUOTED([echo "$INPUT" | sed -e '/./,$!d'],
-[0], [dnl
-])
-
-
-# set argument to 'br0', should go to the bridge path.
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl ofproto/trace br0 TAB 2>&1)"
-MATCH="$(GET_COMP_STR([br_flow], []))"
-AT_CHECK_UNQUOTED([GET_EXPAN(${INPUT})],
-[0], [dnl
-${MATCH}
-])
-# check the available completions.
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})], [0])
-
-
-# set argument to some random string, should go to the odp_flow path.
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl ofproto/trace "in_port(123),mac(),ip,tcp" TAB 2>&1)"
-MATCH="$(GET_COMP_STR([-generate], [-generate])
-GET_COMP_STR([packet], [])
-GET_COMP_STR([OPTIONS...], []))"
-AT_CHECK_UNQUOTED([GET_EXPAN(${INPUT})],
-[0], [dnl
-${MATCH}
-])
-# check the available completions.
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})],
-[0], [dnl
--generate
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-# complex completion check - vlog/set
-# vlog/set {spec | PATTERN:destination:pattern}
-# test non expandable arguments
-AT_SETUP([appctl-bashcomp - complex completion check 4])
-AT_SKIP_IF([test -z ${BASH_VERSION+x}])
-OVS_VSWITCHD_START
-
-# check the top level completion.
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl vlog/set TAB 2>&1)"
-MATCH="$(GET_COMP_STR([PATTERN:destination:pattern], [])
-GET_COMP_STR([spec], []))"
-AT_CHECK_UNQUOTED([GET_EXPAN(${INPUT})],
-[0], [dnl
-${MATCH}
-])
-# check the available completions.
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})], [0])
-
-
-# set argument to random 'abcd', there should be no more completions.
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl vlog/set abcd TAB 2>&1)"
-AT_CHECK_UNQUOTED([echo "$INPUT" | sed -e '/./,$!d'],
-[0], [dnl
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([appctl-bashcomp - negative test])
-AT_SKIP_IF([test -z ${BASH_VERSION+x}])
-OVS_VSWITCHD_START(add-port br0 p0 -- set Interface p0 type=dummy)
-
-# negative test - incorrect subcommand
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl ERROR 2>&1)"
-AT_CHECK_UNQUOTED([echo "$INPUT" | sed -e 's/[ \t]*$//' | sed -e '/./,$!d'], [0])
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl ERROR TAB 2>&1)"
-AT_CHECK_UNQUOTED([echo "$INPUT" | sed -e 's/[ \t]*$//' | sed -e '/./!d'],
-[0], [dnl
-])
-
-
-# negative test - no ovs-vswitchd
-# negative test - no ovsdb-server
-# negative test - no ovs-ofctl
-# should not see any error.
-OVS_VSWITCHD_STOP
-m4_foreach(
-[target_daemon],
-[[ovs-vswitchd],
-[ovsdb-server],
-[ovs-ofctl]],
-[
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl --target target_daemon TAB 2>&1)"
-MATCH="$(ovs-appctl --option | sort | sed -n '/^--.*/p' | cut -d '=' -f1)"
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})],
-[0], [dnl
-${MATCH}
-])
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovs-appctl --target target_daemon ERROR SUBCMD TAB 2>&1)"
-AT_CHECK_UNQUOTED([echo "$INPUT" | sed -e 's/[ \t]*$//' | sed -e '/./!d'],
-[0], [dnl
-])])
-
-
-# negative test - do not match on nested option
-INPUT="$(bash ovs-appctl-bashcomp.bash debug ovsdb-tool create TAB 2>&1)"
-AT_CHECK_UNQUOTED([GET_AVAIL(${INPUT})], [0])
-
-AT_CLEANUP
-
-
-dnl ----------------------------------------------------------------------
-AT_BANNER([vsctl bashcomp unit tests])
-
-m4_define([PREPARE_MATCH_NOSPACE], [
-echo "$@" | tr ' ' '\n' | sed -e '/^$/d' | sort -u
-])
-
-m4_define([PREPARE_MATCH_SPACE], [
-echo "$@" | tr ' ' '\n' | sed -e '/^$/d' | sed -e 's/$/ /g' | sort -u
-])
-
-AT_SETUP([vsctl-bashcomp - basic verification])
-AT_SKIP_IF([test -z ${BASH_VERSION+x}])
-AT_SKIP_IF([eval 'test ${BASH_VERSINFO[[0]]} -lt 4'])
-OVS_VSWITCHD_START
-
-# complete ovs-vsctl --db=* [TAB]
-TMP="$(ovs-vsctl --commands | cut -d',' -f1-2 | tr -d ',[[]]' | tr -s ' ' '\n')
-$(ovs-vsctl --options | grep -- '--' | sed -e 's/=.*$/=/g')"
-MATCH="$(PREPARE_MATCH_NOSPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "--db=unix:$OVS_RUNDIR/db.sock "],
-[0], [dnl
-${MATCH}
-])
-# complete ovs-vsctl [TAB]
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test ""],
-[0], [dnl
-${MATCH}
-])
-
-# complete on global options.
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "--dry-run "],
-[0], [dnl
-${MATCH}
-])
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "--dry-run --pretty "],
-[0], [dnl
-${MATCH}
-])
-
-# complete on local options.
-TMP="$(ovs-vsctl --commands | grep -- '--may-exist' | cut -d',' -f1-2 | tr -d ',[[]]' | tr -s ' ' '\n' | grep -v -- '--may-exist')"
-MATCH="$(PREPARE_MATCH_SPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "--may-exist "],
-[0], [dnl
-${MATCH}
-])
-
-#
-# test !, +, ?, *.
-#
-# test !.  no following arguments are expanded.
-TMP="$(ovsdb-client --no-heading list-tables)"
-MATCH="$(PREPARE_MATCH_SPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set "],
-[0], [dnl
-${MATCH}
-])
-# test ?.  will show completions for both current and following arguments.
-ovs-vsctl br-set-external-id br0 bridge-id br0
-MATCH="$(PREPARE_MATCH_SPACE(bridge-id --))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "br-get-external-id br0 "],
-[0], [dnl
-${MATCH}
-])
-# test *.  argument with this prefix could be completed for zero or more times.
-TMP="$(ovs-vsctl --no-heading --columns=_uuid,name list Bridge | tr -d '\"')"
-MATCH="$(PREPARE_MATCH_SPACE(${TMP} --))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "destroy Bridge "],
-[0], [dnl
-${MATCH}
-])
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "destroy Bridge br0 "],
-[0], [dnl
-${MATCH}
-])
-# test +.  the first time, an argument is required, after that, it becomes '*'.
-TMP="$(ovsdb-client --no-heading list-columns Open_vSwitch Bridge | awk '/key.*value/ { print $1":"; next } { print $1; next }')"
-MATCH="$(PREPARE_MATCH_NOSPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set Bridge br0 "],
-[0], [dnl
-${MATCH}
-])
-MATCH="$(PREPARE_MATCH_NOSPACE(${TMP} --))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set Bridge br0 other_config:random_key=123 "],
-[0], [dnl
-${MATCH}
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([vsctl-bashcomp - argument completion])
-AT_SKIP_IF([test -z ${BASH_VERSION+x}])
-AT_SKIP_IF([eval 'test ${BASH_VERSINFO[[0]]} -lt 4'])
-OVS_VSWITCHD_START(
-   [add-br br1 -- \
-       set bridge br1 datapath-type=dummy -- \
-    add-br foo -- \
-       set bridge foo datapath-type=dummy -- \
-    add-br --weird-br_name -- \
-       set bridge --weird-br_name datapath-type=dummy -- \
-    add-port br0 br0p0 -- set Interface br0p0 type=dummy -- \
-    add-port br0 br0p1 -- set Interface br0p1 type=dummy -- \
-    add-port br1 br1p0 -- set Interface br1p0 type=dummy -- \
-    add-port br1 br1p1 -- set Interface br1p1 type=dummy -- \
-    add-port foo bar -- set Interface bar type=dummy ])
-#
-# test completion functions defined in '_OVS_VSCTL_ARG_COMPLETION_FUNCS'.
-# therein, the different argument prefixes are also tested at the same time.
-#
-# A space is appended to each output if completion is configured without
-# 'nospace' option.
-#
-
-
-#
-# test: _ovs_vsctl_complete_table
-#
-TMP="$(ovsdb-client --no-heading list-tables)"
-MATCH="$(PREPARE_MATCH_SPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set "],
-[0], [dnl
-${MATCH}
-])
-MATCH="$(PREPARE_MATCH_SPACE(Open_vSwitch))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set Open"],
-[0], [dnl
-${MATCH}
-])
-
-
-#
-# test: _ovs_vsctl_complete_record
-#
-TMP="$(ovs-vsctl --no-heading --columns=_uuid list Open_vSwitch | tr -d '\"')"
-MATCH="$(PREPARE_MATCH_SPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set Open_vSwitch "],
-[0], [dnl
-${MATCH}
-])
-TMP="$(ovs-vsctl --no-heading --columns=_uuid,name list Bridge | tr -d '\"')"
-MATCH="$(PREPARE_MATCH_SPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set Bridge "],
-[0], [dnl
-${MATCH}
-])
-
-
-#
-# test: _ovs_vsctl_complete_bridge
-#
-TMP="$(ovs-vsctl list-br)"
-MATCH="$(PREPARE_MATCH_SPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "br-to-vlan "],
-[0], [dnl
-${MATCH}
-])
-# this also helps check the '_ovs_vsctl_check_startswith_string'.
-MATCH="$(PREPARE_MATCH_SPACE(--weird-br_name))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "br-to-vlan --"],
-[0], [dnl
-${MATCH}
-])
-
-
-#
-# test: _ovs_vsctl_complete_port
-#
-TMP="$(ovs-vsctl --no-heading --columns=name list Port | tr -d '\"')"
-MATCH="$(PREPARE_MATCH_SPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "port-to-br "],
-[0], [dnl
-${MATCH}
-])
-# complete on ports in particular bridge.
-TMP="$(ovs-vsctl list-ports br0)"
-MATCH="$(PREPARE_MATCH_SPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "del-port br0 "],
-[0], [dnl
-${MATCH}
-])
-
-
-#
-# test: _ovs_vsctl_complete_iface
-#
-for br in `ovs-vsctl list-br`; do
-    TMP="${TMP} $(ovs-vsctl list-ifaces $br)"
-done
-MATCH="$(PREPARE_MATCH_SPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "iface-to-br "],
-[0], [dnl
-${MATCH}
-])
-
-
-#
-# test: _ovs_vsctl_complete_bridge_fail_mode
-#
-MATCH="$(PREPARE_MATCH_SPACE(standalone secure))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set-fail-mode br0 "],
-[0], [dnl
-${MATCH}
-])
-
-
-#
-# test: _ovs_vsctl_complete_key
-#
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "br-set-external-id br0 "],
-[0], [dnl
-
-])
-# since there is no key added yet, we will only get our own input.
-MATCH="$(PREPARE_MATCH_SPACE(test_key))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "br-set-external-id br0 test_key"],
-[0], [dnl
-${MATCH}
-])
-# now add a key, as we should see it.
-ovs-vsctl br-set-external-id br0 bridge-id br0
-MATCH="$(PREPARE_MATCH_SPACE(bridge-id))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "br-set-external-id br0 "],
-[0], [dnl
-${MATCH}
-])
-MATCH="$(PREPARE_MATCH_SPACE(bridge-id --))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "br-get-external-id br0 "],
-[0], [dnl
-${MATCH}
-])
-
-
-#
-# test: _ovs_vsctl_complete_value
-#
-# should just return the user input.
-MATCH="$(PREPARE_MATCH_SPACE(test_value --))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "br-set-external-id br0 bridge-id test_value"],
-[0], [dnl
-${MATCH}
-])
-
-
-#
-# test: _ovs_vsctl_complete_column
-#
-TMP="$(ovsdb-client --no-heading list-columns Open_vSwitch Open_vSwitch | tr -d ':' | cut -d' ' -f1)"
-UUID="$(ovs-vsctl --no-heading --columns=_uuid list Open_vSwitch | tr -d ' ')"
-MATCH="$(PREPARE_MATCH_SPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "clear Open_vSwitch $UUID "],
-[0], [dnl
-${MATCH}
-])
-TMP="$(ovsdb-client --no-heading list-columns Open_vSwitch Bridge | tr -d ':' | cut -d' ' -f1)"
-MATCH="$(PREPARE_MATCH_SPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "clear Bridge br0 "],
-[0], [dnl
-${MATCH}
-])
-# the 'clear' command requires one or more (+) COLUMN.
-# so, with one specified COLUMN 'other_config', it should still complete on
-# COLUMNs, plus '--'.
-MATCH="$(PREPARE_MATCH_SPACE(${TMP} --))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "clear Bridge br0 other_config "],
-[0], [dnl
-${MATCH}
-])
-
-
-#
-# test: _ovs_vsctl_complete_key_value
-#
-# with no key available, should always get user input.
-MATCH="$(PREPARE_MATCH_NOSPACE(random_key))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "add Bridge br0 other_config random_key"],
-[0], [dnl
-${MATCH}
-])
-MATCH="$(PREPARE_MATCH_NOSPACE(abc))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "add Bridge br0 other_config random_key=abc"],
-[0], [dnl
-${MATCH}
-])
-# now add two random keys.
-ovs-vsctl set Bridge br0 other_config:random_key1=abc other_config:random_val1=xyz
-MATCH="$(PREPARE_MATCH_NOSPACE(random_key1= random_val1=))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "add Bridge br0 other_config ran"],
-[0], [dnl
-${MATCH}
-])
-
-
-#
-# test: _ovs_vsctl_complete_column_optkey_value
-#
-# at first, we should complete on column.
-TMP="$(ovsdb-client --no-heading list-columns Open_vSwitch Bridge | awk '/key.*value/ { print $1":"; next } { print $1; next }')"
-MATCH="$(PREPARE_MATCH_NOSPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set Bridge br0 "],
-[0], [dnl
-${MATCH}
-])
-MATCH="$(PREPARE_MATCH_NOSPACE(other_config:))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set Bridge br0 other"],
-[0], [dnl
-${MATCH}
-])
-# then, with the ':' we should complete on key.
-TMP="$(ovs-vsctl --no-heading --columns=other_config list Bridge br0 | tr -d '{\"}' | tr -s ', ' '\n' | cut -d'=' -f1)"
-MATCH="$(PREPARE_MATCH_NOSPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set Bridge br0 other_config:"],
-[0], [dnl
-${MATCH}
-])
-# finally, if user fill in some value, we should just complete on user input.
-MATCH="$(PREPARE_MATCH_NOSPACE(random_val1))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set Bridge br0 other_config:random_val1=12345"],
-[0], [dnl
-${MATCH}
-])
-
-
-#
-# test: _ovs_vsctl_complete_filename
-#
-touch private_key certificate
-MATCH="$(PREPARE_MATCH_SPACE(private_key))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set-ssl priva"],
-[0], [dnl
-${MATCH}
-])
-MATCH="$(PREPARE_MATCH_SPACE(certificate))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set-ssl private_key cer"],
-[0], [dnl
-${MATCH}
-])
-
-
-#
-# test: _ovs_vsctl_complete_target
-#
-MATCH="$(PREPARE_MATCH_NOSPACE(pssl: ptcp: punix: ssl: tcp: unix:))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set-manager "],
-[0], [dnl
-${MATCH}
-])
-# filename completion on unix, punix.
-MATCH="$(PREPARE_MATCH_NOSPACE(testsuite.log))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set-manager unix:test"],
-[0], [dnl
-${MATCH}
-])
-# no completion on other type, just return available types.
-# in real environment, bash will not complete on anything.
-MATCH="$(PREPARE_MATCH_NOSPACE(pssl: ptcp: punix: tcp: unix:))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set-manager ssl:something"],
-[0], [dnl
-${MATCH}
-])
-
-
-#
-# test: _ovs_vsctl_complete_new
-#
-# test 'add-br'
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "add-br "],
-[0], [dnl
---- BEGIN MESSAGE
-Enter a new bridge:
-> ovs-vsctl add-br --- END MESSAGE
-])
-# user input does not change the output.
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "add-br new-br"],
-[0], [dnl
---- BEGIN MESSAGE
-Enter a new bridge:
-> ovs-vsctl add-br new-br--- END MESSAGE
-])
-# after specifying the new bridge name, we should complete on parent bridge.
-TMP="$(ovs-vsctl list-br)"
-MATCH="$(PREPARE_MATCH_SPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "add-br new-br "],
-[0], [dnl
-${MATCH}
-])
-# test 'add-port'
-# after specifying the new port name, we should complete on the column part
-# of '*COLUMN?:KEY=VALUE'.
-TMP="$(ovsdb-client --no-heading list-columns Open_vSwitch Port | awk '/key.*value/ { print $1":"; next } { print $1; next }')"
-MATCH="$(PREPARE_MATCH_NOSPACE(${TMP} --))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "add-port br0 new-port "],
-[0], [dnl
-${MATCH}
-])
-
-
-#
-# test: _ovs_vsctl_complete_dashdash
-#
-# after '--', there should be no global options available for completion.
-TMP="$(ovs-vsctl --commands | cut -d',' -f1-2 | tr -d ',[[]]' | tr -s ' ' '\n')"
-MATCH="$(PREPARE_MATCH_NOSPACE(${TMP}))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "init -- "],
-[0], [dnl
-${MATCH}
-])
-TMP="$(ovs-vsctl --no-heading --columns=name,_uuid list Port | tr -d '\"')"
-MATCH="$(PREPARE_MATCH_SPACE(${TMP} newp1 newp2))"
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "add-port br0 newp1 -- add-port br1 newp2 -- set Port "],
-[0], [dnl
-${MATCH}
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([vsctl-bashcomp - negative test])
-AT_SKIP_IF([test -z ${BASH_VERSION+x}])
-AT_SKIP_IF([eval 'test ${BASH_VERSINFO[[0]]} -lt 4'])
-OVS_VSWITCHD_START
-
-# complete non-matching command.
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "invalid"],
-[0], [dnl
-
-])
-
-# complete after invalid command.
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "invalid argu"],
-[0], [dnl
-
-])
-
-# complete non-matching end argument.
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set INVALID_"],
-[0], [dnl
-
-])
-
-# complete after invalid intermediate argument.
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "set INVALID_TBL "],
-[1], [dnl
---- BEGIN MESSAGE
-Cannot complete 'INVALID_TBL' at index 3:
-> ovs-vsctl set INVALID_TBL --- END MESSAGE])
-
-# complete ovs-vsctl --db=wrongdb [TAB]
-# should return 1 and show nothing.
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test "--db=wrongdb"],
-[1], [])
-
-OVS_VSWITCHD_STOP
-# delete ovsdb-server and try again.
-AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test ""],
-[1], [])
-
-AT_CLEANUP
diff --git a/tests/daemon-py.at b/tests/daemon-py.at
deleted file mode 100644
index 6adea3c85..000000000
--- a/tests/daemon-py.at
+++ /dev/null
@@ -1,252 +0,0 @@
-AT_BANNER([daemon unit tests - Python])
-
-m4_define([DAEMON_PYN],
-  [AT_SETUP([daemon - $1])
-   AT_SKIP_IF([test $2 = no])
-   # Skip this test for Windows, echo $! gives shell pid instead of parent process
-   AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-   AT_KEYWORDS([python daemon])
-
-   on_exit 'kill $(cat *.pid)'
-   pidfile=test-daemon.py.pid
-
-   # Start the daemon and wait for the pidfile to get created
-   # and that its contents are the correct pid.
-   AT_CHECK([$3 $srcdir/test-daemon.py --pidfile & echo $!], [0], [stdout])
-   pid=$(cat stdout)
-
-   OVS_WAIT_UNTIL([test -s $pidfile], [kill $pid])
-   AT_CHECK([test $pid = $(cat $pidfile)])
-   AT_CHECK([kill -0 $pid])
-
-   # Kill the daemon and make sure that the pidfile gets deleted.
-   kill $pid
-   OVS_WAIT_WHILE([kill -0 $pid])
-   AT_CHECK([test ! -e $pidfile])
-   AT_CLEANUP])
-
-DAEMON_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-DAEMON_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([DAEMON_MONITOR_PYN],
-  [AT_SETUP([daemon --monitor - $1])
-   AT_SKIP_IF([test $2 = no])
-
-   # Skip this test for Windows, echo $! gives shell pid instead of parent process
-   AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-
-   on_exit 'kill $(cat *.pid)'
-   pidfile=test-daemon.py.pid
-
-   # Start the daemon and wait for the pidfile to get created.
-   AT_CHECK([$3 $srcdir/test-daemon.py --pidfile --monitor & echo $!], [0], [stdout])
-   monitor=$(cat stdout)
-   OVS_WAIT_UNTIL([test -s $pidfile])
-   child=$(cat $pidfile)
-
-   # Check that the pidfile names a running process,
-   # and that the parent process of that process is our child process.
-   check_ancestors $child $monitor
-
-   # Kill the daemon process, making it look like a segfault,
-   # and wait for a new child process to get spawned.
-   AT_CHECK([kill -SEGV $child])
-   OVS_WAIT_WHILE([kill -0 $child])
-   OVS_WAIT_UNTIL([test -s $pidfile && test $(cat $pidfile) != $child])
-   child2=$(cat $pidfile)
-
-   # Check that the pidfile names a running process,
-   # and that the parent process of that process is our child process.
-   check_ancestors $child2 $monitor
-
-   # Kill the daemon process with SIGTERM, and wait for the daemon
-   # and the monitor processes to go away and the pidfile to get deleted.
-   AT_CHECK([kill $child2])
-   OVS_WAIT_WHILE([kill -0 $monitor || kill -0 $child2 || test -e $pidfile])
-   AT_CLEANUP])
-
-DAEMON_MONITOR_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-DAEMON_MONITOR_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([DAEMON_MONITOR_RESTART_PYN],
-  [AT_SETUP([daemon --monitor restart exit code - $1])
-   AT_SKIP_IF([test $2 = no])
-   # Skip this test for Windows, echo $! gives shell pid instead of parent process
-   AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-
-   on_exit 'kill $(cat *.pid)'
-   pidfile=test-daemon.py.pid
-
-   # Start the daemon and wait for the pidfile to get created.
-   AT_CHECK([$3 $srcdir/test-daemon.py --pidfile --monitor & echo $!], [0], [stdout])
-   monitor=$(cat stdout)
-   OVS_WAIT_UNTIL([test -s $pidfile])
-   child=$(cat $pidfile)
-
-   # Check that the pidfile names a running process,
-   # and that the parent process of that process is our child process.
-   check_ancestors $child $monitor
-
-   # HUP the daemon process causing it to throw an exception,
-   # and wait for a new child process to get spawned.
-   AT_CHECK([kill -HUP $child])
-   OVS_WAIT_WHILE([kill -0 $child])
-   OVS_WAIT_UNTIL([test -s $pidfile && test $child != $(cat $pidfile)])
-   child2=$(cat $pidfile)
-
-   # Check that the pidfile names a running process,
-   # and that the parent process of that process is our child process.
-   check_ancestors $child2 $monitor
-
-   # Kill the daemon process with SIGTERM, and wait for the daemon
-   # and the monitor processes to go away and the pidfile to get deleted.
-   AT_CHECK([kill $child2])
-   OVS_WAIT_WHILE([kill -0 $monitor || kill -0 $child2 || test -e $pidfile])
-   AT_CLEANUP])
-
-DAEMON_MONITOR_RESTART_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-DAEMON_MONITOR_RESTART_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([DAEMON_DETACH_PYN],
-  [AT_SETUP([daemon --detach - $1])
-   AT_SKIP_IF([test $2 = no])
-
-   # Skip this test for Windows, the pid file not removed if the daemon is killed
-   AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-
-   on_exit 'kill $(cat *.pid)'
-   pidfile=test-daemon.py.pid
-
-   # Start the daemon and make sure that the pidfile exists immediately.
-   # We don't wait for the pidfile to get created because the daemon is
-   # supposed to do so before the parent exits.
-   AT_CHECK([$3 $srcdir/test-daemon.py --pidfile --detach --no-chdir], [0])
-   AT_CHECK([test -s $pidfile])
-   pid=$(cat $pidfile)
-   check_ancestors $pid 1
-
-   # Kill the daemon and make sure that the pidfile gets deleted.
-   AT_CHECK([kill $pid])
-   OVS_WAIT_WHILE([kill -0 $pid])
-   AT_CHECK([test ! -e $pidfile])
-   AT_CLEANUP])
-
-DAEMON_DETACH_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-DAEMON_DETACH_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([DAEMON_DETACH_MONITOR_PYN],
-  [AT_SETUP([daemon --detach --monitor - $1])
-   AT_SKIP_IF([test $2 = no])
-
-   # Skip this test for Windows, uses Linux specific kill signal
-   AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-
-   on_exit 'kill $(cat *.pid)'
-   pidfile=test-daemon.py.pid
-
-   # Start the daemon and make sure that the pidfile exists immediately.
-   # We don't wait for the pidfile to get created because the daemon is
-   # supposed to do so before the parent exits.
-   AT_CHECK([$3 $srcdir/test-daemon.py --pidfile --detach --no-chdir --monitor], [0])
-   AT_CHECK([test -s $pidfile])
-   child=$(cat $pidfile)
-   AT_CHECK([parent_pid $child], [0], [stdout])
-   monitor=$(cat stdout)
-
-   # Check that the pidfile names a running process,
-   # and that the parent process of that process is a running process,
-   # and that the parent process of that process is init.
-   check_ancestors $child $monitor 1
-
-   # Kill the daemon process, making it look like a segfault,
-   # and wait for a new daemon process to get spawned.
-   AT_CHECK([kill -SEGV $child])
-   OVS_WAIT_WHILE([kill -0 $child])
-   OVS_WAIT_UNTIL([test -s $pidfile && test $(cat $pidfile) != $child])
-   child2=$(cat $pidfile)
-
-   # Check that the pidfile names a running process,
-   # and that the parent process of that process is our child process.
-   check_ancestors $child2 $monitor 1
-
-   # Kill the daemon process with SIGTERM, and wait for the daemon
-   # and the monitor processes to go away and the pidfile to get deleted.
-   AT_CHECK([kill $child2])
-   OVS_WAIT_WHILE([kill -0 $child2 || kill -0 $monitor || test -e $pidfile])
-   AT_CLEANUP])
-
-DAEMON_DETACH_MONITOR_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-DAEMON_DETACH_MONITOR_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([DAEMON_DETACH_ERRORS_PYN],
-  [AT_SETUP([daemon --detach startup errors - $1])
-   AT_SKIP_IF([test $2 = no])
-   AT_CHECK([$3 $srcdir/test-daemon.py --pidfile --detach --no-chdir --bail], [1], [], [stderr])
-   AT_CHECK([grep 'test-daemon.py: exiting after daemonize_start() as requested' stderr],
-     [0], [ignore])
-   AT_CHECK([test ! -s test-daemon.py.pid])
-   AT_CLEANUP])
-
-DAEMON_DETACH_ERRORS_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-DAEMON_DETACH_ERRORS_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([DAEMON_DETACH_MONITOR_ERRORS_PYN],
-  [AT_SETUP([daemon --detach --monitor startup errors - $1])
-   AT_SKIP_IF([test $2 = no])
-   AT_CAPTURE_FILE([pid])
-   AT_CHECK([$3 $srcdir/test-daemon.py --pidfile --detach --no-chdir --monitor --bail], [1], [], [stderr])
-   AT_CHECK([grep 'test-daemon.py: exiting after daemonize_start() as requested' stderr],
-     [0], [ignore])
-   AT_CHECK([test ! -s test-daemon.py.pid])
-   AT_CLEANUP])
-
-DAEMON_DETACH_MONITOR_ERRORS_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-DAEMON_DETACH_MONITOR_ERRORS_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([DAEMON_DETACH_CLOSES_FDS_PYN],
-  [AT_SETUP([daemon --detach closes standard fds - $1])
-   AT_SKIP_IF([test $2 = no])
-
-   # Skip this test for Windows, uses Linux specific kill signal
-   AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-
-   AT_CHECK([(yes 2>stderr; echo $? > status) | $3 $srcdir/test-daemon.py --pidfile --detach --no-chdir])
-   AT_CHECK([kill $(cat test-daemon.py.pid)])
-   AT_CHECK([test -s status])
-   if grep '[[bB]]roken pipe' stderr >/dev/null 2>&1; then
-     # Something in the environment caused SIGPIPE to be ignored, but
-     # 'yes' at least told us that it got EPIPE.  Good enough; we know
-     # that stdout was closed.
-     :
-   else
-     # Otherwise make sure that 'yes' died from SIGPIPE.
-     AT_CHECK([kill -l `cat status`], [0], [PIPE
-])
-   fi
-   AT_CLEANUP])
-
-DAEMON_DETACH_CLOSES_FDS_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-DAEMON_DETACH_CLOSES_FDS_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([DAEMON_DETACH_MONITOR_CLOSES_FDS_PYN],
-  [AT_SETUP([daemon --detach --monitor closes standard fds - $1])
-   AT_SKIP_IF([test $2 = no])
-   # Skip this test for Windows, uses Linux specific kill signal
-   AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-   AT_CHECK([(yes 2>stderr; echo $? > status) | $3 $srcdir/test-daemon.py --pidfile --detach --no-chdir], [0], [], [])
-   AT_CHECK([kill $(cat test-daemon.py.pid)])
-   AT_CHECK([test -s status])
-   if grep '[[bB]]roken pipe' stderr >/dev/null 2>&1; then
-     # Something in the environment caused SIGPIPE to be ignored, but
-     # 'yes' at least told us that it got EPIPE.  Good enough; we know
-     # that stdout was closed.
-     :
-   else
-     # Otherwise make sure that 'yes' died from SIGPIPE.
-     AT_CHECK([kill -l `cat status`], [0], [PIPE
-])
-   fi
-   AT_CLEANUP])
-
-DAEMON_DETACH_MONITOR_CLOSES_FDS_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-DAEMON_DETACH_MONITOR_CLOSES_FDS_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
diff --git a/tests/daemon.at b/tests/daemon.at
deleted file mode 100644
index bdc8910f9..000000000
--- a/tests/daemon.at
+++ /dev/null
@@ -1,228 +0,0 @@
-AT_BANNER([daemon unit tests - C])
-
-OVS_START_SHELL_HELPERS
-# check_process_name PID NAME
-#
-# On Linux, make sure that the name of process PID is NAME.
-# (On other systems, don't bother.)
-if test -e /proc/$$/comm; then
-    check_process_name() {
-        # In case we're building with shared libraries enabled, strip
-        # off libtool's lt- prefix.
-        AT_CHECK_UNQUOTED([sed 's/lt-//' /proc/$1/comm], [0], [$2
-])
-    }
-else
-    check_process_name() {
-        :
-    }
-fi
-
-# check_ancestors PID PARENT [GRANDPARENT...]
-check_ancestors() {
-    echo "checking ancestry: $*"
-    local child=$1; shift
-    AT_CHECK([kill -0 $child])
-    while test $# != 0; do
-        local parent=$1; shift
-        AT_CHECK([parent_pid $child], [0], [stdout])
-        actual_parent=$(cat stdout)
-        if test $parent = 1; then
-            # Traditionally, if a parent's process exits, the process's new
-            # parent is pid 1 (init) but this is not always the case these
-            # days.  Instead, if the parent process should be pid 1, be
-            # satisfied if the parent process is different from our own pid.
-            if test $actual_parent = $$; then
-                echo "parent of pid $child is this shell ($$) but should not be"
-                AT_FAIL_IF([:])
-            fi
-        elif test $parent != $actual_parent; then
-            echo "parent of pid $child is $actual_parent but should be $parent"
-            AT_FAIL_IF([:])
-        fi
-        child=$parent
-    done
-}
-OVS_END_SHELL_HELPERS
-
-AT_SETUP([daemon])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-
-dnl OVS_SKIP_NON_ADMIN_WIN()
-dnl
-dnl Checks if we have enough rights to create a service
-m4_define([OVS_SKIP_NON_ADMIN_WIN],
-  [
-   AT_SKIP_IF([net session; test $? -ne 0])
-   ])
-
-# Start the daemon and wait for the pidfile to get created
-# and that its contents are the correct pid.
-on_exit 'kill $(cat *.pid)'
-AT_CHECK([ovsdb-server --pidfile --no-db 2>/dev/null & echo $!], [0], [stdout])
-expected_pid=$(cat stdout)
-
-OVS_WAIT_UNTIL([test -s ovsdb-server.pid])
-pid=$(cat ovsdb-server.pid)
-
-AT_CHECK([test $pid = $expected_pid])
-AT_CHECK([kill -0 $pid])
-
-# Kill the daemon and make sure that the pidfile gets deleted.
-AT_CHECK([kill $pid])
-OVS_WAIT_WHILE([kill -0 $pid])
-
-AT_CHECK([test ! -e ovsdb-server.pid])
-AT_CLEANUP
-
-AT_SETUP([daemon --monitor])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-
-# This test intentionally causes SIGSEGV, so make Address Sanitizer ignore it.
-ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS
-
-# Start the daemon and wait for the pidfile to get created.
-on_exit 'kill $(cat *.pid)'
-AT_CHECK([ovsdb-server --monitor --pidfile --no-db 2>/dev/null & echo $!],
-  [0], [stdout])
-parent=$(cat stdout)
-OVS_WAIT_UNTIL([test -s ovsdb-server.pid])
-
-# Check that the pidfile names a running process,
-# and that the parent process of that process is our child process,
-# and that (with a Linux kernel) the child's process name is correct.
-child=$(cat ovsdb-server.pid)
-check_ancestors $child $parent
-check_process_name $child ovsdb-server
-
-# Avoid a race between pidfile creation and notifying the parent,
-# which can easily trigger if ovsdb-server is slow (e.g. due to valgrind).
-OVS_WAIT_UNTIL([ovs-appctl --timeout=10 -t ovsdb-server version])
-
-# Kill the daemon process, making it look like a segfault,
-# and wait for a new child process to get spawned.
-AT_CHECK([kill -SEGV $child], [0], [], [ignore])
-OVS_WAIT_WHILE([kill -0 $child])
-OVS_WAIT_UNTIL([test -s ovsdb-server.pid && test $(cat ovsdb-server.pid) != $child])
-
-# Check that the pidfile names a running process,
-# and that the parent process of that process is our child process.
-child2=$(cat ovsdb-server.pid)
-check_ancestors $child2 $parent
-check_process_name $child2 ovsdb-server
-
-# Kill the daemon process with SIGTERM, and wait for the daemon
-# and the monitor processes to go away and the pidfile to get deleted.
-AT_CHECK([kill $child2])
-OVS_WAIT_WHILE([kill -0 $parent || kill -0 $child2 || test -e ovsdb-server.pid])
-AT_CLEANUP
-
-
-AT_SETUP([daemon --detach])
-
-# Start the daemon and make sure that the pidfile exists immediately.
-# We don't wait for the pidfile to get created because the daemon is
-# supposed to do so before the parent exits.
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --no-db], [0])
-AT_CHECK([test -s ovsdb-server.pid])
-child=$(cat ovsdb-server.pid)
-AT_CHECK([kill -0 $child])
-
-# Kill the daemon and make sure that the pidfile gets deleted.
-if test "$IS_WIN32" = "yes"; then
-  # When a 'kill pid' is done on windows (through 'taskkill //F'),
-  # pidfiles are not deleted (because it is force kill), so use
-  # 'ovs-appctl exit' instead
-  OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-else
-  kill $child
-fi
-OVS_WAIT_WHILE([kill -0 $child])
-AT_CHECK([test ! -e ovsdb-server.pid])
-
-AT_CLEANUP
-
-
-AT_SETUP([daemon --detach --monitor])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-
-# This test intentionally causes SIGSEGV, so make Address Sanitizer ignore it.
-ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS
-
-on_exit 'kill $(cat *.pid)'
-
-# Start the daemon and make sure that the pidfile exists immediately.
-# We don't wait for the pidfile to get created because the daemon is
-# supposed to do so before the parent exits.
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --monitor --no-db])
-AT_CHECK([test -s ovsdb-server.pid])
-child=$(cat ovsdb-server.pid)
-
-# Check process naming and ancestry.
-monitor=$(parent_pid $child)
-check_process_name $child ovsdb-server
-check_ancestors $child $monitor 1
-
-# Kill the daemon process, making it look like a segfault,
-# and wait for a new daemon process to get spawned.
-AT_CHECK([kill -SEGV $child], [0])
-OVS_WAIT_WHILE([kill -0 $child])
-OVS_WAIT_UNTIL([test -s ovsdb-server.pid && test `cat ovsdb-server.pid` != $child])
-child2=$(cat ovsdb-server.pid)
-
-# Check process naming and ancestry.
-check_process_name $child2 ovsdb-server
-check_ancestors $child2 $monitor 1
-
-# Kill the daemon process with SIGTERM, and wait for the daemon
-# and the monitor processes to go away and the pidfile to get deleted.
-AT_CHECK([kill $child2])
-OVS_WAIT_WHILE(
-  [kill -0 $monitor || kill -0 $child2 || test -e ovsdb-server.pid])
-AT_CLEANUP
-
-
-AT_SETUP([daemon --detach startup errors])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --unixctl=nonexistent/unixctl --no-db], [1], [], [stderr])
-AT_CHECK([grep 'could not initialize control socket' stderr],
-  [0], [ignore])
-AT_CHECK([test ! -e ovsdb-server.pid])
-AT_CLEANUP
-
-
-AT_SETUP([daemon --detach --monitor startup errors])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --monitor --unixctl=nonexistent/unixctl --no-db], [1], [], [stderr])
-AT_CHECK([grep 'could not initialize control socket' stderr],
-  [0], [ignore])
-AT_CHECK([test ! -e ovsdb-server.pid])
-AT_CLEANUP
-
-
-AT_SETUP([daemon --service])
-AT_KEYWORDS([windows-service])
-AT_SKIP_IF([test "$IS_WIN32" != "yes"])
-OVS_SKIP_NON_ADMIN_WIN
-AT_SKIP_IF([sc qc ovsdb-server])
-
-AT_CAPTURE_FILE([pid])
-# To create a Windows service, we need the absolute path for the executable.
-abs_path="$(cd $(dirname `which ovsdb-server`); pwd -W; cd $OLDPWD)"
-
-AT_CHECK([sc create ovsdb-server binpath="$abs_path/ovsdb-server --no-db --log-file=`pwd`/ovsdb-server.log --pidfile=`pwd`/ovsdb-server.pid --unixctl=`pwd`/ovsdb-server.ctl --remote=punix:`pwd`/socket --service"],
-[0], [[[SC]] CreateService SUCCESS
-])
-
-AT_CHECK([sc start ovsdb-server], [0], [ignore], [ignore], [sc delete ovsdb-server])
-OVS_WAIT_UNTIL([test -s ovsdb-server.pid])
-OVS_WAIT_UNTIL([sc query ovsdb-server | grep STATE | grep RUNNING > /dev/null 2>&1])
-AT_CHECK([kill -0 `cat ovsdb-server.pid`], [0], [ignore])
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-dbs], [0],
-[Open_vSwitch
-])
-AT_CHECK([sc stop ovsdb-server], [0], [ignore])
-OVS_WAIT_UNTIL([test ! -s ovsdb-server.pid])
-AT_CHECK([sc query ovsdb-server | grep STATE | grep STOPPED], [0], [ignore])
-AT_CHECK([sc delete ovsdb-server], [0], [[[SC]] DeleteService SUCCESS
-])
-AT_CLEANUP
diff --git a/tests/dpctl.at b/tests/dpctl.at
deleted file mode 100644
index deec54959..000000000
--- a/tests/dpctl.at
+++ /dev/null
@@ -1,87 +0,0 @@
-AT_BANNER([dpctl])
-
-AT_SETUP([dpctl - add-dp del-dp])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl dpctl/add-dp dummy at br0])
-AT_CHECK([ovs-appctl dpctl/add-dp dummy at br0], [2], [],
-  [ovs-vswitchd: add_dp (File exists)
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-AT_CHECK([ovs-appctl dpctl/del-dp dummy at br0])
-AT_CHECK([ovs-appctl dpctl/del-dp dummy at br0], [2], [], [stderr])
-AT_CHECK([sed 's/(.*)/(...)/' stderr], [0], [dnl
-ovs-vswitchd: opening datapath (...)
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([dpctl - add-if set-if del-if])
-OVS_VSWITCHD_START([], [], [=override])
-AT_CHECK([ovs-appctl dpctl/add-dp dummy at br0])
-AT_CHECK([ovs-appctl dpctl/show dummy at br0], [0], [dnl
-dummy at br0:
-  lookups: hit:0 missed:0 lost:0
-  flows: 0
-  port 0: br0 (dummy-internal)
-])
-AT_CHECK([ovs-appctl dpctl/add-if dummy at br0 vif1.0,type=dummy,port_no=5])
-AT_CHECK([ovs-appctl dpctl/show dummy at br0], [0], [dnl
-dummy at br0:
-  lookups: hit:0 missed:0 lost:0
-  flows: 0
-  port 0: br0 (dummy-internal)
-  port 5: vif1.0 (dummy)
-])
-AT_CHECK([ovs-appctl dpctl/add-if dummy at br0 vif1.0,type=dummy], [2], [],
-  [stderr])
-AT_CHECK([sed 's/(.*)/(...)/' stderr], [0],
-  [ovs-vswitchd: adding vif1.0 to dummy at br0 failed (...)
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-AT_CHECK([ovs-appctl dpctl/set-if dummy at br0 vif1.0,port_no=5])
-AT_CHECK([ovs-appctl dpctl/set-if dummy at br0 vif1.0,type=system], [2], [],
-  [ovs-vswitchd: vif1.0: can't change type from dummy to system
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-AT_CHECK([ovs-appctl dpctl/set-if dummy at br0 br0,type=dummy-internal], [0])
-AT_CHECK([ovs-appctl dpctl/set-if dummy at br0 br0,type=internal], [2], [],
-  [ovs-vswitchd: br0: can't change type from dummy-internal to internal
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-AT_CHECK([ovs-appctl dpctl/del-if dummy at br0 vif1.0])
-AT_CHECK([ovs-appctl dpctl/show dummy at br0], [0], [dnl
-dummy at br0:
-  lookups: hit:0 missed:0 lost:0
-  flows: 0
-  port 0: br0 (dummy-internal)
-])
-AT_CHECK([ovs-appctl dpctl/del-if dummy at br0 vif1.0], [2], [],
-  [ovs-vswitchd: no port named vif1.0
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-AT_CHECK([ovs-appctl dpctl/show dummy at br0], [0], [dnl
-dummy at br0:
-  lookups: hit:0 missed:0 lost:0
-  flows: 0
-  port 0: br0 (dummy-internal)
-])
-AT_CHECK([ovs-appctl dpctl/del-if dummy at br0 nonexistent], [2], [],
-  [ovs-vswitchd: no port named nonexistent
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-AT_CHECK([ovs-appctl dpctl/del-if dummy at br0 br0], [2], [], [stderr])
-AT_CHECK([sed 's/(.*)/(...)/' stderr], [0],
-  [ovs-vswitchd: deleting port br0 from dummy at br0 failed (...)
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-AT_CHECK([ovs-appctl dpctl/del-dp dummy at br0])
-AT_CHECK([ovs-appctl dpctl/del-if dummy at br0 br0], [2], [], [stderr])
-AT_CHECK([sed 's/(.*)/(...)/' stderr], [0],
-  [ovs-vswitchd: opening datapath (...)
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-OVS_VSWITCHD_STOP(["/dummy at br0: port_del failed/d
-/dummy at br0: failed to add vif1.0 as port/d
-/Dropped 1 log messages in last/d"])
-AT_CLEANUP
diff --git a/tests/dpdk/ring_client.c b/tests/dpdk/ring_client.c
deleted file mode 100644
index 8cc3fb533..000000000
--- a/tests/dpdk/ring_client.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#include <getopt.h>
-
-#include <config.h>
-#include <rte_config.h>
-#include <rte_mbuf.h>
-#include <rte_ether.h>
-#include <rte_string_fns.h>
-#include <rte_ip.h>
-#include <rte_byteorder.h>
-
-#include "util.h"
-
-/* Number of packets to attempt to read from queue. */
-#define PKT_READ_SIZE  ((uint16_t)32)
-
-/* Define common names for structures shared between ovs_dpdk and client. */
-#define MP_CLIENT_RXQ_NAME "dpdkr%u_tx"
-#define MP_CLIENT_TXQ_NAME "dpdkr%u_rx"
-
-#define RTE_LOGTYPE_APP RTE_LOGTYPE_USER1
-
-/* Our client id number - tells us which rx queue to read, and tx
- * queue to write to.
- */
-static unsigned int client_id;
-
-/*
- * Given the rx queue name template above, get the queue name.
- */
-static inline const char *
-get_rx_queue_name(unsigned int id)
-{
-    /* Buffer for return value. */
-    static char buffer[RTE_RING_NAMESIZE];
-
-    snprintf(buffer, sizeof(buffer), MP_CLIENT_RXQ_NAME, id);
-    return buffer;
-}
-
-/*
- * Given the tx queue name template above, get the queue name.
- */
-static inline const char *
-get_tx_queue_name(unsigned int id)
-{
-    /* Buffer for return value. */
-    static char buffer[RTE_RING_NAMESIZE];
-
-    snprintf(buffer, sizeof(buffer), MP_CLIENT_TXQ_NAME, id);
-    return buffer;
-}
-
-/*
- * Print a usage message.
- */
-static void
-usage(const char *progname)
-{
-    printf("\nUsage: %s [EAL args] -- -n <client_id>\n", progname);
-}
-
-/*
- * Convert the client id number from a string to an usigned int.
- */
-static int
-parse_client_num(const char *client)
-{
-    if (str_to_uint(client, 10, &client_id)) {
-        return 0;
-    } else {
-        return -1;
-    }
-}
-
-/*
- * Parse the application arguments to the client app.
- */
-static int
-parse_app_args(int argc, char *argv[])
-{
-    int option_index = 0, opt = 0;
-    char **argvopt = argv;
-    const char *progname = NULL;
-    static struct option lgopts[] = {
-        {NULL, 0, NULL, 0 }
-    };
-    progname = argv[0];
-
-    while ((opt = getopt_long(argc, argvopt, "n:", lgopts,
-        &option_index)) != EOF) {
-        switch (opt) {
-            case 'n':
-                if (parse_client_num(optarg) != 0) {
-                    usage(progname);
-                    return -1;
-                }
-                break;
-            default:
-                usage(progname);
-                return -1;
-        }
-    }
-
-    return 0;
-}
-
-/*
- * Application main function - loops through
- * receiving and processing packets. Never returns
- */
-int
-main(int argc, char *argv[])
-{
-    struct rte_ring *rx_ring = NULL;
-    struct rte_ring *tx_ring = NULL;
-    int retval = 0;
-    void *pkts[PKT_READ_SIZE];
-    int rslt = 0;
-
-    if ((retval = rte_eal_init(argc, argv)) < 0) {
-        return -1;
-    }
-
-    argc -= retval;
-    argv += retval;
-
-    if (parse_app_args(argc, argv) < 0) {
-        rte_exit(EXIT_FAILURE, "Invalid command-line arguments\n");
-    }
-
-    rx_ring = rte_ring_lookup(get_rx_queue_name(client_id));
-    if (rx_ring == NULL) {
-        rte_exit(EXIT_FAILURE,
-            "Cannot get RX ring - is server process running?\n");
-    }
-
-    tx_ring = rte_ring_lookup(get_tx_queue_name(client_id));
-    if (tx_ring == NULL) {
-        rte_exit(EXIT_FAILURE,
-            "Cannot get TX ring - is server process running?\n");
-    }
-
-    RTE_LOG(INFO, APP, "Finished Process Init.\n");
-
-    printf("\nClient process %u handling packets\n", client_id);
-    printf("[Press Ctrl-C to quit ...]\n");
-
-    for (;;) {
-        unsigned rx_pkts = PKT_READ_SIZE;
-
-        /* Try dequeuing max possible packets first, if that fails, get the
-         * most we can. Loop body should only execute once, maximum.
-         */
-        while (unlikely(rte_ring_dequeue_bulk(rx_ring, pkts,
-                        rx_pkts, NULL) != 0) && rx_pkts > 0) {
-            rx_pkts = (uint16_t)RTE_MIN(rte_ring_count(rx_ring), PKT_READ_SIZE);
-        }
-
-        if (rx_pkts > 0) {
-            /* blocking enqueue */
-            do {
-                rslt = rte_ring_enqueue_bulk(tx_ring, pkts, rx_pkts, NULL);
-            } while (rslt == -ENOBUFS);
-        }
-    }
-}
diff --git a/tests/dpif-netdev.at b/tests/dpif-netdev.at
deleted file mode 100644
index 039ee971b..000000000
--- a/tests/dpif-netdev.at
+++ /dev/null
@@ -1,422 +0,0 @@
-AT_BANNER([dpif-netdev])
-
-m4_divert_push([PREPARE_TESTS])
-[
-# Strips out uninteresting parts of flow output, as well as parts
-# that vary from one run to another (e.g., timing and bond actions).
-strip_timers () {
-    sed '
-    s/duration:[0-9]*\.[0-9]*/duration:0.0/
-    s/used:[0-9]*\.[0-9]*/used:0.0/
-'
-}
-
-strip_xout () {
-    sed '
-    s/ufid:[-0-9a-f]* //
-    s/used:[0-9]*\.[0-9]*/used:0.0/
-    s/actions:.*/actions: <del>/
-    s/packets:[0-9]*/packets:0/
-    s/bytes:[0-9]*/bytes:0/
-' | sort
-}
-
-strip_xout_keep_actions () {
-    sed '
-    s/ufid:[-0-9a-f]* //
-    s/used:[0-9]*\.[0-9]*/used:0.0/
-    s/packets:[0-9]*/packets:0/
-    s/bytes:[0-9]*/bytes:0/
-' | sort
-}
-
-filter_flow_install () {
-    grep 'flow_add' | sed 's/.*flow_add: //' | sort | uniq
-}
-
-filter_hw_flow_install () {
-    grep 'netdev_dummy.*flow put\[create\]' | sed 's/.*|DBG|//' | sort | uniq
-}
-
-filter_hw_flow_del () {
-    grep 'netdev_dummy.*flow del' | sed 's/.*|DBG|//' | sort | uniq
-}
-
-filter_hw_packet_netdev_dummy () {
-    grep 'netdev_dummy.*: packet:.*with mark' | sed 's/.*|DBG|//' | sort | uniq
-}
-
-filter_flow_dump () {
-    grep 'flow_dump ' | sed '
-        s/.*flow_dump //
-        s/used:[0-9]*\.[0-9]*/used:0.0/
-    ' | sort | uniq
-}
-
-strip_metadata () {
-    sed 's/metadata=0x[0-9a-f]*/metadata=0x0/'
-}
-]
-m4_divert_pop([PREPARE_TESTS])
-
-AT_SETUP([dpif-netdev - netdev-dummy/receive])
-# Create br0 with interfaces p0
-OVS_VSWITCHD_START([add-port br0 p1 -- set interface p1 type=dummy ofport_request=1 -- ])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-ovs-appctl time/stop
-ovs-appctl time/warp 5000
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:02:00),eth_type(0x0800),ipv4(src=10.0.0.1,dst=10.0.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(ack)'])
-   AT_CHECK([grep -A 1 'miss upcall' ovs-vswitchd.log | tail -n 1], [0], [dnl
-skb_priority(0),skb_mark(0),ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:01,dst=50:54:00:00:02:00),eth_type(0x0800),ipv4(src=10.0.0.1,dst=10.0.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(ack)
-])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:06:00),eth_type(0x0800),ipv4(src=10.0.0.5,dst=10.0.0.6,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(ack)' --len 1024])
-   AT_CHECK([grep -A 1 'miss upcall' ovs-vswitchd.log | tail -n 1], [0], [dnl
-skb_priority(0),skb_mark(0),ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:05,dst=50:54:00:00:06:00),eth_type(0x0800),ipv4(src=10.0.0.5,dst=10.0.0.6,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(ack)
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-m4_define([DPIF_NETDEV_DUMMY_IFACE],
-  [AT_SETUP([dpif-netdev - $1 interface])
-   # Create br0 with interfaces p1 and p7
-   #    and br1 with interfaces p2 and p8
-   # with p1 and p2 connected via unix domain socket
-   OVS_VSWITCHD_START(
-     [add-port br0 p1 -- set interface p1 type=$1 options:pstream=punix:$OVS_RUNDIR/p0.sock ofport_request=1 -- \
-      add-port br0 p7 -- set interface p7 ofport_request=7 type=$1 -- \
-      add-br br1 -- \
-      set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-      set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-                     fail-mode=secure -- \
-      add-port br1 p2 -- set interface p2 type=$1 options:stream=unix:$OVS_RUNDIR/p0.sock ofport_request=2 -- \
-      add-port br1 p8 -- set interface p8 ofport_request=8 type=$1 --], [], [],
-      [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
-   AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-   AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-   AT_CHECK([ovs-ofctl add-flow br1 action=normal])
-   ovs-appctl time/stop
-   ovs-appctl time/warp 5000
-   AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-   AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-   ovs-appctl time/warp 100
-   sleep 1  # wait for forwarders process packets
-
-   AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(2),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-
-   OVS_VSWITCHD_STOP
-   AT_CLEANUP])
-
-DPIF_NETDEV_DUMMY_IFACE([dummy])
-DPIF_NETDEV_DUMMY_IFACE([dummy-pmd])
-
-m4_define([DPIF_NETDEV_MISS_FLOW_INSTALL],
-  [AT_SETUP([dpif-netdev - miss upcall key matches flow_install - $1])
-   OVS_VSWITCHD_START(
-     [add-port br0 p1 \
-      -- set interface p1 type=$1 options:pstream=punix:$OVS_RUNDIR/p0.sock \
-      -- set bridge br0 datapath-type=dummy \
-                        other-config:datapath-id=1234 fail-mode=secure], [], [],
-      [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
-   AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-   AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-   AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-   ovs-appctl ofproto/trace 'in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'
-   sleep 1
-
-   AT_CHECK([grep -A 1 'miss upcall' ovs-vswitchd.log | tail -n 1], [0], [dnl
-skb_priority(0),skb_mark(0),ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)
-])
-   AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-
-   # Now, the same again without megaflows.
-   AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
-])
-   AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-   sleep 1
-
-   AT_CHECK([grep -A 1 'miss upcall' ovs-vswitchd.log | tail -n 1], [0], [dnl
-skb_priority(0),skb_mark(0),ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)
-])
-   AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions: <del>
-skb_priority(0),skb_mark(0),ct_state(-new-est-rel-rpl-inv-trk-snat-dnat),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), actions: <del>
-])
-
-   OVS_VSWITCHD_STOP
-   AT_CLEANUP])
-
-DPIF_NETDEV_MISS_FLOW_INSTALL([dummy])
-DPIF_NETDEV_MISS_FLOW_INSTALL([dummy-pmd])
-
-m4_define([DPIF_NETDEV_FLOW_PUT_MODIFY],
-  [AT_SETUP([dpif-netdev - datapath flow modification - $1])
-   OVS_VSWITCHD_START(
-     [add-port br0 p1 -- set interface p1 type=$1 ofport_request=1 options:pstream=punix:$OVS_RUNDIR/p1.sock -- \
-      add-port br0 p2 -- set interface p2 type=$1 ofport_request=2 options:pstream=punix:$OVS_RUNDIR/p2.sock -- \
-      set bridge br0 datapath-type=dummy \
-                     other-config:datapath-id=1234 fail-mode=secure], [], [],
-      [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
-   AT_CHECK([ovs-appctl vlog/set dpif:file:dbg dpif_netdev:file:dbg])
-
-   # Add a flow that directs some packets received on p1 to p2 and the
-   # rest back out p1.
-   AT_CHECK([ovs-ofctl del-flows br0])
-   AT_CHECK([ovs-ofctl add-flow br0 priority=1,ip,in_port=1,dl_src=00:06:07:08:09:0a,dl_dst=00:01:02:03:04:05,actions=output:2])
-   AT_CHECK([ovs-ofctl add-flow br0 priority=0,in_port=1,actions=IN_PORT])
-
-   # Inject a packet of the form that should go to p2.
-   packet="in_port(1),packet_type(ns=0,id=0),eth(src=00:06:07:08:09:0a,dst=00:01:02:03:04:05),eth_type(0x8100),vlan(vid=1000,pcp=5),encap(eth_type(0x0800),ipv4(src=127.0.0.1,dst=127.0.0.1,proto=0,tos=0,ttl=64,frag=no))"
-   AT_CHECK([ovs-appctl netdev-dummy/receive p1 $packet --len 64], [0])
-
-   OVS_WAIT_UNTIL([grep "miss upcall" ovs-vswitchd.log])
-   AT_CHECK([grep -A 1 'miss upcall' ovs-vswitchd.log | tail -n 1], [0], [dnl
-skb_priority(0),skb_mark(0),ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=00:06:07:08:09:0a,dst=00:01:02:03:04:05),eth_type(0x8100),vlan(vid=1000,pcp=5),encap(eth_type(0x0800),ipv4(src=127.0.0.1,dst=127.0.0.1,proto=0,tos=0,ttl=64,frag=no))
-])
-   ovs-appctl revalidator/wait
-   # Dump the datapath flow to see that it goes to p2 ("actions:2").
-   AT_CHECK([ovs-appctl dpif/dump-flows br0], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=00:06:07:08:09:0a,dst=00:01:02:03:04:05),eth_type(0x8100),vlan(vid=1000,pcp=5),encap(eth_type(0x0800),ipv4(frag=no)), packets:0, bytes:0, used:never, actions:2
-])
-
-   # Delete the flows, then add new flows that would not match the same
-   # packet as before.
-   AT_CHECK([ovs-ofctl del-flows br0])
-   AT_CHECK([ovs-ofctl add-flow br0 priority=1,in_port=1,dl_src=00:06:07:08:09:0a,dl_dst=00:01:02:03:04:05,dl_type=0x0801,actions=output:2])
-   AT_CHECK([ovs-ofctl add-flow br0 priority=0,in_port=1,actions=IN_PORT])
-
-   # Wait for flow revalidation
-   ovs-appctl revalidator/wait
-
-   # Inject the same packet again.
-   AT_CHECK([ovs-appctl netdev-dummy/receive p1 $packet --len 64])
-
-   ovs-appctl revalidator/wait
-   # Dump the datapath flow to see that it goes to p1 ("actions:IN_PORT").
-   AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_timers], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=00:06:07:08:09:0a,dst=00:01:02:03:04:05),eth_type(0x8100),vlan(vid=1000,pcp=5),encap(eth_type(0x0800),ipv4(frag=no)), packets:1, bytes:64, used:0.0s, actions:1
-])
-   OVS_VSWITCHD_STOP
-   AT_CLEANUP])
-
-DPIF_NETDEV_FLOW_PUT_MODIFY([dummy])
-DPIF_NETDEV_FLOW_PUT_MODIFY([dummy-pmd])
-
-
-m4_define([DPIF_NETDEV_MISS_FLOW_DUMP],
-  [AT_SETUP([dpif-netdev - miss upcall key matches flow_dump - $1])
-   OVS_VSWITCHD_START(
-     [add-port br0 p1 \
-      -- set interface p1 type=$1 options:pstream=punix:$OVS_RUNDIR/p0.sock \
-      -- set bridge br0 datapath-type=dummy \
-                        other-config:datapath-id=1234 fail-mode=secure], [], [],
-      [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
-   AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
-], [])
-   AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-   AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-   AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-   sleep 1
-
-   AT_CHECK([grep -A 1 'miss upcall' ovs-vswitchd.log | tail -n 1], [0], [dnl
-skb_priority(0),skb_mark(0),ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)
-])
-   AT_CHECK([filter_flow_dump < ovs-vswitchd.log | strip_xout], [0], [dnl
-skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:0, bytes:0, used:never, actions: <del>
-])
-
-   # Now, the same again without megaflows.
-   AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
-])
-   AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
-], [])
-   AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-   sleep 1
-
-   AT_CHECK([grep -A 1 'miss upcall' ovs-vswitchd.log | tail -n 1], [0], [dnl
-skb_priority(0),skb_mark(0),ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)
-])
-   AT_CHECK([filter_flow_dump < ovs-vswitchd.log | strip_xout], [0], [dnl
-skb_priority(0),skb_mark(0),ct_state(0/0xff),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), packets:0, bytes:0, used:never, actions: <del>
-skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:0, bytes:0, used:never, actions: <del>
-])
-
-   OVS_VSWITCHD_STOP
-   AT_CLEANUP])
-
-DPIF_NETDEV_MISS_FLOW_DUMP([dummy])
-DPIF_NETDEV_MISS_FLOW_DUMP([dummy-pmd])
-
-AT_SETUP([dpif-netdev - meters])
-# Create br0 with interfaces p1 and p7
-#    and br1 with interfaces p2 and p8
-# with p1 and p2 connected via unix domain socket
-OVS_VSWITCHD_START(
-  [add-port br0 p1 -- set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p0.sock ofport_request=1 -- \
-   add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-                  fail-mode=secure -- \
-   add-port br1 p2 -- set interface p2 type=dummy options:stream=unix:$OVS_RUNDIR/p0.sock ofport_request=2 -- \
-   add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-meter br0 'meter=1 pktps burst stats bands=type=drop rate=1 burst_size=1'])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-meter br0 'meter=2 kbps burst stats bands=type=drop rate=1 burst_size=2'])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 'in_port=1 action=meter:1,7'])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 'in_port=7 action=meter:2,1'])
-AT_CHECK([ovs-ofctl add-flow br1 'in_port=2 action=8'])
-AT_CHECK([ovs-ofctl add-flow br1 'in_port=8 action=2'])
-ovs-appctl time/stop
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 dump-meters br0], [0], [dnl
-OFPST_METER_CONFIG reply (OF1.3) (xid=0x2):
-meter=1 pktps burst stats bands=
-type=drop rate=1 burst_size=1
-
-meter=2 kbps burst stats bands=
-type=drop rate=1 burst_size=2
-])
-
-ovs-appctl time/warp 5000
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-sleep 1  # wait for forwarders process packets
-
-# Meter 1 is measuring packets, allowing one packet per second with
-# bursts of one packet, so 4 out of 5 packets should hit the drop
-# band.
-# Meter 2 is measuring kbps, with burst size 2 (== 2000 bits). 4 packets
-# (240 bytes == 1920 bits) pass, but the last packet should hit the drop band.
-AT_CHECK([ovs-ofctl -O OpenFlow13 meter-stats br0 | strip_timers], [0], [dnl
-OFPST_METER reply (OF1.3) (xid=0x2):
-meter:1 flow_count:1 packet_in_count:5 byte_in_count:300 duration:0.0s bands:
-0: packet_count:4 byte_count:240
-
-meter:2 flow_count:1 packet_in_count:5 byte_in_count:300 duration:0.0s bands:
-0: packet_count:1 byte_count:60
-])
-
-# Advance time by 1/2 second
-ovs-appctl time/warp 500
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60])
-sleep 1  # wait for forwarders process packets
-
-# Meter 1 is measuring packets, allowing one packet per second with
-# bursts of one packet, so all 5 of the new packets should hit the drop
-# band.
-# Meter 2 is measuring kbps, with burst size 2 (== 2000 bits). After 500ms
-# there should be space for 80 + 500 bits, so one new 60 byte (480 bit) packet
-# should pass, remaining 4 should hit the drop band.
-AT_CHECK([ovs-ofctl -O OpenFlow13 meter-stats br0 | strip_timers], [0], [dnl
-OFPST_METER reply (OF1.3) (xid=0x2):
-meter:1 flow_count:1 packet_in_count:10 byte_in_count:600 duration:0.0s bands:
-0: packet_count:9 byte_count:540
-
-meter:2 flow_count:1 packet_in_count:10 byte_in_count:600 duration:0.0s bands:
-0: packet_count:5 byte_count:300
-])
-
-AT_CHECK([cat ovs-vswitchd.log | filter_flow_install | strip_xout_keep_actions], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions:meter(0),7
-recirc_id(0),in_port(2),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions:8
-recirc_id(0),in_port(7),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions:meter(1),1
-recirc_id(0),in_port(8),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions:2
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-m4_define([DPIF_NETDEV_FLOW_HW_OFFLOAD],
-  [AT_SETUP([dpif-netdev - partial hw offload - $1])
-   AT_SKIP_IF([test "$IS_WIN32" = "yes" || test "$IS_BSD" = "yes"])
-   OVS_VSWITCHD_START(
-     [add-port br0 p1 -- set interface p1 type=$1 ofport_request=1 options:pstream=punix:$OVS_RUNDIR/p1.sock -- \
-      set bridge br0 datapath-type=dummy \
-                     other-config:datapath-id=1234 fail-mode=secure], [], [],
-      [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
-   AT_CHECK([ovs-appctl vlog/set dpif:file:dbg dpif_netdev:file:dbg netdev_dummy:file:dbg])
-
-   AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:hw-offload=true])
-   OVS_WAIT_UNTIL([grep "netdev: Flow API Enabled" ovs-vswitchd.log])
-
-   AT_CHECK([ovs-ofctl del-flows br0])
-   AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=IN_PORT])
-
-   packet="packet_type(ns=0,id=0),eth(src=00:06:07:08:09:0a,dst=00:01:02:03:04:05),eth_type(0x0800),ipv4(src=127.0.0.1,dst=127.0.0.1,proto=0,tos=0,ttl=64,frag=no)"
-   AT_CHECK([ovs-appctl netdev-dummy/receive p1 $packet --len 64], [0])
-
-   OVS_WAIT_UNTIL([grep "miss upcall" ovs-vswitchd.log])
-   AT_CHECK([grep -A 1 'miss upcall' ovs-vswitchd.log | tail -n 1], [0], [dnl
-skb_priority(0),skb_mark(0),ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=00:06:07:08:09:0a,dst=00:01:02:03:04:05),eth_type(0x0800),ipv4(src=127.0.0.1,dst=127.0.0.1,proto=0,tos=0,ttl=64,frag=no)
-])
-   # Check that flow successfully offloaded.
-   OVS_WAIT_UNTIL([grep "succeed to add netdev flow" ovs-vswitchd.log])
-   AT_CHECK([filter_hw_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-p1: flow put[[create]]: flow match: recirc_id=0,eth,ip,in_port=1,vlan_tci=0x0000,nw_frag=no, mark: 0
-])
-   # Check that datapath flow installed successfully.
-   AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-   # Inject the same packet again.
-   AT_CHECK([ovs-appctl netdev-dummy/receive p1 $packet --len 64], [0])
-
-   # Check for succesfull packet matching with installed offloaded flow.
-   AT_CHECK([filter_hw_packet_netdev_dummy < ovs-vswitchd.log | strip_xout], [0], [dnl
-p1: packet: ip,vlan_tci=0x0000,dl_src=00:06:07:08:09:0a,dl_dst=00:01:02:03:04:05,nw_src=127.0.0.1,nw_dst=127.0.0.1,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=64 matches with flow: recirc_id=0,eth,ip,vlan_tci=0x0000,nw_frag=no with mark: 0
-])
-
-   ovs-appctl revalidator/wait
-   # Dump the datapath flow to see that actions was executed for a packet.
-   AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_timers], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:64, used:0.0s, actions:1
-])
-
-   # Wait for datapath flow expiration.
-   ovs-appctl time/stop
-   ovs-appctl time/warp 15000
-   ovs-appctl revalidator/wait
-
-   # Check that flow successfully deleted from HW.
-   OVS_WAIT_UNTIL([grep "succeed to delete netdev flow" ovs-vswitchd.log])
-   AT_CHECK([filter_hw_flow_del < ovs-vswitchd.log | strip_xout], [0], [dnl
-p1: flow del: mark: 0
-])
-   OVS_VSWITCHD_STOP
-   AT_CLEANUP])
-
-DPIF_NETDEV_FLOW_HW_OFFLOAD([dummy])
-DPIF_NETDEV_FLOW_HW_OFFLOAD([dummy-pmd])
diff --git a/tests/file_name.at b/tests/file_name.at
deleted file mode 100644
index e263ce326..000000000
--- a/tests/file_name.at
+++ /dev/null
@@ -1,125 +0,0 @@
-AT_BANNER([test dir_name and base_name functions])
-
-m4_define([CHECK_FILE_NAME],
-  [AT_SETUP([components of "$1" are "$2", "$3"])
-   AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-   AT_KEYWORDS([dir_name base_name])
-   AT_CHECK([ovstest test-util file_name "AS_ESCAPE($1)"], [0], [$2
-$3
-])
-   AT_CLEANUP])
-
-# These are the test cases given in POSIX for dirname() and basename().
-CHECK_FILE_NAME([/usr/lib], [/usr], [lib])
-CHECK_FILE_NAME([/usr/], [/], [usr])
-CHECK_FILE_NAME([usr], [.], [usr])
-CHECK_FILE_NAME([/], [/], [/])
-CHECK_FILE_NAME([.], [.], [.])
-CHECK_FILE_NAME([..], [.], [..])
-CHECK_FILE_NAME([//], [//], [//])       # / is also allowed
-CHECK_FILE_NAME([//foo], [//], [foo])   # / is also allowed for dirname
-CHECK_FILE_NAME([], [.], [.])
-
-# Additional test cases.
-CHECK_FILE_NAME([dir/file], [dir], [file])
-CHECK_FILE_NAME([dir/file/], [dir], [file])
-CHECK_FILE_NAME([dir/file//], [dir], [file])
-CHECK_FILE_NAME([///foo], [/], [foo])
-
-AT_BANNER([test follow_symlinks function])
-
-m4_define([CHECK_FOLLOW],
-  [echo "check $1 -> $2"
-   AT_CHECK_UNQUOTED([ovstest test-util follow-symlinks "$1"], [0], [$2
-])
-   echo])
-
-AT_SETUP([follow_symlinks - relative symlinks])
-: > target
-ln -s target source
-AT_SKIP_IF([test ! -h source])
-CHECK_FOLLOW([source], [target])
-
-mkdir dir
-ln -s target2 dir/source2
-CHECK_FOLLOW([dir/source2], [dir/target2])
-
-mkdir dir/dir2
-ln -s dir/b a
-ln -s c dir/b
-ln -s dir2/d dir/c
-CHECK_FOLLOW([a], [dir/dir2/d])
-AT_CLEANUP
-
-AT_SETUP([follow_symlinks - absolute symlinks])
-: > target
-ln -s "`pwd`/target" source
-AT_SKIP_IF([test ! -h source])
-CHECK_FOLLOW([source], [`pwd`/target])
-
-mkdir dir
-ln -s "`pwd`/dir/target2" dir/source2
-CHECK_FOLLOW([dir/source2], [`pwd`/dir/target2])
-
-mkdir dir/dir2
-ln -s "`pwd`/dir/b" a
-ln -s "`pwd`/dir/c" dir/b
-ln -s "`pwd`/dir/dir2/d" dir/c
-CHECK_FOLLOW([a], [`pwd`/dir/dir2/d])
-AT_CLEANUP
-
-AT_SETUP([follow_symlinks - symlinks to directories])
-mkdir target
-ln -s target source
-AT_SKIP_IF([test ! -h source])
-ln -s target/ source2
-CHECK_FOLLOW([source], [target])
-CHECK_FOLLOW([source2], [target/])
-
-# follow_symlinks() doesn't expand symlinks in the middle of a name.
-: > source/x
-CHECK_FOLLOW([source/x], [source/x])
-AT_CLEANUP
-
-AT_SETUP([follow_symlinks - nonexistent targets])
-ln -s target source
-AT_SKIP_IF([test ! -h source])
-CHECK_FOLLOW([source], [target])
-CHECK_FOLLOW([target], [target])
-CHECK_FOLLOW([target], [target])
-AT_CLEANUP
-
-AT_SETUP([follow_symlinks - regular files])
-touch x
-CHECK_FOLLOW([x], [x])
-AT_CLEANUP
-
-AT_SETUP([follow_symlinks - device targets])
-AT_SKIP_IF([test ! -e /dev/null])
-AT_SKIP_IF([test ! -e /dev/full])
-ln -s /dev/null x
-ln -s /dev/full y
-CHECK_FOLLOW([x], [/dev/null])
-CHECK_FOLLOW([y], [/dev/full])
-AT_CLEANUP
-
-AT_SETUP([follow_symlinks - nonexistent files])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-CHECK_FOLLOW([nonexistent], [nonexistent])
-CHECK_FOLLOW([a/b/c], [a/b/c])
-CHECK_FOLLOW([/a/b/c], [/a/b/c])
-CHECK_FOLLOW([//a/b/c], [//a/b/c])
-AT_CLEANUP
-
-AT_SETUP([follow_symlinks - symlink loop])
-ln -s a b
-AT_SKIP_IF([test ! -h b])
-ln -s b a
-AT_SKIP_IF([test ! -h a])
-
-AT_CHECK([ovstest test-util follow-symlinks a], [0], [a
-], [stderr])
-AT_CHECK([sed 's/^[[^|]]*|//' stderr], [0],
-  [00001|util|WARN|a: too many levels of symlinks
-])
-AT_CLEANUP
diff --git a/tests/flowgen.py b/tests/flowgen.py
deleted file mode 100755
index 976fe7a97..000000000
--- a/tests/flowgen.py
+++ /dev/null
@@ -1,239 +0,0 @@
-#! /usr/bin/env python
-
-# Copyright (c) 2009, 2010, 2011, 2012, 2015, 2017 Nicira, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import socket
-import struct
-
-
-def pack_ethaddr(ea):
-    octets = ea.split(':')
-    assert len(octets) == 6
-    return b''.join([struct.pack('B', int(octet, 16)) for octet in octets])
-
-
-def output(attrs):
-    # Compose flow.
-
-    flow = {}
-    flow['DL_SRC'] = "00:02:e3:0f:80:a4"
-    flow['DL_DST'] = "00:1a:92:40:ac:05"
-    flow['NW_PROTO'] = 0
-    flow['NW_TOS'] = 0
-    flow['NW_SRC'] = '0.0.0.0'
-    flow['NW_DST'] = '0.0.0.0'
-    flow['TP_SRC'] = 0
-    flow['TP_DST'] = 0
-    if 'DL_VLAN' in attrs:
-        flow['DL_VLAN'] = {'none': 0xffff,
-                           'zero': 0,
-                           'nonzero': 0x0123}[attrs['DL_VLAN']]
-    else:
-        flow['DL_VLAN'] = 0xffff  # OFP_VLAN_NONE
-    if attrs['DL_HEADER'] == '802.2':
-        flow['DL_TYPE'] = 0x5ff  # OFP_DL_TYPE_NOT_ETH_TYPE
-    elif attrs['DL_TYPE'] == 'ip':
-        flow['DL_TYPE'] = 0x0800  # ETH_TYPE_IP
-        flow['NW_SRC'] = '10.0.2.15'
-        flow['NW_DST'] = '192.168.1.20'
-        flow['NW_TOS'] = 44
-        if attrs['TP_PROTO'] == 'other':
-            flow['NW_PROTO'] = 42
-        elif attrs['TP_PROTO'] in ('TCP', 'TCP+options'):
-            flow['NW_PROTO'] = 6  # IPPROTO_TCP
-            flow['TP_SRC'] = 6667
-            flow['TP_DST'] = 9998
-        elif attrs['TP_PROTO'] == 'UDP':
-            flow['NW_PROTO'] = 17  # IPPROTO_UDP
-            flow['TP_SRC'] = 1112
-            flow['TP_DST'] = 2223
-        elif attrs['TP_PROTO'] == 'ICMP':
-            flow['NW_PROTO'] = 1  # IPPROTO_ICMP
-            flow['TP_SRC'] = 8    # echo request
-            flow['TP_DST'] = 0    # code
-        else:
-            assert False
-        if attrs['IP_FRAGMENT'] not in ('no', 'first'):
-            flow['TP_SRC'] = flow['TP_DST'] = 0
-    elif attrs['DL_TYPE'] == 'non-ip':
-        flow['DL_TYPE'] = 0x5678
-    else:
-        assert False
-
-    # Compose packet
-    packet = b''
-    wildcards = 1 << 5 | 1 << 6 | 1 << 7 | 32 << 8 | 32 << 14 | 1 << 21
-
-    packet += pack_ethaddr(flow['DL_DST'])
-    packet += pack_ethaddr(flow['DL_SRC'])
-    if flow['DL_VLAN'] != 0xffff:
-        packet += struct.pack('>HH', 0x8100, flow['DL_VLAN'])
-    len_ofs = len(packet)
-    if attrs['DL_HEADER'].startswith('802.2'):
-        packet += struct.pack('>H', 0)
-    if attrs['DL_HEADER'] == '802.2':
-        packet += struct.pack('BBB', 0x42, 0x42, 0x03)  # LLC for 802.1D STP
-    else:
-        if attrs['DL_HEADER'] == '802.2+SNAP':
-            packet += struct.pack('BBB', 0xaa, 0xaa, 0x03)  # LLC for SNAP
-            packet += struct.pack('BBB', 0, 0, 0)           # SNAP OUI
-        packet += struct.pack('>H', flow['DL_TYPE'])
-        if attrs['DL_TYPE'] == 'ip':
-            ip = struct.pack('>BBHHHBBHLL',
-                             (4 << 4) | 5,      # version, hdrlen
-                             flow['NW_TOS'],    # type of service
-                             0,                 # total length, filled in later
-                             65432,             # id
-                             0,                 # frag offset
-                             64,                # ttl
-                             flow['NW_PROTO'],  # protocol
-                             0,                 # checksum
-                             0x0a00020f,        # source
-                             0xc0a80114)        # dest
-            wildcards &= ~(1 << 5 | 63 << 8 | 63 << 14 | 1 << 21)
-            if attrs['IP_OPTIONS'] == 'yes':
-                ip = struct.pack('B', (4 << 4) | 8) + ip[1:]
-                ip += struct.pack('>BBHHHBBBx',
-                                  130,       # type
-                                  11,        # length
-                                  0x6bc5,    # top secret
-                                  0xabcd,
-                                  0x1234,
-                                  1,
-                                  2,
-                                  3)
-            if attrs['IP_FRAGMENT'] != 'no':
-                frag_map = {'first': 0x2000,   # more frags, ofs 0
-                            'middle': 0x2111,  # more frags, ofs 0x888
-                            'last': 0x0222}    # last frag, ofs 0x1110
-                ip = (ip[:6]
-                      + struct.pack('>H', frag_map[attrs['IP_FRAGMENT']])
-                      + ip[8:])
-            if attrs['IP_FRAGMENT'] in ('no', 'first'):
-                if attrs['TP_PROTO'].startswith('TCP'):
-                    tcp = struct.pack('>HHLLHHHH',
-                                      flow['TP_SRC'],  # source port
-                                      flow['TP_DST'],  # dest port
-                                      87123455,        # seqno
-                                      712378912,       # ackno
-                                      (5 << 12) | 0x02 | 0x10,
-                                           # hdrlen, SYN, ACK
-                                      5823,   # window size
-                                      18923,  # checksum
-                                      12893)  # urgent pointer
-                    if attrs['TP_PROTO'] == 'TCP+options':
-                        tcp = (tcp[:12]
-                               + struct.pack('H', (6 << 12) | 0x02 | 0x10)
-                               + tcp[14:])
-                        tcp += struct.pack('>BBH', 2, 4, 1975)  # MSS option
-                    tcp += b'payload'
-                    ip += tcp
-                    wildcards &= ~(1 << 6 | 1 << 7)
-                elif attrs['TP_PROTO'] == 'UDP':
-                    udp_len = 15
-                    udp = struct.pack('>HHHH',
-                                      flow['TP_SRC'],
-                                      flow['TP_DST'],
-                                      udp_len, 0)
-                    while len(udp) < udp_len:
-                        udp += struct.pack('B', udp_len)
-                    ip += udp
-                    wildcards &= ~(1 << 6 | 1 << 7)
-                elif attrs['TP_PROTO'] == 'ICMP':
-                    ip += struct.pack('>BBHHH',
-                                      8,        # echo request
-                                      0,        # code
-                                      0,        # checksum
-                                      736,      # identifier
-                                      931)      # sequence number
-                    wildcards &= ~(1 << 6 | 1 << 7)
-                elif attrs['TP_PROTO'] == 'other':
-                    ip += b'other header'
-                else:
-                    assert False
-            ip = ip[:2] + struct.pack('>H', len(ip)) + ip[4:]
-            packet += ip
-    if attrs['DL_HEADER'].startswith('802.2'):
-        packet_len = len(packet)
-        if flow['DL_VLAN'] != 0xffff:
-            packet_len -= 4
-        packet = (packet[:len_ofs]
-                  + struct.pack('>H', packet_len)
-                  + packet[len_ofs + 2:])
-
-    print(' '.join(['%s=%s' for k, v in attrs.items()]))
-    print(' '.join(['%s=%s' for k, v in flow.items()]))
-    print()
-
-    flows.write(struct.pack('>LH',
-                            wildcards,  # wildcards
-                            1))         # in_port
-    flows.write(pack_ethaddr(flow['DL_SRC']))
-    flows.write(pack_ethaddr(flow['DL_DST']))
-    flows.write(struct.pack('>HBxHBBxx',
-                            flow['DL_VLAN'],
-                            0,  # DL_VLAN_PCP
-                            flow['DL_TYPE'],
-                            flow['NW_TOS'],
-                            flow['NW_PROTO']))
-    flows.write(socket.inet_aton(flow['NW_SRC']))
-    flows.write(socket.inet_aton(flow['NW_DST']))
-    flows.write(struct.pack('>HH', flow['TP_SRC'], flow['TP_DST']))
-
-    packets.write(struct.pack('>LLLL',
-                              0,                # timestamp seconds
-                              0,                # timestamp microseconds
-                              len(packet),      # bytes saved
-                              len(packet)))     # total length
-    packets.write(packet)
-
-
-flows = open('flows', 'wb')
-packets = open('pcap', 'wb')
-
-# Print pcap file header.
-packets.write(struct.pack('>LHHLLLL',
-                          0xa1b2c3d4,  # magic number
-                          2,           # major version
-                          4,           # minor version
-                          0,           # time zone offset
-                          0,           # time stamp accuracy
-                          1518,        # snaplen
-                          1))          # Ethernet
-
-output({'DL_HEADER': '802.2'})
-
-for dl_header in ('802.2+SNAP', 'Ethernet'):
-    a = {'DL_HEADER': dl_header}
-    for dl_vlan in ('none', 'zero', 'nonzero'):
-        b = a.copy()
-        b['DL_VLAN'] = dl_vlan
-
-        # Non-IP case.
-        c = b.copy()
-        c['DL_TYPE'] = 'non-ip'
-        output(c)
-
-        for ip_options in ('no', 'yes'):
-            c = b.copy()
-            c['DL_TYPE'] = 'ip'
-            c['IP_OPTIONS'] = ip_options
-            for ip_fragment in ('no', 'first', 'middle', 'last'):
-                d = c.copy()
-                d['IP_FRAGMENT'] = ip_fragment
-                for tp_proto in ('TCP', 'TCP+options', 'UDP', 'ICMP', 'other'):
-                    e = d.copy()
-                    e['TP_PROTO'] = tp_proto
-                    output(e)
diff --git a/tests/fuzz-regression-list.at b/tests/fuzz-regression-list.at
deleted file mode 100644
index e3173fb88..000000000
--- a/tests/fuzz-regression-list.at
+++ /dev/null
@@ -1,23 +0,0 @@
-TEST_FUZZ_REGRESSION([flow_extract_fuzzer-5112775280951296])
-TEST_FUZZ_REGRESSION([flow_extract_fuzzer-5457710546944000])
-TEST_FUZZ_REGRESSION([json_parser_fuzzer-4790908707930112])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-4584019764183040])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-4730143510626304])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-4854119633256448])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-5070973479944192])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-5072291707748352])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-5147430386401280])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-5168455220199424])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-5190507327127552])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-5204186701496320])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-5394482341085184])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-5395207246839808])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-5647458888581120])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-5674119268925440])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-5674419757252608])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-5677588436484096])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-5706562554298368])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-5722747668791296])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-6285128790704128])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-6470117922701312])
-TEST_FUZZ_REGRESSION([ofp_print_fuzzer-6502620041576448])
diff --git a/tests/fuzz-regression.at b/tests/fuzz-regression.at
deleted file mode 100644
index 9de460a56..000000000
--- a/tests/fuzz-regression.at
+++ /dev/null
@@ -1,21 +0,0 @@
-AT_BANNER([fuzz regression])
-
-OVS_START_SHELL_HELPERS
-test_fuzz_regression() {
-   filename=$top_srcdir/tests/fuzz-regression/$1
-   AS_CASE([$1],
-     [flow_extract_fuzzer*], [ovs-ofctl parse-packet < $filename],
-     [ofp_print_fuzzer*], [ovs-ofctl ofp-parse - < $filename],
-     [json_parser_fuzzer*], [ovstest test-json $filename],
-     [*], [AT_FAIL_IF([:])])
-   status=$?
-   AT_CHECK([test $status = 0 || test $status = 1])
-}
-OVS_END_SHELL_HELPERS
-
-m4_define([TEST_FUZZ_REGRESSION],
-  [AT_SETUP([fuzz regression - $1])
-   test_fuzz_regression $1
-   AT_CLEANUP])
-
-m4_include([tests/fuzz-regression-list.at])
diff --git a/tests/fuzz-regression/flow_extract_fuzzer-5112775280951296 b/tests/fuzz-regression/flow_extract_fuzzer-5112775280951296
deleted file mode 100644
index 610d259f9f44193a5f36cef1ea4923e57ad4876a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 54
TcmY#TK!CQpAT|R+04ECo<W~p8

diff --git a/tests/fuzz-regression/flow_extract_fuzzer-5457710546944000 b/tests/fuzz-regression/flow_extract_fuzzer-5457710546944000
deleted file mode 100644
index 2d65673e736d9cee7cea231ed627e9ed9b7f9a17..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 227
ocmY#TK!CQpAU4AlD})dZRyzX at 2}Y<miS&P%dL}e;Vd9j~009jhD*ylh

diff --git a/tests/fuzz-regression/json_parser_fuzzer-4790908707930112 b/tests/fuzz-regression/json_parser_fuzzer-4790908707930112
deleted file mode 100644
index 87d5f34dc6e4e59ffd679fadd9eea4d3eb8d0ea2..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 43
tcmWN<0TBQo3<5x-7{LL at Mj-oF(7&e+2DF0{j!e1wFDtnywT5Qz^#H@$2)+OS

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-4584019764183040 b/tests/fuzz-regression/ofp_print_fuzzer-4584019764183040
deleted file mode 100644
index c0b9ae23c217d2eb3da03fef89cb75579f22da34..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 128
zcmX|(*$n_72t%I>7)Ky+3CDAD<dS|gr3Yhj#i7NT!i-jtG*yln>Z=+m2ez=f7y<-)
L^=ld0Ylj~XH*q5*

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-4730143510626304 b/tests/fuzz-regression/ofp_print_fuzzer-4730143510626304
deleted file mode 100644
index 6001b7360bbbc8a46f68fee9f8d311ee3260a6c7..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 12
QcmZQ$WZ+Q%g8x7a00_qc^8f$<

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-4854119633256448 b/tests/fuzz-regression/ofp_print_fuzzer-4854119633256448
deleted file mode 100644
index b76d96317205b0c9fa3d1b7000f10ca4a562727c..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 48
lcmZSQXE0Du_^$u~{}mV*fIKi at 5Mp2ubzop%V1!D7DF8Wq3#R}8

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-5070973479944192 b/tests/fuzz-regression/ofp_print_fuzzer-5070973479944192
deleted file mode 100644
index 3bc5c3c9663b66f82bc7f7958fcfc88563432ee7..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 112
zcmZP<W++eq0tOZk38WK%m;uC6Q1}m_AdLSC{~-X#MV3HtKsrD&2oWIf|9=Jn28LCP
K3=9lRAV~nt-XS#r

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-5072291707748352 b/tests/fuzz-regression/ofp_print_fuzzer-5072291707748352
deleted file mode 100644
index 633cc1ef3bb8dccfcaeceac9a70b76e6de94328c..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 112
zcmZP<W++eq0tOZk38WK%m;uDX0scb)P#VU>LPIqF2dQD;V_;at$iTqB1QG-QQ$sF9

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-5147430386401280 b/tests/fuzz-regression/ofp_print_fuzzer-5147430386401280
deleted file mode 100644
index 020e06dc0f39c3364ca1e180e43ddf64a87d5aa1..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 128
zcmZSNV`xwSf&VZP!T^cDSzsv?;=cj|ObbN(|9=Jr1_osX23{0(P|km3<AKJ4O$HMH
D|63hU

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-5168455220199424 b/tests/fuzz-regression/ofp_print_fuzzer-5168455220199424
deleted file mode 100644
index 523b3766ed6ab820d1473ece783ad5469e23f2f1..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 80
xcmZSQX9!RL0tN;~5Cx<a6#jz&gE<3(r~?C3A|tUlgW*3|2 at 1i$z`=wp0069x4?F+>

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-5190507327127552 b/tests/fuzz-regression/ofp_print_fuzzer-5190507327127552
deleted file mode 100644
index 2e7669ce0a9162ac99eb687594b0de0b0fe4a689..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 113
zcmZP<W++eq0tOZk38WK%m;uDX2mZqVLJ?2|i34E*MgIS1;A3D|#mK<GzyuZq09&^k
AIsgCw

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-5204186701496320 b/tests/fuzz-regression/ofp_print_fuzzer-5204186701496320
deleted file mode 100644
index 045d93662aa9d2fdfde556f667702ae119365488..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 80
YcmZSNV+c?n2QWZ2{Rh+kA(Vmw0He_iT>t<8

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-5394482341085184 b/tests/fuzz-regression/ofp_print_fuzzer-5394482341085184
deleted file mode 100644
index b42c9932509456ef40635f4f2fbc48ce4c4e8069..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 128
zcmYj{$qfJ?48zO<h!HBW023lM4_8IW%TAIq!y+=tO^;&U<U0qKT$gB2jj}%xFpl-;
Fewt&48RY-~

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-5395207246839808 b/tests/fuzz-regression/ofp_print_fuzzer-5395207246839808
deleted file mode 100644
index 6b566688f3be4a20dbce4d1aa654c9a39f9d5424..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 156
zcmZP+WSFA>1PqKoJORWa2mJs4AEFJ&00C4p{{LsNU|>*IU=TnRXJA%f0E^UtNQh2^
HRt5$DVtFH(

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-5647458888581120 b/tests/fuzz-regression/ofp_print_fuzzer-5647458888581120
deleted file mode 100644
index 2a803ce5b93b850f7977323daba3356d5e231234..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 48
xcmZSOWiU_x19lb$1|BvB2}TE71_p!w{~0707?c$l^kPLBK!Amjfr)`Z0RV$D1qJ{B

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-5674119268925440 b/tests/fuzz-regression/ofp_print_fuzzer-5674119268925440
deleted file mode 100644
index 6d0704c31c9de3a84ab059ad86cf3abce816b60f..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 96
zcmZSQXGl;00tN;~5Cx<a6#jz&g98JDC=fG%B{C9=GZ_AZl|YF9KxH8HjFW&W769=y
J9wb>f696$B6u$rf

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-5674419757252608 b/tests/fuzz-regression/ofp_print_fuzzer-5674419757252608
deleted file mode 100644
index 7c3be52fe36d910da0eaddcf11420023a94fe735..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 112
zcmZP<W++eq0tOZk38WMLD=;u9{09RF1(Eo#0OUcK2oj<UNiA3vkdLH?L4bi_6(a)!
I0~1IP04O0a1ONa4

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-5677588436484096 b/tests/fuzz-regression/ofp_print_fuzzer-5677588436484096
deleted file mode 100644
index 85665f521bbd6a58ac94af80824e5c32afa81df2..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 128
zcmZSQXJ}9W0tN;~5Cx<a6#jz&Lofq_r~?C3A|tUlgW*3=4y+1DKp6~-^Wbcl6agAy
HJXAjbT{a%`

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-5706562554298368 b/tests/fuzz-regression/ofp_print_fuzzer-5706562554298368
deleted file mode 100644
index d2dd2befec21dc95ec003a653beceff875a4d761..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 72
zcmZSQXYfz}f(8ag5T(GtprG&{3>b777(^Wy7=RN0|0`r97H2U02P;7#7#Jr2btotR
E0FjIk?*IS*

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-5722747668791296 b/tests/fuzz-regression/ofp_print_fuzzer-5722747668791296
deleted file mode 100644
index aa18ede78895fc94ef0a6ee4805b2577f024047f..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 120
zcmZSNW2jId0RAf|01*uQhp-u7d<gyjKZ67VgR%mHih=?Ig92O at F0KVp$H2hA0Wtsp
D-(nQ&

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-6285128790704128 b/tests/fuzz-regression/ofp_print_fuzzer-6285128790704128
deleted file mode 100644
index ab820aaddcea328b1beda5e3d7e2a7791c5780cc..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 128
zcmZSNV`xwSgZ~f;NCH_14qOx at fh5cT;lM=x|7WmZU{F?I(1M5n`3hjZ at _!)Bz<^;Q
INEr|V06V-LY5)KL

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-6470117922701312 b/tests/fuzz-regression/ofp_print_fuzzer-6470117922701312
deleted file mode 100644
index c5b9c189f6a8d852ced7bde198297c56bb0d6f61..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 256
zcmZSNVq{Q20{{QRI3QNrT at a7qHUmr$C(Qs=LN3iFfYWHW1juRsfe;y>@{nb)u`yKx
E00{IZ*Z=?k

diff --git a/tests/fuzz-regression/ofp_print_fuzzer-6502620041576448 b/tests/fuzz-regression/ofp_print_fuzzer-6502620041576448
deleted file mode 100644
index 82534e60c6fc25c4565bd9b61139224140c0978d..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 128
zcmZSNV`yMtI-su3^qv6-IJg at AGYBxSGB7az|NozXnc*J;17icjM<zZ74mJUX9e=;u
z{0GXp0TnPXu>5EI&(82)M1jG90jSu5fk9b;K|oo-<30le6N3WKU<A<US-_wr4Kf%6
JeuLOx002u%82tbM

diff --git a/tests/heap.at b/tests/heap.at
deleted file mode 100644
index 5267564b1..000000000
--- a/tests/heap.at
+++ /dev/null
@@ -1,13 +0,0 @@
-AT_BANNER([heap library])
-
-m4_define([TEST_HEAP],
-  [AT_SETUP([heap library -- m4_bpatsubst([$1], [-], [ ])])
-   AT_CHECK([ovstest test-heap $1])
-   AT_CLEANUP])
-
-TEST_HEAP([insert-delete-same-order])
-TEST_HEAP([insert-delete-reverse-order])
-TEST_HEAP([insert-delete-every-order])
-TEST_HEAP([insert-delete-same-order-with-dups])
-TEST_HEAP([raw-insert])
-TEST_HEAP([raw-delete])
diff --git a/tests/idltest.ann b/tests/idltest.ann
deleted file mode 100644
index 66e863737..000000000
--- a/tests/idltest.ann
+++ /dev/null
@@ -1,9 +0,0 @@
-# -*- python -*-
-
-# This code, when invoked by "ovsdb-idlc annotate" (by the build
-# process), annotates idltest.ovsschema with additional data that give
-# the ovsdb-idl engine information about the types involved, so that
-# it can generate more programmer-friendly data structures.
-
-s["idlPrefix"] = "idltest_"
-s["idlHeader"] = "\"tests/idltest.h\""
diff --git a/tests/idltest.ovsschema b/tests/idltest.ovsschema
deleted file mode 100644
index bee79fc50..000000000
--- a/tests/idltest.ovsschema
+++ /dev/null
@@ -1,184 +0,0 @@
-{
-  "name": "idltest",
-  "version": "1.2.3",
-  "tables": {
-    "link1": {
-      "columns": {
-        "i": {
-          "type": "integer"
-        },
-        "k": {
-          "type": {
-            "key": {
-              "type": "uuid",
-              "refTable": "link1"
-            }
-          }
-        },
-        "ka": {
-          "type": {
-            "key": {
-              "type": "uuid",
-              "refTable": "link1"
-            },
-            "max": "unlimited",
-            "min": 0
-          }
-        },
-        "l2": {
-          "type": {
-            "key": {
-              "type": "uuid",
-              "refTable": "link2"
-            },
-            "min": 0
-          }
-        }
-      },
-      "isRoot" : true
-    },
-    "link2": {
-      "columns": {
-        "i": {
-          "type": "integer"
-        },
-        "l1": {
-          "type": {
-            "key": {
-              "type": "uuid",
-              "refTable": "link1"
-            },
-            "min": 0
-          }
-        }
-      },
-      "isRoot" : true
-    },
-    "simple": {
-      "columns": {
-        "b": {
-          "type": "boolean"
-        },
-        "ba": {
-          "type": {
-            "key": "boolean",
-            "max": 1,
-            "min": 0
-          }
-        },
-        "i": {
-          "type": "integer"
-        },
-        "ia": {
-          "type": {
-            "key": "integer",
-            "max": "unlimited",
-            "min": 0
-          }
-        },
-        "r": {
-          "type": "real"
-        },
-        "ra": {
-          "type": {
-            "key": "real",
-            "max": "unlimited",
-            "min": 0
-          }
-        },
-        "s": {
-          "type": "string"
-        },
-        "sa": {
-          "type": {
-            "key": "string",
-            "max": "unlimited",
-            "min": 0
-          }
-        },
-        "u": {
-          "type": "uuid"
-        },
-        "ua": {
-          "type": {
-            "key": "uuid",
-            "max": "unlimited",
-            "min": 0
-          }
-        }
-      },
-      "isRoot" : true
-    },
-    "simple2" : {
-      "columns" : {
-        "name" : {
-          "type": "string"
-        },
-        "smap" : {
-          "type": {
-            "key" : "string",
-            "value": "string",
-            "min": 0,
-            "max": "unlimited"
-          }
-        },
-        "imap": {
-          "type" : {
-            "key": {
-              "type" : "integer",
-              "minInteger" : 0,
-              "maxInteger" : 4095
-            },
-            "value": {
-              "type" : "string"
-            },
-            "min": 0,
-            "max": "unlimited"
-          }
-        }
-      },
-      "isRoot" : true
-    },
-    "simple3" : {
-      "columns" : {
-        "name" : {
-          "type": "string"
-        },
-        "uset": {
-          "type": {
-             "key": {"type": "uuid"},
-             "min": 0,
-             "max": "unlimited"
-          }
-        },
-        "uref": {
-          "type": {
-             "key": {"type": "uuid",
-                     "refTable": "simple4",
-                     "refType": "strong"},
-             "min": 0,
-             "max": "unlimited"
-          }
-        }
-      },
-      "isRoot" : true
-    },
-    "simple4" : {
-      "columns" : {
-        "name" : {
-          "type": "string"
-        }
-      },
-      "isRoot" : false
-    },
-    "singleton" : {
-      "columns" : {
-        "name" : {
-          "type": "string"
-        }
-      },
-      "isRoot" : true,
-      "maxRows" : 1
-    }
-  }
-}
diff --git a/tests/idltest2.ovsschema b/tests/idltest2.ovsschema
deleted file mode 100644
index 210e4c389..000000000
--- a/tests/idltest2.ovsschema
+++ /dev/null
@@ -1,144 +0,0 @@
-{
-  "name": "idltest",
-  "version": "1.2.3",
-  "tables": {
-    "link1": {
-      "columns": {
-        "i": {
-          "type": "integer"
-        },
-        "k": {
-          "type": {
-            "key": {
-              "type": "uuid",
-              "refTable": "link1"
-            }
-          }
-        },
-        "ka": {
-          "type": {
-            "key": {
-              "type": "uuid",
-              "refTable": "link1"
-            },
-            "max": "unlimited",
-            "min": 0
-          }
-        }
-      }
-    },
-    "simple": {
-      "columns": {
-        "b": {
-          "type": "boolean"
-        },
-        "ba": {
-          "type": {
-            "key": "boolean",
-            "max": 1,
-            "min": 0
-          }
-        },
-        "i": {
-          "type": "integer"
-        },
-        "ia": {
-          "type": {
-            "key": "integer",
-            "max": "unlimited",
-            "min": 0
-          }
-        },
-        "r": {
-          "type": "real"
-        },
-        "ra": {
-          "type": {
-            "key": "real",
-            "max": "unlimited",
-            "min": 0
-          }
-        },
-        "s": {
-          "type": "string"
-        },
-        "sa": {
-          "type": {
-            "key": "string",
-            "max": "unlimited",
-            "min": 0
-          }
-        },
-        "u": {
-          "type": "uuid"
-        },
-        "ua": {
-          "type": {
-            "key": "uuid",
-            "max": "unlimited",
-            "min": 0
-          }
-        }
-      }
-    },
-    "simple2" : {
-      "columns" : {
-        "name" : {
-          "type": "string"
-        },
-        "smap" : {
-          "type": {
-            "key" : "string",
-            "value": "string",
-            "min": 0,
-            "max": "unlimited"
-          }
-        },
-        "imap": {
-          "type" : {
-            "key": {
-              "type" : "integer",
-              "minInteger" : 0,
-              "maxInteger" : 4095
-            },
-            "value": {
-              "type" : "string"
-            },
-            "min": 0,
-            "max": "unlimited"
-          }
-        }
-      }
-    },
-    "simple3" : {
-      "columns" : {
-        "name" : {
-          "type": "string"
-        },
-        "uset": {
-          "type": {
-             "key": {"type": "uuid"},
-             "min": 0,
-             "max": "unlimited"
-          }
-        },
-        "uref": {
-          "type": {
-             "key": {"type": "uuid",
-                     "refTable": "simple4",
-                     "refType": "strong"},
-             "min": 0,
-             "max": "unlimited"
-          }
-        }
-      }
-    },
-    "simple4" : {
-      "columns" : {
-        "name" : {
-          "type": "string"
-        }
-      }
-    }
-  }
-}
diff --git a/tests/interface-reconfigure.at b/tests/interface-reconfigure.at
deleted file mode 100644
index 035b00956..000000000
--- a/tests/interface-reconfigure.at
+++ /dev/null
@@ -1,1052 +0,0 @@
-m4_divert_push([PREPARE_TESTS])
-[
-# Creates a directory tree for use with "interface-reconfigure --root-dir".
-ifr_setup () {
-    for script in \
-            interface-reconfigure \
-            InterfaceReconfigure.py \
-            InterfaceReconfigureBridge.py \
-            InterfaceReconfigureVswitch.py
-        do
-            cp $top_srcdir/xenserver/opt_xensource_libexec_$script $script
-        done
-
-        mkdir -p etc
-        cat > etc/xensource-inventory <<EOF
-PRODUCT_BRAND='XenServer'
-PRODUCT_NAME='xenenterprise'
-PRODUCT_VERSION='5.5.0'
-BUILD_NUMBER='24648p'
-KERNEL_VERSION='2.6.18-128.1.6.el5.xs5.5.0.505.1024xen'
-XEN_VERSION='3.3.1'
-INSTALLATION_DATE='2010-02-10 16:45:28.748345'
-PRIMARY_DISK='/dev/disk/by-id/scsi-360022190add7fc001241a14e0ee3e85c'
-BACKUP_PARTITION='/dev/disk/by-id/scsi-360022190add7fc001241a14e0ee3e85c-part2'
-INSTALLATION_UUID='852ee692-71b4-439e-abfb-0eba72dc85f0'
-CONTROL_DOMAIN_UUID='44e6b66e-3074-4a3c-bbcd-756d845a3b56'
-DEFAULT_SR_PHYSDEVS='/dev/sda3'
-DOM0_MEM='752'
-MANAGEMENT_INTERFACE='xenbr2'
-EOF
-
-        mkdir -p etc/xensource
-        echo vswitch > etc/xensource/network.conf
-
-        for utility in \
-            sbin/ethtool \
-            sbin/ifdown \
-            sbin/ifup \
-            sbin/ip \
-            sbin/update-issue \
-            sbin/vconfig \
-            usr/sbin/brctl \
-            usr/sbin/ovs-vlan-bug-workaround
-        do
-            mkdir -p `dirname $utility`
-            cat > $utility <<'EOF'
-#! /bin/sh
-echo ${0} ${*} >&2
-EOF
-            chmod +x $utility
-        done
-
-        mkdir -p usr/bin
-        cat > usr/bin/ovs-vsctl <<'EOF'
-#! /bin/sh
-echo ${0} ${*} >&2
-
-while test ${#} -ge 4; do
-    if test X"${1}" = Xget && \
-       test X"${2}" = Xinterface && \
-       test X"${4}" = Xofport; then
-          if test X"${3}" = Xeth2; then
-              echo 5
-          else
-              echo -1
-          fi
-    fi
-
-    shift
-done
-EOF
-        chmod +x usr/bin/ovs-vsctl
-
-        cat > usr/bin/ovs-ofctl <<'EOF'
-#! /bin/sh
-echo ${0} ${*} >&2
-
-# Check that the flow is properly formed.
-ovs-ofctl parse-flow "${3}" >/dev/null
-EOF
-        chmod +x usr/bin/ovs-ofctl
-
-        mkdir -p etc/sysconfig/network-scripts
-        configure_netdev () {
-            mkdir -p sys/class/net/${1}
-            echo ${2} > sys/class/net/${1}/address
-            echo ${3} > sys/class/net/${1}/tx_queue_len
-            if test ${1} = eth1; then
-                # No VLAN acceleration.
-                echo 0x829 > sys/class/net/${1}/features
-            else
-                # Supports VLAN acceleration.
-                echo 0x10b89 > sys/class/net/${1}/features
-            fi
-            mkdir sys/class/net/${1}/device
-            ln -s ../../../bus/pci/drivers/e1000 sys/class/net/${1}/device/driver
-
-            : >> etc/sysconfig/network-scripts/ifcfg-${1}
-        }
-
-        configure_netdev lo   00:00:00:00:00:00 0
-        configure_netdev eth0 00:22:19:22:4b:af 1000
-        configure_netdev eth1 00:22:19:22:4b:b1 1000
-        configure_netdev eth2 00:15:17:a0:29:80 1000
-        configure_netdev eth3 00:15:17:a0:29:81 1000
-        configure_netdev eth4 00:1b:21:29:ce:51 1000
-
-        mkdir -p var/xapi
-        cat > var/xapi/network.dbcache <<'EOF'
-<?xml version="1.0" ?>
-<xenserver-network-configuration>
-        <pif ref="OpaqueRef:e0955887-571f-17fc-a971-61c1ec7d81b6">
-                <VLAN_slave_of/>
-                <tunnel_access_PIF_of/>
-                <management>
-                        False
-                </management>
-                <bond_slave_of>
-                        OpaqueRef:86d81bcf-0d25-90b2-cb11-af2007bd586e
-                </bond_slave_of>
-                <uuid>
-                        bd62a141-091f-3909-e334-0334f67ff3be
-                </uuid>
-                <IP>
-                        
-                </IP>
-                <VLAN_master_of>
-                        OpaqueRef:NULL
-                </VLAN_master_of>
-                <VLAN>
-                        -1
-                </VLAN>
-                <netmask>
-                        
-                </netmask>
-                <other_config/>
-                <MAC>
-                        00:22:19:22:4b:af
-                </MAC>
-                <ip_configuration_mode>
-                        None
-                </ip_configuration_mode>
-                <DNS>
-                        
-                </DNS>
-                <device>
-                        eth0
-                </device>
-                <bond_master_of/>
-                <currently_attached>
-                        False
-                </currently_attached>
-                <gateway>
-                        
-                </gateway>
-                <network>
-                        OpaqueRef:83e4a934-aeb5-e6f0-a743-d1c7ef7364c5
-                </network>
-        </pif>
-        <pif ref="OpaqueRef:eea8da94-a5e6-18fc-34a7-5e9b5a235806">
-                <VLAN_slave_of/>
-                <tunnel_access_PIF_of/>
-                <management>
-                        False
-                </management>
-                <bond_slave_of>
-                        OpaqueRef:NULL
-                </bond_slave_of>
-                <uuid>
-                        df8d35c2-cc3a-a623-7065-d987a29feb75
-                </uuid>
-                <IP>
-                        
-                </IP>
-                <VLAN_master_of>
-                        OpaqueRef:NULL
-                </VLAN_master_of>
-                <VLAN>
-                        -1
-                </VLAN>
-                <netmask>
-                        
-                </netmask>
-                <other_config/>
-                <MAC>
-                        00:1b:21:29:ce:51
-                </MAC>
-                <ip_configuration_mode>
-                        None
-                </ip_configuration_mode>
-                <DNS>
-                        
-                </DNS>
-                <device>
-                        eth4
-                </device>
-                <bond_master_of/>
-                <currently_attached>
-                        False
-                </currently_attached>
-                <gateway>
-                        
-                </gateway>
-                <network>
-                        OpaqueRef:bf51b4d3-7bdc-ea55-ba21-539b150b0531
-                </network>
-        </pif>
-        <pif ref="OpaqueRef:2956e6c8-487e-981c-85ff-c84796418768">
-                <VLAN_slave_of/>
-                <tunnel_access_PIF_of/>
-                <management>
-                        False
-                </management>
-                <bond_slave_of>
-                        OpaqueRef:86d81bcf-0d25-90b2-cb11-af2007bd586e
-                </bond_slave_of>
-                <uuid>
-                        2f87fc95-5ab4-571a-2487-3f4ac1985663
-                </uuid>
-                <IP>
-                        
-                </IP>
-                <VLAN_master_of>
-                        OpaqueRef:NULL
-                </VLAN_master_of>
-                <VLAN>
-                        -1
-                </VLAN>
-                <netmask>
-                        
-                </netmask>
-                <other_config/>
-                <MAC>
-                        00:22:19:22:4b:b1
-                </MAC>
-                <ip_configuration_mode>
-                        None
-                </ip_configuration_mode>
-                <DNS>
-                        
-                </DNS>
-                <device>
-                        eth1
-                </device>
-                <bond_master_of/>
-                <currently_attached>
-                        False
-                </currently_attached>
-                <gateway>
-                        
-                </gateway>
-                <network>
-                        OpaqueRef:92b41bf6-aa21-45d3-1c86-c87a5fa98f7d
-                </network>
-        </pif>
-        <pif ref="OpaqueRef:d2d1e51e-4da9-3163-8f57-bb683429335e">
-                <VLAN_slave_of/>
-                <tunnel_access_PIF_of/>
-                <management>
-                        False
-                </management>
-                <bond_slave_of>
-                        OpaqueRef:NULL
-                </bond_slave_of>
-                <uuid>
-                        d2dfdab3-daf4-afea-f055-a25a0d24d714
-                </uuid>
-                <IP>
-                        
-                </IP>
-                <VLAN_master_of>
-                        OpaqueRef:4c0eb823-4d96-da1d-e75f-411b85badb0c
-                </VLAN_master_of>
-                <VLAN>
-                        4
-                </VLAN>
-                <netmask>
-                        
-                </netmask>
-                <other_config/>
-                <MAC>
-                        fe:ff:ff:ff:ff:ff
-                </MAC>
-                <ip_configuration_mode>
-                        None
-                </ip_configuration_mode>
-                <DNS>
-                        
-                </DNS>
-                <device>
-                        bond0
-                </device>
-                <bond_master_of/>
-                <currently_attached>
-                        True
-                </currently_attached>
-                <gateway>
-                        
-                </gateway>
-                <network>
-                        OpaqueRef:a63afad0-fb4c-b4a4-3696-cbb3d88afc47
-                </network>
-        </pif>
-        <pif ref="OpaqueRef:2bc0fab5-523a-4125-609d-212391f5f6fc">
-                <VLAN_slave_of>
-                        <master>
-                                OpaqueRef:e623e1d6-cd02-be8d-820d-49d65c710297
-                        </master>
-                </VLAN_slave_of>
-                <tunnel_access_PIF_of/>
-                <management>
-                        False
-                </management>
-                <bond_slave_of>
-                        OpaqueRef:NULL
-                </bond_slave_of>
-                <uuid>
-                        f4ba396e-a993-a592-5fbc-a1d566afb59e
-                </uuid>
-                <IP>
-                        10.0.0.188
-                </IP>
-                <VLAN_master_of>
-                        OpaqueRef:NULL
-                </VLAN_master_of>
-                <VLAN>
-                        -1
-                </VLAN>
-                <netmask>
-                        255.0.0.0
-                </netmask>
-                <other_config/>
-                <MAC>
-                        00:15:17:a0:29:81
-                </MAC>
-                <ip_configuration_mode>
-                        Static
-                </ip_configuration_mode>
-                <DNS>
-                        
-                </DNS>
-                <device>
-                        eth3
-                </device>
-                <bond_master_of/>
-                <currently_attached>
-                        True
-                </currently_attached>
-                <gateway>
-                        
-                </gateway>
-                <network>
-                        OpaqueRef:d9189da2-d00b-61ba-8a6d-ac42cc868e32
-                </network>
-        </pif>
-        <pif ref="OpaqueRef:205d1186-2cd1-d5e6-45e4-ea1698ea6e15">
-                <VLAN_slave_of/>
-                <tunnel_access_PIF_of/>
-                <management>
-                        True
-                </management>
-                <bond_slave_of>
-                        OpaqueRef:NULL
-                </bond_slave_of>
-                <uuid>
-                        646ca9a1-36ad-e2f9-3ecc-1e5622c201c2
-                </uuid>
-                <IP>
-                        172.18.3.188
-                </IP>
-                <VLAN_master_of>
-                        OpaqueRef:NULL
-                </VLAN_master_of>
-                <VLAN>
-                        -1
-                </VLAN>
-                <netmask>
-                        255.255.0.0
-                </netmask>
-                <other_config/>
-                <MAC>
-                        00:15:17:a0:29:80
-                </MAC>
-                <ip_configuration_mode>
-                        DHCP
-                </ip_configuration_mode>
-                <DNS>
-                        
-                </DNS>
-                <device>
-                        eth2
-                </device>
-                <bond_master_of/>
-                <currently_attached>
-                        True
-                </currently_attached>
-                <gateway>
-                        
-                </gateway>
-                <network>
-                        OpaqueRef:6e7c6e81-6b5e-b91f-e1f9-9e028567bdfe
-                </network>
-        </pif>
-        <pif ref="OpaqueRef:8e3e37e6-ebb9-087e-0201-f6a56bf554c3">
-                <VLAN_slave_of/>
-                <tunnel_access_PIF_of/>
-                <management>
-                        False
-                </management>
-                <bond_slave_of>
-                        OpaqueRef:NULL
-                </bond_slave_of>
-                <uuid>
-                        3941edd2-865b-8dd8-61f0-199f5e1fa652
-                </uuid>
-                <IP>
-                        
-                </IP>
-                <VLAN_master_of>
-                        OpaqueRef:e623e1d6-cd02-be8d-820d-49d65c710297
-                </VLAN_master_of>
-                <VLAN>
-                        123
-                </VLAN>
-                <netmask>
-                        
-                </netmask>
-                <other_config/>
-                <MAC>
-                        fe:ff:ff:ff:ff:ff
-                </MAC>
-                <ip_configuration_mode>
-                        None
-                </ip_configuration_mode>
-                <DNS>
-                        
-                </DNS>
-                <device>
-                        eth3
-                </device>
-                <bond_master_of/>
-                <currently_attached>
-                        True
-                </currently_attached>
-                <gateway>
-                        
-                </gateway>
-                <network>
-                        OpaqueRef:240fb5f8-addc-6ea3-f921-2a42b42acd17
-                </network>
-        </pif>
-        <pif ref="OpaqueRef:69c904bb-8da9-3424-485b-8b47c2d3ef11">
-                <VLAN_slave_of>
-                        <master>
-                                OpaqueRef:4c0eb823-4d96-da1d-e75f-411b85badb0c
-                        </master>
-                </VLAN_slave_of>
-                <tunnel_access_PIF_of/>
-                <management>
-                        False
-                </management>
-                <bond_slave_of>
-                        OpaqueRef:NULL
-                </bond_slave_of>
-                <uuid>
-                        6c0327a9-afa3-fc19-6798-a1bfe20095ed
-                </uuid>
-                <IP>
-                        
-                </IP>
-                <VLAN_master_of>
-                        OpaqueRef:NULL
-                </VLAN_master_of>
-                <VLAN>
-                        -1
-                </VLAN>
-                <netmask>
-                        
-                </netmask>
-                <other_config/>
-                <MAC>
-                        00:22:19:22:4b:af
-                </MAC>
-                <ip_configuration_mode>
-                        None
-                </ip_configuration_mode>
-                <DNS>
-                        
-                </DNS>
-                <device>
-                        bond0
-                </device>
-                <bond_master_of>
-                        <slave>
-                                OpaqueRef:86d81bcf-0d25-90b2-cb11-af2007bd586e
-                        </slave>
-                </bond_master_of>
-                <currently_attached>
-                        True
-                </currently_attached>
-                <gateway>
-                        
-                </gateway>
-                <network>
-                        OpaqueRef:ec1e5037-60ea-97e5-54b8-39bdb43c071a
-                </network>
-        </pif>
-        <bond ref="OpaqueRef:86d81bcf-0d25-90b2-cb11-af2007bd586e">
-                <master>
-                        OpaqueRef:69c904bb-8da9-3424-485b-8b47c2d3ef11
-                </master>
-                <uuid>
-                        dad825f1-6d81-386e-849c-5589281e53e1
-                </uuid>
-                <slaves>
-                        <slave>
-                                OpaqueRef:e0955887-571f-17fc-a971-61c1ec7d81b6
-                        </slave>
-                        <slave>
-                                OpaqueRef:2956e6c8-487e-981c-85ff-c84796418768
-                        </slave>
-                </slaves>
-        </bond>
-        <vlan ref="OpaqueRef:4c0eb823-4d96-da1d-e75f-411b85badb0c">
-                <tagged_PIF>
-                        OpaqueRef:69c904bb-8da9-3424-485b-8b47c2d3ef11
-                </tagged_PIF>
-                <uuid>
-                        841814da-d0d2-9da4-0b2e-b6143480bbfb
-                </uuid>
-                <untagged_PIF>
-                        OpaqueRef:d2d1e51e-4da9-3163-8f57-bb683429335e
-                </untagged_PIF>
-        </vlan>
-        <vlan ref="OpaqueRef:e623e1d6-cd02-be8d-820d-49d65c710297">
-                <tagged_PIF>
-                        OpaqueRef:2bc0fab5-523a-4125-609d-212391f5f6fc
-                </tagged_PIF>
-                <uuid>
-                        399279a2-5ccd-5368-9af3-8622a1f1ac82
-                </uuid>
-                <untagged_PIF>
-                        OpaqueRef:8e3e37e6-ebb9-087e-0201-f6a56bf554c3
-                </untagged_PIF>
-        </vlan>
-        <network ref="OpaqueRef:a63afad0-fb4c-b4a4-3696-cbb3d88afc47">
-                <PIFs>
-                        <PIF>
-                                OpaqueRef:d2d1e51e-4da9-3163-8f57-bb683429335e
-                        </PIF>
-                </PIFs>
-                <bridge>
-                        xapi2
-                </bridge>
-                <other_config/>
-                <uuid>
-                        99be2da4-6c33-6f8e-49ea-3bc592fe3c85
-                </uuid>
-        </network>
-        <network ref="OpaqueRef:d9189da2-d00b-61ba-8a6d-ac42cc868e32">
-                <PIFs>
-                        <PIF>
-                                OpaqueRef:2bc0fab5-523a-4125-609d-212391f5f6fc
-                        </PIF>
-                </PIFs>
-                <bridge>
-                        xenbr3
-                </bridge>
-                <other_config/>
-                <uuid>
-                        2902ae1b-8013-897a-b697-0b200ea3aaa5
-                </uuid>
-        </network>
-        <network ref="OpaqueRef:ec1e5037-60ea-97e5-54b8-39bdb43c071a">
-                <PIFs>
-                        <PIF>
-                                OpaqueRef:69c904bb-8da9-3424-485b-8b47c2d3ef11
-                        </PIF>
-                </PIFs>
-                <bridge>
-                        xapi1
-                </bridge>
-                <other_config/>
-                <uuid>
-                        45cbbb43-113d-a712-3231-c6463f253cef
-                </uuid>
-        </network>
-        <network ref="OpaqueRef:92b41bf6-aa21-45d3-1c86-c87a5fa98f7d">
-                <PIFs>
-                        <PIF>
-                                OpaqueRef:2956e6c8-487e-981c-85ff-c84796418768
-                        </PIF>
-                </PIFs>
-                <bridge>
-                        xenbr1
-                </bridge>
-                <other_config/>
-                <uuid>
-                        99f8771a-645a-26a3-e06c-30a401f1d009
-                </uuid>
-        </network>
-        <network ref="OpaqueRef:6e7c6e81-6b5e-b91f-e1f9-9e028567bdfe">
-                <PIFs>
-                        <PIF>
-                                OpaqueRef:205d1186-2cd1-d5e6-45e4-ea1698ea6e15
-                        </PIF>
-                </PIFs>
-                <bridge>
-                        xenbr2
-                </bridge>
-                <other_config/>
-                <uuid>
-                        d08c8749-0c8f-9e8d-ce25-fd364661ee99
-                </uuid>
-        </network>
-        <network ref="OpaqueRef:83e4a934-aeb5-e6f0-a743-d1c7ef7364c5">
-                <PIFs>
-                        <PIF>
-                                OpaqueRef:e0955887-571f-17fc-a971-61c1ec7d81b6
-                        </PIF>
-                </PIFs>
-                <bridge>
-                        xenbr0
-                </bridge>
-                <other_config>
-                        <vswitch-disable-in-band>
-                                true
-                        </vswitch-disable-in-band>
-                </other_config>
-                <uuid>
-                        c9eecb03-560d-61de-b6a8-56dfc766f67e
-                </uuid>
-        </network>
-        <network ref="OpaqueRef:bf51b4d3-7bdc-ea55-ba21-539b150b0531">
-                <PIFs>
-                        <PIF>
-                                OpaqueRef:eea8da94-a5e6-18fc-34a7-5e9b5a235806
-                        </PIF>
-                </PIFs>
-                <bridge>
-                        xenbr4
-                </bridge>
-                <other_config/>
-                <uuid>
-                        d2c14c89-29cc-51d4-7664-633eff02b2ad
-                </uuid>
-        </network>
-        <network ref="OpaqueRef:0b7354a4-8f4b-aa08-2f16-a22c117e4211">
-                <PIFs/>
-                <bridge>
-                        xapi0
-                </bridge>
-                <other_config/>
-                <uuid>
-                        dc0f0632-c2aa-1b78-2fea-0d3a23c51740
-                </uuid>
-        </network>
-        <network ref="OpaqueRef:240fb5f8-addc-6ea3-f921-2a42b42acd17">
-                <PIFs>
-                        <PIF>
-                                OpaqueRef:8e3e37e6-ebb9-087e-0201-f6a56bf554c3
-                        </PIF>
-                </PIFs>
-                <bridge>
-                        xapi3
-                </bridge>
-                <other_config/>
-                <uuid>
-                        db7bdc03-074d-42ae-fc73-9b06de1d57f6
-                </uuid>
-        </network>
-        <pool ref="OpaqueRef:a765d06c-fc82-cc67-8f6c-fd8db45f6a84">
-                <other_config>
-                        <vswitch-controller-fail-mode>
-                                secure
-                        </vswitch-controller-fail-mode>
-                </other_config>
-        </pool>
-</xenserver-network-configuration>
-EOF
-}
-
-ifr_run () {
-    $PYTHON ./interface-reconfigure --root-prefix="`pwd`" --no-syslog "$@"
-}
-
-ifr_filter () {
-    sed -n -e "s,`pwd`,,g" -e 's/ -- /\
-    /g' -e '/^Running command:/!p' stderr
-}]
-m4_divert_pop([PREPARE_TESTS])
-
-
-AT_BANNER([interface-reconfigure])
-
-AT_SETUP([non-VLAN, non-bond])
-AT_KEYWORDS([interface-reconfigure])
-AT_SKIP_IF([$non_ascii_cwd])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-ifr_setup
-
-AT_CHECK([ifr_run --force xenbr2 up], [0], [], [stderr])
-AT_CHECK([ifr_filter], [0], [[Force interface xenbr2 up
-Loading xapi database cache from /var/xapi/network.dbcache
-Configured for Vswitch datapath
-action_up: xenbr2
-Writing network configuration for xenbr2
-Configuring xenbr2 using DHCP configuration
-configure_datapath: bridge      - xenbr2
-configure_datapath: physical    - ['eth2']
-configure_datapath: extra ports - []
-configure_datapath: extra bonds - []
-/usr/bin/ovs-vsctl -vconsole:off get-fail-mode xenbr2
-Applying changes to /etc/sysconfig/network-scripts/route-xenbr2 configuration
-Applying changes to /etc/sysconfig/network configuration
-Applying changes to /etc/sysconfig/network-scripts/ifcfg-xenbr2 configuration
-/sbin/ip link set eth2 up mtu 1500
-/sbin/ethtool -K eth2 gro off lro off
-/usr/sbin/ovs-vlan-bug-workaround eth2 on
-/usr/bin/ovs-vsctl --timeout=20
-    --with-iface --if-exists del-port eth2
-    --may-exist add-br xenbr2
-    --may-exist add-port xenbr2 eth2
-    set Bridge xenbr2 other-config:hwaddr="00:15:17:a0:29:80"
-    set Bridge xenbr2 fail_mode=secure
-    remove Bridge xenbr2 other_config disable-in-band
-    br-set-external-id xenbr2 xs-network-uuids d08c8749-0c8f-9e8d-ce25-fd364661ee99
-/usr/bin/ovs-vsctl -vconsole:off get interface eth2 ofport
-/usr/bin/ovs-ofctl add-flow xenbr2 idle_timeout=0,priority=0,in_port=5,arp,nw_proto=1,actions=local
-/usr/bin/ovs-ofctl add-flow xenbr2 idle_timeout=0,priority=0,in_port=local,arp,dl_src=00:15:17:a0:29:80,actions=5
-/usr/bin/ovs-ofctl add-flow xenbr2 idle_timeout=0,priority=0,in_port=5,dl_dst=00:15:17:a0:29:80,actions=local
-/usr/bin/ovs-ofctl add-flow xenbr2 idle_timeout=0,priority=0,in_port=local,dl_src=00:15:17:a0:29:80,actions=5
-/sbin/ifup xenbr2
-/sbin/update-issue
-Committing changes to /etc/sysconfig/network-scripts/route-xenbr2 configuration
-Committing changes to /etc/sysconfig/network configuration
-Committing changes to /etc/sysconfig/network-scripts/ifcfg-xenbr2 configuration
-]])
-
-AT_CHECK([cat etc/sysconfig/network-scripts/ifcfg-xenbr2], [0],
-  [# DO NOT EDIT: This file (ifcfg-xenbr2) was autogenerated by interface-reconfigure
-XEMANAGED=yes
-DEVICE=xenbr2
-ONBOOT=no
-NOZEROCONF=yes
-TYPE=Ethernet
-BOOTPROTO=dhcp
-PERSISTENT_DHCLIENT=yes
-MTU=1500
-])
-
-# Simulate interface-reconfigure creating xenbr2, so that we can tell
-# interface-reconfigure to take it back down.
-AT_CHECK([configure_netdev xenbr2 00:15:17:a0:29:80 0])
-
-AT_CHECK([ifr_run --force xenbr2 down], [0], [], [stderr])
-AT_CHECK([ifr_filter], [0], [[Force interface xenbr2 down
-Loading xapi database cache from /var/xapi/network.dbcache
-Configured for Vswitch datapath
-action_down: xenbr2
-/sbin/ifdown xenbr2
-deconfigure ipdev xenbr2 on xenbr2
-deconfigure_bridge: bridge           - xenbr2
-action_down: bring down physical devices - ['eth2']
-/sbin/ip link set eth2 down
-/usr/bin/ovs-vsctl --timeout=20
-    --with-iface --if-exists del-port xenbr2
-    --if-exists del-br xenbr2
-]])
-
-AT_CLEANUP
-
-AT_SETUP([VLAN, non-bond])
-AT_KEYWORDS([interface-reconfigure])
-AT_SKIP_IF([$non_ascii_cwd])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-ifr_setup
-
-AT_CHECK([ifr_run --force xapi3 up], [0], [], [stderr])
-AT_CHECK([ifr_filter], [0], [[Force interface xapi3 up
-Loading xapi database cache from /var/xapi/network.dbcache
-Configured for Vswitch datapath
-action_up: xapi3
-Writing network configuration for xapi3
-Configuring xapi3 using None configuration
-configure_datapath: bridge      - xenbr3
-configure_datapath: physical    - ['eth3']
-configure_datapath: extra ports - []
-configure_datapath: extra bonds - []
-Applying changes to /etc/sysconfig/network-scripts/route-xapi3 configuration
-Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi3 configuration
-/sbin/ip link set eth3 up mtu 1500
-/sbin/ethtool -K eth3 gro off lro off
-/usr/sbin/ovs-vlan-bug-workaround eth3 on
-/usr/bin/ovs-vsctl --timeout=20
-    --with-iface --if-exists del-port eth3
-    --may-exist add-br xenbr3
-    --may-exist add-port xenbr3 eth3
-    set Bridge xenbr3 other-config:hwaddr="00:15:17:a0:29:81"
-    set Bridge xenbr3 fail_mode=secure
-    remove Bridge xenbr3 other_config disable-in-band
-    br-set-external-id xenbr3 xs-network-uuids 2902ae1b-8013-897a-b697-0b200ea3aaa5;db7bdc03-074d-42ae-fc73-9b06de1d57f6
-    --if-exists del-br xapi3
-    --may-exist add-br xapi3 xenbr3 123
-    br-set-external-id xapi3 xs-network-uuids 2902ae1b-8013-897a-b697-0b200ea3aaa5;db7bdc03-074d-42ae-fc73-9b06de1d57f6
-    set Interface xapi3 MAC="00:15:17:a0:29:81"
-/sbin/ifup xapi3
-/sbin/update-issue
-Committing changes to /etc/sysconfig/network-scripts/route-xapi3 configuration
-Committing changes to /etc/sysconfig/network-scripts/ifcfg-xapi3 configuration
-]])
-
-AT_CHECK([cat etc/sysconfig/network-scripts/ifcfg-xapi3], [0],
-  [# DO NOT EDIT: This file (ifcfg-xapi3) was autogenerated by interface-reconfigure
-XEMANAGED=yes
-DEVICE=xapi3
-ONBOOT=no
-NOZEROCONF=yes
-TYPE=Ethernet
-BOOTPROTO=none
-MTU=1500
-])
-
-# Simulate interface-reconfigure creating xapi3, so that we can tell
-# interface-reconfigure to take it back down.
-AT_CHECK([configure_netdev xapi3 00:23:20:AC:AF:02 0])
-
-AT_CHECK([ifr_run --force xapi3 down], [0], [], [stderr])
-AT_CHECK([ifr_filter], [0], [[Force interface xapi3 down
-Loading xapi database cache from /var/xapi/network.dbcache
-Configured for Vswitch datapath
-action_down: xapi3
-/sbin/ifdown xapi3
-deconfigure ipdev xapi3 on xenbr3
-deconfigure_bridge: bridge           - xapi3
-action_down: no more masters, bring down slave xenbr3
-deconfigure_bridge: bridge           - xenbr3
-action_down: bring down physical devices - ['eth3']
-/sbin/ip link set eth3 down
-/usr/bin/ovs-vsctl --timeout=20
-    --with-iface --if-exists del-port xapi3
-    --if-exists del-br xapi3
-    --if-exists del-br xenbr3
-]])
-
-AT_CLEANUP
-
-AT_SETUP([Bond, non-VLAN])
-AT_KEYWORDS([interface-reconfigure])
-AT_SKIP_IF([$non_ascii_cwd])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-ifr_setup
-
-# Pretend that bond0 exists, even though it would really be created by
-# a "create-bond" call in an ovs-vsctl invocation within
-# interface-reconfigure, because otherwise interface-reconfigure will
-# die with "failed to apply changes: netdev: up: device bond0 does not
-# exist" after it thinks it created bond0.
-AT_CHECK([configure_netdev bond0 00:23:20:e6:39:75 0])
-
-AT_CHECK([ifr_run --force xapi1 up], [0], [], [stderr])
-AT_CHECK([ifr_filter], [0], [[Force interface xapi1 up
-Loading xapi database cache from /var/xapi/network.dbcache
-Configured for Vswitch datapath
-action_up: xapi1
-Writing network configuration for xapi1
-Configuring xapi1 using None configuration
-configure_datapath: leaving bond bond0 up
-configure_datapath: leaving bond bond0 up
-configure_datapath: bridge      - xapi1
-configure_datapath: physical    - ['eth0', 'eth1']
-configure_datapath: extra ports - []
-configure_datapath: extra bonds - []
-netdev: down: device xenbr0 does not exist, ignoring
-netdev: down: device xenbr1 does not exist, ignoring
-Applying changes to /etc/sysconfig/network-scripts/route-xapi1 configuration
-Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi1 configuration
-/sbin/ip link set eth0 up mtu 1500
-/sbin/ethtool -K eth0 gro off lro off
-/usr/sbin/ovs-vlan-bug-workaround eth0 on
-/sbin/ip link set eth1 up mtu 1500
-/sbin/ethtool -K eth1 gro off lro off
-/usr/sbin/ovs-vlan-bug-workaround eth1 off
-/usr/bin/ovs-vsctl --timeout=20
-    --if-exists del-br xenbr0
-    --if-exists del-br xenbr1
-    --with-iface --if-exists del-port eth0
-    --with-iface --if-exists del-port eth1
-    --may-exist add-br xapi1
-    --with-iface --if-exists del-port bond0
-    --fake-iface add-bond xapi1 bond0 eth0 eth1
-    set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:bond-miimon-interval=100 bond_updelay=31000 other-config:bond-detect-mode=carrier lacp=off bond_mode=balance-slb
-    set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af"
-    set Bridge xapi1 fail_mode=secure
-    remove Bridge xapi1 other_config disable-in-band
-    br-set-external-id xapi1 xs-network-uuids 45cbbb43-113d-a712-3231-c6463f253cef;99be2da4-6c33-6f8e-49ea-3bc592fe3c85
-/sbin/ifup xapi1
-action_up: bring up bond0
-/sbin/ip link set bond0 up
-/sbin/update-issue
-Committing changes to /etc/sysconfig/network-scripts/route-xapi1 configuration
-Committing changes to /etc/sysconfig/network-scripts/ifcfg-xapi1 configuration
-]])
-
-AT_CHECK([cat etc/sysconfig/network-scripts/ifcfg-xapi1], [0],
-  [# DO NOT EDIT: This file (ifcfg-xapi1) was autogenerated by interface-reconfigure
-XEMANAGED=yes
-DEVICE=xapi1
-ONBOOT=no
-NOZEROCONF=yes
-TYPE=Ethernet
-BOOTPROTO=none
-MTU=1500
-])
-
-# Simulate interface-reconfigure creating xapi1, so that we can tell
-# interface-reconfigure to take it back down.
-AT_CHECK([configure_netdev xapi1 00:22:19:22:4B:AF 0])
-
-AT_CHECK([ifr_run --force xapi1 down], [0], [], [stderr])
-AT_CHECK([ifr_filter], [0], [[Force interface xapi1 down
-Loading xapi database cache from /var/xapi/network.dbcache
-Configured for Vswitch datapath
-action_down: xapi1
-/sbin/ifdown xapi1
-deconfigure ipdev xapi1 on xapi1
-deconfigure_bridge: bridge           - xapi1
-action_down: bring down physical devices - ['eth0', 'eth1']
-/sbin/ip link set eth0 down
-/sbin/ip link set eth1 down
-/usr/bin/ovs-vsctl --timeout=20
-    --with-iface --if-exists del-port xapi1
-    --if-exists del-br xapi1
-]])
-
-AT_CLEANUP
-
-AT_SETUP([VLAN on bond])
-AT_KEYWORDS([interface-reconfigure])
-AT_SKIP_IF([$non_ascii_cwd])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-ifr_setup
-
-# Pretend that bond0 exists, even though it would really be created by
-# a "create-bond" call in an ovs-vsctl invocation within
-# interface-reconfigure, because otherwise interface-reconfigure will
-# die with "failed to apply changes: netdev: up: device bond0 does not
-# exist" after it thinks it created bond0.
-AT_CHECK([configure_netdev bond0 00:23:20:e6:39:75 0])
-
-AT_CHECK([ifr_run --force xapi2 up], [0], [], [stderr])
-AT_CHECK([ifr_filter], [0], [[Force interface xapi2 up
-Loading xapi database cache from /var/xapi/network.dbcache
-Configured for Vswitch datapath
-action_up: xapi2
-Writing network configuration for xapi2
-Configuring xapi2 using None configuration
-configure_datapath: leaving bond bond0 up
-configure_datapath: leaving bond bond0 up
-configure_datapath: bridge      - xapi1
-configure_datapath: physical    - ['eth0', 'eth1']
-configure_datapath: extra ports - []
-configure_datapath: extra bonds - []
-netdev: down: device xenbr0 does not exist, ignoring
-netdev: down: device xenbr1 does not exist, ignoring
-Applying changes to /etc/sysconfig/network-scripts/route-xapi2 configuration
-Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi2 configuration
-/sbin/ip link set eth0 up mtu 1500
-/sbin/ethtool -K eth0 gro off lro off
-/usr/sbin/ovs-vlan-bug-workaround eth0 on
-/sbin/ip link set eth1 up mtu 1500
-/sbin/ethtool -K eth1 gro off lro off
-/usr/sbin/ovs-vlan-bug-workaround eth1 off
-/usr/bin/ovs-vsctl --timeout=20
-    --if-exists del-br xenbr0
-    --if-exists del-br xenbr1
-    --with-iface --if-exists del-port eth0
-    --with-iface --if-exists del-port eth1
-    --may-exist add-br xapi1
-    --with-iface --if-exists del-port bond0
-    --fake-iface add-bond xapi1 bond0 eth0 eth1
-    set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:bond-miimon-interval=100 bond_updelay=31000 other-config:bond-detect-mode=carrier lacp=off bond_mode=balance-slb
-    set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af"
-    set Bridge xapi1 fail_mode=secure
-    remove Bridge xapi1 other_config disable-in-band
-    br-set-external-id xapi1 xs-network-uuids 45cbbb43-113d-a712-3231-c6463f253cef;99be2da4-6c33-6f8e-49ea-3bc592fe3c85
-    --if-exists del-br xapi2
-    --may-exist add-br xapi2 xapi1 4
-    br-set-external-id xapi2 xs-network-uuids 45cbbb43-113d-a712-3231-c6463f253cef;99be2da4-6c33-6f8e-49ea-3bc592fe3c85
-    set Interface xapi2 MAC="00:22:19:22:4b:af"
-/sbin/ifup xapi2
-action_up: bring up bond0
-/sbin/ip link set bond0 up
-/sbin/update-issue
-Committing changes to /etc/sysconfig/network-scripts/route-xapi2 configuration
-Committing changes to /etc/sysconfig/network-scripts/ifcfg-xapi2 configuration
-]])
-
-AT_CHECK([cat etc/sysconfig/network-scripts/ifcfg-xapi2], [0],
-  [# DO NOT EDIT: This file (ifcfg-xapi2) was autogenerated by interface-reconfigure
-XEMANAGED=yes
-DEVICE=xapi2
-ONBOOT=no
-NOZEROCONF=yes
-TYPE=Ethernet
-BOOTPROTO=none
-MTU=1500
-])
-
-# Simulate interface-reconfigure creating xapi2, so that we can tell
-# interface-reconfigure to take it back down.
-AT_CHECK([configure_netdev xapi2 00:23:20:A4:71:C2 0])
-
-AT_CHECK([ifr_run --force xapi2 down], [0], [], [stderr])
-AT_CHECK([ifr_filter], [0], [[Force interface xapi2 down
-Loading xapi database cache from /var/xapi/network.dbcache
-Configured for Vswitch datapath
-action_down: xapi2
-/sbin/ifdown xapi2
-deconfigure ipdev xapi2 on xapi1
-deconfigure_bridge: bridge           - xapi2
-action_down: no more masters, bring down slave xapi1
-deconfigure_bridge: bridge           - xapi1
-action_down: bring down physical devices - ['eth0', 'eth1']
-/sbin/ip link set eth0 down
-/sbin/ip link set eth1 down
-/usr/bin/ovs-vsctl --timeout=20
-    --with-iface --if-exists del-port xapi2
-    --if-exists del-br xapi2
-    --if-exists del-br xapi1
-]])
-
-AT_CLEANUP
-
-dnl This test configures two tunnels, then deletes the second and re-uses its
-dnl name for different types of ports. This was introduced to detect errors
-dnl where port configuration persists even when the port is deleted and
-dnl readded.
-AT_SETUP([Re-create port with different types])
-AT_KEYWORDS([interface-reconfigure])
-OVS_VSWITCHD_START(
-  [add-port br0 p0 -- set int p0 type=gre options:remote_ip=127.0.0.1 -- \
-   add-port br0 p1 -- set int p1 type=dummy -- \
-   add-port br0 p2 -- set int p2 type=dummy])
-
-AT_CHECK([ovs-vsctl set int p1 type=gre options:remote_ip=127.0.0.1])
-AT_CHECK([ovs-vsctl del-port p1])
-AT_CHECK([ovs-vsctl add-port br0 p1 -- set int p1 type=dummy])
-
-OVS_APP_EXIT_AND_WAIT([ovs-vswitchd])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
diff --git a/tests/json.at b/tests/json.at
deleted file mode 100644
index bfe0f1967..000000000
--- a/tests/json.at
+++ /dev/null
@@ -1,412 +0,0 @@
-m4_define([JSON_CHECK_POSITIVE_C],
-  [AT_SETUP([$1])
-   AT_KEYWORDS([json positive])
-   AT_CHECK([printf %s "AS_ESCAPE([$2])" > input])
-   AT_CAPTURE_FILE([input])
-   AT_CHECK([ovstest test-json $4 input], [0], [stdout], [])
-   AT_CHECK([cat stdout], [0], [$3
-])
-   AT_CLEANUP])
-
-# JSON_CHECK_POSITIVE_PY(TITLE, INPUT, OUTPUT, TEST-JSON-ARGS,
-#                        PYTHON-CHCEK, PYTHON-BIN)
-#
-m4_define([JSON_CHECK_POSITIVE_PY],
-  [AT_SETUP([$1])
-   AT_KEYWORDS([json positive Python])
-   AT_SKIP_IF([test $5 = no])
-   AT_CHECK([printf %s "AS_ESCAPE([$2])" > input])
-   AT_CAPTURE_FILE([input])
-   AT_CHECK([$6 $srcdir/test-json.py $4 input], [0], [stdout], [])
-   AT_CHECK([cat stdout], [0], [$3
-])
-   AT_CLEANUP])
-
-m4_define([JSON_CHECK_POSITIVE_UCS4PY],
-  [AT_SETUP([$1])
-   AT_KEYWORDS([json positive Python])
-   AT_SKIP_IF([test $HAVE_PYTHON2 = no])
-   AT_XFAIL_IF([test $HAVE_PYTHON2 = yes &&
-                $PYTHON2 -c "exit(len(u'\U00010800'))"; test $? -ne 1])
-   AT_CHECK([printf %s "AS_ESCAPE([$2])" > input])
-   AT_CAPTURE_FILE([input])
-   AT_CHECK([$PYTHON2 $srcdir/test-json.py $4 input], [0], [stdout], [])
-   AT_CHECK([cat stdout], [0], [$3
-])
-   AT_CLEANUP])
-
-m4_define([JSON_CHECK_POSITIVE],
-  [JSON_CHECK_POSITIVE_C([$1 - C], [$2], [$3], [$4])
-   JSON_CHECK_POSITIVE_PY([$1 - Python2], [$2], [$3], [$4],
-                          [$HAVE_PYTHON2], [$PYTHON2])
-   JSON_CHECK_POSITIVE_PY([$1 - Python3], [$2], [$3], [$4],
-                          [$HAVE_PYTHON3], [$PYTHON3])])
-
-m4_define([JSON_CHECK_POSITIVE_PY23],
-  [JSON_CHECK_POSITIVE_PY([$1 - Python2], [$2], [$3], [$4],
-                          [$HAVE_PYTHON2], [$PYTHON2])
-   JSON_CHECK_POSITIVE_PY([$1 - Python3], [$2], [$3], [$4],
-                          [$HAVE_PYTHON3], [$PYTHON3])])
-
-m4_define([JSON_CHECK_NEGATIVE_C],
-  [AT_SETUP([$1])
-   AT_KEYWORDS([json negative])
-   AT_CHECK([printf %s "AS_ESCAPE([$2])" > input])
-   AT_CAPTURE_FILE([input])
-   AT_CHECK([ovstest test-json $4 input], [1], [stdout], [])
-   AT_CHECK([[sed 's/^error: [^:]*:/error:/' < stdout]], [0], [$3
-])
-   AT_CLEANUP])
-
-# JSON_CHECK_NEGATIVE_PY(TITLE, INPUT, OUTPUT, TEST-JSON-ARGS,
-#                        PYTHON-CHCEK, PYTHON-BIN)
-#
-m4_define([JSON_CHECK_NEGATIVE_PY], 
-  [AT_SETUP([$1])
-   AT_KEYWORDS([json negative Python])
-   AT_SKIP_IF([test $5 = no])
-   AT_CHECK([printf %s "AS_ESCAPE([$2])" > input])
-   AT_CAPTURE_FILE([input])
-   AT_CHECK([$6 $srcdir/test-json.py $4 input], [1], [stdout], [])
-   AT_CHECK([[sed 's/^error: [^:]*:/error:/' < stdout]], [0], [$3
-])
-   AT_CLEANUP])
-
-m4_define([JSON_CHECK_NEGATIVE],
-  [JSON_CHECK_NEGATIVE_C([$1 - C], [$2], [$3], [$4])
-   JSON_CHECK_NEGATIVE_PY([$1 - Python2], [$2], [$3], [$4],
-                          [$HAVE_PYTHON2], [$PYTHON2])
-   JSON_CHECK_NEGATIVE_PY([$1 - Python3], [$2], [$3], [$4],
-                          [$HAVE_PYTHON3], [$PYTHON3])])
-
-AT_BANNER([JSON -- arrays])
-
-JSON_CHECK_POSITIVE([empty array], [[ [   ] ]], [[[]]])
-JSON_CHECK_POSITIVE([single-element array], [[ [ 1 ] ]], [[[1]]])
-JSON_CHECK_POSITIVE([2-element array], [[ [ 1, 2 ] ]], [[[1,2]]])
-JSON_CHECK_POSITIVE([many-element array],
-                    [[ [ 1, 2, 3, 4, 5 ] ]],
-                    [[[1,2,3,4,5]]])
-JSON_CHECK_NEGATIVE([missing comma], [[ [ 1, 2, 3 4, 5 ] ]],
-                    [error: syntax error expecting '@:>@' or ','])
-JSON_CHECK_NEGATIVE([trailing comma not allowed], 
-                    [[[1,2,]]], [error: syntax error expecting value])
-JSON_CHECK_NEGATIVE([doubled comma not allowed], 
-                    [[[1,,2]]], [error: syntax error expecting value])
-
-AT_BANNER([JSON -- strings])
-
-JSON_CHECK_POSITIVE([empty string], [[[ "" ]]], [[[""]]])
-JSON_CHECK_POSITIVE([1-character strings], 
-                    [[[ "a", "b", "c" ]]],
-                    [[["a","b","c"]]])
-JSON_CHECK_POSITIVE([escape sequences], 
-  [[[ " \" \\ \/ \b \f \n \r \t" ]]],
-  [[[" \" \\ / \b \f \n \r \t"]]])
-JSON_CHECK_POSITIVE([Unicode escape sequences], 
-  [[[ " \u0022 \u005c \u002F \u0008 \u000c \u000A \u000d \u0009" ]]],
-  [[[" \" \\ / \b \f \n \r \t"]]])
-JSON_CHECK_POSITIVE_C([surrogate pairs - C],
-  [[["\ud834\udd1e"]]],
-  [[["𝄞"]]])
-JSON_CHECK_POSITIVE_UCS4PY([surrogate pairs - Python],
-  [[["\ud834\udd1e"]]],
-  [[["𝄞"]]])
-JSON_CHECK_NEGATIVE([a string by itself is not valid JSON], ["xxx"],
-                    [error: syntax error at beginning of input])
-JSON_CHECK_NEGATIVE([end of line in quoted string],
-                    [[["xxx
-"]]],
-                    [error: U+000A must be escaped in quoted string])
-JSON_CHECK_NEGATIVE([formfeed in quoted string],
-                    [[["xxx"]]],
-                    [error: U+000C must be escaped in quoted string])
-JSON_CHECK_NEGATIVE([bad escape in quoted string],
-                    [[["\x12"]]],
-                    [error: bad escape \x])
-JSON_CHECK_NEGATIVE([\u must be followed by 4 hex digits (1)],
-                    [[["\u1x"]]],
-                    [error: quoted string ends within \u escape])
-JSON_CHECK_NEGATIVE([\u must be followed by 4 hex digits (2)],
-                    [[["\u1xyz"]]],
-                    [error: malformed \u escape])
-JSON_CHECK_NEGATIVE([isolated leading surrogate not allowed],
-                    [[["\ud834xxx"]]],
-                    [error: malformed escaped surrogate pair])
-JSON_CHECK_NEGATIVE([surrogatess must paired properly],
-                    [[["\ud834\u1234"]]],
-                    [error: second half of escaped surrogate pair is not trailing surrogate])
-JSON_CHECK_NEGATIVE([null bytes not allowed], 
-                    [[["\u0000"]]], 
-                    [error: null bytes not supported in quoted strings])
-dnl Check for regression against a prior bug.
-JSON_CHECK_POSITIVE([properly quoted backslash at end of string],
-  [[["\\"]]],
-  [[["\\"]]])
-JSON_CHECK_NEGATIVE([stray backslash at end of string],
-  [[["abcd\"]]],
-  [error: unexpected end of input in quoted string])
-
-AT_SETUP([end of input in quoted string - C])
-AT_KEYWORDS([json negative])
-AT_CHECK([printf '"xxx' | ovstest test-json -], [1],
-  [error: line 0, column 4, byte 4: unexpected end of input in quoted string
-])
-AT_CLEANUP
-
-AT_SETUP([end of input in quoted string - Python])
-AT_KEYWORDS([json negative Python])
-AT_SKIP_IF([test $HAVE_PYTHON2 = no])
-AT_CHECK([printf '"xxx' > input
-$PYTHON2 $srcdir/test-json.py input], [1],
-  [error: line 0, column 4, byte 4: unexpected end of input in quoted string
-])
-AT_CLEANUP
-
-AT_BANNER([JSON -- objects])
-
-JSON_CHECK_POSITIVE([empty object], [[{ }]], [[{}]])
-JSON_CHECK_POSITIVE([simple object],
-                    [[{"b": 2, "a": 1, "c": 3}]],
-                    [[{"a":1,"b":2,"c":3}]])
-JSON_CHECK_NEGATIVE([bad value], [[{"a": }, "b": 2]], 
-                    [error: syntax error expecting value])
-JSON_CHECK_NEGATIVE([missing colon], [[{"b": 2, "a" 1, "c": 3}]],
-                    [error: syntax error parsing object expecting ':'])
-JSON_CHECK_NEGATIVE([missing comma], [[{"b": 2 "a" 1, "c": 3}]],
-                    [error: syntax error expecting '}' or ','])
-JSON_CHECK_NEGATIVE([trailing comma not allowed],
-                    [[{"b": 2, "a": 1, "c": 3, }]],
-                    [[error: syntax error parsing object expecting string]])
-JSON_CHECK_NEGATIVE([doubled comma not allowed],
-                    [[{"b": 2, "a": 1,, "c": 3}]],
-                    [[error: syntax error parsing object expecting string]])
-JSON_CHECK_NEGATIVE([names must be strings],
-                    [[{1: 2}]],
-                    [[error: syntax error parsing object expecting string]])
-
-AT_BANNER([JSON -- literal names])
-
-JSON_CHECK_POSITIVE([null], [[[ null ]]], [[[null]]])
-JSON_CHECK_POSITIVE([false], [[[ false ]]], [[[false]]])
-JSON_CHECK_POSITIVE([true], [[[ true ]]], [[[true]]])
-JSON_CHECK_NEGATIVE([a literal by itself is not valid JSON], [null],
-                    [error: syntax error at beginning of input])
-JSON_CHECK_NEGATIVE([nullify is invalid], [[[ nullify ]]], 
-                    [error: invalid keyword 'nullify'])
-JSON_CHECK_NEGATIVE([nubs is invalid], [[[ nubs ]]],
-                    [error: invalid keyword 'nubs'])
-JSON_CHECK_NEGATIVE([xxx is invalid], [[[ xxx ]]], 
-                    [error: invalid keyword 'xxx'])
-
-AT_BANNER([JSON -- numbers])
-
-JSON_CHECK_POSITIVE(
-  [integers expressed as reals],
-  [[[1.0000000000,
-     2.00000000000000000000000000000000000,
-     2e5,
-     2.1234e4,
-     2.1230e3,
-     0e-10000,
-     0e10000]]],
-  [[[1,2,200000,21234,2123,0,0]]])
-JSON_CHECK_POSITIVE(
-  [large integers], 
-  [[[9223372036854775807, -9223372036854775808]]],
-  [[[9223372036854775807,-9223372036854775808]]])
-JSON_CHECK_POSITIVE(
-  [large integers expressed as reals], 
-  [[[9223372036854775807.0, -9223372036854775808.0,
-     92233720.36854775807e11, -9.223372036854775808e18]]],
-  [[[9223372036854775807,-9223372036854775808,9223372036854775807,-9223372036854775808]]])
-# It seems likely that the following test will fail on some system that
-# rounds slightly differently in arithmetic or in printf, but I'd like
-# to keep it this way until we run into such a system.
-JSON_CHECK_POSITIVE_C(
-  [C - large integers that overflow to reals],
-  [[[9223372036854775807000, -92233720368547758080000]]],
-  [[[9.22337203685478e+21,-9.22337203685478e+22]]])
-JSON_CHECK_POSITIVE_PY23(
-  [large integers that overflow to reals],
-  [[[9223372036854775807000, -92233720368547758080000]]],
-  [[[9.223372036854776e+21,-9.223372036854776e+22]]])
-
-JSON_CHECK_POSITIVE(
-  [negative zero],
-  [[[-0, -0.0, 1e-9999, -1e-9999]]],
-  [[[0,0,0,0]]])
-
-JSON_CHECK_POSITIVE(
-  [reals], 
-  [[[0.0, 1.0, 2.0, 3.0, 3.5, 81.250]]],
-  [[[0,1,2,3,3.5,81.25]]])
-JSON_CHECK_POSITIVE(
-  [scientific notation],
-  [[[1e3, 1E3, 2.5E2, 1e+3, 125e-3, 3.125e-2, 3125e-05, 1.525878906e-5]]],
-  [[[1000,1000,250,1000,0.125,0.03125,0.03125,1.525878906e-05]]])
-# It seems likely that the following test will fail on some system that
-# rounds slightly differently in arithmetic or in printf, but I'd like
-# to keep it this way until we run into such a system.
-JSON_CHECK_POSITIVE_C(
-  [C - +/- DBL_MAX],
-  [[[1.7976931348623157e+308, -1.7976931348623157e+308]]],
-  [[[1.79769313486232e+308,-1.79769313486232e+308]]])
-JSON_CHECK_POSITIVE_PY23(
-  [+/- DBL_MAX],
-  [[[1.7976931348623157e+308, -1.7976931348623157e+308]]],
-  [[[1.7976931348623157e+308,-1.7976931348623157e+308]]])
-
-JSON_CHECK_POSITIVE(
-  [negative reals], 
-  [[[-0, -1.0, -2.0, -3.0, -3.5, -8.1250]]],
-  [[[0,-1,-2,-3,-3.5,-8.125]]])
-JSON_CHECK_POSITIVE(
-  [negative scientific notation],
-  [[[-1e3, -1E3, -2.5E2, -1e+3, -125e-3, -3.125e-2, -3125e-05, -1.525878906e-5]]],
-  [[[-1000,-1000,-250,-1000,-0.125,-0.03125,-0.03125,-1.525878906e-05]]])
-JSON_CHECK_POSITIVE(
-  [1e-9999 underflows to 0],
-  [[[1e-9999]]],
-  [[[0]]])
-JSON_CHECK_NEGATIVE([a number by itself is not valid JSON], [1],
-                    [error: syntax error at beginning of input])
-JSON_CHECK_NEGATIVE(
-  [leading zeros not allowed],
-  [[[0123]]],
-  [error: leading zeros not allowed])
-JSON_CHECK_NEGATIVE(
-  [1e9999 is too big],
-  [[[1e9999]]],
-  [error: number outside valid range])
-JSON_CHECK_NEGATIVE_C(
-  [exponent bigger than INT_MAX],
-  [[[1e9999999999999999999]]],
-  [error: exponent outside valid range])
-JSON_CHECK_NEGATIVE_C(
-  [exponent smaller than INT_MIN],
-  [[[1e-9999999999999999999]]],
-  [error: exponent outside valid range])
-JSON_CHECK_NEGATIVE_C(
-  [accumulated exponent bigger than INT_MAX],
-  [[[340282366920938463461761716499e2147483647]]],
-  [error: exponent outside valid range])
-JSON_CHECK_NEGATIVE_C(
-  [accumulated exponent smaller than INT_MIN],
-  [[[0.340282366920938463461761716499e-2147483648]]],
-  [error: exponent outside valid range])
-JSON_CHECK_NEGATIVE(
-  [decimal point must be followed by digit],
-  [[[1.]]],
-  [error: decimal point must be followed by digit])
-JSON_CHECK_NEGATIVE(
-  [exponent must contain at least one digit (1)],
-  [[[1e]]],
-  [error: exponent must contain at least one digit])
-JSON_CHECK_NEGATIVE(
-  [exponent must contain at least one digit (2)],
-  [[[1e+]]],
-  [error: exponent must contain at least one digit])
-JSON_CHECK_NEGATIVE(
-  [exponent must contain at least one digit (3)],
-  [[[1e-]]],
-  [error: exponent must contain at least one digit])
-
-AT_BANNER([JSON -- RFC 4627 examples])
-
-JSON_CHECK_POSITIVE([RFC 4267 object example],
-[[{
-   "Image": {
-       "Width":  800,
-       "Height": 600,
-       "Title":  "View from 15th Floor",
-       "Thumbnail": {
-           "Url":    "http://www.example.com/image/481989943",
-           "Height": 125,
-           "Width":  "100"
-       },
-       "IDs": [116, 943, 234, 38793]
-     }
-}]],
-[[{"Image":{"Height":600,"IDs":[116,943,234,38793],"Thumbnail":{"Height":125,"Url":"http://www.example.com/image/481989943","Width":"100"},"Title":"View from 15th Floor","Width":800}}]])
-
-JSON_CHECK_POSITIVE([RFC 4267 array example],
-[[[
-   {
-      "precision": "zip",
-      "Latitude":  37.7668,
-      "Longitude": -122.3959,
-      "Address":   "",
-      "City":      "SAN FRANCISCO",
-      "State":     "CA",
-      "Zip":       "94107",
-      "Country":   "US"
-   },
-   {
-      "precision": "zip",
-      "Latitude":  37.371991,
-      "Longitude": -122.026020,
-      "Address":   "",
-      "City":      "SUNNYVALE",
-      "State":     "CA",
-      "Zip":       "94085",
-      "Country":   "US"
-   }
-]]],
-[[[{"Address":"","City":"SAN FRANCISCO","Country":"US","Latitude":37.7668,"Longitude":-122.3959,"State":"CA","Zip":"94107","precision":"zip"},{"Address":"","City":"SUNNYVALE","Country":"US","Latitude":37.371991,"Longitude":-122.02602,"State":"CA","Zip":"94085","precision":"zip"}]]])
-
-AT_BANNER([JSON -- pathological cases])
-
-JSON_CHECK_NEGATIVE([trailing garbage], [[[1]null]],
-                    [error: trailing garbage at end of input])
-JSON_CHECK_NEGATIVE([formfeeds are not valid white space],
-                    [[[]]], [error: invalid character U+000c])
-JSON_CHECK_NEGATIVE([';' is not a valid token],
-                    [;], [error: invalid character ';'])
-JSON_CHECK_NEGATIVE([arrays nesting too deep],
-                    [m4_for([i], [0], [1002], [1], [@<:@])dnl
-                     m4_for([i], [0], [1002], [1], [@:>@])],
-                    [error: input exceeds maximum nesting depth 1000])
-JSON_CHECK_NEGATIVE([objects nesting too deep],
-                    [m4_for([i], [0], [1002], [1], [{"x":])dnl
-                     m4_for([i], [0], [1002], [1], [}])],
-                    [error: input exceeds maximum nesting depth 1000])
-
-AT_SETUP([input may not be empty])
-AT_KEYWORDS([json negative])
-AT_CHECK([ovstest test-json /dev/null], [1], [error: line 0, column 0, byte 0: empty input stream
-])
-AT_CLEANUP
-
-AT_BANNER([JSON -- multiple inputs])
-
-JSON_CHECK_POSITIVE([multiple adjacent objects], [[{}{}{}]], [[{}
-{}
-{}]],
-  [--multiple])
-
-JSON_CHECK_POSITIVE([multiple space-separated objects], [[{}  {}  {}]], [[{}
-{}
-{}]],
-  [--multiple])
-
-JSON_CHECK_POSITIVE([multiple objects on separate lines], [[{}
-{}
-{}]], [[{}
-{}
-{}]],
-  [--multiple])
-
-JSON_CHECK_POSITIVE([multiple objects and arrays], [[{}[]{}[]]], [[{}
-[]
-{}
-[]]],
-  [--multiple])
-
-JSON_CHECK_NEGATIVE([garbage between multiple objects], [[{}x{}]], [[{}
-error: invalid keyword 'x'
-{}]], [--multiple])
-
-JSON_CHECK_NEGATIVE([garbage after multiple objects], [[{}{}x]], [[{}
-{}
-error: invalid keyword 'x']], [--multiple])
diff --git a/tests/jsonrpc-py.at b/tests/jsonrpc-py.at
deleted file mode 100644
index e75ac4551..000000000
--- a/tests/jsonrpc-py.at
+++ /dev/null
@@ -1,46 +0,0 @@
-AT_BANNER([JSON-RPC - Python])
-
-m4_define([JSONRPC_REQ_REPLY_SUCCESS_PYN],
-  [AT_SETUP([JSON-RPC request and successful reply - $1])
-   AT_SKIP_IF([test $2 = no])
-   AT_KEYWORDS([python jsonrpc])
-   AT_CHECK([$3 $srcdir/test-jsonrpc.py --pidfile --detach --no-chdir listen punix:socket])
-   on_exit 'kill `cat test-jsonrpc.py.pid`'
-   AT_CHECK(
-     [[$3 $srcdir/test-jsonrpc.py request unix:socket echo '[{"a": "b", "x": null}]']], [0],
-     [[{"error":null,"id":0,"result":[{"a":"b","x":null}]}
-]])
-   AT_CLEANUP])
-
-JSONRPC_REQ_REPLY_SUCCESS_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-JSONRPC_REQ_REPLY_SUCCESS_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([JSONRPC_REQ_REPLY_ERROR_PYN],
-  [AT_SETUP([JSON-RPC request and error reply - $1])
-   AT_SKIP_IF([test $2 = no])
-   AT_KEYWORDS([python jsonrpc])
-   AT_CHECK([$3 $srcdir/test-jsonrpc.py --pidfile --detach --no-chdir listen punix:socket])
-   on_exit 'kill `cat test-jsonrpc.py.pid`'
-   AT_CHECK(
-     [[$3 $srcdir/test-jsonrpc.py request unix:socket bad-request '[]']], [0],
-     [[{"error":{"error":"unknown method"},"id":0,"result":null}
-]])
-   AT_CLEANUP])
-
-JSONRPC_REQ_REPLY_ERROR_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-JSONRPC_REQ_REPLY_ERROR_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([JSONRPC_NOTIFICATION_PYN],
-  [AT_SETUP([JSON-RPC notification - $1])
-   AT_SKIP_IF([test $2 = no])
-   AT_KEYWORDS([python jsonrpc])
-   AT_CHECK([$3 $srcdir/test-jsonrpc.py --pidfile --detach --no-chdir listen punix:socket])
-   on_exit 'kill `cat test-jsonrpc.py.pid`'
-   AT_CHECK([test -e test-jsonrpc.py.pid])
-   AT_CHECK([[$3 $srcdir/test-jsonrpc.py notify unix:socket shutdown '[]']])
-   # Wait for test-jsonrpc to die, based on its pidfile disappearing
-   OVS_WAIT_WHILE([test -e test-jsonrpc.py.pid])
-   AT_CLEANUP])
-
-JSONRPC_NOTIFICATION_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-JSONRPC_NOTIFICATION_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
diff --git a/tests/jsonrpc.at b/tests/jsonrpc.at
deleted file mode 100644
index c84174eed..000000000
--- a/tests/jsonrpc.at
+++ /dev/null
@@ -1,29 +0,0 @@
-AT_BANNER([JSON-RPC - C])
-
-AT_SETUP([JSON-RPC request and successful reply])
-AT_CHECK([ovstest test-jsonrpc --detach --no-chdir --pidfile listen punix:socket])
-on_exit 'kill `cat test-jsonrpc.pid`'
-AT_CHECK(
-  [[ovstest test-jsonrpc request unix:socket echo '[{"a": "b", "x": null}]']], [0],
-  [[{"error":null,"id":0,"result":[{"a":"b","x":null}]}
-]])
-AT_CLEANUP
-
-AT_SETUP([JSON-RPC request and error reply])
-AT_CHECK([ovstest test-jsonrpc --detach --no-chdir --pidfile listen punix:socket])
-on_exit 'kill `cat test-jsonrpc.pid`'
-AT_CHECK(
-  [[ovstest test-jsonrpc request unix:socket bad-request '[]']], [0],
-  [[{"error":{"error":"unknown method"},"id":0,"result":null}
-]])
-AT_CLEANUP
-
-AT_SETUP([JSON-RPC notification])
-AT_CHECK([ovstest test-jsonrpc --detach --no-chdir --pidfile listen punix:socket])
-on_exit 'kill `cat test-jsonrpc.pid`'
-# Check that the pidfile got created.
-AT_CHECK([test -e test-jsonrpc.pid])
-AT_CHECK([[ovstest test-jsonrpc notify unix:socket shutdown '[]']])
-# Wait for test-jsonrpc to die, based on its pidfile disappearing
-OVS_WAIT_WHILE([test -e test-jsonrpc.pid])
-AT_CLEANUP
diff --git a/tests/lacp.at b/tests/lacp.at
deleted file mode 100644
index 7b460d7be..000000000
--- a/tests/lacp.at
+++ /dev/null
@@ -1,1013 +0,0 @@
-AT_BANNER([lacp])
-
-# Strips out Reciulation ID information since it may change over time.
-m4_define([STRIP_RECIRC_ID], [[sed '
-    s/Recirc-ID.*$/<del>/
-' ]])
-
-# Strips out active slave mac address since it may change over time.
-m4_define([STRIP_ACTIVE_SLAVE_MAC], [[sed '
-    s/active slave mac.*$/<active slave mac del>/
-' ]])
-
-AT_SETUP([lacp - config])
-OVS_VSWITCHD_START([\
-        add-port br0 p1 --\
-        set Port p1 lacp=active --\
-        set Interface p1 type=dummy ])
-
-ovs-appctl time/stop
-ovs-appctl time/warp 300 100
-
-AT_CHECK([ovs-appctl lacp/show], [0], [dnl
----- p1 ----
-  status: active negotiated
-  sys_id: aa:55:aa:55:00:00
-  sys_priority: 65535
-  aggregation key: 1
-  lacp_time: slow
-
-slave: p1: expired attached
-  port_id: 1
-  port_priority: 65535
-  may_enable: false
-
-  actor sys_id: aa:55:aa:55:00:00
-  actor sys_priority: 65535
-  actor port_id: 1
-  actor port_priority: 65535
-  actor key: 1
-  actor state: activity synchronized collecting distributing expired
-
-  partner sys_id: 00:00:00:00:00:00
-  partner sys_priority: 0
-  partner port_id: 0
-  partner port_priority: 0
-  partner key: 0
-  partner state: timeout
-])
-AT_CHECK([ovs-appctl bond/show])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([lacp - multi port config])
-OVS_VSWITCHD_START([dnl
-        add-bond br0 bond p1 p2 --\
-        set Port bond lacp=active bond-mode=active-backup \
-            other_config:lacp-time="fast" \
-            other_config:lacp-system-id=11:22:33:44:55:66 \
-            other_config:lacp-system-priority=54321 --\
-        set Interface p1 type=dummy \
-            other_config:lacp-port-id=11 \
-            other_config:lacp-port-priority=111 \
-            other_config:lacp-aggregation-key=3333 --\
-        set Interface p2 type=dummy \
-            other_config:lacp-port-id=22 \
-            other_config:lacp-port-priority=222 \
-            other_config:lacp-aggregation-key=3333 ])
-
-ovs-appctl time/stop
-ovs-appctl time/warp 300 100
-
-AT_CHECK([ovs-appctl lacp/show], [0], [stdout])
-AT_CHECK([sed -e 's/aggregation key:.*/aggregation key: <omitted>/' < stdout], [0], [dnl
----- bond ----
-  status: active negotiated
-  sys_id: 11:22:33:44:55:66
-  sys_priority: 54321
-  aggregation key: <omitted>
-  lacp_time: fast
-
-slave: p1: expired attached
-  port_id: 11
-  port_priority: 111
-  may_enable: false
-
-  actor sys_id: 11:22:33:44:55:66
-  actor sys_priority: 54321
-  actor port_id: 11
-  actor port_priority: 111
-  actor key: 3333
-  actor state: activity timeout aggregation synchronized collecting distributing expired
-
-  partner sys_id: 00:00:00:00:00:00
-  partner sys_priority: 0
-  partner port_id: 0
-  partner port_priority: 0
-  partner key: 0
-  partner state: timeout
-
-slave: p2: expired attached
-  port_id: 22
-  port_priority: 222
-  may_enable: false
-
-  actor sys_id: 11:22:33:44:55:66
-  actor sys_priority: 54321
-  actor port_id: 22
-  actor port_priority: 222
-  actor key: 3333
-  actor state: activity timeout aggregation synchronized collecting distributing expired
-
-  partner sys_id: 00:00:00:00:00:00
-  partner sys_priority: 0
-  partner port_id: 0
-  partner port_priority: 0
-  partner key: 0
-  partner state: timeout
-])
-AT_CHECK([ovs-appctl bond/show], [0], [dnl
----- bond ----
-bond_mode: active-backup
-bond may use recirculation: no, Recirc-ID : -1
-bond-hash-basis: 0
-updelay: 0 ms
-downdelay: 0 ms
-lacp_status: negotiated
-lacp_fallback_ab: false
-active slave mac: 00:00:00:00:00:00(none)
-
-slave p1: disabled
-  may_enable: false
-
-slave p2: disabled
-  may_enable: false
-
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([lacp - negotiation])
-# Create bond0 on br0 with interfaces p0 and p1
-#    and bond1 on br1 with interfaces p2 and p3
-# with p0 patched to p2 and p1 patched to p3.
-OVS_VSWITCHD_START(
-  [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
-                            other-config:lacp-time=fast \
-                            other-config:bond-rebalance-interval=0 -- \
-   set interface p0 type=patch options:peer=p2 ofport_request=1 \
-                    other-config:lacp-aggregation-key=2 -- \
-   set interface p1 type=patch options:peer=p3 ofport_request=2 \
-                    other-config:lacp-aggregation-key=2 -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-                  fail-mode=secure -- \
-   add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
-                            other-config:lacp-time=fast \
-                            other-config:bond-rebalance-interval=0 -- \
-   set interface p2 type=patch options:peer=p0 ofport_request=3 \
-                    other-config:lacp-aggregation-key=4 -- \
-   set interface p3 type=patch options:peer=p1 ofport_request=4 \
-                    other-config:lacp-aggregation-key=4 --])
-
-AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
-])
-
-ovs-appctl time/stop
-
-# Wait for up to 5 (simulated) seconds, until LACP negotiation finishes.
-i=0
-while :; do
-    ovs-appctl lacp/show bond0 > bond0
-    AT_CAPTURE_FILE([bond0])
-    ovs-appctl lacp/show bond1 > bond1
-    AT_CAPTURE_FILE([bond1])
-    if grep negotiated bond0 && grep negotiated bond1; then
-        if grep expired bond0 || grep expired bond1; then
-            :
-        else
-            break
-        fi
-    fi
-    i=`expr $i + 1`
-    if test $i = 50; then
-        AT_FAIL_IF([:])
-    fi
-    ovs-appctl time/warp 100
-done
-
-# Now check the correctly negotiated configuration.
-AT_CHECK(
-  [ovs-appctl lacp/show bond0
-ovs-appctl lacp/show bond1
-ovs-appctl bond/show bond0 | STRIP_RECIRC_ID | STRIP_ACTIVE_SLAVE_MAC
-ovs-appctl bond/show bond1 | STRIP_RECIRC_ID | STRIP_ACTIVE_SLAVE_MAC ], [0], [stdout])
-AT_CHECK([sed '/active slave/d' stdout], [0], [dnl
----- bond0 ----
-  status: active negotiated
-  sys_id: aa:55:aa:55:00:00
-  sys_priority: 65534
-  aggregation key: 2
-  lacp_time: fast
-
-slave: p0: current attached
-  port_id: 1
-  port_priority: 65535
-  may_enable: true
-
-  actor sys_id: aa:55:aa:55:00:00
-  actor sys_priority: 65534
-  actor port_id: 1
-  actor port_priority: 65535
-  actor key: 2
-  actor state: activity timeout aggregation synchronized collecting distributing
-
-  partner sys_id: aa:66:aa:66:00:00
-  partner sys_priority: 65534
-  partner port_id: 3
-  partner port_priority: 65535
-  partner key: 4
-  partner state: activity timeout aggregation synchronized collecting distributing
-
-slave: p1: current attached
-  port_id: 2
-  port_priority: 65535
-  may_enable: true
-
-  actor sys_id: aa:55:aa:55:00:00
-  actor sys_priority: 65534
-  actor port_id: 2
-  actor port_priority: 65535
-  actor key: 2
-  actor state: activity timeout aggregation synchronized collecting distributing
-
-  partner sys_id: aa:66:aa:66:00:00
-  partner sys_priority: 65534
-  partner port_id: 4
-  partner port_priority: 65535
-  partner key: 4
-  partner state: activity timeout aggregation synchronized collecting distributing
----- bond1 ----
-  status: active negotiated
-  sys_id: aa:66:aa:66:00:00
-  sys_priority: 65534
-  aggregation key: 4
-  lacp_time: fast
-
-slave: p2: current attached
-  port_id: 3
-  port_priority: 65535
-  may_enable: true
-
-  actor sys_id: aa:66:aa:66:00:00
-  actor sys_priority: 65534
-  actor port_id: 3
-  actor port_priority: 65535
-  actor key: 4
-  actor state: activity timeout aggregation synchronized collecting distributing
-
-  partner sys_id: aa:55:aa:55:00:00
-  partner sys_priority: 65534
-  partner port_id: 1
-  partner port_priority: 65535
-  partner key: 2
-  partner state: activity timeout aggregation synchronized collecting distributing
-
-slave: p3: current attached
-  port_id: 4
-  port_priority: 65535
-  may_enable: true
-
-  actor sys_id: aa:66:aa:66:00:00
-  actor sys_priority: 65534
-  actor port_id: 4
-  actor port_priority: 65535
-  actor key: 4
-  actor state: activity timeout aggregation synchronized collecting distributing
-
-  partner sys_id: aa:55:aa:55:00:00
-  partner sys_priority: 65534
-  partner port_id: 2
-  partner port_priority: 65535
-  partner key: 2
-  partner state: activity timeout aggregation synchronized collecting distributing
----- bond0 ----
-bond_mode: balance-tcp
-bond may use recirculation: yes, <del>
-bond-hash-basis: 0
-updelay: 0 ms
-downdelay: 0 ms
-lacp_status: negotiated
-lacp_fallback_ab: false
-
-slave p0: enabled
-  may_enable: true
-
-slave p1: enabled
-  may_enable: true
-
----- bond1 ----
-bond_mode: balance-tcp
-bond may use recirculation: yes, <del>
-bond-hash-basis: 0
-updelay: 0 ms
-downdelay: 0 ms
-lacp_status: negotiated
-lacp_fallback_ab: false
-
-slave p2: enabled
-  may_enable: true
-
-slave p3: enabled
-  may_enable: true
-
-])
-AT_CHECK([grep 'active slave$' stdout], [0], [dnl
-  active slave
-  active slave
-])
-
-# Redirect the patch link between p0 and p2 so that no packets get
-# back and forth across them anymore.  Then wait 4 simulated
-# seconds.  The LACP state should become "expired" for p0 and p2.
-AT_CHECK([ovs-vsctl \
--- add-port br0 null0 -- set int null0 type=patch options:peer=p2 -- set int p2 options:peer=null0 \
--- add-port br1 null1 -- set int null1 type=patch options:peer=p0 -- set int p0 options:peer=null1])
-
-ovs-appctl time/warp 4100 100
-AT_CHECK(
-  [ovs-appctl lacp/show bond0
-ovs-appctl lacp/show bond1
-ovs-appctl bond/show bond0 | STRIP_RECIRC_ID | STRIP_ACTIVE_SLAVE_MAC
-ovs-appctl bond/show bond1 | STRIP_RECIRC_ID | STRIP_ACTIVE_SLAVE_MAC ], [0], [dnl
----- bond0 ----
-  status: active negotiated
-  sys_id: aa:55:aa:55:00:00
-  sys_priority: 65534
-  aggregation key: 2
-  lacp_time: fast
-
-slave: p0: expired attached
-  port_id: 1
-  port_priority: 65535
-  may_enable: false
-
-  actor sys_id: aa:55:aa:55:00:00
-  actor sys_priority: 65534
-  actor port_id: 1
-  actor port_priority: 65535
-  actor key: 2
-  actor state: activity timeout aggregation synchronized collecting distributing expired
-
-  partner sys_id: aa:66:aa:66:00:00
-  partner sys_priority: 65534
-  partner port_id: 3
-  partner port_priority: 65535
-  partner key: 4
-  partner state: activity timeout aggregation collecting distributing
-
-slave: p1: current attached
-  port_id: 2
-  port_priority: 65535
-  may_enable: true
-
-  actor sys_id: aa:55:aa:55:00:00
-  actor sys_priority: 65534
-  actor port_id: 2
-  actor port_priority: 65535
-  actor key: 2
-  actor state: activity timeout aggregation synchronized collecting distributing
-
-  partner sys_id: aa:66:aa:66:00:00
-  partner sys_priority: 65534
-  partner port_id: 4
-  partner port_priority: 65535
-  partner key: 4
-  partner state: activity timeout aggregation synchronized collecting distributing
----- bond1 ----
-  status: active negotiated
-  sys_id: aa:66:aa:66:00:00
-  sys_priority: 65534
-  aggregation key: 4
-  lacp_time: fast
-
-slave: p2: expired attached
-  port_id: 3
-  port_priority: 65535
-  may_enable: false
-
-  actor sys_id: aa:66:aa:66:00:00
-  actor sys_priority: 65534
-  actor port_id: 3
-  actor port_priority: 65535
-  actor key: 4
-  actor state: activity timeout aggregation synchronized collecting distributing expired
-
-  partner sys_id: aa:55:aa:55:00:00
-  partner sys_priority: 65534
-  partner port_id: 1
-  partner port_priority: 65535
-  partner key: 2
-  partner state: activity timeout aggregation collecting distributing
-
-slave: p3: current attached
-  port_id: 4
-  port_priority: 65535
-  may_enable: true
-
-  actor sys_id: aa:66:aa:66:00:00
-  actor sys_priority: 65534
-  actor port_id: 4
-  actor port_priority: 65535
-  actor key: 4
-  actor state: activity timeout aggregation synchronized collecting distributing
-
-  partner sys_id: aa:55:aa:55:00:00
-  partner sys_priority: 65534
-  partner port_id: 2
-  partner port_priority: 65535
-  partner key: 2
-  partner state: activity timeout aggregation synchronized collecting distributing
----- bond0 ----
-bond_mode: balance-tcp
-bond may use recirculation: yes, <del>
-bond-hash-basis: 0
-updelay: 0 ms
-downdelay: 0 ms
-lacp_status: negotiated
-lacp_fallback_ab: false
-<active slave mac del>
-
-slave p0: disabled
-  may_enable: false
-
-slave p1: enabled
-  active slave
-  may_enable: true
-
----- bond1 ----
-bond_mode: balance-tcp
-bond may use recirculation: yes, <del>
-bond-hash-basis: 0
-updelay: 0 ms
-downdelay: 0 ms
-lacp_status: negotiated
-lacp_fallback_ab: false
-<active slave mac del>
-
-slave p2: disabled
-  may_enable: false
-
-slave p3: enabled
-  active slave
-  may_enable: true
-
-])
-
-# Wait 4 more simulated seconds.  The LACP state should become
-# "defaulted" for p0 and p2.
-ovs-appctl time/warp 4100 100
-AT_CHECK(
-  [ovs-appctl lacp/show bond0
-ovs-appctl lacp/show bond1
-ovs-appctl bond/show bond0 | STRIP_RECIRC_ID | STRIP_ACTIVE_SLAVE_MAC
-ovs-appctl bond/show bond1 | STRIP_RECIRC_ID | STRIP_ACTIVE_SLAVE_MAC ], [0], [dnl
----- bond0 ----
-  status: active negotiated
-  sys_id: aa:55:aa:55:00:00
-  sys_priority: 65534
-  aggregation key: 2
-  lacp_time: fast
-
-slave: p0: defaulted detached
-  port_id: 1
-  port_priority: 65535
-  may_enable: false
-
-  actor sys_id: aa:55:aa:55:00:00
-  actor sys_priority: 65534
-  actor port_id: 1
-  actor port_priority: 65535
-  actor key: 2
-  actor state: activity timeout aggregation defaulted
-
-  partner sys_id: 00:00:00:00:00:00
-  partner sys_priority: 0
-  partner port_id: 0
-  partner port_priority: 0
-  partner key: 0
-  partner state:
-
-slave: p1: current attached
-  port_id: 2
-  port_priority: 65535
-  may_enable: true
-
-  actor sys_id: aa:55:aa:55:00:00
-  actor sys_priority: 65534
-  actor port_id: 2
-  actor port_priority: 65535
-  actor key: 2
-  actor state: activity timeout aggregation synchronized collecting distributing
-
-  partner sys_id: aa:66:aa:66:00:00
-  partner sys_priority: 65534
-  partner port_id: 4
-  partner port_priority: 65535
-  partner key: 4
-  partner state: activity timeout aggregation synchronized collecting distributing
----- bond1 ----
-  status: active negotiated
-  sys_id: aa:66:aa:66:00:00
-  sys_priority: 65534
-  aggregation key: 4
-  lacp_time: fast
-
-slave: p2: defaulted detached
-  port_id: 3
-  port_priority: 65535
-  may_enable: false
-
-  actor sys_id: aa:66:aa:66:00:00
-  actor sys_priority: 65534
-  actor port_id: 3
-  actor port_priority: 65535
-  actor key: 4
-  actor state: activity timeout aggregation defaulted
-
-  partner sys_id: 00:00:00:00:00:00
-  partner sys_priority: 0
-  partner port_id: 0
-  partner port_priority: 0
-  partner key: 0
-  partner state:
-
-slave: p3: current attached
-  port_id: 4
-  port_priority: 65535
-  may_enable: true
-
-  actor sys_id: aa:66:aa:66:00:00
-  actor sys_priority: 65534
-  actor port_id: 4
-  actor port_priority: 65535
-  actor key: 4
-  actor state: activity timeout aggregation synchronized collecting distributing
-
-  partner sys_id: aa:55:aa:55:00:00
-  partner sys_priority: 65534
-  partner port_id: 2
-  partner port_priority: 65535
-  partner key: 2
-  partner state: activity timeout aggregation synchronized collecting distributing
----- bond0 ----
-bond_mode: balance-tcp
-bond may use recirculation: yes, <del>
-bond-hash-basis: 0
-updelay: 0 ms
-downdelay: 0 ms
-lacp_status: negotiated
-lacp_fallback_ab: false
-<active slave mac del>
-
-slave p0: disabled
-  may_enable: false
-
-slave p1: enabled
-  active slave
-  may_enable: true
-
----- bond1 ----
-bond_mode: balance-tcp
-bond may use recirculation: yes, <del>
-bond-hash-basis: 0
-updelay: 0 ms
-downdelay: 0 ms
-lacp_status: negotiated
-lacp_fallback_ab: false
-<active slave mac del>
-
-slave p2: disabled
-  may_enable: false
-
-slave p3: enabled
-  active slave
-  may_enable: true
-
-])
-
-# Reconnect the patch link between p0 and p2 to allow traffic between the ports.
-AT_CHECK([ovs-vsctl \
--- del-port null0 -- set int p2 options:peer=p0 \
--- del-port null1 -- set int p0 options:peer=p2])
-
-# Wait for 30 more seconds (LACP_SLOW_TIME_TX) for the lacp to renegotiate
-ovs-appctl time/warp 30100 100
-
-AT_CHECK(
-  [ovs-appctl lacp/show bond0
-ovs-appctl lacp/show bond1
-ovs-appctl bond/show bond0 | STRIP_RECIRC_ID | STRIP_ACTIVE_SLAVE_MAC
-ovs-appctl bond/show bond1 | STRIP_RECIRC_ID | STRIP_ACTIVE_SLAVE_MAC ], [0], [dnl
----- bond0 ----
-  status: active negotiated
-  sys_id: aa:55:aa:55:00:00
-  sys_priority: 65534
-  aggregation key: 2
-  lacp_time: fast
-
-slave: p0: current attached
-  port_id: 1
-  port_priority: 65535
-  may_enable: true
-
-  actor sys_id: aa:55:aa:55:00:00
-  actor sys_priority: 65534
-  actor port_id: 1
-  actor port_priority: 65535
-  actor key: 2
-  actor state: activity timeout aggregation synchronized collecting distributing
-
-  partner sys_id: aa:66:aa:66:00:00
-  partner sys_priority: 65534
-  partner port_id: 3
-  partner port_priority: 65535
-  partner key: 4
-  partner state: activity timeout aggregation synchronized collecting distributing
-
-slave: p1: current attached
-  port_id: 2
-  port_priority: 65535
-  may_enable: true
-
-  actor sys_id: aa:55:aa:55:00:00
-  actor sys_priority: 65534
-  actor port_id: 2
-  actor port_priority: 65535
-  actor key: 2
-  actor state: activity timeout aggregation synchronized collecting distributing
-
-  partner sys_id: aa:66:aa:66:00:00
-  partner sys_priority: 65534
-  partner port_id: 4
-  partner port_priority: 65535
-  partner key: 4
-  partner state: activity timeout aggregation synchronized collecting distributing
----- bond1 ----
-  status: active negotiated
-  sys_id: aa:66:aa:66:00:00
-  sys_priority: 65534
-  aggregation key: 4
-  lacp_time: fast
-
-slave: p2: current attached
-  port_id: 3
-  port_priority: 65535
-  may_enable: true
-
-  actor sys_id: aa:66:aa:66:00:00
-  actor sys_priority: 65534
-  actor port_id: 3
-  actor port_priority: 65535
-  actor key: 4
-  actor state: activity timeout aggregation synchronized collecting distributing
-
-  partner sys_id: aa:55:aa:55:00:00
-  partner sys_priority: 65534
-  partner port_id: 1
-  partner port_priority: 65535
-  partner key: 2
-  partner state: activity timeout aggregation synchronized collecting distributing
-
-slave: p3: current attached
-  port_id: 4
-  port_priority: 65535
-  may_enable: true
-
-  actor sys_id: aa:66:aa:66:00:00
-  actor sys_priority: 65534
-  actor port_id: 4
-  actor port_priority: 65535
-  actor key: 4
-  actor state: activity timeout aggregation synchronized collecting distributing
-
-  partner sys_id: aa:55:aa:55:00:00
-  partner sys_priority: 65534
-  partner port_id: 2
-  partner port_priority: 65535
-  partner key: 2
-  partner state: activity timeout aggregation synchronized collecting distributing
----- bond0 ----
-bond_mode: balance-tcp
-bond may use recirculation: yes, <del>
-bond-hash-basis: 0
-updelay: 0 ms
-downdelay: 0 ms
-lacp_status: negotiated
-lacp_fallback_ab: false
-<active slave mac del>
-
-slave p0: enabled
-  may_enable: true
-
-slave p1: enabled
-  active slave
-  may_enable: true
-
----- bond1 ----
-bond_mode: balance-tcp
-bond may use recirculation: yes, <del>
-bond-hash-basis: 0
-updelay: 0 ms
-downdelay: 0 ms
-lacp_status: negotiated
-lacp_fallback_ab: false
-<active slave mac del>
-
-slave p2: enabled
-  may_enable: true
-
-slave p3: enabled
-  active slave
-  may_enable: true
-
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# test lacp liveness propagation - OF1.3.
-AT_SETUP([lacp - liveness propagation - OF1.3])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow13 -P standard monitor br0 --detach --no-chdir --pidfile])
-check_liveness () {
-    printf '\n\n--- check_liveness %d ---\n\n\n' $1
-    shift
-
-        echo >>expout "OFPT_PORT_STATUS (OF1.3): MOD: 1(p0): addr:
-     config:     0
-     state:      $1
-     speed: 0 Mbps now, 0 Mbps max"
-
-        AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/ *duration.*//
-s/addr:[0-9a-fA-F:]*/addr:/' < monitor.log|grep -A3 "MOD: 1(p0)"|grep -ve --]],
-      [0], [expout])
-}
-: > expout
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-# Set miss_send_len to 128, enabling port_status messages to our service connection.
-ovs-appctl -t ovs-ofctl ofctl/send 0409000c0123456700000080
-
-# Create bond0 on br0 with interfaces p0 and p1
-#    and bond1 on br1 with interfaces p2 and p3
-# with p0 patched to p2 and p1 patched to p3.
-AT_CHECK([ovs-vsctl add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
-                            other-config:lacp-time=fast \
-                            other-config:bond-rebalance-interval=0 -- \
-   set interface p0 type=patch options:peer=p2 ofport_request=1 \
-                    other-config:lacp-aggregation-key=2 -- \
-   set interface p1 type=patch options:peer=p3 ofport_request=2 \
-                    other-config:lacp-aggregation-key=2 -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-                  fail-mode=secure -- \
-   add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
-                            other-config:lacp-time=fast \
-                            other-config:bond-rebalance-interval=0 -- \
-   set interface p2 type=patch options:peer=p0 ofport_request=3 \
-                    other-config:lacp-aggregation-key=4 -- \
-   set interface p3 type=patch options:peer=p1 ofport_request=4 \
-                    other-config:lacp-aggregation-key=4 --])
-
-AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
-])
-ovs-appctl time/stop
-
-# Wait for up to 5 (simulated) seconds, until LACP negotiation finishes.
-i=0
-while :; do
-    ovs-appctl lacp/show bond0 > bond0
-    AT_CAPTURE_FILE([bond0])
-    ovs-appctl lacp/show bond1 > bond1
-    AT_CAPTURE_FILE([bond1])
-    if grep negotiated bond0 && grep negotiated bond1; then
-        if grep expired bond0 || grep expired bond1; then
-            :
-        else
-            break
-        fi
-    fi
-    i=`expr $i + 1`
-    if test $i = 50; then
-        AT_FAIL_IF([:])
-    fi
-    ovs-appctl time/warp 100
-done
-check_liveness 1 LIVE
-
-# Makes LACP state "expired" for p0 and p2.
-AT_CHECK([ovs-vsctl \
--- add-port br0 null0 -- set int null0 type=patch options:peer=p2 -- set int p2 options:peer=null0 \
--- add-port br1 null1 -- set int null1 type=patch options:peer=p0 -- set int p0 options:peer=null1])
-
-# Wait 4 more simulated seconds.  The LACP state should become "defaulted" for p0 and p2.
-ovs-appctl time/warp 4100 100
-check_liveness 3 0
-
-# Reconnect the patch link between p0 and p2 to allow traffic between the ports.
-AT_CHECK([ovs-vsctl \
--- del-port null0 -- set int p2 options:peer=p0 \
--- del-port null1 -- set int p0 options:peer=p2])
-
-# Wait for 30 more seconds (LACP_SLOW_TIME_TX) for the lacp to renegotiate
-ovs-appctl time/warp 30100 100
-check_liveness 3 LIVE
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# test lacp liveness propagation - OF1.4.
-AT_SETUP([lacp - liveness propagation - OF1.4])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow14 -P standard monitor br0 --detach --no-chdir --pidfile])
-check_liveness () {
-    printf '\n\n--- check_liveness %d ---\n\n\n' $1
-    shift
-
-        echo >>expout "OFPT_PORT_STATUS (OF1.4): MOD: 1(p0): addr:
-     config:     0
-     state:      $1
-     speed: 0 Mbps now, 0 Mbps max"
-
-        AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/ *duration.*//
-s/addr:[0-9a-fA-F:]*/addr:/' < monitor.log|grep -A3 "MOD: 1(p0)"|grep -ve --]],
-      [0], [expout])
-}
-: > expout
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-# Set miss_send_len to 128, enabling port_status messages to our service connection.
-ovs-appctl -t ovs-ofctl ofctl/send 0509000c0123456700000080
-
-# Create bond0 on br0 with interfaces p0 and p1
-#    and bond1 on br1 with interfaces p2 and p3
-# with p0 patched to p2 and p1 patched to p3.
-AT_CHECK([ovs-vsctl add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
-                            other-config:lacp-time=fast \
-                            other-config:bond-rebalance-interval=0 -- \
-   set interface p0 type=patch options:peer=p2 ofport_request=1 \
-                    other-config:lacp-aggregation-key=2 -- \
-   set interface p1 type=patch options:peer=p3 ofport_request=2 \
-                    other-config:lacp-aggregation-key=2 -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-                  fail-mode=secure -- \
-   add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
-                            other-config:lacp-time=fast \
-                            other-config:bond-rebalance-interval=0 -- \
-   set interface p2 type=patch options:peer=p0 ofport_request=3 \
-                    other-config:lacp-aggregation-key=4 -- \
-   set interface p3 type=patch options:peer=p1 ofport_request=4 \
-                    other-config:lacp-aggregation-key=4 --])
-
-AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
-])
-ovs-appctl time/stop
-
-# Wait for up to 5 (simulated) seconds, until LACP negotiation finishes.
-i=0
-while :; do
-    ovs-appctl lacp/show bond0 > bond0
-    AT_CAPTURE_FILE([bond0])
-    ovs-appctl lacp/show bond1 > bond1
-    AT_CAPTURE_FILE([bond1])
-    if grep negotiated bond0 && grep negotiated bond1; then
-        if grep expired bond0 || grep expired bond1; then
-            :
-        else
-            break
-        fi
-    fi
-    i=`expr $i + 1`
-    if test $i = 50; then
-        AT_FAIL_IF([:])
-    fi
-    ovs-appctl time/warp 100
-done
-check_liveness 1 LIVE
-
-# Makes LACP state "expired" for p0 and p2.
-AT_CHECK([ovs-vsctl \
--- add-port br0 null0 -- set int null0 type=patch options:peer=p2 -- set int p2 options:peer=null0 \
--- add-port br1 null1 -- set int null1 type=patch options:peer=p0 -- set int p0 options:peer=null1])
-
-# Wait 4 more simulated seconds.  The LACP state should become "defaulted" for p0 and p2.
-ovs-appctl time/warp 4100 100
-check_liveness 3 0
-
-# Reconnect the patch link between p0 and p2 to allow traffic between the ports.
-AT_CHECK([ovs-vsctl \
--- del-port null0 -- set int p2 options:peer=p0 \
--- del-port null1 -- set int p0 options:peer=p2])
-
-# Wait for 30 more seconds (LACP_SLOW_TIME_TX) for the lacp to renegotiate
-ovs-appctl time/warp 30100 100
-check_liveness 3 LIVE
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# test lacp liveness propagation - OF1.5.
-AT_SETUP([lacp - liveness propagation - OF1.5])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow15 -P standard monitor br0 --detach --no-chdir --pidfile])
-check_liveness () {
-    printf '\n\n--- check_liveness %d ---\n\n\n' $1
-    shift
-
-        echo >>expout "OFPT_PORT_STATUS (OF1.5): MOD: 1(p0): addr:
-     config:     0
-     state:      $1
-     speed: 0 Mbps now, 0 Mbps max"
-
-        AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/ *duration.*//
-s/addr:[0-9a-fA-F:]*/addr:/' < monitor.log|grep -A3 "MOD: 1(p0)"|grep -ve --]],
-      [0], [expout])
-}
-: > expout
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-# Set miss_send_len to 128, enabling port_status messages to our service connection.
-ovs-appctl -t ovs-ofctl ofctl/send 0609000c0123456700000080
-
-# Create bond0 on br0 with interfaces p0 and p1
-#    and bond1 on br1 with interfaces p2 and p3
-# with p0 patched to p2 and p1 patched to p3.
-AT_CHECK([ovs-vsctl add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
-                            other-config:lacp-time=fast \
-                            other-config:bond-rebalance-interval=0 -- \
-   set interface p0 type=patch options:peer=p2 ofport_request=1 \
-                    other-config:lacp-aggregation-key=2 -- \
-   set interface p1 type=patch options:peer=p3 ofport_request=2 \
-                    other-config:lacp-aggregation-key=2 -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-                  fail-mode=secure -- \
-   add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
-                            other-config:lacp-time=fast \
-                            other-config:bond-rebalance-interval=0 -- \
-   set interface p2 type=patch options:peer=p0 ofport_request=3 \
-                    other-config:lacp-aggregation-key=4 -- \
-   set interface p3 type=patch options:peer=p1 ofport_request=4 \
-                    other-config:lacp-aggregation-key=4 --])
-
-AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
-])
-ovs-appctl time/stop
-
-# Wait for up to 5 (simulated) seconds, until LACP negotiation finishes.
-i=0
-while :; do
-    ovs-appctl lacp/show bond0 > bond0
-    AT_CAPTURE_FILE([bond0])
-    ovs-appctl lacp/show bond1 > bond1
-    AT_CAPTURE_FILE([bond1])
-    if grep negotiated bond0 && grep negotiated bond1; then
-        if grep expired bond0 || grep expired bond1; then
-            :
-        else
-            break
-        fi
-    fi
-    i=`expr $i + 1`
-    if test $i = 50; then
-        AT_FAIL_IF([:])
-    fi
-    ovs-appctl time/warp 100
-done
-check_liveness 1 LIVE
-
-# Makes LACP state "expired" for p0 and p2.
-AT_CHECK([ovs-vsctl \
--- add-port br0 null0 -- set int null0 type=patch options:peer=p2 -- set int p2 options:peer=null0 \
--- add-port br1 null1 -- set int null1 type=patch options:peer=p0 -- set int p0 options:peer=null1])
-
-# Wait 4 more simulated seconds.  The LACP state should become "defaulted" for p0 and p2.
-ovs-appctl time/warp 4100 100
-check_liveness 3 0
-
-# Reconnect the patch link between p0 and p2 to allow traffic between the ports.
-AT_CHECK([ovs-vsctl \
--- del-port null0 -- set int p2 options:peer=p0 \
--- del-port null1 -- set int p0 options:peer=p2])
-
-# Wait for 30 more seconds (LACP_SLOW_TIME_TX) for the lacp to renegotiate
-ovs-appctl time/warp 30100 100
-check_liveness 3 LIVE
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/learn.at b/tests/learn.at
deleted file mode 100644
index 5f1d6df9d..000000000
--- a/tests/learn.at
+++ /dev/null
@@ -1,838 +0,0 @@
-AT_BANNER([learning action])
-
-AT_SETUP([learning action - parsing and formatting])
-AT_DATA([flows.txt], [[
-actions=learn()
-actions=learn(send_flow_rem)
-actions=learn(delete_learned)
-actions=learn(send_flow_rem,delete_learned)
-actions=learn(NXM_OF_VLAN_TCI[0..11], NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[], output:NXM_OF_IN_PORT[], load:10->NXM_NX_REG0[5..10])
-actions=learn(table=1,idle_timeout=10, hard_timeout=20, fin_idle_timeout=5, fin_hard_timeout=10, priority=10, cookie=0xfedcba9876543210, in_port=99,eth_dst=eth_src,load:in_port->reg1[16..31])
-actions=learn(limit=4096)
-actions=learn(limit=4096,result_dst=reg0[0])
-]])
-AT_CHECK([ovs-ofctl parse-flows flows.txt], [0],
-[[usable protocols: any
-chosen protocol: OpenFlow10-table_id
-OFPT_FLOW_MOD (xid=0x1): ADD actions=learn(table=1)
-OFPT_FLOW_MOD (xid=0x2): ADD actions=learn(table=1,send_flow_rem)
-OFPT_FLOW_MOD (xid=0x3): ADD actions=learn(table=1,delete_learned)
-OFPT_FLOW_MOD (xid=0x4): ADD actions=learn(table=1,send_flow_rem,delete_learned)
-OFPT_FLOW_MOD (xid=0x5): ADD actions=learn(table=1,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],output:NXM_OF_IN_PORT[],load:0xa->NXM_NX_REG0[5..10])
-OFPT_FLOW_MOD (xid=0x6): ADD actions=learn(table=1,idle_timeout=10,hard_timeout=20,fin_idle_timeout=5,fin_hard_timeout=10,priority=10,cookie=0xfedcba9876543210,in_port=99,NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:NXM_OF_IN_PORT[]->NXM_NX_REG1[16..31])
-OFPT_FLOW_MOD (xid=0x7): ADD actions=learn(table=1,limit=4096)
-OFPT_FLOW_MOD (xid=0x8): ADD actions=learn(table=1,limit=4096,result_dst=NXM_NX_REG0[0])
-]])
-AT_CLEANUP
-
-AT_SETUP([learning action - parsing and formatting - illegal in_port_oxm])
-AT_CHECK([[ovs-ofctl parse-flow 'actions=learn(table=1, in_port_oxm=123456)']],
-  [1], [], [stderr])
-AT_CHECK([sed -e 's/.*|ofp_port|WARN|//' < stderr], [0],
-  [[port 123456 is outside the supported range 0 through ffff or 0xffffff00 through 0xffffffff
-ovs-ofctl: table=1, in_port_oxm=123456: in_port_oxm value 123456 cannot be parsed as a subfield (123456: unknown field `123456') or an immediate value (123456: port value out of range for in_port_oxm)
-]], [[]])
-AT_CLEANUP
-
-AT_SETUP([learning action - parsing and formatting - OXM])
-AT_DATA([flows.txt], [[
-actions=learn(output:OXM_OF_IN_PORT[])
-actions=learn(table=1, in_port=1, load:OXM_OF_IN_PORT[]->NXM_NX_REG1[], load:0xfffffffe->OXM_OF_IN_PORT[])
-]])
-AT_CHECK([ovs-ofctl -O OpenFlow12 parse-flows flows.txt], [0],
-[[usable protocols: any
-chosen protocol: OXM-OpenFlow12
-OFPT_FLOW_MOD (OF1.2) (xid=0x1): ADD actions=learn(table=1,output:OXM_OF_IN_PORT[])
-OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD actions=learn(table=1,in_port=1,load:OXM_OF_IN_PORT[]->NXM_NX_REG1[],load:0xfffffffe->OXM_OF_IN_PORT[])
-]])
-AT_CLEANUP
-
-AT_SETUP([learning action - examples])
-AT_DATA([flows.txt], [[
-# These are the examples from ofp-actions.c.
-actions=learn(in_port=99,NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[], load:NXM_OF_IN_PORT[]->NXM_NX_REG1[16..31])
-actions=learn(NXM_OF_VLAN_TCI[0..11], NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],output:NXM_OF_IN_PORT[])
-table=0 actions=learn(table=1,hard_timeout=10, NXM_OF_VLAN_TCI[0..11],output:NXM_OF_IN_PORT[]), resubmit(,1)
-table=1 priority=0 actions=flood
-]])
-AT_CHECK([ovs-ofctl parse-flows flows.txt], [0],
-[[usable protocols: OXM,OpenFlow10+table_id,NXM+table_id,OpenFlow11
-chosen protocol: OpenFlow10+table_id
-OFPT_FLOW_MOD (xid=0x1): ADD table:255 actions=learn(table=1,in_port=99,NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:NXM_OF_IN_PORT[]->NXM_NX_REG1[16..31])
-OFPT_FLOW_MOD (xid=0x2): ADD table:255 actions=learn(table=1,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],output:NXM_OF_IN_PORT[])
-OFPT_FLOW_MOD (xid=0x3): ADD actions=learn(table=1,hard_timeout=10,NXM_OF_VLAN_TCI[0..11],output:NXM_OF_IN_PORT[]),resubmit(,1)
-OFPT_FLOW_MOD (xid=0x4): ADD table:1 priority=0 actions=FLOOD
-]])
-AT_CLEANUP
-
-AT_SETUP([learning action - satisfied prerequisites])
-AT_DATA([flows.txt],
-[[actions=learn(eth_type=0x800,load:5->NXM_OF_IP_DST[])
-ip,actions=learn(load:NXM_OF_IP_DST[]->NXM_NX_REG1[])
-ip,actions=learn(eth_type=0x800,OXM_OF_IPV4_DST[])
-]])
-AT_CHECK([ovs-ofctl parse-flows flows.txt], [0],
-[[usable protocols: any
-chosen protocol: OpenFlow10-table_id
-OFPT_FLOW_MOD (xid=0x1): ADD actions=learn(table=1,eth_type=0x800,load:0x5->NXM_OF_IP_DST[])
-OFPT_FLOW_MOD (xid=0x2): ADD ip actions=learn(table=1,load:NXM_OF_IP_DST[]->NXM_NX_REG1[])
-OFPT_FLOW_MOD (xid=0x3): ADD ip actions=learn(table=1,eth_type=0x800,NXM_OF_IP_DST[])
-]])
-AT_CLEANUP
-
-AT_SETUP([learning action - invalid prerequisites])
-AT_CHECK([[ovs-ofctl parse-flow 'actions=learn(load:5->NXM_OF_IP_DST[])']],
-  [1], [], [stderr])
-AT_CHECK([sed -e 's/.*|meta_flow|WARN|//' < stderr], [0],
-  [[destination field ip_dst lacks correct prerequisites
-ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
-]], [[]])
-AT_CHECK([[ovs-ofctl parse-flow 'actions=learn(load:NXM_OF_IP_DST[]->NXM_NX_REG1[])']],
-  [1], [], [stderr])
-AT_CHECK([sed -e 's/.*|meta_flow|WARN|//' < stderr], [0],
-  [[source field ip_dst lacks correct prerequisites
-ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
-]])
-AT_CLEANUP
-
-AT_SETUP([learning action - too-long immediate value])
-dnl 129 bits is too long.
-AT_CHECK([[ovs-ofctl parse-flow 'actions=learn(load:0x1fedbca9876543210fedbca9876543210->NXM_NX_IPV6_DST[])']],
-  [1], [], [[ovs-ofctl: 0x1fedbca9876543210fedbca9876543210->NXM_NX_IPV6_DST[]: value does not fit into 128 bits
-]])
-
-dnl 128 bits is merely a bad prerequisite.
-AT_CHECK([[ovs-ofctl parse-flow 'actions=learn(load:0xfedbca9876543210fedbca9876543210->NXM_NX_IPV6_DST[])']], [1], [], [stderr])
-AT_CHECK([sed -e 's/.*|meta_flow|WARN|//' < stderr], [0],
-  [[destination field ipv6_dst lacks correct prerequisites
-ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
-]], [[]])
-AT_CLEANUP
-
-AT_SETUP([learning action - standard VLAN+MAC learning])
-OVS_VSWITCHD_START(
-  [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
-   add-port br0 p2 -- set Interface p2 type=dummy ofport_request=2 -- \
-   add-port br0 p3 -- set Interface p3 type=dummy ofport_request=3])
-# Set up flow table for VLAN+MAC learning.
-AT_DATA([flows.txt], [[
-table=0 actions=learn(table=1, hard_timeout=60, NXM_OF_VLAN_TCI[0..11], NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[], output:NXM_OF_IN_PORT[]), resubmit(,1)
-table=1 priority=0 actions=flood
-]])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-# Trace an ARP packet arriving on port 3, to create a MAC learning entry.
-flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
-actual=`tail -1 stdout | sed 's/Datapath actions: //'`
-
-expected="1,2,100"
-AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
-mv stdout expout
-AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
-
-# Check for the MAC learning entry.
-AT_CHECK([ovs-ofctl dump-flows br0 table=1 --no-stats --sort], [0], [dnl
- table=1, priority=0 actions=FLOOD
- table=1, hard_timeout=60, vlan_tci=0x0000/0x0fff,dl_dst=50:54:00:00:00:05 actions=output:3
-])
-
-# Trace a packet arrival destined for the learned MAC.
-# (This will also learn a MAC.)
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),eth_type(0x0806),arp(sip=192.168.0.2,tip=192.168.0.1,op=2,sha=50:54:00:00:00:06,tha=50:54:00:00:00:05)' -generate], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [Datapath actions: 3
-])
-
-# Check for both MAC learning entries.
-AT_CHECK([ovs-ofctl dump-flows br0 table=1 --no-stats | sort], [0], [dnl
- table=1, hard_timeout=60, vlan_tci=0x0000/0x0fff,dl_dst=50:54:00:00:00:05 actions=output:3
- table=1, hard_timeout=60, vlan_tci=0x0000/0x0fff,dl_dst=50:54:00:00:00:06 actions=output:1
- table=1, priority=0 actions=FLOOD
-])
-
-# Trace a packet arrival that updates the first learned MAC entry.
-flow="in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
-actual=`tail -1 stdout | sed 's/Datapath actions: //'`
-
-expected="1,3,100"
-AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
-mv stdout expout
-AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
-
-# Check that the MAC learning entry was updated.
-AT_CHECK([ovs-ofctl dump-flows br0 table=1 --no-stats | sort], [0], [dnl
- table=1, hard_timeout=60, vlan_tci=0x0000/0x0fff,dl_dst=50:54:00:00:00:05 actions=output:2
- table=1, hard_timeout=60, vlan_tci=0x0000/0x0fff,dl_dst=50:54:00:00:00:06 actions=output:1
- table=1, priority=0 actions=FLOOD
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks that repeated uses of a "learn" action cause the
-dnl modified time of the learned flow to advance.  Otherwise, the
-dnl learned flow will expire after its hard timeout even though it's
-dnl supposed to be refreshed.  (The expiration can be hard to see since
-dnl it gets re-learned again the next time a packet appears, but
-dnl sometimes the expiration can cause temporary flooding etc.)
-AT_SETUP([learning action - learn refreshes hard_age])
-OVS_VSWITCHD_START(
-  [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
-   add-port br0 p2 -- set Interface p2 type=dummy ofport_request=2 -- \
-   add-port br0 p3 -- set Interface p3 type=dummy ofport_request=3])
-
-ovs-appctl time/stop
-
-# Set up flow table for MAC learning.
-AT_DATA([flows.txt], [[
-table=0 actions=learn(table=1, hard_timeout=10, NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[], output:NXM_OF_IN_PORT[]), resubmit(,1)
-table=1 priority=0 actions=flood
-]])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-# Trace an ICMP packet arriving on port 3, to create a MAC learning entry.
-flow="in_port(3),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
-actual=`tail -1 stdout | sed 's/Datapath actions: //'`
-
-expected="1,2,100"
-AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
-mv stdout expout
-AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
-
-# Check that the MAC learning entry appeared.
-AT_CHECK([ovs-ofctl dump-flows br0 table=1 --no-stats | sort], [0], [dnl
- table=1, hard_timeout=10, dl_dst=50:54:00:00:00:07 actions=output:3
- table=1, priority=0 actions=FLOOD
-])
-
-# For 25 seconds, make sure that the MAC learning entry doesn't
-# disappear as long as we refresh it every second.
-for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25; do
-    ovs-appctl time/warp 1000
-    AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
-
-    # Check that the entry is there.
-    AT_CHECK([ovs-ofctl dump-flows br0 table=1], [0], [stdout])
-    AT_CHECK([ofctl_strip < stdout | sort], [0], [dnl
- table=1, hard_timeout=10, dl_dst=50:54:00:00:00:07 actions=output:3
- table=1, priority=0 actions=FLOOD
-NXST_FLOW reply:
-])
-
-    if test $i != 1; then
-        # Check that hard_age has appeared.  We need to do this separately
-        # from the above check because ofctl_strip removes it.  dump-flows
-        # only prints hard_age when it is different from the flow's duration
-        # (that is, the number of seconds from the time it was created),
-        # so we only check for it after we've refreshed the flow once.
-        AT_CHECK([grep dl_dst=50:54:00:00:00:07 stdout | grep -c hard_age],
-                 [0], [1
-])
-    fi
-done
-
-# Make sure that 15 seconds without refreshing makes the flow time out.
-ovs-appctl time/warp 15000 5000
-sleep 1
-AT_CHECK([ovs-ofctl dump-flows br0 table=1 --no-stats | sort], [0], [dnl
- table=1, priority=0 actions=FLOOD
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([learning action - TCPv4 port learning])
-OVS_VSWITCHD_START(
-  [add-port br0 p1 -- set Interface p1 type=dummy -- \
-   add-port br0 p2 -- set Interface p2 type=dummy -- \
-   add-port br0 p3 -- set Interface p3 type=dummy])
-# Set up flow table for TCPv4 port learning.
-AT_CHECK([[ovs-ofctl add-flow br0 'table=0 tcp actions=learn(table=1, hard_timeout=60, eth_type=0x800, nw_proto=6, NXM_OF_IP_SRC[]=NXM_OF_IP_DST[], NXM_OF_IP_DST[]=NXM_OF_IP_SRC[], NXM_OF_TCP_SRC[]=NXM_OF_TCP_DST[], NXM_OF_TCP_DST[]=NXM_OF_TCP_SRC[]), flood']])
-
-# Trace a TCPv4 packet arriving on port 3.
-flow="in_port(3),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:06),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=40000,dst=80)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
-actual=`tail -1 stdout | sed 's/Datapath actions: //'`
-
-expected="1,2,100"
-AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
-mv stdout expout
-AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
-
-# Check for the learning entry.
-AT_CHECK([ovs-ofctl dump-flows br0 table=1 --no-stats | sort], [0], [dnl
- table=1, hard_timeout=60, tcp,nw_src=192.168.0.1,nw_dst=192.168.0.2,tp_src=80,tp_dst=40000 actions=drop
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([learning action - TCPv6 port learning])
-OVS_VSWITCHD_START(
-  [add-port br0 p1 -- set Interface p1 type=dummy -- \
-   add-port br0 p2 -- set Interface p2 type=dummy -- \
-   add-port br0 p3 -- set Interface p3 type=dummy])
-# Set up flow table for TCPv6 port learning.
-# Also add a 128-bit-wide "load" action and a 128-bit literal match to check
-# that they work.
-AT_CHECK([[ovs-ofctl add-flow br0 'table=0 tcp6 actions=learn(table=1, hard_timeout=60, eth_type=0x86dd, nw_proto=6, NXM_NX_IPV6_SRC[]=NXM_NX_IPV6_DST[], ipv6_dst=2001:0db8:85a3:0000:0000:8a2e:0370:7334, NXM_OF_TCP_SRC[]=NXM_OF_TCP_DST[], NXM_OF_TCP_DST[]=NXM_OF_TCP_SRC[], load(0x20010db885a308d313198a2e03707348->NXM_NX_IPV6_DST[])), flood']])
-
-# Trace a TCPv6 packet arriving on port 3.
-flow="in_port(3),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:06),eth_type(0x86dd),ipv6(src=fec0::2,dst=fec0::1,label=0,proto=6,tclass=0,hlimit=255,frag=no),tcp(src=40000,dst=80)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
-actual=`tail -1 stdout | sed 's/Datapath actions: //'`
-
-expected="1,2,100"
-AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
-mv stdout expout
-AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
-
-# Check for the learning entry.
-AT_CHECK([ovs-ofctl dump-flows br0 --no-stats | sort], [0], [dnl
- table=1, hard_timeout=60, tcp6,ipv6_src=fec0::1,ipv6_dst=2001:db8:85a3::8a2e:370:7334,tp_src=80,tp_dst=40000 actions=load:0x13198a2e03707348->NXM_NX_IPV6_DST[[0..63]],load:0x20010db885a308d3->NXM_NX_IPV6_DST[[64..127]]
- tcp6 actions=learn(table=1,hard_timeout=60,eth_type=0x86dd,nw_proto=6,NXM_NX_IPV6_SRC[[]]=NXM_NX_IPV6_DST[[]],ipv6_dst=2001:db8:85a3::8a2e:370:7334,NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],NXM_OF_TCP_DST[[]]=NXM_OF_TCP_SRC[[]],load:0x20010db885a308d313198a2e03707348->NXM_NX_IPV6_DST[[]]),FLOOD
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# In this use of a learn action, the first packet in the flow creates
-# a new flow that changes the behavior of subsequent packets in the
-# flow.
-AT_SETUP([learning action - self-modifying flow])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-
-ovs-appctl time/stop
-# Set up flow table for TCPv4 port learning.
-AT_CHECK([[ovs-ofctl add-flow br0 'actions=load:3->NXM_NX_REG0[0..15],learn(table=0,priority=65535,NXM_OF_ETH_SRC[],NXM_OF_VLAN_TCI[0..11],output:NXM_NX_REG0[0..15]),output:2']])
-
-# Trace some packets arriving.  The particular packets don't matter.
-for i in 1 2 3 4 5 6 7 8 9 10; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'
-    ovs-appctl time/warp 10
-    if [[ $i -eq 1 ]]; then
-        sleep 1
-    fi
-done
-
-# Check for the learning entry.
-ovs-appctl time/warp 1000
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0],
-[[ n_packets=1, n_bytes=118, actions=load:0x3->NXM_NX_REG0[0..15],learn(table=0,priority=65535,NXM_OF_ETH_SRC[],NXM_OF_VLAN_TCI[0..11],output:NXM_NX_REG0[0..15]),output:2
- n_packets=9, n_bytes=1062, priority=65535,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:05 actions=output:3
-NXST_FLOW reply:
-]])
-
-# Check that the first packet went out port 2 and the rest out port 3.
-AT_CHECK(
-  [(ovs-ofctl dump-ports br0 2; ovs-ofctl dump-ports br0 3) | strip_xids], [0],
-  [OFPST_PORT reply: 1 ports
-  port  2: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=1, bytes=118, drop=?, errs=?, coll=?
-OFPST_PORT reply: 1 ports
-  port  3: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=9, bytes=1062, drop=?, errs=?, coll=?
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# This test is much like the previous, but adds idle timeouts and sends
-# two different flows to the bridge. This tests that the statistics are
-# attributed correctly.
-AT_SETUP([learning action - self-modifying flow with idle_timeout])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-
-ovs-appctl time/stop
-# Set up flow table for TCPv4 port learning.
-AT_CHECK([[ovs-ofctl add-flow br0 'actions=load:3->NXM_NX_REG0[0..15],learn(table=0,idle_timeout=5,priority=65535,NXM_OF_ETH_SRC[],NXM_OF_VLAN_TCI[0..11],output:NXM_NX_REG0[0..15]),output:2']])
-
-# Trace some packets arriving.  The particular packets don't matter.
-for i in `seq 1 10`; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'
-    ovs-appctl time/warp 10
-    if [[ $i -eq 1 ]]; then
-        sleep 1
-    fi
-done
-
-# Trace some packets arriving.  This is is a different flow from the previous.
-# Note that we advance time by 1 second between each packet here.
-for i in `seq 1 10`; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'
-    ovs-appctl time/warp 1000
-    # Note: netdev-dummy/receive merely queues the packet.
-    # We need to wait for other thread to process the packet
-    # and update the flow's 'used' for the packet.
-    # (i % 3 == 0) below is somehow arbitrary but chosen to ensure
-    # that we update the flow's 'used' frequently enough to prevent
-    # idle_timeout.
-    if [[ $i -eq 1 -o $((i % 3)) -eq 0 ]]; then
-        sleep 1
-    fi
-done
-
-# Check that the first packet of each flow went out port 2 and the rest out
-# port 3.
-AT_CHECK(
-  [(ovs-ofctl dump-ports br0 2; ovs-ofctl dump-ports br0 3) | strip_xids], [0],
-  [OFPST_PORT reply: 1 ports
-  port  2: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=2, bytes=236, drop=?, errs=?, coll=?
-OFPST_PORT reply: 1 ports
-  port  3: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=18, bytes=2124, drop=?, errs=?, coll=?
-])
-
-# Check for the learning entry.
-ovs-appctl time/warp 1000
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0],
-[[ n_packets=2, n_bytes=236, actions=load:0x3->NXM_NX_REG0[0..15],learn(table=0,idle_timeout=5,priority=65535,NXM_OF_ETH_SRC[],NXM_OF_VLAN_TCI[0..11],output:NXM_NX_REG0[0..15]),output:2
- n_packets=9, n_bytes=1062, idle_timeout=5, priority=65535,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:06 actions=output:3
-NXST_FLOW reply:
-]])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# This test is much like the previous, but adds hard timeouts and sends
-# two different flows to the bridge. This tests that the statistics are
-# attributed correctly.
-AT_SETUP([learning action - self-modifying flow with hard_timeout])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-
-ovs-appctl time/stop
-# Set up flow table for TCPv4 port learning.
-AT_CHECK([[ovs-ofctl add-flow br0 'actions=load:3->NXM_NX_REG0[0..15],learn(table=0,hard_timeout=10,priority=65535,NXM_OF_ETH_SRC[],NXM_OF_VLAN_TCI[0..11],output:NXM_NX_REG0[0..15]),output:2']])
-
-# Trace some packets arriving.  The particular packets don't matter.
-for i in `seq 1 10`; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'
-    if [[ $i -eq 1 ]]; then
-        sleep 1
-    fi
-    ovs-appctl time/warp 10
-done
-
-# Check that the first packet of each flow went out port 2 and the rest out
-# port 3.
-AT_CHECK(
-  [(ovs-ofctl dump-ports br0 2; ovs-ofctl dump-ports br0 3) | strip_xids], [0],
-  [OFPST_PORT reply: 1 ports
-  port  2: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=1, bytes=118, drop=?, errs=?, coll=?
-OFPST_PORT reply: 1 ports
-  port  3: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=9, bytes=1062, drop=?, errs=?, coll=?
-])
-
-# Trace some packets arriving.  This is is a different flow from the previous.
-# Note that we advance time by 2 second between each packet here.
-for i in `seq 1 10`; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'
-    # Note: hard_timeout should fire immediately after #6 packet.
-    # #7 packet re-install the flow and the following 3 packets
-    # (#8, #9, #10) use the flow.
-    # it's difficult to predict the exact timing of rule expiry
-    # because it's affected by flow dumper thread via udpif_dump_seq.
-    # hard_timeout value for this test was chosen to overcome the uncertainty.
-    #
-    # receive #1  learn, install flow with hard_timeout=10
-    #  sleep to ensure the flow installation
-    #  (warp, timeout left 8s)
-    # receive #2   the learned flow
-    #  (warp, timeout left 6s)
-    # receive #3
-    #  (warp, timeout left 4s)
-    # receive #4
-    #  (warp, timeout left 2s)
-    # receive #5
-    #  (warp, timeout left 0s)
-    #  NOTE: OVS does not consider this expired yet.  cf. rule_expire()
-    # receive #6
-    #  (warp, timeout left -2s)
-    #  sleep to ensure flow expiration
-    # receive #7  learn, install flow with hard_timeout=10
-    #  sleep to ensure the flow installation
-    #  (warp, timeout left 8s)
-    # receive #8
-    #  (warp, timeout left 6s)
-    # receive #9
-    #  (warp, timeout left 4s)
-    # receive #10
-    #  (warp, timeout left 2s)
-    if [[ $i -eq 1 -o $i -eq 7 ]]; then
-        sleep 1
-    fi
-    ovs-appctl time/warp 2000
-    if [[ $i -eq 6 ]]; then
-        sleep 1
-    fi
-done
-
-# Check that the first packet of each flow went out port 2 and the rest out
-# port 3.
-AT_CHECK(
-  [(ovs-ofctl dump-ports br0 2; ovs-ofctl dump-ports br0 3) | strip_xids], [0],
-  [OFPST_PORT reply: 1 ports
-  port  2: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=3, bytes=354, drop=?, errs=?, coll=?
-OFPST_PORT reply: 1 ports
-  port  3: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=17, bytes=2006, drop=?, errs=?, coll=?
-])
-
-# Check for the learning entry.
-ovs-appctl time/warp 1000
-sleep 1
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0],
-[[ n_packets=3, n_bytes=354, actions=load:0x3->NXM_NX_REG0[0..15],learn(table=0,hard_timeout=10,priority=65535,NXM_OF_ETH_SRC[],NXM_OF_VLAN_TCI[0..11],output:NXM_NX_REG0[0..15]),output:2
- n_packets=3, n_bytes=354, hard_timeout=10, priority=65535,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:06 actions=output:3
-NXST_FLOW reply:
-]])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([learning action - fin_timeout feature])
-# This is a totally artificial use of the "learn" action.  The only purpose
-# is to check that specifying fin_idle_timeout or fin_hard_timeout causes
-# a corresponding fin_timeout action to end up in the learned flows.
-OVS_VSWITCHD_START(
-    [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
-AT_CHECK([[ovs-ofctl add-flow br0 'actions=learn(fin_hard_timeout=10, fin_idle_timeout=5, NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[], output:NXM_OF_IN_PORT[])']])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)' -generate], [0], [ignore])
-AT_CHECK([ovs-ofctl dump-flows br0 table=1 --no-stats], [0],
-[ table=1, dl_dst=50:54:00:00:00:05 actions=fin_timeout(idle_timeout=5,hard_timeout=10),output:1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([learning action - delete_learned feature])
-OVS_VSWITCHD_START
-
-# Add some initial flows and check that it was successful.
-AT_DATA([flows.txt], [dnl
-                       reg0=0x1 actions=learn(delete_learned,cookie=0x123)
-                       reg0=0x2 actions=learn(delete_learned,cookie=0x123)
-cookie=0x123, table=1, reg0=0x3 actions=drop
-cookie=0x123, table=1, reg0=0x4 actions=drop
-cookie=0x123, table=2, reg0=0x5 actions=drop
-cookie=0x234, table=1, reg0=0x6 actions=drop
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl dump-flows br0 --no-stats | sort], [0], [dnl
- cookie=0x123, table=1, reg0=0x3 actions=drop
- cookie=0x123, table=1, reg0=0x4 actions=drop
- cookie=0x123, table=2, reg0=0x5 actions=drop
- cookie=0x234, table=1, reg0=0x6 actions=drop
- reg0=0x1 actions=learn(table=1,delete_learned,cookie=0x123)
- reg0=0x2 actions=learn(table=1,delete_learned,cookie=0x123)
-])
-
-# Delete one of the learn actions.  The learned flows should stay, since there
-# is another learn action with the identical target.
-AT_CHECK([ovs-ofctl del-flows br0 'table=0 reg0=1'])
-AT_CHECK([ovs-ofctl dump-flows br0 --no-stats | sort], [0], [dnl
- cookie=0x123, table=1, reg0=0x3 actions=drop
- cookie=0x123, table=1, reg0=0x4 actions=drop
- cookie=0x123, table=2, reg0=0x5 actions=drop
- cookie=0x234, table=1, reg0=0x6 actions=drop
- reg0=0x2 actions=learn(table=1,delete_learned,cookie=0x123)
-])
-
-# Change the flow with the learn action by adding a second action.  The learned
-# flows should stay because the learn action is still there.
-AT_CHECK([ovs-ofctl mod-flows br0 'table=0 reg0=2 actions=output:1,learn(delete_learned,cookie=0x123)'])
-AT_CHECK([ovs-ofctl dump-flows br0 --no-stats | sort], [0], [dnl
- cookie=0x123, table=1, reg0=0x3 actions=drop
- cookie=0x123, table=1, reg0=0x4 actions=drop
- cookie=0x123, table=2, reg0=0x5 actions=drop
- cookie=0x234, table=1, reg0=0x6 actions=drop
- reg0=0x2 actions=output:1,learn(table=1,delete_learned,cookie=0x123)
-])
-
-# Change the flow with the learn action by replacing its learn action by one
-# with a different target.  The (previous) learned flows disappear.
-AT_CHECK([ovs-ofctl mod-flows br0 'table=0 reg0=2 actions=learn(delete_learned,cookie=0x234)'])
-AT_CHECK([ovs-ofctl dump-flows br0 --no-stats | sort], [0], [dnl
- cookie=0x123, table=2, reg0=0x5 actions=drop
- cookie=0x234, table=1, reg0=0x6 actions=drop
- reg0=0x2 actions=learn(table=1,delete_learned,cookie=0x234)
-])
-
-# Use add-flow to replace the flow with the learn action by one with the
-# same learn action and an extra action.  The (new) learned flow remains.
-AT_CHECK([ovs-ofctl add-flow br0 'table=0 reg0=2 actions=learn(delete_learned,cookie=0x234),output:2'])
-AT_CHECK([ovs-ofctl dump-flows br0 --no-stats | sort], [0], [dnl
- cookie=0x123, table=2, reg0=0x5 actions=drop
- cookie=0x234, table=1, reg0=0x6 actions=drop
- reg0=0x2 actions=learn(table=1,delete_learned,cookie=0x234),output:2
-])
-
-# Delete the flow with the learn action.  The learned flow disappears too.
-AT_CHECK([ovs-ofctl del-flows br0 table=0])
-AT_CHECK([ovs-ofctl dump-flows br0 --no-stats | sort], [0], [dnl
- cookie=0x123, table=2, reg0=0x5 actions=drop
-])
-
-# Add a new set of flows to check on a corner case: the learned flows
-# contain their own learn actions which cascade to further deletions.
-# This can't happen if the learned flows were actually created by a
-# learn action, since the learn action has very restricted action
-# support, but there's no restriction that the deleted flows were
-# created by a learn action.
-AT_DATA([flows.txt], [dnl
-                       reg0=0x1 actions=learn(table=1,delete_learned,cookie=0x123)
-                       reg0=0x2 actions=learn(table=2,delete_learned,cookie=0x234)
-cookie=0x123, table=1, reg0=0x3 actions=learn(table=3,delete_learned,cookie=0x345)
-cookie=0x234, table=2, reg0=0x3 actions=learn(table=4,delete_learned,cookie=0x456)
-cookie=0x345, table=3, reg0=0x4 actions=learn(table=5,delete_learned,cookie=0x567)
-cookie=0x456, table=4, reg0=0x5 actions=learn(table=5,delete_learned,cookie=0x567)
-cookie=0x567, table=5, reg0=0x6 actions=drop
-cookie=0x567, table=5, reg0=0x7 actions=drop
-cookie=0x567, table=5, reg0=0x8 actions=drop
-])
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl dump-flows br0 --no-stats | sort], [0], [dnl
- cookie=0x123, table=1, reg0=0x3 actions=learn(table=3,delete_learned,cookie=0x345)
- cookie=0x234, table=2, reg0=0x3 actions=learn(table=4,delete_learned,cookie=0x456)
- cookie=0x345, table=3, reg0=0x4 actions=learn(table=5,delete_learned,cookie=0x567)
- cookie=0x456, table=4, reg0=0x5 actions=learn(table=5,delete_learned,cookie=0x567)
- cookie=0x567, table=5, reg0=0x6 actions=drop
- cookie=0x567, table=5, reg0=0x7 actions=drop
- cookie=0x567, table=5, reg0=0x8 actions=drop
- reg0=0x1 actions=learn(table=1,delete_learned,cookie=0x123)
- reg0=0x2 actions=learn(table=2,delete_learned,cookie=0x234)
-])
-
-# Deleting the flow with reg0=1 should cascade to delete a few levels
-# of learned flows, but the ones with cookie=0x567 stick around
-# because of the flow with cookie=0x456.
-AT_CHECK([ovs-ofctl del-flows br0 'table=0 reg0=1'])
-AT_CHECK([ovs-ofctl dump-flows br0 --no-stats | sort], [0], [dnl
- cookie=0x234, table=2, reg0=0x3 actions=learn(table=4,delete_learned,cookie=0x456)
- cookie=0x456, table=4, reg0=0x5 actions=learn(table=5,delete_learned,cookie=0x567)
- cookie=0x567, table=5, reg0=0x6 actions=drop
- cookie=0x567, table=5, reg0=0x7 actions=drop
- cookie=0x567, table=5, reg0=0x8 actions=drop
- reg0=0x2 actions=learn(table=2,delete_learned,cookie=0x234)
-])
-
-# Deleting the flow with reg0=2 should cascade to delete all the rest:
-AT_CHECK([ovs-ofctl del-flows br0 'table=0 reg0=2'])
-AT_CHECK([ovs-ofctl dump-flows br0 --no-stats | sort])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([learning action - delete_learned/limit with packet])
-OVS_VSWITCHD_START(
-    [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 --\
-     add-port br0 p2 -- set Interface p2 type=dummy ofport_request=2])
-
-# Add some initial flows and check that it was successful.
-AT_DATA([flows.txt], [dnl
-table=0 actions=set_field:0x2->reg7,set_field:0xabcdef01->metadata, resubmit(,1)
-table=1 actions=learn(table=10,delete_learned,cookie=0x123,limit=3,result_dst=NXM_NX_REG6[[0]],NXM_OF_ETH_DST[[]]=NXM_OF_ETH_SRC[[]],OXM_OF_METADATA[[]],output:NXM_NX_REG7)
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl dump-flows br0 --no-stats | sort], [0], [dnl
- actions=load:0x2->NXM_NX_REG7[[]],load:0xabcdef01->OXM_OF_METADATA[[]],resubmit(,1)
- table=1, actions=learn(table=10,delete_learned,cookie=0x123,limit=3,result_dst=NXM_NX_REG6[[0]],NXM_OF_ETH_DST[[]]=NXM_OF_ETH_SRC[[]],OXM_OF_METADATA[[]],output:NXM_NX_REG7[[]])
-])
-
-dnl Each packet will generate its own flow at table=10, except last one
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:ff),eth_type(0x1234)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:02,dst=50:54:00:00:00:ff),eth_type(0x1234)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:03,dst=50:54:00:00:00:ff),eth_type(0x1234)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:04,dst=50:54:00:00:00:ff),eth_type(0x1234)'])
-
-AT_CHECK([ovs-ofctl dump-flows br0 table=10 --no-stats | sort], [0], [dnl
- cookie=0x123, table=10, metadata=0xabcdef01,dl_dst=50:54:00:00:00:01 actions=output:2
- cookie=0x123, table=10, metadata=0xabcdef01,dl_dst=50:54:00:00:00:02 actions=output:2
- cookie=0x123, table=10, metadata=0xabcdef01,dl_dst=50:54:00:00:00:03 actions=output:2
-])
-
-ovs-appctl revalidator/wait
-
-AT_CHECK([ovs-ofctl del-flows br0 'table=1'])
-AT_CHECK([ovs-ofctl dump-flows br0 table=10 --no-stats | sort], [0], [dnl
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([learning action - limit])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 actions=learn(table=1,dl_dst=dl_src,cookie=0x1,limit=1),2
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:ff),eth_type(0x1234)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:02,dst=50:54:00:00:00:ff),eth_type(0x1234)'])
-
-OVS_WAIT_UNTIL([ovs-ofctl dump-ports br0 2 | grep -o 'tx pkts=2' >/dev/null])
-
-AT_CHECK([ovs-ofctl dump-flows br0 table=1 --no-stats], [0], [dnl
- cookie=0x1, table=1, dl_dst=50:54:00:00:00:01 actions=drop
-])
-
-dnl Delete the learned flow
-AT_CHECK([ovs-ofctl del-flows br0 table=1])
-
-AT_CHECK([ovs-ofctl dump-flows br0 table=1 | ofctl_strip | sort], [0], [dnl
-NXST_FLOW reply:
-])
-
-ovs-appctl revalidator/wait
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:02,dst=50:54:00:00:00:ff),eth_type(0x1234)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:ff),eth_type(0x1234)'])
-
-OVS_WAIT_UNTIL([ovs-ofctl dump-ports br0 2 | grep -o 'tx pkts=4' >/dev/null])
-
-AT_CHECK([ovs-ofctl dump-flows br0 table=1 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, table=1, dl_dst=50:54:00:00:00:02 actions=drop
-NXST_FLOW reply:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([learning action - limit result_dst])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 actions=learn(table=1,dl_dst=dl_src,cookie=0x1,limit=1,result_dst=reg0[[0]]),controller
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:ff),eth_type(0x1234)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:02,dst=50:54:00:00:00:ff),eth_type(0x1234)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 4])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 reg0=0x1,in_port=1 (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:ff,dl_type=0x1234
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:02,dl_dst=50:54:00:00:00:ff,dl_type=0x1234
-])
-
-AT_CHECK([ovs-ofctl dump-flows br0 table=1 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, table=1, dl_dst=50:54:00:00:00:01 actions=drop
-NXST_FLOW reply:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([learning action - different limits])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2 3
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 udp,actions=learn(table=11,dl_type=0x0800,nw_proto=17,udp_src=udp_dst,limit=1,result_dst=reg0[[0]]),resubmit(,1)
-table=0 in_port=2 udp,actions=learn(table=12,dl_type=0x0800,nw_proto=17,udp_src=udp_dst,limit=10,result_dst=reg0[[0]]),resubmit(,1)
-table=0 in_port=3 udp,actions=learn(table=13,dl_type=0x0800,nw_proto=17,udp_src=udp_dst,limit=20,result_dst=reg0[[0]]),resubmit(,1)
-dnl
-dnl These flows simply counts the packets that executed a successful learn action:
-dnl
-table=1 cookie=1,reg0=1,in_port=1 actions=drop
-table=1 cookie=2,reg0=1,in_port=2 actions=drop
-table=1 cookie=3,reg0=1,in_port=3 actions=drop
-dnl
-dnl These flows simply counts the packets that didn't execute a successful learn action:
-dnl
-table=1 cookie=1,reg0=0,in_port=1 actions=drop
-table=1 cookie=2,reg0=0,in_port=2 actions=drop
-table=1 cookie=3,reg0=0,in_port=3 actions=drop
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-for i in `seq 1001 1030`; do
-    ovs-appctl netdev-dummy/receive p1 "in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:ff),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=$i)"
-    ovs-appctl netdev-dummy/receive p2 "in_port(2),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:ff),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=$i)"
-    ovs-appctl netdev-dummy/receive p3 "in_port(3),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:ff),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=$i)"
-done
-
-dnl Check successful counters:
-AT_CHECK([ovs-ofctl dump-flows br0 table=1,reg0=1 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, table=1, n_packets=1, n_bytes=106, reg0=0x1,in_port=1 actions=drop
- cookie=0x2, table=1, n_packets=10, n_bytes=1060, reg0=0x1,in_port=2 actions=drop
- cookie=0x3, table=1, n_packets=20, n_bytes=2120, reg0=0x1,in_port=3 actions=drop
-NXST_FLOW reply:
-])
-
-dnl Check failed counters:
-AT_CHECK([ovs-ofctl dump-flows br0 table=1,reg0=0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, table=1, n_packets=29, n_bytes=3074, reg0=0,in_port=1 actions=drop
- cookie=0x2, table=1, n_packets=20, n_bytes=2120, reg0=0,in_port=2 actions=drop
- cookie=0x3, table=1, n_packets=10, n_bytes=1060, reg0=0,in_port=3 actions=drop
-NXST_FLOW reply:
-])
-
-dnl Check learned flows:
-
-AT_CHECK([ovs-ofctl dump-flows br0 table=13 | ofctl_strip | sort], [0], [dnl
- table=13, udp,tp_src=1001 actions=drop
- table=13, udp,tp_src=1002 actions=drop
- table=13, udp,tp_src=1003 actions=drop
- table=13, udp,tp_src=1004 actions=drop
- table=13, udp,tp_src=1005 actions=drop
- table=13, udp,tp_src=1006 actions=drop
- table=13, udp,tp_src=1007 actions=drop
- table=13, udp,tp_src=1008 actions=drop
- table=13, udp,tp_src=1009 actions=drop
- table=13, udp,tp_src=1010 actions=drop
- table=13, udp,tp_src=1011 actions=drop
- table=13, udp,tp_src=1012 actions=drop
- table=13, udp,tp_src=1013 actions=drop
- table=13, udp,tp_src=1014 actions=drop
- table=13, udp,tp_src=1015 actions=drop
- table=13, udp,tp_src=1016 actions=drop
- table=13, udp,tp_src=1017 actions=drop
- table=13, udp,tp_src=1018 actions=drop
- table=13, udp,tp_src=1019 actions=drop
- table=13, udp,tp_src=1020 actions=drop
-NXST_FLOW reply:
-])
-
-AT_CHECK([ovs-ofctl dump-flows br0 table=12 | ofctl_strip | sort], [0], [dnl
- table=12, udp,tp_src=1001 actions=drop
- table=12, udp,tp_src=1002 actions=drop
- table=12, udp,tp_src=1003 actions=drop
- table=12, udp,tp_src=1004 actions=drop
- table=12, udp,tp_src=1005 actions=drop
- table=12, udp,tp_src=1006 actions=drop
- table=12, udp,tp_src=1007 actions=drop
- table=12, udp,tp_src=1008 actions=drop
- table=12, udp,tp_src=1009 actions=drop
- table=12, udp,tp_src=1010 actions=drop
-NXST_FLOW reply:
-])
-
-AT_CHECK([ovs-ofctl dump-flows br0 table=11 | ofctl_strip | sort], [0], [dnl
- table=11, udp,tp_src=1001 actions=drop
-NXST_FLOW reply:
-])
-
-AT_CHECK([ovs-vsctl del-br br0])
-
-ovs-appctl time/warp 500
-ovs-appctl time/warp 500
-ovs-appctl time/warp 500
-ovs-appctl time/warp 500
-
-AT_CHECK([ovs-vsctl add-br br1 -- set b br1 datapath_type=dummy])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/lib.at b/tests/lib.at
deleted file mode 100644
index d5a30d4a1..000000000
--- a/tests/lib.at
+++ /dev/null
@@ -1,9 +0,0 @@
-AT_BANNER([Library -- basic])
-
-AT_SETUP([successful linking])
-AT_KEYWORDS([libopenvswitch])
-AT_CAPTURE_FILE([log])
-AT_CHECK(
-  [test-lib], [0],
-  [], [ignore])
-AT_CLEANUP
diff --git a/tests/library.at b/tests/library.at
deleted file mode 100644
index a30d362e3..000000000
--- a/tests/library.at
+++ /dev/null
@@ -1,258 +0,0 @@
-AT_BANNER([library unit tests])
-
-AT_SETUP([flow extractor])
-AT_CHECK([$PYTHON $srcdir/flowgen.py >/dev/null])
-AT_CHECK([ovstest test-flows flows pcap], [0], [checked 247 packets, 0 errors
-])
-AT_CLEANUP
-
-AT_SETUP([TCP/IP checksumming])
-AT_CHECK([ovstest test-csum], [0], [....#....#....####................................#................................#
-])
-AT_CLEANUP
-
-AT_SETUP([hash functions])
-AT_CHECK([ovstest test-hash])
-AT_CLEANUP
-
-AT_SETUP([hash map])
-AT_KEYWORDS([hmap])
-AT_CHECK([ovstest test-hmap], [0], [............
-])
-AT_CLEANUP
-
-AT_SETUP([hash index])
-AT_KEYWORDS([hindex])
-AT_CHECK([ovstest test-hindex], [0], [.....................
-])
-AT_CLEANUP
-
-AT_SETUP([cuckoo hash])
-AT_KEYWORDS([cmap])
-AT_CHECK([ovstest test-cmap check 1], [0], [...
-])
-AT_CLEANUP
-
-AT_SETUP([counting cuckoo hash])
-AT_KEYWORDS([cmap])
-AT_CHECK([ovstest test-ccmap check 1], [0], [...
-])
-AT_CLEANUP
-
-AT_SETUP([atomic operations])
-AT_CHECK([ovstest test-atomic])
-AT_CLEANUP
-
-AT_SETUP([test linked lists])
-AT_CHECK([ovstest test-list], [0], [....
-])
-AT_CLEANUP
-
-AT_SETUP([packet library])
-AT_CHECK([ovstest test-packets])
-AT_CLEANUP
-
-AT_SETUP([SHA-1])
-AT_CHECK([ovstest test-sha1], [0], [.........
-])
-AT_CLEANUP
-
-AT_SETUP([test skiplist])
-AT_KEYWORDS([skiplist])
-AT_CHECK([ovstest test-skiplist], [0], [skiplist insert
-skiplist delete
-skiplist find
-skiplist forward_to
-skiplist random
-
-])
-AT_CLEANUP
-
-AT_SETUP([type properties])
-AT_CHECK([test-type-props])
-AT_CLEANUP
-
-AT_SETUP([strtok_r bug fix])
-AT_CHECK([test-strtok_r], [0], [NULL NULL
-])
-AT_CLEANUP
-
-AT_SETUP([byte order conversion])
-AT_KEYWORDS([byte order])
-AT_CHECK([ovstest test-byte-order])
-AT_CLEANUP
-
-AT_SETUP([random number generator])
-AT_CHECK([ovstest test-random], [0], [dnl
-average=7fa2014f
-
-bit      0     1
-  0  4946  5054
-  1  4939  5061
-  2  4947  5053
-  3  4935  5065
-  4  5004  4996
-  5  4998  5002
-  6  5062  4938
-  7  5009  4991
-  8  5001  4999
-  9  5022  4978
- 10  5006  4994
- 11  5039  4961
- 12  4940  5060
- 13  5048  4952
- 14  4930  5070
- 15  4973  5027
- 16  4954  5046
- 17  5043  4957
- 18  5020  4980
- 19  5104  4896
- 20  5051  4949
- 21  5003  4997
- 22  5110  4890
- 23  4950  5050
- 24  5016  4984
- 25  5019  4981
- 26  4948  5052
- 27  4995  5005
- 28  4995  5005
- 29  4969  5031
- 30  5109  4891
- 31  4984  5016
-(expected values are 5000)
-
-nibble   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
-     0 640 589 610 613 588 632 650 613 582 646 627 640 612 650 637 671
-     1 626 642 663 620 630 609 617 602 615 638 614 644 641 597 598 644
-     2 667 611 617 613 609 629 642 651 604 641 594 659 651 610 617 585
-     3 621 662 594 605 618 644 616 613 613 616 611 608 614 660 653 652
-     4 641 668 621 664 619 624 625 642 624 629 607 566 599 639 618 614
-     5 666 629 620 621 581 615 598 620 630 651 671 622 628 603 657 588
-     6 620 640 621 606 603 644 628 633 620 597 653 591 637 658 634 615
-     7 636 645 679 593 598 609 612 612 623 626 638 669 603 629 606 622
-(expected values are 625)
-])
-AT_CLEANUP
-
-m4_foreach(
-  [testname],
-  [[ctz],
-   [clz],
-   [round_up_pow2],
-   [round_down_pow2],
-   [count_1bits],
-   [log_2_floor],
-   [bitwise_copy],
-   [bitwise_zero],
-   [bitwise_one],
-   [bitwise_is_all_zeros],
-   [bitwise_rscan],
-   [ovs_scan]],
-  [AT_SETUP([testname[()] function])
-   AT_KEYWORDS([testname])
-   AT_CHECK([ovstest test-util testname], [0], [], [])
-   AT_CLEANUP])
-
-AT_SETUP([unix socket, short pathname - C])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-AT_CHECK([ovstest test-unix-socket x])
-AT_CLEANUP
-
-dnl Unix sockets with long names are problematic because the name has to
-dnl go in a fixed-length field in struct sockaddr_un.  Generally the limit
-dnl is about 100 bytes.  On Linux, we work around this by indirecting through
-dnl a directory fd using /proc/self/fd/<dirfd>.  We do not have a workaround
-dnl for other platforms, so we skip the test there.
-AT_SETUP([unix socket, long pathname - C])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-dnl Linux sockaddr_un has a 108-byte limit, so this needs to be longer.
-dnl Linux "ecryptfs" has a 143-byte limit, so we use that many bytes.
-longname=01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012
-
-dnl Skip the test if the directory can't be created (presumably the file
-dnl system doesn't support such long names).
-AT_CHECK([mkdir $longname || exit 77])
-
-AT_CHECK([cd $longname && ovstest test-unix-socket ../$longname/socket socket])
-AT_CLEANUP
-
-m4_define([UNIX_SOCKET_SHORT_PATHNAME_PYN],
-  [AT_SETUP([unix socket, short pathname - $1])
-   AT_SKIP_IF([test $2 = no || test "$IS_WIN32" = "yes"])
-   AT_KEYWORDS([python unixsocket])
-   AT_CHECK([$3 $srcdir/test-unix-socket.py x])
-   AT_CLEANUP])
-
-UNIX_SOCKET_SHORT_PATHNAME_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-UNIX_SOCKET_SHORT_PATHNAME_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-dnl Unix sockets with long names are problematic because the name has to
-dnl go in a fixed-length field in struct sockaddr_un.  Generally the limit
-dnl is about 100 bytes.  On Linux, we work around this by indirecting through
-dnl a directory fd using /proc/self/fd/<dirfd>.  We do not have a workaround
-dnl for other platforms, so we skip the test there.
-m4_define([UNIX_SOCKET_LONG_PATHNAME_PYN],
-  [AT_SETUP([unix socket, long pathname - $1])
-   AT_SKIP_IF([test $2 = no || test "$IS_WIN32" = "yes"])
-   AT_KEYWORDS([python unixsocket])
-   dnl Linux sockaddr_un has a 108-byte limit, so this needs to be longer.
-   dnl Linux "ecryptfs" has a 143-byte limit, so we use that many bytes.
-   longname=01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012
-
-   dnl Skip the test if the directory can't be created (presumably the file
-   dnl system doesn't support such long names).
-   AT_CHECK([mkdir $longname || exit 77])
-   AT_CHECK([cd $longname && $3 $abs_srcdir/test-unix-socket.py ../$longname/socket socket])
-   AT_CLEANUP])
-
-UNIX_SOCKET_LONG_PATHNAME_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-UNIX_SOCKET_LONG_PATHNAME_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-AT_SETUP([ovs_assert])
-if test "$IS_WIN32" = "yes"; then
-  exit_status=9
-else
-  # SIGABRT + 128
-  exit_status=134
-fi
-AT_CHECK([ovstest test-util -voff -vfile:info '-vPATTERN:file:%c|%p|%m' --log-file assert],
-  [$exit_status], [], [stderr])
-
-AT_CHECK([sed 's/\(opened log file\) .*/\1/
-s/|[[^|]]*: /|/' test-util.log], [0], [dnl
-vlog|INFO|opened log file
-util|EMER|assertion false failed in test_assert()
-])
-
-AT_CHECK([sed 's/.*: //
-1q' stderr], [0],
-  [assertion false failed in test_assert()
-])
-
-AT_CLEANUP
-
-AT_SETUP([snprintf])
-AT_CHECK([ovstest test-util snprintf])
-AT_CLEANUP
-
-AT_SETUP([bitmap functions])
-AT_CHECK([ovstest test-bitmap check], [0], [..
-])
-AT_CLEANUP
-
-AT_SETUP([use of public headers])
-AT_CHECK([test-lib], [0], [])
-AT_CLEANUP
-
-AT_SETUP([ofpbuf module])
-AT_CHECK([ovstest test-ofpbuf], [0], [])
-AT_CLEANUP
-
-AT_SETUP([rcu])
-AT_CHECK([ovstest test-rcu-quiesce], [0], [])
-AT_CLEANUP
-
-AT_SETUP([stopwatch module])
-AT_CHECK([ovstest test-stopwatch], [0], [......
-], [ignore])
-AT_CLEANUP
diff --git a/tests/lockfile.at b/tests/lockfile.at
deleted file mode 100644
index 61920c3b0..000000000
--- a/tests/lockfile.at
+++ /dev/null
@@ -1,54 +0,0 @@
-AT_BANNER([lockfile unit tests])
-
-# CHECK_LOCKFILE([test-name], [number-children], [error-message]
-# [skip-test-windows])
-m4_define([CHECK_LOCKFILE],
-  [AT_SETUP([m4_translit([$1], [_], [ ])])
-   m4_if([$4], [yes], [AT_SKIP_IF([test "$IS_WIN32" = "yes"])])
-   AT_KEYWORDS([lockfile])
-   AT_CHECK([ovstest test-lockfile $1], [0], [$1: success (m4_if(
-     [$2], [1], [$2 child], [$2 children]))
-], [stderr])
-   AT_CHECK([sed 's/pid [[0-9]]*/pid <pid>/' stderr], [0], [$3])
-   AT_CLEANUP])
-
-CHECK_LOCKFILE([lock_and_unlock], [0])
-
-CHECK_LOCKFILE([lock_and_unlock_twice], [0])
-
-CHECK_LOCKFILE([lock_blocks_same_process], [0],
-  [lockfile|WARN|.file.~lock~: cannot lock file because this process has already locked it
-])
-
-CHECK_LOCKFILE([lock_blocks_same_process_twice], [0],
-  [lockfile|WARN|.file.~lock~: cannot lock file because this process has already locked it
-lockfile|WARN|.file.~lock~: cannot lock file because this process has already locked it
-])
-
-CHECK_LOCKFILE([lock_blocks_other_process], [1],
-  [lockfile|WARN|.file.~lock~: child does not inherit lock
-lockfile|WARN|.file.~lock~: cannot lock file because it is already locked by pid <pid>
-], [yes])
-
-CHECK_LOCKFILE([lock_twice_blocks_other_process], [1],
-  [lockfile|WARN|.file.~lock~: cannot lock file because this process has already locked it
-lockfile|WARN|.file.~lock~: child does not inherit lock
-lockfile|WARN|.file.~lock~: cannot lock file because it is already locked by pid <pid>
-], [yes])
-
-CHECK_LOCKFILE([lock_and_unlock_allows_other_process], [1], [], [yes])
-
-CHECK_LOCKFILE([lock_multiple], [0],
-  [lockfile|WARN|.a.~lock~: cannot lock file because this process has already locked it
-])
-
-CHECK_LOCKFILE([lock_symlink], [0],
-  [lockfile|WARN|.a.~lock~: cannot lock file because this process has already locked it
-lockfile|WARN|.b.~lock~: cannot lock file because this process has already locked it
-lockfile|WARN|.b.~lock~: cannot lock file because this process has already locked it
-lockfile|WARN|.a.~lock~: cannot lock file because this process has already locked it
-], [yes])
-
-CHECK_LOCKFILE([lock_symlink_to_dir], [0],
-  [lockfile|WARN|dir/.b.~lock~: cannot lock file because this process has already locked it
-], [yes])
diff --git a/tests/mcast-snooping.at b/tests/mcast-snooping.at
deleted file mode 100644
index 757cf7186..000000000
--- a/tests/mcast-snooping.at
+++ /dev/null
@@ -1,218 +0,0 @@
-AT_BANNER([mcast snooping])
-
-AT_SETUP([mcast - check multicasts to trunk ports are not duplicated])
-
-OVS_VSWITCHD_START([])
-
-AT_CHECK([
-    ovs-vsctl set bridge br0 \
-    datapath_type=dummy \
-    mcast_snooping_enable=true \
-    other-config:mcast-snooping-disable-flood-unregistered=true
-], [0])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-
-# Create an access port p1 on vlan 1725, and a trunk port p2.
-AT_CHECK([
-    ovs-vsctl add-port br0 p1 tag=1725 -- set Interface p1 type=dummy \
-    other-config:hwaddr=aa:55:aa:55:00:01 ofport_request=1 \
-    -- add-port br0 p2 -- set Interface p2 type=dummy \
-    other-config:hwaddr=aa:55:aa:55:00:02 ofport_request=2
-], [0])
-
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (dummy)
-    p2 2/2: (dummy)
-])
-
-ovs-appctl time/stop
-
-# Send IGMPv3 query on p2 with vlan 1725
-# 5c:8a:38:55:25:52 > 01:00:5e:00:00:01, ethertype 802.1Q (0x8100), length 64: vlan 1725, p 0, ethertype IPv4,
-# 172.17.25.1 > 224.0.0.1: igmp query v3
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 \
-'01005e0000015c8a38552552810006bd080046c000240000000001027f00ac111901e0000001940400001164ec1e00000000027d000000000000000000000000'])
-
-# Send IGMPv3 query on p2 with vlan 1728
-# 5c:8a:38:55:25:52 > 01:00:5e:00:00:01, ethertype 802.1Q (0x8100), length 64: vlan 1728, p 0, ethertype IPv4,
-# 172.17.28.1 > 224.0.0.1: igmp query v3
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 \
-'01005e0000015c8a38552552810006c0080046c000240000000001027c00ac111c01e0000001940400001164ec1e00000000027d000000000000000000000000'])
-
-AT_CHECK([ovs-appctl mdb/show br0], [0], [dnl
- port  VLAN  GROUP                Age
-    2  1725  querier               0
-    2  1728  querier               0
-])
-
-AT_CHECK([ovs-vsctl set Interface p2 options:tx_pcap=p2.pcap])
-
-# Send a multicast packet on p1
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive p1 \
-    'in_port(1),eth(src=aa:55:aa:55:00:01,dst=01:00:5e:5e:01:01),eth_type(0x0800),ipv4(src=10.0.0.1,dst=239.94.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=0,dst=8000)'
-])
-
-# Check this packet was forwarded exactly once to p2 and has vlan tag 1725
-# aa:55:aa:55:00:01 > 01:00:5e:5e:01:01, ethertype 802.1Q (0x8100), length 46: vlan 1725, p 0, ethertype IPv4,
-# 10.0.0.1.0 > 239.94.1.1.8000: UDP, length 0
-AT_CHECK([ovs-pcap p2.pcap > p2.pcap.txt 2>&1])
-AT_CHECK([cat p2.pcap.txt], [0], [dnl
-01005e5e0101aa55aa550001810006bd08004500005c00000000401180310a000001ef5e010100001f40004801ba000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f
-])
-
-# Clear the mdb, send a IGMP packet with invalid checksum and make sure it
-# does not end up in the mdb.
-AT_CHECK([ovs-appctl mdb/flush br0], [0], [dnl
-table successfully flushed
-])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 \
-'01005e0000015c8a38552552810006bd080046c000240000000001027f00ac111901e0000001940400001164ec1000000000027d000000000000000000000000'])
-
-AT_CHECK([ovs-appctl mdb/show br0], [0], [dnl
- port  VLAN  GROUP                Age
-])
-
-
-# First send a valid packet to make sure it populates the mdb. Than Clear
-# the mdb, send a MLD packet with invalid checksum and make sure it does
-# not end up in the mdb.
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 \
-'3333ff0e4c67000c290e4c6786dd600000000020000100000000000000000000000000000000ff0200000000000000000001ff0e4c673a000502000001008300e7b800000000ff0200000000000000000001ff0e4c67'])
-
-AT_CHECK([ovs-appctl mdb/show br0], [0], [dnl
- port  VLAN  GROUP                Age
-    2     0  ff02::1:ff0e:4c67           0
-])
-
-AT_CHECK([ovs-appctl mdb/flush br0], [0], [dnl
-table successfully flushed
-])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 \
-'3333ff0e4c67000c290e4c6786dd600000000020000100000000000000000000000000000000ff0200000000000000000001ff0e4c673a000502000001008300e7b000000000ff0200000000000000000001ff0e4c67'])
-
-AT_CHECK([ovs-appctl mdb/show br0], [0], [dnl
- port  VLAN  GROUP                Age
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([mcast - delete the port mdb when vlan configuration changed])
-OVS_VSWITCHD_START([])
-
-AT_CHECK([
-    ovs-vsctl set bridge br0 \
-    datapath_type=dummy \
-    mcast_snooping_enable=true \
-    other-config:mcast-snooping-disable-flood-unregistered=false
-], [0])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-
-AT_CHECK([
-    ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy \
-    other-config:hwaddr=aa:55:aa:55:00:01 ofport_request=1 \
-    -- add-port br0 p2 \
-    -- set Interface p2 type=dummy other-config:hwaddr=aa:55:aa:55:00:02 ofport_request=2 \
-    -- add-port br0 p3 \
-    -- set Interface p3 type=dummy other-config:hwaddr=aa:55:aa:55:00:03 ofport_request=3
-], [0])
-
-ovs-appctl time/stop
-
-# send report packets
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive p1  \
-        '01005E010101000C29A027A18100000108004500001C000100004002CBAEAC10221EE001010112140CE9E0010101'
-    ovs-appctl netdev-dummy/receive p1  \
-        '01005E010101000C29A027A28100000208004500001C000100004002CBAEAC10221EE001010112140CE9E0010101'
-], [0])
-
-# send query packets
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive p3  \
-       '01005E010101000C29A027D18100000108004500001C000100004002CBCBAC102201E00101011114EEEB00000000'
-    ovs-appctl netdev-dummy/receive p3  \
-        '01005E010101000C29A027D28100000208004500001C000100004002CBCAAC102202E00101011114EEEB00000000'
-], [0])
-
-AT_CHECK([ovs-appctl mdb/show br0], [0], [dnl
- port  VLAN  GROUP                Age
-    1     1  224.1.1.1           0
-    1     2  224.1.1.1           0
-    3     1  querier               0
-    3     2  querier               0
-])
-
-AT_CHECK([ovs-vsctl set port p3 tag=2], [0])
-
-AT_CHECK([ovs-appctl mdb/show br0], [0], [dnl
- port  VLAN  GROUP                Age
-    1     1  224.1.1.1           0
-    1     2  224.1.1.1           0
-])
-
-AT_CLEANUP
-
-AT_SETUP([mcast - delete the port mdb when port destroyed])
-OVS_VSWITCHD_START([])
-
-AT_CHECK([
-    ovs-vsctl set bridge br0 \
-    datapath_type=dummy \
-    mcast_snooping_enable=true \
-    other-config:mcast-snooping-disable-flood-unregistered=false
-], [0])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-
-AT_CHECK([
-    ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy \
-    other-config:hwaddr=aa:55:aa:55:00:01 ofport_request=1 \
-    -- add-port br0 p2 \
-    -- set Interface p2 type=dummy other-config:hwaddr=aa:55:aa:55:00:02 ofport_request=2 \
-], [0])
-
-ovs-appctl time/stop
-
-# send report packets
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive p1  \
-        '01005E010101000C29A027A18100000108004500001C000100004002CBAEAC10221EE001010112140CE9E0010101'
-    ovs-appctl netdev-dummy/receive p1  \
-        '01005E010101000C29A027A28100000208004500001C000100004002CBAEAC10221EE001010112140CE9E0010101'
-], [0])
-
-# send query packets
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive p2  \
-       '01005E010101000C29A027D18100000108004500001C000100004002CBCBAC102201E00101011114EEEB00000000'
-    ovs-appctl netdev-dummy/receive p2  \
-        '01005E010101000C29A027D28100000208004500001C000100004002CBCAAC102202E00101011114EEEB00000000'
-], [0])
-
-AT_CHECK([ovs-appctl mdb/show br0], [0], [dnl
- port  VLAN  GROUP                Age
-    1     1  224.1.1.1           0
-    1     2  224.1.1.1           0
-    2     1  querier               0
-    2     2  querier               0
-])
-
-AT_CHECK([ovs-vsctl del-port br0 p2], [0])
-
-AT_CHECK([ovs-appctl mdb/show br0], [0], [dnl
- port  VLAN  GROUP                Age
-    1     1  224.1.1.1           0
-    1     2  224.1.1.1           0
-])
-
-AT_CLEANUP
diff --git a/tests/mpls-xlate.at b/tests/mpls-xlate.at
deleted file mode 100644
index a9ba62215..000000000
--- a/tests/mpls-xlate.at
+++ /dev/null
@@ -1,209 +0,0 @@
-AT_BANNER([mpls-xlate])
-
-AT_SETUP([MPLS xlate action])
-
-OVS_VSWITCHD_START(
-  [add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 -- \
-   add-port br0 p1 -- set Interface p1 type=patch \
-                                       options:peer=p2 ofport_request=2 -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-                  fail-mode=secure -- \
-   add-port br1 p2 -- set Interface p2 type=patch \
-                                       options:peer=p1])
-
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p0 1/1: (dummy)
-    p1 2/none: (patch: peer=p2)
-  br1:
-    br1 65534/101: (dummy-internal)
-    p2 1/none: (patch: peer=p1)
-])
-
-dnl Setup single MPLS tags.
-AT_CHECK([ovs-ofctl -O OpenFlow15 add-group br0 group_id=1232,type=select,selection_method=hash,bucket=output:LOCAL])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-group br0 group_id=1233,type=all,bucket=output:LOCAL])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-group br0 group_id=1234,type=all,bucket=dec_ttl,output:LOCAL])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 in_port=local,dl_type=0x0800,action=push_mpls:0x8847,set_field:10-\>mpls_label,output:1])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 dl_type=0x8847,in_port=1,mpls_label=20,action=pop_mpls:0x0800,output:LOCAL])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 dl_type=0x8847,in_port=1,mpls_label=21,action=pop_mpls:0x0800,dec_ttl,output:LOCAL])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 dl_type=0x8847,in_port=1,mpls_label=22,action=pop_mpls:0x0800,group:1232])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 dl_type=0x8847,in_port=1,mpls_label=23,action=pop_mpls:0x0800,group:1233])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 dl_type=0x8847,in_port=1,mpls_label=24,action=pop_mpls:0x0800,group:1234])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 dl_type=0x8847,in_port=1,mpls_label=25,action=pop_mpls:0x0800,output:2])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br1 in_port=1,action=output:LOCAL])
-
-dnl The following is needed on slow systems, because the flows in the datapath
-dnl will be evicted before the packet can match the recirculation context
-ovs-appctl time/stop
-
-dnl Test MPLS push
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=17,tos=0,ttl=64,frag=no),udp(src=7777,dst=80)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: push_mpls(label=10,tc=0,ttl=64,bos=1,eth_type=0x8847),1
-])
-
-dnl Test MPLS pop then output (actions do not trigger reciculation)
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x8847),mpls(label=20,tc=0,ttl=64,bos=1)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: pop_mpls(eth_type=0x800),100
-])
-
-dnl Test MPLS pop, dec_ttl, output (actions trigger recirculation)
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x8847),mpls(label=21,tc=0,ttl=64,bos=1)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: pop_mpls(eth_type=0x800),recirc(0x1)
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(1),in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(ipv4(ttl=63)),100
-])
-
-dnl Test MPLS pop then select group output (group type triggers recirculation)
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x8847),mpls(label=22,tc=0,ttl=64,bos=1)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: pop_mpls(eth_type=0x800),recirc(0x2)
-])
-
-for d in 0 1 2 3; do
-    pkt="in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x8847),mpls(label=22,tc=0,ttl=64,bos=1)"
-    AT_CHECK([ovs-appctl netdev-dummy/receive p0 $pkt])
-done
-
-AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/packets.*actions:1/actions:1/' | strip_used | strip_ufid | sort], [0], [dnl
-flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x8847),mpls(label=22/0xfffff,tc=0/0,ttl=64/0x0,bos=1/1), packets:3, bytes:54, used:0.0s, actions:pop_mpls(eth_type=0x800),recirc(0x3)
-recirc_id(0x3),in_port(1),packet_type(ns=0,id=0),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=0.0.0.0,dst=0.0.0.0,proto=0,frag=no), actions:100
-])
-
-dnl Test MPLS pop then all group output (bucket actions do not trigger recirculation)
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x8847),mpls(label=23,tc=0,ttl=64,bos=1)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: pop_mpls(eth_type=0x800),100
-])
-
-dnl Test MPLS pop then all group output (bucket actions trigger recirculation)
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x8847),mpls(label=24,tc=0,ttl=64,bos=1)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: pop_mpls(eth_type=0x800),recirc(0x4)
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(4),in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(ipv4(ttl=63)),100
-])
-
-dnl Test MPLS pop then all output to patch port
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x8847),mpls(label=25,tc=0,ttl=64,bos=1)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: pop_mpls(eth_type=0x800),recirc(0x5)
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(5),in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 101
-])
-
-dnl Setup multiple MPLS tags.
-AT_CHECK([ovs-ofctl del-flows br0])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 in_port=local,dl_type=0x0800,action=push_mpls:0x8847,set_field:10-\>mpls_label,push_mpls:0x8847,set_field:20-\>mpls_label,output:1])
-# The resubmits will be executed after recirculation, which preserves the
-# register values.
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 cookie=0xa,table=0,dl_type=0x8847,in_port=1,mpls_label=60,action=set_field:10-\>reg0,pop_mpls:0x8847,goto_table:1])
-# The pop_mpls below recirculates from within a resubmit
-# After recirculation the (restored) register value is moved to IP ttl.
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 cookie=0xb,table=1,dl_type=0x8847,in_port=1,mpls_label=50,action=push:NXM_NX_REG0[[0..7]],pop_mpls:0x0800,set_field:0-\>nw_ttl,pop:NXM_NX_REG1[[0..7]],move:NXM_NX_REG1[[0..7]]-\>NXM_NX_IP_TTL[[]],output:LOCAL])
-
-dnl Double MPLS push
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: push_mpls(label=10,tc=0,ttl=64,bos=1,eth_type=0x8847),push_mpls(label=20,tc=0,ttl=64,bos=0,eth_type=0x8847),1
-])
-
-dnl Double MPLS pop
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x8847),mpls(label=60,tc=0,ttl=64,bos=0,label=50,tc=0,ttl=64,bos=1)'], [0], [stdout])
-AT_CHECK([tail -1 stdout | sed 's/recirc(0x[[0-9a-f]]*)/recirc(?)/'], [0],
-  [Datapath actions: pop_mpls(eth_type=0x8847),pop_mpls(eth_type=0x800),recirc(?)
-])
-
-recirc_id=$(tail -1 stdout | sed 's/.*recirc(0x\([[0-9a-f]]*\)).*/\1/')
-echo "recirc_id $recirc_id"
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "recirc_id($recirc_id),in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=47,tos=0,ttl=64,frag=no)"], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(ipv4(ttl=10)),100
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([MPLS xlate action - patch-port])
-
-OVS_VSWITCHD_START(
-  [add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 -- \
-   add-port br0 p1 -- set Interface p1 type=patch \
-                                       options:peer=p2 ofport_request=2 -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-                  fail-mode=secure -- \
-   add-port br1 p2 -- set Interface p2 type=patch \
-                                       options:peer=p1 -- \
-   add-port br1 p3 -- set Interface p3 type=dummy ofport_request=3])
-
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg ofproto_dpif_upcall:dbg])
-
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p0 1/1: (dummy)
-    p1 2/none: (patch: peer=p2)
-  br1:
-    br1 65534/101: (dummy-internal)
-    p2 1/none: (patch: peer=p1)
-    p3 3/3: (dummy)
-])
-
-dnl MPLS PUSH + POP.
-AT_CHECK([ovs-ofctl del-flows br0])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 in_port=local,ip,actions=2,1,1])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br1 in_port=1,ip,actions=dec_ttl,push_mpls:0x8847,3])
-
-dnl MPLS push+pop
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=10.1.1.22,dst=10.0.0.3,proto=6,tos=0,ttl=64,frag=no),tcp(src=53295,dst=8080)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(ipv4(ttl=63)),push_mpls(label=0,tc=0,ttl=63,bos=1,eth_type=0x8847),3,pop_mpls(eth_type=0x800),set(ipv4(ttl=64)),1,1
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([MPLS xlate action - group bucket])
-
-OVS_VSWITCHD_START
-add_of_ports br0 1
-
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg ofproto_dpif_upcall:dbg])
-
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=push_mpls:0x8847,output:1'])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 in_port=local,ip,actions=group:1234,output:1,output:1])
-
-dnl MPLS push in a bucket
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=10.1.1.22,dst=10.0.0.3,proto=6,tos=0,ttl=64,frag=no),tcp(src=53295,dst=8080)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: push_mpls(label=0,tc=0,ttl=64,bos=1,eth_type=0x8847),1,pop_mpls(eth_type=0x800),1,1
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/multipath.at b/tests/multipath.at
deleted file mode 100644
index a7c880b1b..000000000
--- a/tests/multipath.at
+++ /dev/null
@@ -1,582 +0,0 @@
-AT_BANNER([multipath link selection])
-
-# The test-multipath program prints a lot of output on stdout, but each of the
-# tests below ignores it because it will vary a bit depending on endianness and
-# floating point precision.  test-multipath will output an error message on
-# stderr and return with exit code 1 if anything really goes wrong.  In each
-# case, we list the (approximate) expected output in a comment to aid debugging
-# if the test does fail.
-
-AT_SETUP([modulo_n multipath link selection])
-AT_CHECK([[ovstest test-multipath 'eth_src,50,modulo_n,1,0,NXM_NX_REG0[]']],
-  [0], [ignore])
-# 1 ->  2: disruption=0.50 (perfect=0.50); stddev/expected=0.0000
-# 2 ->  3: disruption=0.66 (perfect=0.33); stddev/expected=0.0023
-# 3 ->  4: disruption=0.75 (perfect=0.25); stddev/expected=0.0061
-# 4 ->  5: disruption=0.80 (perfect=0.20); stddev/expected=0.0082
-# 5 ->  6: disruption=0.83 (perfect=0.17); stddev/expected=0.0083
-# 6 ->  7: disruption=0.86 (perfect=0.14); stddev/expected=0.0061
-# 7 ->  8: disruption=0.88 (perfect=0.12); stddev/expected=0.0103
-# 8 ->  9: disruption=0.89 (perfect=0.11); stddev/expected=0.0129
-# 9 -> 10: disruption=0.90 (perfect=0.10); stddev/expected=0.0091
-#10 -> 11: disruption=0.91 (perfect=0.09); stddev/expected=0.0114
-#11 -> 12: disruption=0.91 (perfect=0.08); stddev/expected=0.0073
-#12 -> 13: disruption=0.92 (perfect=0.08); stddev/expected=0.0165
-#13 -> 14: disruption=0.93 (perfect=0.07); stddev/expected=0.0149
-#14 -> 15: disruption=0.93 (perfect=0.07); stddev/expected=0.0127
-#15 -> 16: disruption=0.94 (perfect=0.06); stddev/expected=0.0142
-#16 -> 17: disruption=0.94 (perfect=0.06); stddev/expected=0.0098
-#17 -> 18: disruption=0.94 (perfect=0.06); stddev/expected=0.0159
-#18 -> 19: disruption=0.95 (perfect=0.05); stddev/expected=0.0121
-#19 -> 20: disruption=0.95 (perfect=0.05); stddev/expected=0.0195
-#20 -> 21: disruption=0.95 (perfect=0.05); stddev/expected=0.0120
-#21 -> 22: disruption=0.95 (perfect=0.05); stddev/expected=0.0181
-#22 -> 23: disruption=0.96 (perfect=0.04); stddev/expected=0.0222
-#23 -> 24: disruption=0.96 (perfect=0.04); stddev/expected=0.0164
-#24 -> 25: disruption=0.96 (perfect=0.04); stddev/expected=0.0146
-#25 -> 26: disruption=0.96 (perfect=0.04); stddev/expected=0.0175
-#26 -> 27: disruption=0.96 (perfect=0.04); stddev/expected=0.0231
-#27 -> 28: disruption=0.96 (perfect=0.04); stddev/expected=0.0172
-#28 -> 29: disruption=0.97 (perfect=0.03); stddev/expected=0.0211
-#29 -> 30: disruption=0.97 (perfect=0.03); stddev/expected=0.0213
-#30 -> 31: disruption=0.97 (perfect=0.03); stddev/expected=0.0253
-#31 -> 32: disruption=0.97 (perfect=0.03); stddev/expected=0.0208
-#32 -> 33: disruption=0.97 (perfect=0.03); stddev/expected=0.0223
-#33 -> 34: disruption=0.97 (perfect=0.03); stddev/expected=0.0215
-#34 -> 35: disruption=0.97 (perfect=0.03); stddev/expected=0.0201
-#35 -> 36: disruption=0.97 (perfect=0.03); stddev/expected=0.0220
-#36 -> 37: disruption=0.97 (perfect=0.03); stddev/expected=0.0221
-#37 -> 38: disruption=0.97 (perfect=0.03); stddev/expected=0.0201
-#38 -> 39: disruption=0.97 (perfect=0.03); stddev/expected=0.0215
-#39 -> 40: disruption=0.97 (perfect=0.03); stddev/expected=0.0271
-#40 -> 41: disruption=0.98 (perfect=0.02); stddev/expected=0.0272
-#41 -> 42: disruption=0.98 (perfect=0.02); stddev/expected=0.0208
-#42 -> 43: disruption=0.98 (perfect=0.02); stddev/expected=0.0226
-#43 -> 44: disruption=0.98 (perfect=0.02); stddev/expected=0.0264
-#44 -> 45: disruption=0.98 (perfect=0.02); stddev/expected=0.0233
-#45 -> 46: disruption=0.98 (perfect=0.02); stddev/expected=0.0285
-#46 -> 47: disruption=0.98 (perfect=0.02); stddev/expected=0.0246
-#47 -> 48: disruption=0.98 (perfect=0.02); stddev/expected=0.0282
-#48 -> 49: disruption=0.98 (perfect=0.02); stddev/expected=0.0233
-#49 -> 50: disruption=0.98 (perfect=0.02); stddev/expected=0.0197
-#50 -> 51: disruption=0.98 (perfect=0.02); stddev/expected=0.0317
-#51 -> 52: disruption=0.98 (perfect=0.02); stddev/expected=0.0283
-#52 -> 53: disruption=0.98 (perfect=0.02); stddev/expected=0.0282
-#53 -> 54: disruption=0.98 (perfect=0.02); stddev/expected=0.0273
-#54 -> 55: disruption=0.98 (perfect=0.02); stddev/expected=0.0283
-#55 -> 56: disruption=0.98 (perfect=0.02); stddev/expected=0.0288
-#56 -> 57: disruption=0.98 (perfect=0.02); stddev/expected=0.0263
-#57 -> 58: disruption=0.98 (perfect=0.02); stddev/expected=0.0339
-#58 -> 59: disruption=0.98 (perfect=0.02); stddev/expected=0.0262
-#59 -> 60: disruption=0.98 (perfect=0.02); stddev/expected=0.0309
-#60 -> 61: disruption=0.98 (perfect=0.02); stddev/expected=0.0285
-#61 -> 62: disruption=0.98 (perfect=0.02); stddev/expected=0.0288
-#62 -> 63: disruption=0.98 (perfect=0.02); stddev/expected=0.0298
-#63 -> 64: disruption=0.98 (perfect=0.02); stddev/expected=0.0277
-AT_CLEANUP
-
-AT_SETUP([hash_threshold multipath link selection])
-AT_CHECK([[ovstest test-multipath 'eth_src,50,hash_threshold,1,0,NXM_NX_REG0[]']],
-  [0], [ignore])
-# 1 ->  2: disruption=0.50 (perfect=0.50); stddev/expected=0.0000
-# 2 ->  3: disruption=0.50 (perfect=0.33); stddev/expected=0.0056
-# 3 ->  4: disruption=0.50 (perfect=0.25); stddev/expected=0.0050
-# 4 ->  5: disruption=0.50 (perfect=0.20); stddev/expected=0.0074
-# 5 ->  6: disruption=0.50 (perfect=0.17); stddev/expected=0.0031
-# 6 ->  7: disruption=0.50 (perfect=0.14); stddev/expected=0.0078
-# 7 ->  8: disruption=0.50 (perfect=0.12); stddev/expected=0.0085
-# 8 ->  9: disruption=0.50 (perfect=0.11); stddev/expected=0.0093
-# 9 -> 10: disruption=0.50 (perfect=0.10); stddev/expected=0.0083
-#10 -> 11: disruption=0.51 (perfect=0.09); stddev/expected=0.0110
-#11 -> 12: disruption=0.50 (perfect=0.08); stddev/expected=0.0124
-#12 -> 13: disruption=0.50 (perfect=0.08); stddev/expected=0.0143
-#13 -> 14: disruption=0.50 (perfect=0.07); stddev/expected=0.0148
-#14 -> 15: disruption=0.50 (perfect=0.07); stddev/expected=0.0099
-#15 -> 16: disruption=0.50 (perfect=0.06); stddev/expected=0.0166
-#16 -> 17: disruption=0.50 (perfect=0.06); stddev/expected=0.0099
-#17 -> 18: disruption=0.50 (perfect=0.06); stddev/expected=0.0194
-#18 -> 19: disruption=0.50 (perfect=0.05); stddev/expected=0.0169
-#19 -> 20: disruption=0.50 (perfect=0.05); stddev/expected=0.0169
-#20 -> 21: disruption=0.50 (perfect=0.05); stddev/expected=0.0185
-#21 -> 22: disruption=0.50 (perfect=0.05); stddev/expected=0.0160
-#22 -> 23: disruption=0.50 (perfect=0.04); stddev/expected=0.0236
-#23 -> 24: disruption=0.50 (perfect=0.04); stddev/expected=0.0147
-#24 -> 25: disruption=0.50 (perfect=0.04); stddev/expected=0.0195
-#25 -> 26: disruption=0.50 (perfect=0.04); stddev/expected=0.0199
-#26 -> 27: disruption=0.50 (perfect=0.04); stddev/expected=0.0227
-#27 -> 28: disruption=0.50 (perfect=0.04); stddev/expected=0.0198
-#28 -> 29: disruption=0.50 (perfect=0.03); stddev/expected=0.0216
-#29 -> 30: disruption=0.50 (perfect=0.03); stddev/expected=0.0233
-#30 -> 31: disruption=0.50 (perfect=0.03); stddev/expected=0.0266
-#31 -> 32: disruption=0.51 (perfect=0.03); stddev/expected=0.0238
-#32 -> 33: disruption=0.50 (perfect=0.03); stddev/expected=0.0194
-#33 -> 34: disruption=0.50 (perfect=0.03); stddev/expected=0.0173
-#34 -> 35: disruption=0.50 (perfect=0.03); stddev/expected=0.0223
-#35 -> 36: disruption=0.50 (perfect=0.03); stddev/expected=0.0220
-#36 -> 37: disruption=0.50 (perfect=0.03); stddev/expected=0.0237
-#37 -> 38: disruption=0.50 (perfect=0.03); stddev/expected=0.0237
-#38 -> 39: disruption=0.50 (perfect=0.03); stddev/expected=0.0251
-#39 -> 40: disruption=0.50 (perfect=0.03); stddev/expected=0.0212
-#40 -> 41: disruption=0.50 (perfect=0.02); stddev/expected=0.0267
-#41 -> 42: disruption=0.50 (perfect=0.02); stddev/expected=0.0242
-#42 -> 43: disruption=0.50 (perfect=0.02); stddev/expected=0.0222
-#43 -> 44: disruption=0.50 (perfect=0.02); stddev/expected=0.0244
-#44 -> 45: disruption=0.50 (perfect=0.02); stddev/expected=0.0231
-#45 -> 46: disruption=0.50 (perfect=0.02); stddev/expected=0.0299
-#46 -> 47: disruption=0.50 (perfect=0.02); stddev/expected=0.0263
-#47 -> 48: disruption=0.50 (perfect=0.02); stddev/expected=0.0307
-#48 -> 49: disruption=0.50 (perfect=0.02); stddev/expected=0.0253
-#49 -> 50: disruption=0.50 (perfect=0.02); stddev/expected=0.0228
-#50 -> 51: disruption=0.50 (perfect=0.02); stddev/expected=0.0273
-#51 -> 52: disruption=0.50 (perfect=0.02); stddev/expected=0.0243
-#52 -> 53: disruption=0.50 (perfect=0.02); stddev/expected=0.0268
-#53 -> 54: disruption=0.50 (perfect=0.02); stddev/expected=0.0251
-#54 -> 55: disruption=0.50 (perfect=0.02); stddev/expected=0.0297
-#55 -> 56: disruption=0.50 (perfect=0.02); stddev/expected=0.0287
-#56 -> 57: disruption=0.50 (perfect=0.02); stddev/expected=0.0299
-#57 -> 58: disruption=0.50 (perfect=0.02); stddev/expected=0.0272
-#58 -> 59: disruption=0.50 (perfect=0.02); stddev/expected=0.0295
-#59 -> 60: disruption=0.50 (perfect=0.02); stddev/expected=0.0312
-#60 -> 61: disruption=0.50 (perfect=0.02); stddev/expected=0.0361
-#61 -> 62: disruption=0.50 (perfect=0.02); stddev/expected=0.0308
-#62 -> 63: disruption=0.50 (perfect=0.02); stddev/expected=0.0283
-#63 -> 64: disruption=0.50 (perfect=0.02); stddev/expected=0.0325
-AT_CLEANUP
-
-AT_SETUP([hrw multipath link selection])
-AT_CHECK([[ovstest test-multipath 'eth_src,50,hrw,1,0,NXM_NX_REG0[]']],
-  [0], [ignore])
-# 1 ->  2: disruption=0.50 (perfect=0.50); stddev/expected=0.0000
-# 2 ->  3: disruption=0.33 (perfect=0.33); stddev/expected=0.0033
-# 3 ->  4: disruption=0.25 (perfect=0.25); stddev/expected=0.0076
-# 4 ->  5: disruption=0.20 (perfect=0.20); stddev/expected=0.0059
-# 5 ->  6: disruption=0.17 (perfect=0.17); stddev/expected=0.0030
-# 6 ->  7: disruption=0.14 (perfect=0.14); stddev/expected=0.0124
-# 7 ->  8: disruption=0.13 (perfect=0.12); stddev/expected=0.0072
-# 8 ->  9: disruption=0.11 (perfect=0.11); stddev/expected=0.0074
-# 9 -> 10: disruption=0.10 (perfect=0.10); stddev/expected=0.0161
-#10 -> 11: disruption=0.09 (perfect=0.09); stddev/expected=0.0055
-#11 -> 12: disruption=0.08 (perfect=0.08); stddev/expected=0.0092
-#12 -> 13: disruption=0.08 (perfect=0.08); stddev/expected=0.0134
-#13 -> 14: disruption=0.07 (perfect=0.07); stddev/expected=0.0124
-#14 -> 15: disruption=0.07 (perfect=0.07); stddev/expected=0.0156
-#15 -> 16: disruption=0.06 (perfect=0.06); stddev/expected=0.0182
-#16 -> 17: disruption=0.06 (perfect=0.06); stddev/expected=0.0150
-#17 -> 18: disruption=0.06 (perfect=0.06); stddev/expected=0.0109
-#18 -> 19: disruption=0.05 (perfect=0.05); stddev/expected=0.0162
-#19 -> 20: disruption=0.05 (perfect=0.05); stddev/expected=0.0149
-#20 -> 21: disruption=0.05 (perfect=0.05); stddev/expected=0.0148
-#21 -> 22: disruption=0.05 (perfect=0.05); stddev/expected=0.0230
-#22 -> 23: disruption=0.04 (perfect=0.04); stddev/expected=0.0208
-#23 -> 24: disruption=0.04 (perfect=0.04); stddev/expected=0.0210
-#24 -> 25: disruption=0.04 (perfect=0.04); stddev/expected=0.0228
-#25 -> 26: disruption=0.04 (perfect=0.04); stddev/expected=0.0155
-#26 -> 27: disruption=0.04 (perfect=0.04); stddev/expected=0.0208
-#27 -> 28: disruption=0.04 (perfect=0.04); stddev/expected=0.0218
-#28 -> 29: disruption=0.03 (perfect=0.03); stddev/expected=0.0193
-#29 -> 30: disruption=0.03 (perfect=0.03); stddev/expected=0.0169
-#30 -> 31: disruption=0.03 (perfect=0.03); stddev/expected=0.0163
-#31 -> 32: disruption=0.03 (perfect=0.03); stddev/expected=0.0192
-#32 -> 33: disruption=0.03 (perfect=0.03); stddev/expected=0.0212
-#33 -> 34: disruption=0.03 (perfect=0.03); stddev/expected=0.0240
-#34 -> 35: disruption=0.03 (perfect=0.03); stddev/expected=0.0227
-#35 -> 36: disruption=0.03 (perfect=0.03); stddev/expected=0.0230
-#36 -> 37: disruption=0.03 (perfect=0.03); stddev/expected=0.0183
-#37 -> 38: disruption=0.03 (perfect=0.03); stddev/expected=0.0227
-#38 -> 39: disruption=0.03 (perfect=0.03); stddev/expected=0.0255
-#39 -> 40: disruption=0.03 (perfect=0.03); stddev/expected=0.0247
-#40 -> 41: disruption=0.02 (perfect=0.02); stddev/expected=0.0228
-#41 -> 42: disruption=0.02 (perfect=0.02); stddev/expected=0.0247
-#42 -> 43: disruption=0.02 (perfect=0.02); stddev/expected=0.0265
-#43 -> 44: disruption=0.02 (perfect=0.02); stddev/expected=0.0250
-#44 -> 45: disruption=0.02 (perfect=0.02); stddev/expected=0.0258
-#45 -> 46: disruption=0.02 (perfect=0.02); stddev/expected=0.0196
-#46 -> 47: disruption=0.02 (perfect=0.02); stddev/expected=0.0235
-#47 -> 48: disruption=0.02 (perfect=0.02); stddev/expected=0.0314
-#48 -> 49: disruption=0.02 (perfect=0.02); stddev/expected=0.0293
-#49 -> 50: disruption=0.02 (perfect=0.02); stddev/expected=0.0241
-#50 -> 51: disruption=0.02 (perfect=0.02); stddev/expected=0.0291
-#51 -> 52: disruption=0.02 (perfect=0.02); stddev/expected=0.0304
-#52 -> 53: disruption=0.02 (perfect=0.02); stddev/expected=0.0307
-#53 -> 54: disruption=0.02 (perfect=0.02); stddev/expected=0.0250
-#54 -> 55: disruption=0.02 (perfect=0.02); stddev/expected=0.0290
-#55 -> 56: disruption=0.02 (perfect=0.02); stddev/expected=0.0284
-#56 -> 57: disruption=0.02 (perfect=0.02); stddev/expected=0.0272
-#57 -> 58: disruption=0.02 (perfect=0.02); stddev/expected=0.0272
-#58 -> 59: disruption=0.02 (perfect=0.02); stddev/expected=0.0304
-#59 -> 60: disruption=0.02 (perfect=0.02); stddev/expected=0.0345
-#60 -> 61: disruption=0.02 (perfect=0.02); stddev/expected=0.0251
-#61 -> 62: disruption=0.02 (perfect=0.02); stddev/expected=0.0249
-#62 -> 63: disruption=0.02 (perfect=0.02); stddev/expected=0.0285
-#63 -> 64: disruption=0.02 (perfect=0.02); stddev/expected=0.0285
-AT_CLEANUP
-
-AT_SETUP([iter_hash multipath link selection])
-AT_CHECK([[ovstest test-multipath 'eth_src,50,iter_hash,1,0,NXM_NX_REG0[]']],
-  [0], [ignore])
-# 1 ->  2: disruption=0.50 (perfect=0.50); stddev/expected=0.0000
-# 2 ->  3: disruption=0.42 (perfect=0.33); stddev/expected=0.0034
-# 3 ->  4: disruption=0.25 (perfect=0.25); stddev/expected=0.0082
-# 4 ->  5: disruption=0.42 (perfect=0.20); stddev/expected=0.0073
-# 5 ->  6: disruption=0.17 (perfect=0.17); stddev/expected=0.0040
-# 6 ->  7: disruption=0.14 (perfect=0.14); stddev/expected=0.0069
-# 7 ->  8: disruption=0.13 (perfect=0.12); stddev/expected=0.0131
-# 8 ->  9: disruption=0.45 (perfect=0.11); stddev/expected=0.0093
-# 9 -> 10: disruption=0.10 (perfect=0.10); stddev/expected=0.0127
-#10 -> 11: disruption=0.09 (perfect=0.09); stddev/expected=0.0134
-#11 -> 12: disruption=0.08 (perfect=0.08); stddev/expected=0.0101
-#12 -> 13: disruption=0.08 (perfect=0.08); stddev/expected=0.0127
-#13 -> 14: disruption=0.07 (perfect=0.07); stddev/expected=0.0115
-#14 -> 15: disruption=0.07 (perfect=0.07); stddev/expected=0.0100
-#15 -> 16: disruption=0.06 (perfect=0.06); stddev/expected=0.0111
-#16 -> 17: disruption=0.47 (perfect=0.06); stddev/expected=0.0137
-#17 -> 18: disruption=0.05 (perfect=0.06); stddev/expected=0.0204
-#18 -> 19: disruption=0.05 (perfect=0.05); stddev/expected=0.0082
-#19 -> 20: disruption=0.05 (perfect=0.05); stddev/expected=0.0124
-#20 -> 21: disruption=0.05 (perfect=0.05); stddev/expected=0.0203
-#21 -> 22: disruption=0.05 (perfect=0.05); stddev/expected=0.0196
-#22 -> 23: disruption=0.04 (perfect=0.04); stddev/expected=0.0183
-#23 -> 24: disruption=0.04 (perfect=0.04); stddev/expected=0.0212
-#24 -> 25: disruption=0.04 (perfect=0.04); stddev/expected=0.0176
-#25 -> 26: disruption=0.04 (perfect=0.04); stddev/expected=0.0173
-#26 -> 27: disruption=0.04 (perfect=0.04); stddev/expected=0.0159
-#27 -> 28: disruption=0.03 (perfect=0.04); stddev/expected=0.0168
-#28 -> 29: disruption=0.03 (perfect=0.03); stddev/expected=0.0190
-#29 -> 30: disruption=0.03 (perfect=0.03); stddev/expected=0.0305
-#30 -> 31: disruption=0.03 (perfect=0.03); stddev/expected=0.0282
-#31 -> 32: disruption=0.03 (perfect=0.03); stddev/expected=0.0255
-#32 -> 33: disruption=0.49 (perfect=0.03); stddev/expected=0.0220
-#33 -> 34: disruption=0.03 (perfect=0.03); stddev/expected=0.0188
-#34 -> 35: disruption=0.03 (perfect=0.03); stddev/expected=0.0203
-#35 -> 36: disruption=0.03 (perfect=0.03); stddev/expected=0.0207
-#36 -> 37: disruption=0.03 (perfect=0.03); stddev/expected=0.0261
-#37 -> 38: disruption=0.03 (perfect=0.03); stddev/expected=0.0226
-#38 -> 39: disruption=0.03 (perfect=0.03); stddev/expected=0.0233
-#39 -> 40: disruption=0.03 (perfect=0.03); stddev/expected=0.0161
-#40 -> 41: disruption=0.03 (perfect=0.02); stddev/expected=0.0303
-#41 -> 42: disruption=0.02 (perfect=0.02); stddev/expected=0.0249
-#42 -> 43: disruption=0.02 (perfect=0.02); stddev/expected=0.0262
-#43 -> 44: disruption=0.02 (perfect=0.02); stddev/expected=0.0260
-#44 -> 45: disruption=0.02 (perfect=0.02); stddev/expected=0.0266
-#45 -> 46: disruption=0.02 (perfect=0.02); stddev/expected=0.0287
-#46 -> 47: disruption=0.02 (perfect=0.02); stddev/expected=0.0213
-#47 -> 48: disruption=0.02 (perfect=0.02); stddev/expected=0.0301
-#48 -> 49: disruption=0.02 (perfect=0.02); stddev/expected=0.0230
-#49 -> 50: disruption=0.02 (perfect=0.02); stddev/expected=0.0248
-#50 -> 51: disruption=0.02 (perfect=0.02); stddev/expected=0.0203
-#51 -> 52: disruption=0.02 (perfect=0.02); stddev/expected=0.0235
-#52 -> 53: disruption=0.02 (perfect=0.02); stddev/expected=0.0340
-#53 -> 54: disruption=0.02 (perfect=0.02); stddev/expected=0.0264
-#54 -> 55: disruption=0.02 (perfect=0.02); stddev/expected=0.0292
-#55 -> 56: disruption=0.02 (perfect=0.02); stddev/expected=0.0246
-#56 -> 57: disruption=0.02 (perfect=0.02); stddev/expected=0.0270
-#57 -> 58: disruption=0.02 (perfect=0.02); stddev/expected=0.0299
-#58 -> 59: disruption=0.02 (perfect=0.02); stddev/expected=0.0307
-#59 -> 60: disruption=0.02 (perfect=0.02); stddev/expected=0.0275
-#60 -> 61: disruption=0.02 (perfect=0.02); stddev/expected=0.0289
-#61 -> 62: disruption=0.02 (perfect=0.02); stddev/expected=0.0292
-#62 -> 63: disruption=0.02 (perfect=0.02); stddev/expected=0.0292
-#63 -> 64: disruption=0.02 (perfect=0.02); stddev/expected=0.0307
-AT_CLEANUP
-
-AT_SETUP([multipath action missing argument])
-AT_CHECK([ovs-ofctl parse-flow actions=multipath], [1], [],
-  [ovs-ofctl: : not enough arguments to multipath action
-])
-AT_CLEANUP
-
-AT_SETUP([multipath action bad fields])
-AT_CHECK([ovs-ofctl parse-flow 'actions=multipath(xyzzy,50,modulo_n,1,0,NXM_NX_REG0[[]])'], [1], [],
-  [ovs-ofctl: xyzzy,50,modulo_n,1,0,NXM_NX_REG0[[]]: unknown fields `xyzzy'
-])
-AT_CLEANUP
-
-AT_SETUP([multipath action bad algorithm])
-AT_CHECK([ovs-ofctl parse-flow 'actions=multipath(eth_src,50,fubar,1,0,NXM_NX_REG0[[]])'], [1], [],
-  [ovs-ofctl: eth_src,50,fubar,1,0,NXM_NX_REG0[[]]: unknown algorithm `fubar'
-])
-AT_CLEANUP
-
-AT_SETUP([multipath action bad n_links])
-AT_CHECK([ovs-ofctl parse-flow 'actions=multipath(eth_src,50,modulo_n,0,0,NXM_NX_REG0[[]])'], [1], [],
-  [ovs-ofctl: eth_src,50,modulo_n,0,0,NXM_NX_REG0[[]]: n_links 0 is not in valid range 1 to 65536
-])
-AT_CLEANUP
-
-AT_SETUP([multipath action destination too narrow])
-AT_CHECK([ovs-ofctl parse-flow 'actions=multipath(eth_src,50,modulo_n,1024,0,NXM_NX_REG0[[0..7]])'], [1], [],
-  [ovs-ofctl: eth_src,50,modulo_n,1024,0,NXM_NX_REG0[[0..7]]: 8-bit destination field has 256 possible values, less than specified n_links 1024
-])
-AT_CLEANUP
-
-AT_SETUP([modulo_n multipath symmetric_l3 link selection])
-AT_CHECK([[ovstest test-multipath 'symmetric_l3,50,modulo_n,1,0,NXM_NX_REG0[]']],
-  [0], [ignore])
-# 1 ->  2: disruption=0.50 (perfect=0.50); stddev/expected=0.0000
-# 2 ->  3: disruption=0.66 (perfect=0.33); stddev/expected=0.0023
-# 3 ->  4: disruption=0.75 (perfect=0.25); stddev/expected=0.0061
-# 4 ->  5: disruption=0.80 (perfect=0.20); stddev/expected=0.0082
-# 5 ->  6: disruption=0.83 (perfect=0.17); stddev/expected=0.0083
-# 6 ->  7: disruption=0.86 (perfect=0.14); stddev/expected=0.0061
-# 7 ->  8: disruption=0.88 (perfect=0.12); stddev/expected=0.0103
-# 8 ->  9: disruption=0.89 (perfect=0.11); stddev/expected=0.0129
-# 9 -> 10: disruption=0.90 (perfect=0.10); stddev/expected=0.0091
-#10 -> 11: disruption=0.91 (perfect=0.09); stddev/expected=0.0114
-#11 -> 12: disruption=0.91 (perfect=0.08); stddev/expected=0.0073
-#12 -> 13: disruption=0.92 (perfect=0.08); stddev/expected=0.0165
-#13 -> 14: disruption=0.93 (perfect=0.07); stddev/expected=0.0149
-#14 -> 15: disruption=0.93 (perfect=0.07); stddev/expected=0.0127
-#15 -> 16: disruption=0.94 (perfect=0.06); stddev/expected=0.0142
-#16 -> 17: disruption=0.94 (perfect=0.06); stddev/expected=0.0098
-#17 -> 18: disruption=0.94 (perfect=0.06); stddev/expected=0.0159
-#18 -> 19: disruption=0.95 (perfect=0.05); stddev/expected=0.0121
-#19 -> 20: disruption=0.95 (perfect=0.05); stddev/expected=0.0195
-#20 -> 21: disruption=0.95 (perfect=0.05); stddev/expected=0.0120
-#21 -> 22: disruption=0.95 (perfect=0.05); stddev/expected=0.0181
-#22 -> 23: disruption=0.96 (perfect=0.04); stddev/expected=0.0222
-#23 -> 24: disruption=0.96 (perfect=0.04); stddev/expected=0.0164
-#24 -> 25: disruption=0.96 (perfect=0.04); stddev/expected=0.0146
-#25 -> 26: disruption=0.96 (perfect=0.04); stddev/expected=0.0175
-#26 -> 27: disruption=0.96 (perfect=0.04); stddev/expected=0.0231
-#27 -> 28: disruption=0.96 (perfect=0.04); stddev/expected=0.0172
-#28 -> 29: disruption=0.97 (perfect=0.03); stddev/expected=0.0211
-#29 -> 30: disruption=0.97 (perfect=0.03); stddev/expected=0.0213
-#30 -> 31: disruption=0.97 (perfect=0.03); stddev/expected=0.0253
-#31 -> 32: disruption=0.97 (perfect=0.03); stddev/expected=0.0208
-#32 -> 33: disruption=0.97 (perfect=0.03); stddev/expected=0.0223
-#33 -> 34: disruption=0.97 (perfect=0.03); stddev/expected=0.0215
-#34 -> 35: disruption=0.97 (perfect=0.03); stddev/expected=0.0201
-#35 -> 36: disruption=0.97 (perfect=0.03); stddev/expected=0.0220
-#36 -> 37: disruption=0.97 (perfect=0.03); stddev/expected=0.0221
-#37 -> 38: disruption=0.97 (perfect=0.03); stddev/expected=0.0201
-#38 -> 39: disruption=0.97 (perfect=0.03); stddev/expected=0.0215
-#39 -> 40: disruption=0.97 (perfect=0.03); stddev/expected=0.0271
-#40 -> 41: disruption=0.98 (perfect=0.02); stddev/expected=0.0272
-#41 -> 42: disruption=0.98 (perfect=0.02); stddev/expected=0.0208
-#42 -> 43: disruption=0.98 (perfect=0.02); stddev/expected=0.0226
-#43 -> 44: disruption=0.98 (perfect=0.02); stddev/expected=0.0264
-#44 -> 45: disruption=0.98 (perfect=0.02); stddev/expected=0.0233
-#45 -> 46: disruption=0.98 (perfect=0.02); stddev/expected=0.0285
-#46 -> 47: disruption=0.98 (perfect=0.02); stddev/expected=0.0246
-#47 -> 48: disruption=0.98 (perfect=0.02); stddev/expected=0.0282
-#48 -> 49: disruption=0.98 (perfect=0.02); stddev/expected=0.0233
-#49 -> 50: disruption=0.98 (perfect=0.02); stddev/expected=0.0197
-#50 -> 51: disruption=0.98 (perfect=0.02); stddev/expected=0.0317
-#51 -> 52: disruption=0.98 (perfect=0.02); stddev/expected=0.0283
-#52 -> 53: disruption=0.98 (perfect=0.02); stddev/expected=0.0282
-#53 -> 54: disruption=0.98 (perfect=0.02); stddev/expected=0.0273
-#54 -> 55: disruption=0.98 (perfect=0.02); stddev/expected=0.0283
-#55 -> 56: disruption=0.98 (perfect=0.02); stddev/expected=0.0288
-#56 -> 57: disruption=0.98 (perfect=0.02); stddev/expected=0.0263
-#57 -> 58: disruption=0.98 (perfect=0.02); stddev/expected=0.0339
-#58 -> 59: disruption=0.98 (perfect=0.02); stddev/expected=0.0262
-#59 -> 60: disruption=0.98 (perfect=0.02); stddev/expected=0.0309
-#60 -> 61: disruption=0.98 (perfect=0.02); stddev/expected=0.0285
-#61 -> 62: disruption=0.98 (perfect=0.02); stddev/expected=0.0288
-#62 -> 63: disruption=0.98 (perfect=0.02); stddev/expected=0.0298
-#63 -> 64: disruption=0.98 (perfect=0.02); stddev/expected=0.0277
-AT_CLEANUP
-
-AT_SETUP([hash_threshold multipath symmetric_l3 link selection])
-AT_CHECK([[ovstest test-multipath 'symmetric_l3,50,hash_threshold,1,0,NXM_NX_REG0[]']],
-  [0], [ignore])
-# 1 ->  2: disruption=0.50 (perfect=0.50); stddev/expected=0.0000
-# 2 ->  3: disruption=0.50 (perfect=0.33); stddev/expected=0.0056
-# 3 ->  4: disruption=0.50 (perfect=0.25); stddev/expected=0.0050
-# 4 ->  5: disruption=0.50 (perfect=0.20); stddev/expected=0.0074
-# 5 ->  6: disruption=0.50 (perfect=0.17); stddev/expected=0.0031
-# 6 ->  7: disruption=0.50 (perfect=0.14); stddev/expected=0.0078
-# 7 ->  8: disruption=0.50 (perfect=0.12); stddev/expected=0.0085
-# 8 ->  9: disruption=0.50 (perfect=0.11); stddev/expected=0.0093
-# 9 -> 10: disruption=0.50 (perfect=0.10); stddev/expected=0.0083
-#10 -> 11: disruption=0.51 (perfect=0.09); stddev/expected=0.0110
-#11 -> 12: disruption=0.50 (perfect=0.08); stddev/expected=0.0124
-#12 -> 13: disruption=0.50 (perfect=0.08); stddev/expected=0.0143
-#13 -> 14: disruption=0.50 (perfect=0.07); stddev/expected=0.0148
-#14 -> 15: disruption=0.50 (perfect=0.07); stddev/expected=0.0099
-#15 -> 16: disruption=0.50 (perfect=0.06); stddev/expected=0.0166
-#16 -> 17: disruption=0.50 (perfect=0.06); stddev/expected=0.0099
-#17 -> 18: disruption=0.50 (perfect=0.06); stddev/expected=0.0194
-#18 -> 19: disruption=0.50 (perfect=0.05); stddev/expected=0.0169
-#19 -> 20: disruption=0.50 (perfect=0.05); stddev/expected=0.0169
-#20 -> 21: disruption=0.50 (perfect=0.05); stddev/expected=0.0185
-#21 -> 22: disruption=0.50 (perfect=0.05); stddev/expected=0.0160
-#22 -> 23: disruption=0.50 (perfect=0.04); stddev/expected=0.0236
-#23 -> 24: disruption=0.50 (perfect=0.04); stddev/expected=0.0147
-#24 -> 25: disruption=0.50 (perfect=0.04); stddev/expected=0.0195
-#25 -> 26: disruption=0.50 (perfect=0.04); stddev/expected=0.0199
-#26 -> 27: disruption=0.50 (perfect=0.04); stddev/expected=0.0227
-#27 -> 28: disruption=0.50 (perfect=0.04); stddev/expected=0.0198
-#28 -> 29: disruption=0.50 (perfect=0.03); stddev/expected=0.0216
-#29 -> 30: disruption=0.50 (perfect=0.03); stddev/expected=0.0233
-#30 -> 31: disruption=0.50 (perfect=0.03); stddev/expected=0.0266
-#31 -> 32: disruption=0.51 (perfect=0.03); stddev/expected=0.0238
-#32 -> 33: disruption=0.50 (perfect=0.03); stddev/expected=0.0194
-#33 -> 34: disruption=0.50 (perfect=0.03); stddev/expected=0.0173
-#34 -> 35: disruption=0.50 (perfect=0.03); stddev/expected=0.0223
-#35 -> 36: disruption=0.50 (perfect=0.03); stddev/expected=0.0220
-#36 -> 37: disruption=0.50 (perfect=0.03); stddev/expected=0.0237
-#37 -> 38: disruption=0.50 (perfect=0.03); stddev/expected=0.0237
-#38 -> 39: disruption=0.50 (perfect=0.03); stddev/expected=0.0251
-#39 -> 40: disruption=0.50 (perfect=0.03); stddev/expected=0.0212
-#40 -> 41: disruption=0.50 (perfect=0.02); stddev/expected=0.0267
-#41 -> 42: disruption=0.50 (perfect=0.02); stddev/expected=0.0242
-#42 -> 43: disruption=0.50 (perfect=0.02); stddev/expected=0.0222
-#43 -> 44: disruption=0.50 (perfect=0.02); stddev/expected=0.0244
-#44 -> 45: disruption=0.50 (perfect=0.02); stddev/expected=0.0231
-#45 -> 46: disruption=0.50 (perfect=0.02); stddev/expected=0.0299
-#46 -> 47: disruption=0.50 (perfect=0.02); stddev/expected=0.0263
-#47 -> 48: disruption=0.50 (perfect=0.02); stddev/expected=0.0307
-#48 -> 49: disruption=0.50 (perfect=0.02); stddev/expected=0.0253
-#49 -> 50: disruption=0.50 (perfect=0.02); stddev/expected=0.0228
-#50 -> 51: disruption=0.50 (perfect=0.02); stddev/expected=0.0273
-#51 -> 52: disruption=0.50 (perfect=0.02); stddev/expected=0.0243
-#52 -> 53: disruption=0.50 (perfect=0.02); stddev/expected=0.0268
-#53 -> 54: disruption=0.50 (perfect=0.02); stddev/expected=0.0251
-#54 -> 55: disruption=0.50 (perfect=0.02); stddev/expected=0.0297
-#55 -> 56: disruption=0.50 (perfect=0.02); stddev/expected=0.0287
-#56 -> 57: disruption=0.50 (perfect=0.02); stddev/expected=0.0299
-#57 -> 58: disruption=0.50 (perfect=0.02); stddev/expected=0.0272
-#58 -> 59: disruption=0.50 (perfect=0.02); stddev/expected=0.0295
-#59 -> 60: disruption=0.50 (perfect=0.02); stddev/expected=0.0312
-#60 -> 61: disruption=0.50 (perfect=0.02); stddev/expected=0.0361
-#61 -> 62: disruption=0.50 (perfect=0.02); stddev/expected=0.0308
-#62 -> 63: disruption=0.50 (perfect=0.02); stddev/expected=0.0283
-#63 -> 64: disruption=0.50 (perfect=0.02); stddev/expected=0.0325
-AT_CLEANUP
-
-AT_SETUP([hrw multipath symmetric_l3 link selection])
-AT_CHECK([[ovstest test-multipath 'symmetric_l3,50,hrw,1,0,NXM_NX_REG0[]']],
-  [0], [ignore])
-# 1 ->  2: disruption=0.50 (perfect=0.50); stddev/expected=0.0000
-# 2 ->  3: disruption=0.33 (perfect=0.33); stddev/expected=0.0033
-# 3 ->  4: disruption=0.25 (perfect=0.25); stddev/expected=0.0076
-# 4 ->  5: disruption=0.20 (perfect=0.20); stddev/expected=0.0059
-# 5 ->  6: disruption=0.17 (perfect=0.17); stddev/expected=0.0030
-# 6 ->  7: disruption=0.14 (perfect=0.14); stddev/expected=0.0124
-# 7 ->  8: disruption=0.13 (perfect=0.12); stddev/expected=0.0072
-# 8 ->  9: disruption=0.11 (perfect=0.11); stddev/expected=0.0074
-# 9 -> 10: disruption=0.10 (perfect=0.10); stddev/expected=0.0161
-#10 -> 11: disruption=0.09 (perfect=0.09); stddev/expected=0.0055
-#11 -> 12: disruption=0.08 (perfect=0.08); stddev/expected=0.0092
-#12 -> 13: disruption=0.08 (perfect=0.08); stddev/expected=0.0134
-#13 -> 14: disruption=0.07 (perfect=0.07); stddev/expected=0.0124
-#14 -> 15: disruption=0.07 (perfect=0.07); stddev/expected=0.0156
-#15 -> 16: disruption=0.06 (perfect=0.06); stddev/expected=0.0182
-#16 -> 17: disruption=0.06 (perfect=0.06); stddev/expected=0.0150
-#17 -> 18: disruption=0.06 (perfect=0.06); stddev/expected=0.0109
-#18 -> 19: disruption=0.05 (perfect=0.05); stddev/expected=0.0162
-#19 -> 20: disruption=0.05 (perfect=0.05); stddev/expected=0.0149
-#20 -> 21: disruption=0.05 (perfect=0.05); stddev/expected=0.0148
-#21 -> 22: disruption=0.05 (perfect=0.05); stddev/expected=0.0230
-#22 -> 23: disruption=0.04 (perfect=0.04); stddev/expected=0.0208
-#23 -> 24: disruption=0.04 (perfect=0.04); stddev/expected=0.0210
-#24 -> 25: disruption=0.04 (perfect=0.04); stddev/expected=0.0228
-#25 -> 26: disruption=0.04 (perfect=0.04); stddev/expected=0.0155
-#26 -> 27: disruption=0.04 (perfect=0.04); stddev/expected=0.0208
-#27 -> 28: disruption=0.04 (perfect=0.04); stddev/expected=0.0218
-#28 -> 29: disruption=0.03 (perfect=0.03); stddev/expected=0.0193
-#29 -> 30: disruption=0.03 (perfect=0.03); stddev/expected=0.0169
-#30 -> 31: disruption=0.03 (perfect=0.03); stddev/expected=0.0163
-#31 -> 32: disruption=0.03 (perfect=0.03); stddev/expected=0.0192
-#32 -> 33: disruption=0.03 (perfect=0.03); stddev/expected=0.0212
-#33 -> 34: disruption=0.03 (perfect=0.03); stddev/expected=0.0240
-#34 -> 35: disruption=0.03 (perfect=0.03); stddev/expected=0.0227
-#35 -> 36: disruption=0.03 (perfect=0.03); stddev/expected=0.0230
-#36 -> 37: disruption=0.03 (perfect=0.03); stddev/expected=0.0183
-#37 -> 38: disruption=0.03 (perfect=0.03); stddev/expected=0.0227
-#38 -> 39: disruption=0.03 (perfect=0.03); stddev/expected=0.0255
-#39 -> 40: disruption=0.03 (perfect=0.03); stddev/expected=0.0247
-#40 -> 41: disruption=0.02 (perfect=0.02); stddev/expected=0.0228
-#41 -> 42: disruption=0.02 (perfect=0.02); stddev/expected=0.0247
-#42 -> 43: disruption=0.02 (perfect=0.02); stddev/expected=0.0265
-#43 -> 44: disruption=0.02 (perfect=0.02); stddev/expected=0.0250
-#44 -> 45: disruption=0.02 (perfect=0.02); stddev/expected=0.0258
-#45 -> 46: disruption=0.02 (perfect=0.02); stddev/expected=0.0196
-#46 -> 47: disruption=0.02 (perfect=0.02); stddev/expected=0.0235
-#47 -> 48: disruption=0.02 (perfect=0.02); stddev/expected=0.0314
-#48 -> 49: disruption=0.02 (perfect=0.02); stddev/expected=0.0293
-#49 -> 50: disruption=0.02 (perfect=0.02); stddev/expected=0.0241
-#50 -> 51: disruption=0.02 (perfect=0.02); stddev/expected=0.0291
-#51 -> 52: disruption=0.02 (perfect=0.02); stddev/expected=0.0304
-#52 -> 53: disruption=0.02 (perfect=0.02); stddev/expected=0.0307
-#53 -> 54: disruption=0.02 (perfect=0.02); stddev/expected=0.0250
-#54 -> 55: disruption=0.02 (perfect=0.02); stddev/expected=0.0290
-#55 -> 56: disruption=0.02 (perfect=0.02); stddev/expected=0.0284
-#56 -> 57: disruption=0.02 (perfect=0.02); stddev/expected=0.0272
-#57 -> 58: disruption=0.02 (perfect=0.02); stddev/expected=0.0272
-#58 -> 59: disruption=0.02 (perfect=0.02); stddev/expected=0.0304
-#59 -> 60: disruption=0.02 (perfect=0.02); stddev/expected=0.0345
-#60 -> 61: disruption=0.02 (perfect=0.02); stddev/expected=0.0251
-#61 -> 62: disruption=0.02 (perfect=0.02); stddev/expected=0.0249
-#62 -> 63: disruption=0.02 (perfect=0.02); stddev/expected=0.0285
-#63 -> 64: disruption=0.02 (perfect=0.02); stddev/expected=0.0285
-AT_CLEANUP
-
-AT_SETUP([iter_hash symmetric_l3 multipath link selection])
-AT_CHECK([[ovstest test-multipath 'symmetric_l3,50,iter_hash,1,0,NXM_NX_REG0[]']],
-  [0], [ignore])
-# 1 ->  2: disruption=0.50 (perfect=0.50); stddev/expected=0.0000
-# 2 ->  3: disruption=0.42 (perfect=0.33); stddev/expected=0.0034
-# 3 ->  4: disruption=0.25 (perfect=0.25); stddev/expected=0.0082
-# 4 ->  5: disruption=0.42 (perfect=0.20); stddev/expected=0.0073
-# 5 ->  6: disruption=0.17 (perfect=0.17); stddev/expected=0.0040
-# 6 ->  7: disruption=0.14 (perfect=0.14); stddev/expected=0.0069
-# 7 ->  8: disruption=0.13 (perfect=0.12); stddev/expected=0.0131
-# 8 ->  9: disruption=0.45 (perfect=0.11); stddev/expected=0.0093
-# 9 -> 10: disruption=0.10 (perfect=0.10); stddev/expected=0.0127
-#10 -> 11: disruption=0.09 (perfect=0.09); stddev/expected=0.0134
-#11 -> 12: disruption=0.08 (perfect=0.08); stddev/expected=0.0101
-#12 -> 13: disruption=0.08 (perfect=0.08); stddev/expected=0.0127
-#13 -> 14: disruption=0.07 (perfect=0.07); stddev/expected=0.0115
-#14 -> 15: disruption=0.07 (perfect=0.07); stddev/expected=0.0100
-#15 -> 16: disruption=0.06 (perfect=0.06); stddev/expected=0.0111
-#16 -> 17: disruption=0.47 (perfect=0.06); stddev/expected=0.0137
-#17 -> 18: disruption=0.05 (perfect=0.06); stddev/expected=0.0204
-#18 -> 19: disruption=0.05 (perfect=0.05); stddev/expected=0.0082
-#19 -> 20: disruption=0.05 (perfect=0.05); stddev/expected=0.0124
-#20 -> 21: disruption=0.05 (perfect=0.05); stddev/expected=0.0203
-#21 -> 22: disruption=0.05 (perfect=0.05); stddev/expected=0.0196
-#22 -> 23: disruption=0.04 (perfect=0.04); stddev/expected=0.0183
-#23 -> 24: disruption=0.04 (perfect=0.04); stddev/expected=0.0212
-#24 -> 25: disruption=0.04 (perfect=0.04); stddev/expected=0.0176
-#25 -> 26: disruption=0.04 (perfect=0.04); stddev/expected=0.0173
-#26 -> 27: disruption=0.04 (perfect=0.04); stddev/expected=0.0159
-#27 -> 28: disruption=0.03 (perfect=0.04); stddev/expected=0.0168
-#28 -> 29: disruption=0.03 (perfect=0.03); stddev/expected=0.0190
-#29 -> 30: disruption=0.03 (perfect=0.03); stddev/expected=0.0305
-#30 -> 31: disruption=0.03 (perfect=0.03); stddev/expected=0.0282
-#31 -> 32: disruption=0.03 (perfect=0.03); stddev/expected=0.0255
-#32 -> 33: disruption=0.49 (perfect=0.03); stddev/expected=0.0220
-#33 -> 34: disruption=0.03 (perfect=0.03); stddev/expected=0.0188
-#34 -> 35: disruption=0.03 (perfect=0.03); stddev/expected=0.0203
-#35 -> 36: disruption=0.03 (perfect=0.03); stddev/expected=0.0207
-#36 -> 37: disruption=0.03 (perfect=0.03); stddev/expected=0.0261
-#37 -> 38: disruption=0.03 (perfect=0.03); stddev/expected=0.0226
-#38 -> 39: disruption=0.03 (perfect=0.03); stddev/expected=0.0233
-#39 -> 40: disruption=0.03 (perfect=0.03); stddev/expected=0.0161
-#40 -> 41: disruption=0.03 (perfect=0.02); stddev/expected=0.0303
-#41 -> 42: disruption=0.02 (perfect=0.02); stddev/expected=0.0249
-#42 -> 43: disruption=0.02 (perfect=0.02); stddev/expected=0.0262
-#43 -> 44: disruption=0.02 (perfect=0.02); stddev/expected=0.0260
-#44 -> 45: disruption=0.02 (perfect=0.02); stddev/expected=0.0266
-#45 -> 46: disruption=0.02 (perfect=0.02); stddev/expected=0.0287
-#46 -> 47: disruption=0.02 (perfect=0.02); stddev/expected=0.0213
-#47 -> 48: disruption=0.02 (perfect=0.02); stddev/expected=0.0301
-#48 -> 49: disruption=0.02 (perfect=0.02); stddev/expected=0.0230
-#49 -> 50: disruption=0.02 (perfect=0.02); stddev/expected=0.0248
-#50 -> 51: disruption=0.02 (perfect=0.02); stddev/expected=0.0203
-#51 -> 52: disruption=0.02 (perfect=0.02); stddev/expected=0.0235
-#52 -> 53: disruption=0.02 (perfect=0.02); stddev/expected=0.0340
-#53 -> 54: disruption=0.02 (perfect=0.02); stddev/expected=0.0264
-#54 -> 55: disruption=0.02 (perfect=0.02); stddev/expected=0.0292
-#55 -> 56: disruption=0.02 (perfect=0.02); stddev/expected=0.0246
-#56 -> 57: disruption=0.02 (perfect=0.02); stddev/expected=0.0270
-#57 -> 58: disruption=0.02 (perfect=0.02); stddev/expected=0.0299
-#58 -> 59: disruption=0.02 (perfect=0.02); stddev/expected=0.0307
-#59 -> 60: disruption=0.02 (perfect=0.02); stddev/expected=0.0275
-#60 -> 61: disruption=0.02 (perfect=0.02); stddev/expected=0.0289
-#61 -> 62: disruption=0.02 (perfect=0.02); stddev/expected=0.0292
-#62 -> 63: disruption=0.02 (perfect=0.02); stddev/expected=0.0292
-#63 -> 64: disruption=0.02 (perfect=0.02); stddev/expected=0.0307
-AT_CLEANUP
diff --git a/tests/netdev-type.at b/tests/netdev-type.at
deleted file mode 100644
index c62a81f9c..000000000
--- a/tests/netdev-type.at
+++ /dev/null
@@ -1,24 +0,0 @@
-AT_BANNER([netdev-type])
-
-dnl Setting MAC address of netdev internal port fails
-AT_SETUP([bridge - set MAC address of internal port])
-OVS_VSWITCHD_START
-
-# Add an internal port and make sure that it shows up in the datapath.
-add_of_ports br0 1
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (dummy)
-])
-#
-# Set MAC address of dummy device and check that it has been set
-AT_CHECK([ovs-vsctl set Interface p1 type=internal mac=\"aa:55:c0:ff:ee:00\"])
-AT_CHECK([ovs-vsctl get Interface p1 mac_in_use], [0], [dnl
-"aa:55:c0:ff:ee:00"
-])
-
-OVS_APP_EXIT_AND_WAIT([ovs-vswitchd])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
diff --git a/tests/nsh.at b/tests/nsh.at
deleted file mode 100644
index 87f74c5f7..000000000
--- a/tests/nsh.at
+++ /dev/null
@@ -1,823 +0,0 @@
-AT_BANNER([network service header (NSH)])
-
-### -----------------------------------------------------------------
-###   Simple NSH matching test case
-### -----------------------------------------------------------------
-
-AT_SETUP([nsh - matching])
-
-OVS_VSWITCHD_START([dnl
-    set bridge br0 datapath_type=dummy \
-        protocols=OpenFlow10,OpenFlow13,OpenFlow14,OpenFlow15 -- \
-    add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
-    add-port br0 p2 -- set Interface p2 type=dummy ofport_request=2])
-
-AT_DATA([flows.txt], [dnl
-    table=0,in_port=1,dl_type=0x894f,nsh_ttl=63,nsh_mdtype=1,nsh_np=3,nsh_spi=0x123456,nsh_si=255,nsh_c1=0x11223344,actions=set_field:0x2->nsh_flags,set_field:254->nsh_si,set_field:0x44332211->nsh_c1,2
-])
-
-AT_CHECK([
-    ovs-ofctl del-flows br0
-    ovs-ofctl -Oopenflow13 add-flows br0 flows.txt
-    ovs-ofctl -Oopenflow13 dump-flows br0 | ofctl_strip | sort | grep actions
-], [0], [dnl
- in_port=1,dl_type=0x894f,nsh_ttl=63,nsh_mdtype=1,nsh_np=3,nsh_spi=0x123456,nsh_si=255,nsh_c1=0x11223344 actions=set_field:2->nsh_flags,set_field:254->nsh_si,set_field:0x44332211->nsh_c1,output:2
-])
-
-AT_CHECK([
-    ovs-appctl ofproto/trace br0 'in_port=1,dl_type=0x894f,nsh_ttl=63,nsh_mdtype=1,nsh_np=3,nsh_spi=0x123456,nsh_si=255,nsh_c1=0x11223344,nsh_c2=0x55667788,nsh_c3=0x99aabbcc,nsh_c4=0xddeeff00'
-], [0], [dnl
-Flow: in_port=1,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:00:00,dl_type=0x894f,nsh_flags=0,nsh_ttl=63,nsh_mdtype=1,nsh_np=3,nsh_spi=0x123456,nsh_si=255,nsh_c1=0x11223344,nsh_c2=0x55667788,nsh_c3=0x99aabbcc,nsh_c4=0xddeeff00,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0
-
-bridge("br0")
--------------
- 0. in_port=1,dl_type=0x894f,nsh_ttl=63,nsh_mdtype=1,nsh_np=3,nsh_spi=0x123456,nsh_si=255,nsh_c1=0x11223344, priority 32768
-    set_field:2->nsh_flags
-    set_field:254->nsh_si
-    set_field:0x44332211->nsh_c1
-    output:2
-
-Final flow: in_port=1,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:00:00,dl_type=0x894f,nsh_flags=2,nsh_ttl=63,nsh_mdtype=1,nsh_np=3,nsh_spi=0x123456,nsh_si=254,nsh_c1=0x44332211,nsh_c2=0x55667788,nsh_c3=0x99aabbcc,nsh_c4=0xddeeff00,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0
-Megaflow: recirc_id=0,eth,in_port=1,dl_type=0x894f,nsh_flags=0,nsh_ttl=63,nsh_mdtype=1,nsh_np=3,nsh_spi=0x123456,nsh_si=255,nsh_c1=0x11223344
-Datapath actions: set(nsh(flags=2,ttl=63,spi=0x123456,si=254,c1=0x44332211)),2
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-### -----------------------------------------------------------------
-###   NSH MD1 on Ethernet encapsulation over veth link
-### -----------------------------------------------------------------
-
-AT_SETUP([nsh - md1 encap over a veth link])
-
-OVS_VSWITCHD_START([])
-
-AT_CHECK([
-ovs-vsctl set bridge br0 datapath_type=dummy \
-            protocols=OpenFlow10,OpenFlow13,OpenFlow14,OpenFlow15 -- \
-        add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
-        add-port br0 p2 -- set Interface p2 type=dummy ofport_request=2 -- \
-        add-port br0 v3 -- set Interface v3 type=patch options:peer=v4 ofport_request=3 -- \
-        add-port br0 v4 -- set Interface v4 type=patch options:peer=v3 ofport_request=4])
-
-AT_DATA([flows.txt], [dnl
-    table=0,in_port=1,ip,actions=encap(nsh(md_type=1)),set_field:0x1234->nsh_spi,set_field:0x11223344->nsh_c1,encap(ethernet),set_field:11:22:33:44:55:66->dl_dst,3
-    table=0,in_port=4,dl_type=0x894f,nsh_mdtype=1,nsh_spi=0x1234,nsh_c1=0x11223344,actions=decap(),decap(),2
-])
-
-AT_CHECK([
-    ovs-ofctl del-flows br0
-    ovs-ofctl -Oopenflow13 add-flows br0 flows.txt
-    ovs-ofctl -Oopenflow13 dump-flows br0 | ofctl_strip | sort | grep actions
-], [0], [dnl
- in_port=4,dl_type=0x894f,nsh_mdtype=1,nsh_spi=0x1234,nsh_c1=0x11223344 actions=decap(),decap(),output:2
- ip,in_port=1 actions=encap(nsh(md_type=1)),set_field:0x1234->nsh_spi,set_field:0x11223344->nsh_c1,encap(ethernet),set_field:11:22:33:44:55:66->eth_dst,output:3
-])
-
-# TODO:
-# The fields nw_proto, nw_tos, nw_ecn, nw_ttl in final flow seem unnecessary. Can they be avoided?
-# The match on dl_dst=66:77:88:99:aa:bb in the Megaflow is a side effect of setting the dl_dst in the pushed outer
-# Ethernet header. It is a consequence of using wc->masks both for tracking matched and set bits and seems hard to
-# avoid except by using separate masks for both purposes.
-
-AT_CHECK([
-    ovs-appctl ofproto/trace br0 'in_port=1,icmp,dl_src=00:11:22:33:44:55,dl_dst=66:77:88:99:aa:bb,nw_dst=10.10.10.10,nw_src=20.20.20.20'
-], [0], [dnl
-Flow: icmp,in_port=1,vlan_tci=0x0000,dl_src=00:11:22:33:44:55,dl_dst=66:77:88:99:aa:bb,nw_src=20.20.20.20,nw_dst=10.10.10.10,nw_tos=0,nw_ecn=0,nw_ttl=0,icmp_type=0,icmp_code=0
-
-bridge("br0")
--------------
- 0. ip,in_port=1, priority 32768
-    encap(nsh(md_type=1))
-    set_field:0x1234->nsh_spi
-    set_field:0x11223344->nsh_c1
-    encap(ethernet)
-    set_field:11:22:33:44:55:66->eth_dst
-    output:3
-
-bridge("br0")
--------------
- 0. in_port=4,dl_type=0x894f,nsh_mdtype=1,nsh_spi=0x1234,nsh_c1=0x11223344, priority 32768
-    decap()
-    decap()
-
-Final flow: in_port=1,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=11:22:33:44:55:66,dl_type=0x894f,nsh_flags=0,nsh_ttl=63,nsh_mdtype=1,nsh_np=3,nsh_spi=0x1234,nsh_si=255,nsh_c1=0x11223344,nsh_c2=0x0,nsh_c3=0x0,nsh_c4=0x0,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0
-Megaflow: recirc_id=0,eth,ip,in_port=1,dl_dst=66:77:88:99:aa:bb,nw_frag=no
-Datapath actions: push_nsh(flags=0,ttl=63,mdtype=1,np=3,spi=0x1234,si=255,c1=0x11223344,c2=0x0,c3=0x0,c4=0x0),push_eth(src=00:00:00:00:00:00,dst=11:22:33:44:55:66),pop_eth,pop_nsh(),set(eth(dst=11:22:33:44:55:66)),recirc(0x1)
-])
-
-AT_CHECK([
-    ovs-appctl ofproto/trace br0 'in_port=4,dl_type=0x894f,nsh_mdtype=1,nsh_np=3,nsh_spi=0x1234,nsh_c1=0x11223344'
-], [0], [dnl
-Flow: in_port=4,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:00:00,dl_type=0x894f,nsh_flags=0,nsh_ttl=0,nsh_mdtype=1,nsh_np=3,nsh_spi=0x1234,nsh_si=0,nsh_c1=0x11223344,nsh_c2=0x0,nsh_c3=0x0,nsh_c4=0x0,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0
-
-bridge("br0")
--------------
- 0. in_port=4,dl_type=0x894f,nsh_mdtype=1,nsh_spi=0x1234,nsh_c1=0x11223344, priority 32768
-    decap()
-    decap()
-
-Final flow: unchanged
-Megaflow: recirc_id=0,eth,in_port=4,dl_type=0x894f,nsh_mdtype=1,nsh_np=3,nsh_spi=0x1234,nsh_c1=0x11223344
-Datapath actions: pop_eth,pop_nsh(),recirc(0x2)
-])
-
-# Now send two real ICMP echo request packets in on port p1
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive p1 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive p1 1e2ce92a669e3a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-# A packet count of 1 in the megaflow entries means the first packet was processed by
-# the ofproto slow path and the second successfully by the datapath flow entry.
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(dst=1e:2c:e9:2a:66:9e),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:98, used:0.0s, actions:push_nsh(flags=0,ttl=63,mdtype=1,np=3,spi=0x1234,si=255,c1=0x11223344,c2=0x0,c3=0x0,c4=0x0),push_eth(src=00:00:00:00:00:00,dst=11:22:33:44:55:66),pop_eth,pop_nsh(),set(eth(dst=11:22:33:44:55:66)),recirc(0x3)
-recirc_id(0x3),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:98, used:0.0s, actions:2
-])
-
-# Verify, that VLAN tagged packets can be encapsulated by NSH header.
-ovs-appctl time/warp 10000
-
-AT_DATA([flows.txt], [dnl
-    table=0,in_port=1,actions=push_vlan:0x8100,mod_vlan_vid:100,3
-    table=0,in_port=4,actions=encap(nsh),decap(),2
-])
-
-AT_CHECK([
-    ovs-ofctl del-flows br0
-    ovs-ofctl -Oopenflow13 add-flows br0 flows.txt
-    ovs-ofctl -Oopenflow13 dump-flows br0 | ofctl_strip | sort | grep actions
-], [0], [dnl
- in_port=1 actions=push_vlan:0x8100,set_field:4196->vlan_vid,output:3
- in_port=4 actions=encap(nsh),decap(),output:2
-])
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive p1 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive p1 1e2ce92a669e3a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:98, used:0.0s, actions:push_vlan(vid=100,pcp=0),push_nsh(flags=0,ttl=63,mdtype=1,np=3,spi=0x0,si=255,c1=0x0,c2=0x0,c3=0x0,c4=0x0),pop_nsh(),recirc(0x4)
-recirc_id(0x4),in_port(1),packet_type(ns=0,id=0),eth_type(0x8100),vlan(vid=100,pcp=0),encap(eth_type(0x0800),ipv4(frag=no)), packets:1, bytes:102, used:0.0s, actions:2
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-### -----------------------------------------------------------------
-###   NSH MD2 on Ethernet encapsulation over veth link
-### -----------------------------------------------------------------
-
-AT_SETUP([nsh - md2 encap over a veth link])
-
-OVS_VSWITCHD_START([])
-
-AT_CHECK([
-ovs-vsctl set bridge br0 datapath_type=dummy \
-            protocols=OpenFlow10,OpenFlow13,OpenFlow14,OpenFlow15 -- \
-        add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
-        add-port br0 p2 -- set Interface p2 type=dummy ofport_request=2 -- \
-        add-port br0 v3 -- set Interface v3 type=patch options:peer=v4 ofport_request=3 -- \
-        add-port br0 v4 -- set Interface v4 type=patch options:peer=v3 ofport_request=4])
-
-AT_DATA([flows.txt], [dnl
-    table=0,in_port=1,ip,actions=encap(nsh(md_type=2,tlv(0x1000,10,0x12345678),tlv(0x2000,20,0xfedcba9876543210))),set_field:0x1234->nsh_spi,encap(ethernet),set_field:11:22:33:44:55:66->dl_dst,3
-    table=0,in_port=4,dl_type=0x894f,nsh_mdtype=2,nsh_spi=0x1234,actions=decap(),decap(),2
-])
-
-AT_CHECK([
-    ovs-ofctl del-flows br0
-    ovs-ofctl -Oopenflow13 add-flows br0 flows.txt
-    ovs-ofctl -Oopenflow13 dump-flows br0 | ofctl_strip | sort | grep actions
-], [0], [dnl
- in_port=4,dl_type=0x894f,nsh_mdtype=2,nsh_spi=0x1234 actions=decap(),decap(),output:2
- ip,in_port=1 actions=encap(nsh(md_type=2,tlv(0x1000,10,0x12345678),tlv(0x2000,20,0xfedcba9876543210))),set_field:0x1234->nsh_spi,encap(ethernet),set_field:11:22:33:44:55:66->eth_dst,output:3
-])
-
-AT_CHECK([
-    ovs-appctl ofproto/trace br0 'in_port=1,icmp,dl_src=00:11:22:33:44:55,dl_dst=66:77:88:99:aa:bb,nw_dst=10.10.10.10,nw_src=20.20.20.20'
-], [0], [dnl
-Flow: icmp,in_port=1,vlan_tci=0x0000,dl_src=00:11:22:33:44:55,dl_dst=66:77:88:99:aa:bb,nw_src=20.20.20.20,nw_dst=10.10.10.10,nw_tos=0,nw_ecn=0,nw_ttl=0,icmp_type=0,icmp_code=0
-
-bridge("br0")
--------------
- 0. ip,in_port=1, priority 32768
-    encap(nsh(md_type=2,tlv(0x1000,10,0x12345678),tlv(0x2000,20,0xfedcba9876543210)))
-    set_field:0x1234->nsh_spi
-    encap(ethernet)
-    set_field:11:22:33:44:55:66->eth_dst
-    output:3
-
-bridge("br0")
--------------
- 0. in_port=4,dl_type=0x894f,nsh_mdtype=2,nsh_spi=0x1234, priority 32768
-    decap()
-    decap()
-
-Final flow: in_port=1,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=11:22:33:44:55:66,dl_type=0x894f,nsh_flags=0,nsh_ttl=63,nsh_mdtype=2,nsh_np=3,nsh_spi=0x1234,nsh_si=255,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0
-Megaflow: recirc_id=0,eth,ip,in_port=1,dl_dst=66:77:88:99:aa:bb,nw_frag=no
-Datapath actions: push_nsh(flags=0,ttl=63,mdtype=2,np=3,spi=0x1234,si=255,md2=0x10000a041234567820001408fedcba9876543210),push_eth(src=00:00:00:00:00:00,dst=11:22:33:44:55:66),pop_eth,pop_nsh(),set(eth(dst=11:22:33:44:55:66)),recirc(0x1)
-])
-
-AT_CHECK([
-    ovs-appctl ofproto/trace br0 'in_port=4,dl_type=0x894f,nsh_mdtype=2,nsh_np=3,nsh_spi=0x1234'
-], [0], [dnl
-Flow: in_port=4,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:00:00,dl_type=0x894f,nsh_flags=0,nsh_ttl=0,nsh_mdtype=2,nsh_np=3,nsh_spi=0x1234,nsh_si=0,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0
-
-bridge("br0")
--------------
- 0. in_port=4,dl_type=0x894f,nsh_mdtype=2,nsh_spi=0x1234, priority 32768
-    decap()
-    decap()
-
-Final flow: unchanged
-Megaflow: recirc_id=0,eth,in_port=4,dl_type=0x894f,nsh_mdtype=2,nsh_np=3,nsh_spi=0x1234
-Datapath actions: pop_eth,pop_nsh(),recirc(0x2)
-])
-
-# Now send two real ICMP echo request packets in on port p1
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive p1 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive p1 1e2ce92a669e3a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-# A packet count of 1 in the megaflow entries means the first packet was processed by
-# the ofproto slow path and the second successfully by the datapath flow entry.
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(dst=1e:2c:e9:2a:66:9e),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:98, used:0.0s, actions:push_nsh(flags=0,ttl=63,mdtype=2,np=3,spi=0x1234,si=255,md2=0x10000a041234567820001408fedcba9876543210),push_eth(src=00:00:00:00:00:00,dst=11:22:33:44:55:66),pop_eth,pop_nsh(),set(eth(dst=11:22:33:44:55:66)),recirc(0x3)
-recirc_id(0x3),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:98, used:0.0s, actions:2
-])
-
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-### -----------------------------------------------------------------
-###   Double NSH MD1 encapsulation using groups over veth link
-### -----------------------------------------------------------------
-
-AT_SETUP([nsh - double encap over veth link using groups])
-
-OVS_VSWITCHD_START([])
-
-AT_CHECK([
-ovs-vsctl set bridge br0 datapath_type=dummy \
-            protocols=OpenFlow10,OpenFlow13,OpenFlow14,OpenFlow15 -- \
-        add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
-        add-port br0 p2 -- set Interface p2 type=dummy ofport_request=2 -- \
-        add-port br0 v3 -- set Interface v3 type=patch options:peer=v4 ofport_request=3 -- \
-        add-port br0 v4 -- set Interface v4 type=patch options:peer=v3 ofport_request=4])
-
-AT_DATA([flows.txt], [dnl
-    table=0,in_port=1,ip,actions=group:100
-    table=0,in_port=4,packet_type=(0,0),dl_type=0x894f,nsh_mdtype=1,nsh_spi=0x5678,nsh_c1=0x55667788,actions=decap(),goto_table:1
-    table=1,packet_type=(1,0x894f),nsh_mdtype=1,nsh_spi=0x5678,nsh_c1=0x55667788,actions=decap(),goto_table:2
-    table=2,packet_type=(1,0x894f),nsh_mdtype=1,nsh_spi=0x1234,nsh_c1=0x11223344,actions=decap(),output:2
-])
-
-AT_DATA([groups.txt], [dnl
-    add group_id=100,type=indirect,bucket=actions=encap(nsh(md_type=1)),set_field:0x1234->nsh_spi,set_field:0x11223344->nsh_c1,group:200
-    add group_id=200,type=indirect,bucket=actions=encap(nsh(md_type=1)),set_field:0x5678->nsh_spi,set_field:0x55667788->nsh_c1,group:300
-    add group_id=300,type=indirect,bucket=actions=encap(ethernet),set_field:11:22:33:44:55:66->dl_dst,3
-])
-
-AT_CHECK([
-    ovs-ofctl del-flows br0
-    ovs-ofctl -Oopenflow13 add-groups br0 groups.txt
-    ovs-ofctl -Oopenflow13 add-flows br0 flows.txt
-    ovs-ofctl -Oopenflow13 dump-flows br0 | ofctl_strip | sort | grep actions
-], [0], [dnl
- in_port=4,dl_type=0x894f,nsh_mdtype=1,nsh_spi=0x5678,nsh_c1=0x55667788 actions=decap(),goto_table:1
- ip,in_port=1 actions=group:100
- table=1, packet_type=(1,0x894f),nsh_mdtype=1,nsh_spi=0x5678,nsh_c1=0x55667788 actions=decap(),goto_table:2
- table=2, packet_type=(1,0x894f),nsh_mdtype=1,nsh_spi=0x1234,nsh_c1=0x11223344 actions=decap(),output:2
-])
-
-# TODO:
-# The fields nw_proto, nw_tos, nw_ecn, nw_ttl in final flow seem unnecessary. Can they be avoided?
-# The match on dl_dst=66:77:88:99:aa:bb in the Megaflow is a side effect of setting the dl_dst in the pushed outer
-# Ethernet header. It is a consequence of using wc->masks both for tracking matched and set bits and seems hard to
-# avoid except by using separate masks for both purposes.
-
-AT_CHECK([
-    ovs-appctl ofproto/trace br0 'in_port=1,icmp,dl_src=00:11:22:33:44:55,dl_dst=66:77:88:99:aa:bb,nw_dst=10.10.10.10,nw_src=20.20.20.20'
-], [0], [dnl
-Flow: icmp,in_port=1,vlan_tci=0x0000,dl_src=00:11:22:33:44:55,dl_dst=66:77:88:99:aa:bb,nw_src=20.20.20.20,nw_dst=10.10.10.10,nw_tos=0,nw_ecn=0,nw_ttl=0,icmp_type=0,icmp_code=0
-
-bridge("br0")
--------------
- 0. ip,in_port=1, priority 32768
-    group:100
-    bucket 0
-            encap(nsh(md_type=1))
-            set_field:0x1234->nsh_spi
-            set_field:0x11223344->nsh_c1
-            group:200
-            bucket 0
-                    encap(nsh(md_type=1))
-                    set_field:0x5678->nsh_spi
-                    set_field:0x55667788->nsh_c1
-                    group:300
-                    bucket 0
-                            encap(ethernet)
-                            set_field:11:22:33:44:55:66->eth_dst
-                            output:3
-
-                        bridge("br0")
-                        -------------
-                         0. in_port=4,dl_type=0x894f,nsh_mdtype=1,nsh_spi=0x5678,nsh_c1=0x55667788, priority 32768
-                            decap()
-                            goto_table:1
-                         1. packet_type=(1,0x894f),nsh_mdtype=1,nsh_spi=0x5678,nsh_c1=0x55667788, priority 32768
-                            decap()
-
-Final flow: unchanged
-Megaflow: recirc_id=0,eth,ip,in_port=1,dl_dst=66:77:88:99:aa:bb,nw_frag=no
-Datapath actions: push_nsh(flags=0,ttl=63,mdtype=1,np=3,spi=0x1234,si=255,c1=0x11223344,c2=0x0,c3=0x0,c4=0x0),push_nsh(flags=0,ttl=63,mdtype=1,np=4,spi=0x5678,si=255,c1=0x55667788,c2=0x0,c3=0x0,c4=0x0),push_eth(src=00:00:00:00:00:00,dst=11:22:33:44:55:66),pop_eth,pop_nsh(),recirc(0x1)
-])
-
-AT_CHECK([
-    ovs-appctl ofproto/trace br0 'recirc_id=1,in_port=4,packet_type=(1,0x894f),nsh_mdtype=1,nsh_np=3,nsh_spi=0x1234,nsh_c1=0x11223344'
-], [0], [dnl
-Flow: recirc_id=0x1,packet_type=(1,0x894f),in_port=4
-
-bridge("br0")
--------------
-    thaw
-            Resuming from table 0
-        Restoring actions: goto_table:2
-    goto_table:2
- 2. packet_type=(1,0x894f),nsh_mdtype=1,nsh_spi=0x1234,nsh_c1=0x11223344, priority 32768
-    decap()
-
-Final flow: recirc_id=0x1,eth,in_port=4,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:00:00,dl_type=0x0000
-Megaflow: recirc_id=0x1,packet_type=(1,0x894f),in_port=4,dl_type=0x894f,nsh_mdtype=1,nsh_np=3,nsh_spi=0x1234,nsh_c1=0x11223344
-Datapath actions: pop_nsh(),recirc(0x2)
-])
-
-AT_CHECK([
-    ovs-appctl ofproto/trace br0 'recirc_id=2,in_port=4,ip'
-], [0], [dnl
-Flow: recirc_id=0x2,eth,ip,in_port=4,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:00:00,nw_src=0.0.0.0,nw_dst=0.0.0.0,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0
-
-bridge("br0")
--------------
-    thaw
-            Resuming from table 0
-        Restoring actions: unroll_xlate(table=2, cookie=0),output:2
-    unroll_xlate(table=2, cookie=0)
-    restored state: table=2, cookie=0
-    output:2
-
-Final flow: unchanged
-Megaflow: recirc_id=0x2,eth,ip,in_port=4,nw_frag=no
-Datapath actions: 2
-])
-
-# Now send two real ICMP echo request packets in on port p1
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive p1 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive p1 1e2ce92a669e3a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-# A packet count of 1 in the megaflow entries means the first packet was processed by
-# the ofproto slow path and the second successfully by the datapath flow entry.
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(dst=1e:2c:e9:2a:66:9e),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:98, used:0.0s, actions:push_nsh(flags=0,ttl=63,mdtype=1,np=3,spi=0x1234,si=255,c1=0x11223344,c2=0x0,c3=0x0,c4=0x0),push_nsh(flags=0,ttl=63,mdtype=1,np=4,spi=0x5678,si=255,c1=0x55667788,c2=0x0,c3=0x0,c4=0x0),push_eth(src=00:00:00:00:00:00,dst=11:22:33:44:55:66),pop_eth,pop_nsh(),recirc(0x3)
-recirc_id(0x3),in_port(1),packet_type(ns=1,id=0x894f),eth_type(0x894f),nsh(mdtype=1,np=3,spi=0x1234,c1=0x11223344), packets:1, bytes:122, used:0.0s, actions:pop_nsh(),recirc(0x4)
-recirc_id(0x4),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:98, used:0.0s, actions:2
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-### -----------------------------------------------------------------
-###   Triangle bridge setup with VXLAN-GPE tunnels
-### -----------------------------------------------------------------
-
-########################
-# VxLAN-gpe + NSH tunneling test setup for PTAP bridge
-#
-#     192.168.10.10           192.168.10.20             192.168.10.30
-#          n1                       n2                        n3
-#          |ovs-n1                  |ovs-n2                   |ovs-n3
-#   +------o------+          +------o------+           +------o------+
-#   |    br-in1   |          |    br-in2   |           |    br-in3   |
-#   |    (PTAP)   |          |    (PTAP)   |           |    (PTAP)   |
-#   +------o------+          +------o------+           +------o------+
-#      vxlan-gpe                vxlan-gpe                 vxlan-gpe
-#   10.0.0.1                (10.0.0.2)                (10.0.0.3)
-#  (20.0.0.1)                20.0.0.2                 (20.0.0.3)
-#  (30.0.0.1) LOCAL         (30.0.0.2) LOCAL           30.0.0.3  LOCAL
-#   +-----------o-+          +-----------o-+           +-----------o-+
-#   |    br-p1    |          |    br-p2    |           |    br-p3    |
-#   +------o------+          +------o------+           +------o------+
-#     p1-0 |                        | p2-0                    | p3-0
-#     p0-1 |                        | p0-2                    | p0-3
-#       +--o------------------------o-------------------------o--+
-#       |                          br0                           |
-#       +--------------------------------------------------------+
-#
-#   VxLAN-gpe tunnel ports:
-#
-#   No     Bridge    Name             Packet-type Remote bridge & ports
-#   -----------------------------------------------------------------------
-#   1020   br-in1    vxlangpe12       ptap        br-in2 2010 (ptap)
-#   1030   br-in1    vxlangpe13       ptap        br-in3 3010 (ptap)
-#   2010   br-in2    vxlangpe21       ptap        br-in1 1020 (ptap)
-#   2030   br-in2    vxlangpe13       ptap        br-in3 3020 (ptap)
-#   3010   br-in1    vxlangpe31       ptap        br-in1 1030 (ptap)
-#   3020   br-in1    vxlangpe32       ptap        br-in2 2010 (ptap)
-
-AT_SETUP([nsh - triangle PTAP bridge setup with NSH over vxlan-gpe])
-
-OVS_VSWITCHD_START([])
-
-HWADDR_BRP1=aa:55:00:00:00:01
-HWADDR_BRP2=aa:55:00:00:00:02
-HWADDR_BRP3=aa:55:00:00:00:03
-
-# Setup bridge infrastructure
-AT_CHECK([
-    ovs-vsctl add-br br-in1 -- \
-        set bridge br-in1 datapath_type=dummy fail-mode=standalone
-    ovs-vsctl add-br br-in2 -- \
-        set bridge br-in2 datapath_type=dummy fail-mode=standalone
-    ovs-vsctl add-br br-in3 -- \
-        set bridge br-in3 datapath_type=dummy fail-mode=standalone
-    ovs-vsctl add-br br-p1 -- \
-        set bridge br-p1 datapath_type=dummy fail-mode=standalone other-config:hwaddr=$HWADDR_BRP1
-    ovs-vsctl add-br br-p2 -- \
-        set bridge br-p2 datapath_type=dummy fail-mode=standalone other-config:hwaddr=$HWADDR_BRP2
-    ovs-vsctl add-br br-p3 -- \
-        set bridge br-p3 datapath_type=dummy fail-mode=standalone other-config:hwaddr=$HWADDR_BRP3
-
-    ovs-vsctl add-port br-p1 p1-0 -- set interface p1-0 type=patch options:peer=p0-1 ofport_request=2
-    ovs-vsctl add-port br-p2 p2-0 -- set interface p2-0 type=patch options:peer=p0-2 ofport_request=2
-    ovs-vsctl add-port br-p3 p3-0 -- set interface p3-0 type=patch options:peer=p0-3 ofport_request=2
-    ovs-vsctl add-port br0 p0-1 -- set interface p0-1 type=patch options:peer=p1-0 ofport_request=10
-    ovs-vsctl add-port br0 p0-2 -- set interface p0-2 type=patch options:peer=p2-0 ofport_request=20
-    ovs-vsctl add-port br0 p0-3 -- set interface p0-3 type=patch options:peer=p3-0 ofport_request=30
-
-    # Populate the MAC table of br0
-    ovs-ofctl del-flows br0
-    ovs-ofctl add-flow br0 dl_dst=$HWADDR_BRP1,actions=10
-    ovs-ofctl add-flow br0 dl_dst=$HWADDR_BRP2,actions=20
-    ovs-ofctl add-flow br0 dl_dst=$HWADDR_BRP3,actions=30
-
-    ovs-ofctl del-flows br-in1
-    ovs-ofctl del-flows br-in2
-    ovs-ofctl del-flows br-in3
-    ovs-ofctl del-flows br-p1
-    ovs-ofctl del-flows br-p2
-    ovs-ofctl del-flows br-p3
-], [0])
-
-### Setup vxlan-gpe tunnels
-AT_CHECK([
-    ovs-vsctl add-port br-in1 vxlangpe12 -- \
-        set interface vxlangpe12 type=vxlan options:exts=gpe options:remote_ip=10.0.0.2 options:packet_type=ptap ofport_request=1020
-    ovs-vsctl add-port br-in1 vxlangpe13 -- \
-        set interface vxlangpe13 type=vxlan options:exts=gpe options:remote_ip=10.0.0.3 options:packet_type=ptap ofport_request=1030
-
-    ovs-vsctl add-port br-in2 vxlangpe21 -- \
-        set interface vxlangpe21 type=vxlan options:exts=gpe options:remote_ip=20.0.0.1 options:packet_type=ptap ofport_request=2010
-    ovs-vsctl add-port br-in2 vxlangpe23 -- \
-        set interface vxlangpe23 type=vxlan options:exts=gpe options:remote_ip=20.0.0.3 options:packet_type=ptap ofport_request=2030
-
-    ovs-vsctl add-port br-in3 vxlangpe31 -- \
-        set interface vxlangpe31 type=vxlan options:exts=gpe options:remote_ip=30.0.0.1 options:packet_type=ptap ofport_request=3010
-    ovs-vsctl add-port br-in3 vxlangpe32 -- \
-        set interface vxlangpe32 type=vxlan options:exts=gpe options:remote_ip=30.0.0.2 options:packet_type=ptap ofport_request=3020
-
-    ovs-appctl netdev-dummy/ip4addr br-p1 10.0.0.1/24
-    ovs-appctl ovs/route/add 10.0.0.0/24 br-p1
-    ovs-appctl tnl/arp/set br-p1 10.0.0.1 $HWADDR_BRP1
-    ovs-appctl tnl/arp/set br-p1 10.0.0.2 $HWADDR_BRP2
-    ovs-appctl tnl/arp/set br-p1 10.0.0.3 $HWADDR_BRP3
-
-    ovs-appctl netdev-dummy/ip4addr br-p2 20.0.0.2/24
-    ovs-appctl ovs/route/add 20.0.0.0/24 br-p2
-    ovs-appctl tnl/arp/set br-p2 20.0.0.1 $HWADDR_BRP1
-    ovs-appctl tnl/arp/set br-p2 20.0.0.2 $HWADDR_BRP2
-    ovs-appctl tnl/arp/set br-p2 20.0.0.3 $HWADDR_BRP3
-
-    ovs-appctl netdev-dummy/ip4addr br-p3 30.0.0.3/24
-    ovs-appctl ovs/route/add 30.0.0.0/24 br-p3
-    ovs-appctl tnl/arp/set br-p3 30.0.0.1 $HWADDR_BRP1
-    ovs-appctl tnl/arp/set br-p3 30.0.0.2 $HWADDR_BRP2
-    ovs-appctl tnl/arp/set br-p3 30.0.0.3 $HWADDR_BRP3
-], [0], [stdout])
-
-AT_CHECK([
-    ovs-appctl ovs/route/add 10.0.0.0/24 br-p1
-    ovs-appctl tnl/arp/set br-p1 10.0.0.1 $HWADDR_BRP1
-    ovs-appctl tnl/arp/set br-p1 10.0.0.2 $HWADDR_BRP2
-    ovs-appctl tnl/arp/set br-p1 10.0.0.3 $HWADDR_BRP3
-], [0], [stdout])
-
-AT_CHECK([
-    ovs-appctl ovs/route/add 20.0.0.0/24 br-p2
-    ovs-appctl tnl/arp/set br-p2 20.0.0.1 $HWADDR_BRP1
-    ovs-appctl tnl/arp/set br-p2 20.0.0.2 $HWADDR_BRP2
-    ovs-appctl tnl/arp/set br-p2 20.0.0.3 $HWADDR_BRP3
-], [0], [stdout])
-
-AT_CHECK([
-    ovs-appctl ovs/route/add 30.0.0.0/24 br-p3
-    ovs-appctl tnl/arp/set br-p3 30.0.0.1 $HWADDR_BRP1
-    ovs-appctl tnl/arp/set br-p3 30.0.0.2 $HWADDR_BRP2
-    ovs-appctl tnl/arp/set br-p3 30.0.0.3 $HWADDR_BRP3
-], [0], [stdout])
-
-AT_CHECK([
-    ovs-appctl ovs/route/show | grep User:
-], [0], [dnl
-User: 10.0.0.0/24 dev br-p1 SRC 10.0.0.1
-User: 20.0.0.0/24 dev br-p2 SRC 20.0.0.2
-User: 30.0.0.0/24 dev br-p3 SRC 30.0.0.3
-])
-
-AT_CHECK([
-    ovs-appctl tnl/neigh/show | grep br-p | sort
-], [0], [stdout])
-
-
-### Flows in br-p<x>to twist TEP IP addresses in tunnel IP headers
-AT_CHECK([
-    ovs-ofctl add-flow br-p1 in_port:LOCAL,actions=2
-    ovs-ofctl add-flow br-p1 in_port:2,ip,nw_dst:20.0.0.1,actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.2,LOCAL
-    ovs-ofctl add-flow br-p1 in_port:2,ip,nw_dst:30.0.0.1,actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.3,LOCAL
-
-    ovs-ofctl add-flow br-p2 in_port:LOCAL,actions=2
-    ovs-ofctl add-flow br-p2 in_port:2,ip,nw_dst:10.0.0.2,actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.1,LOCAL
-    ovs-ofctl add-flow br-p2 in_port:2,ip,nw_dst:30.0.0.2,actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.3,LOCAL
-
-    ovs-ofctl add-flow br-p3 in_port:LOCAL,actions=2
-    ovs-ofctl add-flow br-p3 in_port:2,ip,nw_dst:10.0.0.3,actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.1,LOCAL
-    ovs-ofctl add-flow br-p3 in_port:2,ip,nw_dst:20.0.0.3,actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.2,LOCAL
-], [0])
-
-AT_CHECK([
-    ovs-ofctl dump-flows br-p1 | ofctl_strip | sort | grep actions
-    ovs-ofctl dump-flows br-p2 | ofctl_strip | sort | grep actions
-    ovs-ofctl dump-flows br-p3 | ofctl_strip | sort | grep actions
-], [0], [dnl
- in_port=LOCAL actions=output:2
- ip,in_port=2,nw_dst=20.0.0.1 actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.2,LOCAL
- ip,in_port=2,nw_dst=30.0.0.1 actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.3,LOCAL
- in_port=LOCAL actions=output:2
- ip,in_port=2,nw_dst=10.0.0.2 actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.1,LOCAL
- ip,in_port=2,nw_dst=30.0.0.2 actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.3,LOCAL
- in_port=LOCAL actions=output:2
- ip,in_port=2,nw_dst=10.0.0.3 actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.1,LOCAL
- ip,in_port=2,nw_dst=20.0.0.3 actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.2,LOCAL
-])
-
-### Setup test ports for traffic injection
-N1_IP=192.168.10.10
-N2_IP=192.168.10.20
-N3_IP=192.168.10.30
-N1_MAC=aa:55:aa:55:00:01
-N2_MAC=aa:55:aa:55:00:02
-N3_MAC=aa:55:aa:55:00:03
-N1_OFPORT=10
-N2_OFPORT=20
-N3_OFPORT=30
-
-AT_CHECK([
-    ovs-vsctl add-port br-in1 n1 -- \
-        set interface n1 type=dummy ofport_request=$N1_OFPORT options:tx_pcap=n1.pcap
-    ovs-vsctl add-port br-in2 n2 -- \
-        set interface n2 type=dummy ofport_request=$N2_OFPORT options:tx_pcap=n2.pcap
-    ovs-vsctl add-port br-in3 n3 -- \
-        set interface n3 type=dummy ofport_request=$N3_OFPORT options:tx_pcap=n3.pcap
-], [0])
-
-#N1_DPPORT=$(ovs-appctl dpif/show | grep "n1 10" | sed 's|.*/\([[0-9]]*\):.*|\1|')
-#N2_DPPORT=$(ovs-appctl dpif/show | grep "n2 20" | sed 's|.*/\([[0-9]]*\):.*|\1|')
-#N3_DPPORT=$(ovs-appctl dpif/show | grep "n3 30" | sed 's|.*/\([[0-9]]*\):.*|\1|')
-
-### Verify datapath configuration
-AT_CHECK([ovs-appctl dpif/show | grep -v hit], [0], [dnl
-  br-in1:
-    br-in1 65534/101: (dummy-internal)
-    n1 10/4: (dummy)
-    vxlangpe12 1020/4789: (vxlan: packet_type=ptap, remote_ip=10.0.0.2)
-    vxlangpe13 1030/4789: (vxlan: packet_type=ptap, remote_ip=10.0.0.3)
-  br-in2:
-    br-in2 65534/102: (dummy-internal)
-    n2 20/5: (dummy)
-    vxlangpe21 2010/4789: (vxlan: packet_type=ptap, remote_ip=20.0.0.1)
-    vxlangpe23 2030/4789: (vxlan: packet_type=ptap, remote_ip=20.0.0.3)
-  br-in3:
-    br-in3 65534/103: (dummy-internal)
-    n3 30/6: (dummy)
-    vxlangpe31 3010/4789: (vxlan: packet_type=ptap, remote_ip=30.0.0.1)
-    vxlangpe32 3020/4789: (vxlan: packet_type=ptap, remote_ip=30.0.0.2)
-  br-p1:
-    br-p1 65534/1: (dummy-internal)
-    p1-0 2/none: (patch: peer=p0-1)
-  br-p2:
-    br-p2 65534/2: (dummy-internal)
-    p2-0 2/none: (patch: peer=p0-2)
-  br-p3:
-    br-p3 65534/3: (dummy-internal)
-    p3-0 2/none: (patch: peer=p0-3)
-  br0:
-    br0 65534/100: (dummy-internal)
-    p0-1 10/none: (patch: peer=p1-0)
-    p0-2 20/none: (patch: peer=p2-0)
-    p0-3 30/none: (patch: peer=p3-0)
-])
-
-### Setup SFC flow configuration
-
-# br-in1 is SFC classifier (table 1) and final SFF (tables 2,3)
-AT_DATA([br-in1.txt], [dnl
-    table=0,in_port=10,ip,actions=decap(),goto_table:1
-    table=0,in_port=10,packet_type=(1,0x800),actions=goto_table:1
-    table=0,in_port=1020,packet_type=(1,0x894f),actions=goto_table:2
-    table=0,in_port=1030,packet_type=(1,0x894f),actions=goto_table:2
-    table=1,priority=32,packet_type=(1,0x800),nw_dst=192.168.10.30,actions=encap(nsh(md_type=1)),set_field:0x3000->nsh_spi,output:1030
-    table=1,priority=0,packet_type=(1,0x800),nw_dst=0.0.0.0/0,actions=encap(nsh(md_type=1)),set_field:0x3020->nsh_spi,output:1020
-    table=2,packet_type=(1,0x894f),nsh_spi=0x1000,nsh_si=255,actions=decap(),goto_table:3
-    table=2,packet_type=(1,0x894f),nsh_spi=0x1020,nsh_si=254,actions=decap(),goto_table:3
-    table=3,ip,actions=set_field:aa:55:aa:55:00:01->dl_dst,output:10
-    table=3,packet_type=(1,0x800),actions=encap(ethernet),set_field:aa:55:aa:55:00:01->dl_dst,output:10
-])
-
-# br-in2 is intermediate SFF (table 2) and simulated SF (table 4)
-AT_DATA([br-in2.txt], [dnl
-    table=0,in_port=2010,packet_type=(1,0x894f),actions=goto_table:2
-    table=0,in_port=2030,packet_type=(1,0x894f),actions=goto_table:2
-    table=2,packet_type=(1,0x894f),nsh_spi=0x3020,nsh_si=255,actions=encap(ethernet),set_field:11:22:33:44:55:66->dl_dst,goto_table:4
-    table=2,packet_type=(1,0x894f),nsh_spi=0x3020,nsh_si=254,actions=output:2030
-    table=2,packet_type=(1,0x894f),nsh_spi=0x1020,nsh_si=255,actions=encap(ethernet),set_field:77:88:99:aa:bb:cc->dl_dst,goto_table:4
-    table=2,packet_type=(1,0x894f),nsh_spi=0x1020,nsh_si=254,actions=output:2010
-    table=4,dl_type=0x894f,dl_dst=11:22:33:44:55:66,actions=set_field:254->nsh_si,decap(),resubmit(,2)
-    table=4,dl_type=0x894f,dl_dst=77:88:99:aa:bb:cc,actions=dec_nsh_ttl,decap(),resubmit(,2)
-])
-
-# br-in3 is SFC classifier (table 1) and final SFF (tables 2,3)
-AT_DATA([br-in3.txt], [dnl
-    table=0,in_port=30,ip,actions=decap(),goto_table:1
-    table=0,in_port=30,packet_type=(1,0x800),actions=goto_table:1
-    table=0,in_port=3010,packet_type=(1,0x894f),actions=goto_table:2
-    table=0,in_port=3020,packet_type=(1,0x894f),actions=goto_table:2
-    table=1,priority=32,packet_type=(1,0x800),nw_dst=192.168.10.10,actions=encap(nsh(md_type=1)),set_field:0x1000->nsh_spi,3010
-    table=1,priority=0,packet_type=(1,0x800),nw_dst=0.0.0.0/0,actions=encap(nsh(md_type=1)),set_field:0x1020->nsh_spi,3020
-    table=2,packet_type=(1,0x894f),nsh_spi=0x3000,nsh_si=255,actions=decap(),goto_table:3
-    table=2,packet_type=(1,0x894f),nsh_spi=0x3020,nsh_si=254,actions=decap(),goto_table:3
-    table=3,ip,actions=set_field:aa:55:aa:55:00:03->dl_dst,output:30
-    table=3,packet_type=(1,0x800),actions=encap(ethernet),set_field:aa:55:aa:55:00:03->dl_dst,output:30
-])
-
-AT_CHECK([
-    ovs-ofctl -Oopenflow13 add-flows br-in1 br-in1.txt
-    ovs-ofctl -Oopenflow13 add-flows br-in2 br-in2.txt
-    ovs-ofctl -Oopenflow13 add-flows br-in3 br-in3.txt
-])
-
-### Inject ICMP Echo request test packets
-
-# N1 to N3, via the direct SF path with spi 0x3000
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n1 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n1 1e2ce92a669e3a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(4),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.30,frag=no), packets:1, bytes:98, used:0.0s, actions:pop_eth,push_nsh(flags=0,ttl=63,mdtype=1,np=1,spi=0x3000,si=255,c1=0x0,c2=0x0,c3=0x0,c4=0x0),clone(tnl_push(tnl_port(4789),header(size=50,type=4,eth(dst=aa:55:00:00:00:03,src=aa:55:00:00:00:01,dl_type=0x0800),ipv4(src=10.0.0.1,dst=10.0.0.3,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0x0),vxlan(flags=0xc000004,vni=0x0)),out_port(1)),set(ipv4(src=30.0.0.1,dst=30.0.0.3)),tnl_pop(4789))
-tunnel(tun_id=0x0,src=30.0.0.1,dst=30.0.0.3,flags(-df-csum+key)),recirc_id(0),in_port(4789),packet_type(ns=1,id=0x894f),eth_type(0x894f),nsh(np=1,spi=0x3000,si=255), packets:1, bytes:108, used:0.0s, actions:pop_nsh(),recirc(0x1)
-tunnel(tun_id=0x0,src=30.0.0.1,dst=30.0.0.3,flags(-df-csum+key)),recirc_id(0x1),in_port(4789),packet_type(ns=1,id=0x800),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:84, used:0.0s, actions:push_eth(src=00:00:00:00:00:00,dst=aa:55:aa:55:00:03),6
-])
-
-AT_CHECK([
-    ovs-ofctl -Oopenflow13 dump-flows br-in1 | ofctl_strip | sort | grep actions
-    ovs-ofctl -Oopenflow13 dump-flows br-in2 | ofctl_strip | sort | grep actions
-    ovs-ofctl -Oopenflow13 dump-flows br-in3 | ofctl_strip | sort | grep actions
-], [0], [dnl
- n_packets=2, n_bytes=196, ip,in_port=10 actions=decap(),goto_table:1
- packet_type=(1,0x800),in_port=10 actions=goto_table:1
- packet_type=(1,0x894f),in_port=1020 actions=goto_table:2
- packet_type=(1,0x894f),in_port=1030 actions=goto_table:2
- table=1, n_packets=2, n_bytes=196, priority=32,packet_type=(1,0x800),nw_dst=192.168.10.30 actions=encap(nsh(md_type=1)),set_field:0x3000->nsh_spi,output:1030
- table=1, priority=0,packet_type=(1,0x800) actions=encap(nsh(md_type=1)),set_field:0x3020->nsh_spi,output:1020
- table=2, packet_type=(1,0x894f),nsh_spi=0x1000,nsh_si=255 actions=decap(),goto_table:3
- table=2, packet_type=(1,0x894f),nsh_spi=0x1020,nsh_si=254 actions=decap(),goto_table:3
- table=3, ip actions=set_field:aa:55:aa:55:00:01->eth_dst,output:10
- table=3, packet_type=(1,0x800) actions=encap(ethernet),set_field:aa:55:aa:55:00:01->eth_dst,output:10
- packet_type=(1,0x894f),in_port=2010 actions=goto_table:2
- packet_type=(1,0x894f),in_port=2030 actions=goto_table:2
- table=2, packet_type=(1,0x894f),nsh_spi=0x1020,nsh_si=254 actions=output:2010
- table=2, packet_type=(1,0x894f),nsh_spi=0x1020,nsh_si=255 actions=encap(ethernet),set_field:77:88:99:aa:bb:cc->eth_dst,goto_table:4
- table=2, packet_type=(1,0x894f),nsh_spi=0x3020,nsh_si=254 actions=output:2030
- table=2, packet_type=(1,0x894f),nsh_spi=0x3020,nsh_si=255 actions=encap(ethernet),set_field:11:22:33:44:55:66->eth_dst,goto_table:4
- table=4, dl_dst=11:22:33:44:55:66,dl_type=0x894f actions=set_field:254->nsh_si,decap(),resubmit(,2)
- table=4, dl_dst=77:88:99:aa:bb:cc,dl_type=0x894f actions=dec_nsh_ttl,decap(),resubmit(,2)
- ip,in_port=30 actions=decap(),goto_table:1
- n_packets=2, n_bytes=216, packet_type=(1,0x894f),in_port=3010 actions=goto_table:2
- packet_type=(1,0x800),in_port=30 actions=goto_table:1
- packet_type=(1,0x894f),in_port=3020 actions=goto_table:2
- table=1, priority=0,packet_type=(1,0x800) actions=encap(nsh(md_type=1)),set_field:0x1020->nsh_spi,output:3020
- table=1, priority=32,packet_type=(1,0x800),nw_dst=192.168.10.10 actions=encap(nsh(md_type=1)),set_field:0x1000->nsh_spi,output:3010
- table=2, n_packets=2, n_bytes=216, packet_type=(1,0x894f),nsh_spi=0x3000,nsh_si=255 actions=decap(),goto_table:3
- table=2, packet_type=(1,0x894f),nsh_spi=0x3020,nsh_si=254 actions=decap(),goto_table:3
- table=3, ip actions=set_field:aa:55:aa:55:00:03->eth_dst,output:30
- table=3, n_packets=2, n_bytes=168, packet_type=(1,0x800) actions=encap(ethernet),set_field:aa:55:aa:55:00:03->eth_dst,output:30
-])
-
-# Clear up megaflow cache
-ovs-appctl time/warp 11000
-
-# N1 to some other IP destination (192.168.10.20), via the indirect SF path with spi 0x3020
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n1 461e7d1a95a13a6dd2099cab080045000054500b40004001552fc0a80a0ac0a80a140800531f09a90001e9509a580000000055ba030000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n1 461e7d1a95a13a6dd2099cab08004500005450934000400154a7c0a80a0ac0a80a140800f41d09a90002ea509a5800000000b3ba030000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637], [0], [ignore])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(4),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.20/255.255.255.248,frag=no), packets:1, bytes:98, used:0.0s, actions:pop_eth,push_nsh(flags=0,ttl=63,mdtype=1,np=1,spi=0x3020,si=255,c1=0x0,c2=0x0,c3=0x0,c4=0x0),clone(tnl_push(tnl_port(4789),header(size=50,type=4,eth(dst=aa:55:00:00:00:02,src=aa:55:00:00:00:01,dl_type=0x0800),ipv4(src=10.0.0.1,dst=10.0.0.2,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0x0),vxlan(flags=0xc000004,vni=0x0)),out_port(1)),set(ipv4(src=20.0.0.1,dst=20.0.0.2)),tnl_pop(4789))
-tunnel(tun_id=0x0,src=20.0.0.1,dst=20.0.0.2,flags(-df-csum+key)),recirc_id(0),in_port(4789),packet_type(ns=1,id=0x894f),eth_type(0x894f),nsh(spi=0x3020,si=255), packets:1, bytes:108, used:0.0s, actions:push_eth(src=00:00:00:00:00:00,dst=11:22:33:44:55:66),set(nsh(spi=0x3020,si=254)),pop_eth,clone(tnl_push(tnl_port(4789),header(size=50,type=4,eth(dst=aa:55:00:00:00:03,src=aa:55:00:00:00:02,dl_type=0x0800),ipv4(src=20.0.0.2,dst=20.0.0.3,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0x0),vxlan(flags=0xc000004,vni=0x0)),out_port(2)),set(ipv4(src=30.0.0.2,dst=30.0.0.3)),tnl_pop(4789))
-tunnel(tun_id=0x0,src=30.0.0.2,dst=30.0.0.3,flags(-df-csum+key)),recirc_id(0),in_port(4789),packet_type(ns=1,id=0x894f),eth_type(0x894f),nsh(np=1,spi=0x3020,si=254), packets:1, bytes:108, used:0.0s, actions:pop_nsh(),recirc(0x2)
-tunnel(tun_id=0x0,src=30.0.0.2,dst=30.0.0.3,flags(-df-csum+key)),recirc_id(0x2),in_port(4789),packet_type(ns=1,id=0x800),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:84, used:0.0s, actions:push_eth(src=00:00:00:00:00:00,dst=aa:55:aa:55:00:03),6
-])
-
-AT_CHECK([
-    ovs-ofctl -Oopenflow13 dump-flows br-in1 | ofctl_strip | sort | grep actions
-    ovs-ofctl -Oopenflow13 dump-flows br-in2 | ofctl_strip | sort | grep actions
-    ovs-ofctl -Oopenflow13 dump-flows br-in3 | ofctl_strip | sort | grep actions
-], [0], [dnl
- n_packets=4, n_bytes=392, ip,in_port=10 actions=decap(),goto_table:1
- packet_type=(1,0x800),in_port=10 actions=goto_table:1
- packet_type=(1,0x894f),in_port=1020 actions=goto_table:2
- packet_type=(1,0x894f),in_port=1030 actions=goto_table:2
- table=1, n_packets=2, n_bytes=196, priority=0,packet_type=(1,0x800) actions=encap(nsh(md_type=1)),set_field:0x3020->nsh_spi,output:1020
- table=1, n_packets=2, n_bytes=196, priority=32,packet_type=(1,0x800),nw_dst=192.168.10.30 actions=encap(nsh(md_type=1)),set_field:0x3000->nsh_spi,output:1030
- table=2, packet_type=(1,0x894f),nsh_spi=0x1000,nsh_si=255 actions=decap(),goto_table:3
- table=2, packet_type=(1,0x894f),nsh_spi=0x1020,nsh_si=254 actions=decap(),goto_table:3
- table=3, ip actions=set_field:aa:55:aa:55:00:01->eth_dst,output:10
- table=3, packet_type=(1,0x800) actions=encap(ethernet),set_field:aa:55:aa:55:00:01->eth_dst,output:10
- n_packets=2, n_bytes=216, packet_type=(1,0x894f),in_port=2010 actions=goto_table:2
- packet_type=(1,0x894f),in_port=2030 actions=goto_table:2
- table=2, n_packets=2, n_bytes=216, packet_type=(1,0x894f),nsh_spi=0x3020,nsh_si=254 actions=output:2030
- table=2, n_packets=2, n_bytes=216, packet_type=(1,0x894f),nsh_spi=0x3020,nsh_si=255 actions=encap(ethernet),set_field:11:22:33:44:55:66->eth_dst,goto_table:4
- table=2, packet_type=(1,0x894f),nsh_spi=0x1020,nsh_si=254 actions=output:2010
- table=2, packet_type=(1,0x894f),nsh_spi=0x1020,nsh_si=255 actions=encap(ethernet),set_field:77:88:99:aa:bb:cc->eth_dst,goto_table:4
- table=4, dl_dst=77:88:99:aa:bb:cc,dl_type=0x894f actions=dec_nsh_ttl,decap(),resubmit(,2)
- table=4, n_packets=2, n_bytes=216, dl_dst=11:22:33:44:55:66,dl_type=0x894f actions=set_field:254->nsh_si,decap(),resubmit(,2)
- ip,in_port=30 actions=decap(),goto_table:1
- n_packets=2, n_bytes=216, packet_type=(1,0x894f),in_port=3010 actions=goto_table:2
- n_packets=2, n_bytes=216, packet_type=(1,0x894f),in_port=3020 actions=goto_table:2
- packet_type=(1,0x800),in_port=30 actions=goto_table:1
- table=1, priority=0,packet_type=(1,0x800) actions=encap(nsh(md_type=1)),set_field:0x1020->nsh_spi,output:3020
- table=1, priority=32,packet_type=(1,0x800),nw_dst=192.168.10.10 actions=encap(nsh(md_type=1)),set_field:0x1000->nsh_spi,output:3010
- table=2, n_packets=2, n_bytes=216, packet_type=(1,0x894f),nsh_spi=0x3000,nsh_si=255 actions=decap(),goto_table:3
- table=2, n_packets=2, n_bytes=216, packet_type=(1,0x894f),nsh_spi=0x3020,nsh_si=254 actions=decap(),goto_table:3
- table=3, ip actions=set_field:aa:55:aa:55:00:03->eth_dst,output:30
- table=3, n_packets=4, n_bytes=336, packet_type=(1,0x800) actions=encap(ethernet),set_field:aa:55:aa:55:00:03->eth_dst,output:30
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/odp.at b/tests/odp.at
deleted file mode 100644
index 8e4ba4615..000000000
--- a/tests/odp.at
+++ /dev/null
@@ -1,406 +0,0 @@
-AT_BANNER([datapath parsing and formatting])
-
-AT_SETUP([OVS datapath key parsing and formatting - valid forms])
-dnl We could add a test for invalid forms, but that's less important.
-AT_DATA([odp-base.txt], [dnl
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x1234)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=5,tos=0x80,ttl=128,frag=no)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=5,tos=0x81,ttl=128,frag=no)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=5,tos=0x80,ttl=128,frag=first)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=5,tos=0x80,ttl=128,frag=later)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=6,tos=0,ttl=128,frag=no),tcp(src=80,dst=8080)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=17,tos=0,ttl=128,frag=no),udp(src=81,dst=6632)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=1,tos=0,ttl=128,frag=no),icmp(type=1,code=2)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x71,hlimit=128,frag=no)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=first)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=later)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=6,tclass=0,hlimit=128,frag=no),tcp(src=80,dst=8080)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=17,tclass=0,hlimit=128,frag=no),udp(src=6630,dst=22)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=1,code=2)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=136,code=0),nd(target=::3,sll=00:05:06:07:08:09,tll=00:0a:0b:0c:0d:0e)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0806),arp(sip=1.2.3.4,tip=5.6.7.8,op=1,sha=00:0f:10:11:12:13,tha=00:14:15:16:17:18)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=136,code=0),nd(target=::3,sll=00:05:06:07:08:09,tll=00:0a:0b:0c:0d:0e)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=136,code=0),nd(target=::3,sll=00:05:06:07:08:09,tll=00:0a:0b:0c:0d:0e),nd_ext(nd_reserved=0x0,nd_options_type=2)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8847),mpls(label=100,tc=3,ttl=64,bos=1)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8847),mpls(label=100,tc=7,ttl=100,bos=1)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8847),mpls(label=100,tc=7,ttl=100,bos=0)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8848),mpls(label=1000,tc=4,ttl=200,bos=1)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8848),mpls(label=1000,tc=4,ttl=200,bos=0)
-])
-
-(echo '# Valid forms without tun_id or VLAN header.'
- sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
-
- sed '
-s/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/
-' odp-base.txt
-
-
- echo
- echo '# Valid forms with tunnel header.'
- sed 's/^/skb_priority(0),tunnel(tun_id=0x7f10354,src=10.10.10.10,dst=20.20.20.20,ttl=64,flags(csum|key)),skb_mark(0x1234),recirc_id(0),dp_hash(0),/' odp-base.txt
-
- echo
- echo '# Valid forms with VLAN header.'
- sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/
-s/\(eth([[^)]]*)\),*/\1,eth_type(0x8100),vlan(vid=99,pcp=7),encap(/
-s/$/)/' odp-base.txt
-
- echo
- echo '# Valid forms with MPLS header.'
- sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/
-s/\(eth([[^)]]*),?\)/\1,eth_type(0x8847),mpls(label=100,tc=7,ttl=64,bos=1)/' odp-base.txt
-
- echo
- echo '# Valid forms with MPLS multicast header.'
- sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/
-s/\(eth([[^)]]*),?\)/\1,eth_type(0x8848),mpls(label=100,tc=7,ttl=64,bos=1)/' odp-base.txt
-
- echo
- echo '# Valid forms with tunnel and VLAN headers.'
- sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,tos=0x8,ttl=128,flags(key)),skb_mark(0),recirc_id(0),dp_hash(0),/
-s/\(eth([[^)]]*)\),*/\1,eth_type(0x8100),vlan(vid=99,pcp=7),encap(/
-s/$/)/' odp-base.txt
-
- echo
- echo '# Valid forms with QOS priority, tunnel, and VLAN headers.'
- sed 's/^/skb_priority(0x1234),tunnel(tun_id=0xfedcba9876543210,src=10.10.10.10,dst=20.20.20.20,tos=0x8,ttl=64,flags(key)),skb_mark(0),recirc_id(0),dp_hash(0),/
-s/\(eth([[^)]]*)\),*/\1,eth_type(0x8100),vlan(vid=99,pcp=7),encap(/
-s/$/)/' odp-base.txt
-
- echo
- echo '# Valid forms with conntrack fields.'
- sed 's/^/skb_priority(0),skb_mark(0),ct_mark(0x12345678),ct_label(0x1234567890abcdef1234567890abcdef),recirc_id(0),dp_hash(0),/' odp-base.txt
-
- echo
- echo '# Valid forms with IP first fragment.'
-sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt | sed -n 's/,frag=no),/,frag=first),/p'
-
- echo
- echo '# Valid forms with IP later fragment.'
-sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt | sed -n 's/,frag=no),.*/,frag=later)/p'
-
- echo
- echo '# Valid forms with tunnel and ERSPAN v1 headers.'
- sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
-
- echo
- echo '# Valid forms with tunnel and ERSPAN v2 headers.'
- sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
-) > odp-in.txt
-AT_CAPTURE_FILE([odp-in.txt])
-
-dnl If the BoS bit of the last LSE is 0 then the stack is unterminated
-dnl Internally a stack of 3 LSEs will be used with the trailing LSEs
-dnl set to zero. This is reflected when the key is formated
-sed '/bos=0/{
-s/^/ODP_FIT_TOO_LITTLE: /
-}' < odp-in.txt > odp-out.txt
-
-dnl Some fields are always printed for this test, because wildcards aren't
-dnl specified. We can skip these.
-sed -i'back' 's/\(skb_mark(0)\),\(ct\)/\1,ct_state(0),ct_zone(0),\2/' odp-out.txt
-sed -i'back' 's/\(skb_mark([[^)]]*)\),\(recirc\)/\1,ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),\2/' odp-out.txt
-sed -i'back' 's/\(in_port(1)\),\(eth\)/\1,packet_type(ns=0,id=0),\2/' odp-out.txt
-
-AT_CHECK_UNQUOTED([ovstest test-odp parse-keys < odp-in.txt], [0], [`cat odp-out.txt`
-])
-AT_CLEANUP
-
-AT_SETUP([OVS datapath wildcarded key parsing and formatting - valid forms])
-dnl We could add a test for invalid forms, but that's less important.
-AT_DATA([odp-base.txt], [dnl
-in_port(1/0xff),eth(src=00:01:02:03:04:05/ff:ff:ff:ff:ff:f0,dst=10:11:12:13:14:15/ff:ff:ff:ff:ff:f0)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x1234/0xfff0)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41/255.255.255.0,dst=172.16.0.20/255.255.255.0,proto=5/0xf0,tos=0x80/0xf0,ttl=128/0xf0,frag=no)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=6,tos=0,ttl=128,frag=no),tcp(src=80/0xff00,dst=8080/0xff)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=17,tos=0,ttl=128,frag=no),udp(src=81/0xff00,dst=6632/0xff)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=17,tos=0,ttl=128,frag=no),udp(src=81/0xff,dst=6632/0xff00)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=1,tos=0,ttl=128,frag=no),icmp(type=1/0xf0,code=2)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1/::255,dst=::2/::255,label=0/0xf0,proto=10/0xf0,tclass=0x70/0xf0,hlimit=128/0xf0,frag=no)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=6,tclass=0,hlimit=128,frag=no),tcp(src=80/0xff00,dst=8080/0xff)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=17,tclass=0,hlimit=128,frag=no),udp(src=6630/0xff00,dst=22/0xff)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=1/0xf0,code=2)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=135,code=0),nd(target=::3/::250)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=135,code=0),nd(target=::3/::250,sll=00:05:06:07:08:09/ff:ff:ff:ff:ff:00)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=136,code=0),nd(target=::3/::250,tll=00:0a:0b:0c:0d:0e/ff:ff:ff:ff:ff:00)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=136,code=0),nd(target=::3/::250,sll=00:05:06:07:08:09/ff:ff:ff:ff:ff:00,tll=00:0a:0b:0c:0d:0e/ff:ff:ff:ff:ff:00)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0806),arp(sip=1.2.3.4/255.255.255.250,tip=5.6.7.8/255.255.255.250,op=1/0xf0,sha=00:0f:10:11:12:13/ff:ff:ff:ff:ff:00,tha=00:14:15:16:17:18/ff:ff:ff:ff:ff:00)
-skb_mark(0x1234/0xfff0),in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=136,code=0),nd(target=::3,sll=00:05:06:07:08:09,tll=00:0a:0b:0c:0d:0e)
-])
-
-(echo '# Valid forms without tun_id or VLAN header.'
- cat odp-base.txt
-
- echo
- echo '# Valid forms with tunnel header.'
- sed 's/^/tunnel(tun_id=0x7f10354\/0xff,src=10.10.10.10\/255.255.255.0,dst=20.20.20.20\/255.255.255.0,ttl=64,vxlan(gbp(id=10\/0xff,flags=0xb)),flags(oam|csum|key)),/' odp-base.txt
-
- echo
- echo '# Valid forms with tunnel header (wildcard flag).'
- sed 's/^/tunnel(tun_id=0x7f10354\/0xff,src=10.10.10.10\/255.255.255.0,dst=20.20.20.20\/255.255.255.0,ttl=64,flags(-df+csum+key)),/' odp-base.txt
-
- echo
- echo '# Valid forms with Geneve header.'
- sed 's/^/tunnel(tun_id=0x7f10354\/0xff,src=10.10.10.10\/255.255.255.0,dst=20.20.20.20\/255.255.255.0,ttl=64,geneve({class=0,type=0,len=4,0xa\/0xff}{class=0xffff,type=0x1,len=4,0xffffffff}),flags(csum|key)),/' odp-base.txt
-
- echo
- echo '# Valid forms with VLAN header.'
- sed 's/\(eth([[^)]]*)\),*/\1,eth_type(0x8100),vlan(vid=99,pcp=7),encap(/
-s/$/)/' odp-base.txt
-
- echo
- echo '# Valid forms with MPLS header.'
- sed 's/\(eth([[^)]]*),?\)/\1,eth_type(0x8847),mpls(label=100\/0xff,tc=7\/7,ttl=64\/0xff,bos=1\/1)/' odp-base.txt
-
- echo
- echo '# Valid forms with QoS priority.'
- sed 's/^/skb_priority(0x1234\/0xff),/' odp-base.txt
-
- echo
- echo '# Valid forms with tunnel and VLAN headers.'
- sed 's/^/tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,tos=0x8,ttl=128,flags(key)),/
-s/\(eth([[^)]]*)\),*/\1,eth_type(0x8100),vlan(vid=99/0xff0,pcp=7/0xe),encap(/
-s/$/)/' odp-base.txt
-
- echo
- echo '# Valid forms with QOS priority, tunnel, and VLAN headers.'
- sed 's/^/skb_priority(0x1234),tunnel(tun_id=0xfedcba9876543210,src=10.10.10.10,dst=20.20.20.20,tos=0x8,ttl=64,flags(key)),/
-s/\(eth([[^)]]*)\),*/\1,eth_type(0x8100),vlan(vid=99,pcp=7),encap(/
-s/$/)/' odp-base.txt
-
- echo
- echo '# Valid forms with conntrack fields.'
- sed 's/\(eth([[^)]]*)\),/\1,ct_state(+trk),ct_zone(0x5\/0xff),ct_mark(0x10305070\/0xf0f0f0f0),ct_label(0x1234567890abcdef1234567890abcdef\/0x102030405060708090a0b0c0d0e0f0),ct_tuple4(src=10.10.10.10,dst=20.20.20.20,proto=17,tp_src=1,tp_dst=2),/' odp-base.txt
-
- echo
- echo '# Valid forms with IP first fragment.'
-sed -n 's/,frag=no),/,frag=first),/p' odp-base.txt
-
- echo
- echo '# Valid forms with IP later fragment.'
-sed -n 's/,frag=no),.*/,frag=later)/p' odp-base.txt
-
- echo
- echo '# Valid forms with tunnel and ERSPAN v1 headers.'
- sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
-
- echo
- echo '# Valid forms with tunnel and ERSPAN v2 headers.'
- sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
-) > odp.txt
-AT_CAPTURE_FILE([odp.txt])
-AT_CHECK_UNQUOTED([ovstest test-odp parse-wc-keys < odp.txt], [0], [`cat odp.txt`
-])
-AT_CLEANUP
-
-AT_SETUP([OVS datapath wildcarded key filtering.])
-dnl We could add a test for invalid forms, but that's less important.
-AT_DATA([odp-base.txt], [dnl
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x1234/0xfff0)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41/255.255.255.0,dst=172.16.0.20/255.255.255.0,proto=5/0xf0,tos=0x80/0xf0,ttl=128/0xf0,frag=no)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=6,tos=0,ttl=128,frag=no),tcp(src=80/0xff00,dst=8080/0xff)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=17,tos=0,ttl=128,frag=no),udp(src=81/0xff00,dst=6632/0xff)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=17,tos=0,ttl=128,frag=no),udp(src=81/0xff,dst=6632/0xff00)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=1,tos=0,ttl=128,frag=no),icmp(type=1/0xf0,code=2/0xff)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1/::255,dst=::2/::255,label=0/0xf0,proto=10/0xf0,tclass=0x70/0xf0,hlimit=128/0xf0,frag=no)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=6,tclass=0,hlimit=128,frag=no),tcp(src=80/0xff00,dst=8080/0xff)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0806),arp(sip=1.2.3.4/255.255.255.250,tip=5.6.7.8/255.255.255.250,op=1/0xf0,sha=00:0f:10:11:12:13/ff:ff:ff:ff:ff:00,tha=00:14:15:16:17:18/ff:ff:ff:ff:ff:00)
-])
-AT_DATA([odp-vlan-base.txt], [dnl
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=6,tos=0,ttl=128,frag=no),tcp(src=80/0xff00,dst=8080/0xff))
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8100),vlan(vid=100,pcp=7),encap(eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=6,tos=0,ttl=128,frag=no),tcp(src=80/0xff00,dst=8080/0xff))
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=17,tos=0,ttl=128,frag=no),udp(src=81/0xff00,dst=6632/0xff))
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8100),vlan(vid=100,pcp=7),encap(eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=17,tos=0,ttl=128,frag=no),udp(src=81/0xff00,dst=6632/0xff))
-])
-AT_DATA([odp-eth-type.txt], [dnl
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x1234/0xfff0)
-])
-AT_DATA([odp-vlan.txt], [dnl
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=6,tos=0,ttl=128,frag=no),tcp(src=80/0xff00,dst=8080/0xff))
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=17,tos=0,ttl=128,frag=no),udp(src=81/0xff00,dst=6632/0xff))
-])
-AT_DATA([odp-ipv4.txt], [dnl
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41/255.255.255.0,dst=172.16.0.20/255.255.255.0,proto=5/0xf0,tos=0x80/0xf0,ttl=128/0xf0,frag=no)
-])
-AT_DATA([odp-icmp.txt], [dnl
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41/255.255.255.0,dst=172.16.0.20/255.255.255.0,proto=5/0xf0,tos=0x80/0xf0,ttl=128/0xf0,frag=no)
-])
-AT_DATA([odp-arp.txt], [dnl
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0806),arp(sip=1.2.3.4/255.255.255.250,tip=5.6.7.8/255.255.255.250,op=1/0xf0,sha=00:0f:10:11:12:13/ff:ff:ff:ff:ff:00,tha=00:14:15:16:17:18/ff:ff:ff:ff:ff:00)
-])
-AT_DATA([odp-tcp.txt], [dnl
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41/255.255.255.0,dst=172.16.0.20/255.255.255.0,proto=5/0xf0,tos=0x80/0xf0,ttl=128/0xf0,frag=no)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=6,tos=0,ttl=128,frag=no),tcp(src=80/0xff00,dst=8080/0xff)
-])
-AT_DATA([odp-tcp6.txt], [dnl
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1/::255,dst=::2/::255,label=0/0xf0,proto=10/0xf0,tclass=0x70/0xf0,hlimit=128/0xf0,frag=no)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=6,tclass=0,hlimit=128,frag=no),tcp(src=80/0xff00,dst=8080/0xff)
-])
-AT_CHECK_UNQUOTED([ovstest test-odp parse-filter filter='dl_type=0x1235' < odp-base.txt], [0], [`cat odp-eth-type.txt`
-])
-AT_CHECK_UNQUOTED([ovstest test-odp parse-filter filter='dl_vlan=99' < odp-vlan-base.txt], [0], [`cat odp-vlan.txt`
-])
-AT_CHECK_UNQUOTED([ovstest test-odp parse-filter filter='dl_vlan=99,ip' < odp-vlan-base.txt], [0], [`cat odp-vlan.txt`
-])
-AT_CHECK_UNQUOTED([ovstest test-odp parse-filter filter='ip,nw_src=35.8.2.199' < odp-base.txt], [0], [`cat odp-ipv4.txt`
-])
-AT_CHECK_UNQUOTED([ovstest test-odp parse-filter filter='ip,nw_dst=172.16.0.199' < odp-base.txt], [0], [`cat odp-ipv4.txt`
-])
-AT_CHECK_UNQUOTED([ovstest test-odp parse-filter filter='dl_type=0x0800,nw_src=35.8.2.199,nw_dst=172.16.0.199' < odp-base.txt], [0], [`cat odp-ipv4.txt`
-])
-AT_CHECK_UNQUOTED([ovstest test-odp parse-filter filter='icmp,nw_src=35.8.2.199' < odp-base.txt], [0], [`cat odp-icmp.txt`
-])
-AT_CHECK_UNQUOTED([ovstest test-odp parse-filter filter='arp,arp_spa=1.2.3.5' < odp-base.txt], [0], [`cat odp-arp.txt`
-])
-AT_CHECK_UNQUOTED([ovstest test-odp parse-filter filter='tcp,tp_src=90' < odp-base.txt], [0], [`cat odp-tcp.txt`
-])
-AT_CHECK_UNQUOTED([ovstest test-odp parse-filter filter='tcp6,tp_src=90' < odp-base.txt], [0], [`cat odp-tcp6.txt`
-])
-AT_CLEANUP
-
-AT_SETUP([OVS datapath actions parsing and formatting - valid forms])
-AT_DATA([actions.txt], [dnl
-1,2,3
-userspace(pid=6633,sFlow(vid=9,pcp=7,output=10),actions)
-userspace(pid=6633,sFlow(vid=9,pcp=7,output=10),actions,tunnel_out_port=10)
-userspace(pid=9765,slow_path(0))
-userspace(pid=9765,slow_path(0),tunnel_out_port=10)
-userspace(pid=9765,slow_path(cfm))
-userspace(pid=9765,slow_path(cfm),tunnel_out_port=10)
-userspace(pid=1234567,userdata(0102030405060708090a0b0c0d0e0f),actions)
-userspace(pid=1234567,userdata(0102030405060708090a0b0c0d0e0f),tunnel_out_port=10)
-userspace(pid=6633,flow_sample(probability=123,collector_set_id=1234,obs_domain_id=2345,obs_point_id=3456,output_port=10))
-userspace(pid=6633,flow_sample(probability=123,collector_set_id=1234,obs_domain_id=2345,obs_point_id=3456,output_port=10,ingress))
-userspace(pid=6633,flow_sample(probability=123,collector_set_id=1234,obs_domain_id=2345,obs_point_id=3456,output_port=10),tunnel_out_port=10)
-userspace(pid=6633,flow_sample(probability=123,collector_set_id=1234,obs_domain_id=2345,obs_point_id=3456,output_port=10,egress),tunnel_out_port=10)
-userspace(pid=6633,ipfix(output_port=10))
-userspace(pid=6633,ipfix(output_port=10),tunnel_out_port=10)
-userspace(pid=6633,controller(reason=1,dont_send=0,continuation=1,recirc_id=4444,rule_cookie=0x5555,controller_id=0,max_len=65535))
-userspace(pid=6633,controller(reason=1,dont_send=1,continuation=0,recirc_id=4444,rule_cookie=0x5555,controller_id=0,max_len=65535))
-set(in_port(2))
-set(eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15))
-set(eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15/ff:ff:ff:00:00:00))
-set(eth_type(0x1234))
-set(ipv4(src=35.8.2.41,dst=172.16.0.20,proto=5,tos=0x80,ttl=128,frag=no))
-set(ipv4(src=35.8.2.41,dst=172.16.0.20,proto=5,ttl=128,frag=no))
-set(ipv4(src=35.8.2.41/255.255.255.0,dst=172.16.0.20,proto=5,tos=0x80,ttl=128,frag=no))
-set(ipv4(src=35.8.2.41/255.255.255.0,tos=0x80,ttl=128,frag=no))
-set(ipv4(tos=0/0x3))
-set(ipv4(tos=0x80/0xfc))
-set(ipv4(ttl=128,frag=no))
-set(ipv4(frag=no))
-set(tcp(src=80,dst=8080))
-set(tcp(src=80/0xff00,dst=8080))
-set(tcp(src=80))
-set(tcp(dst=8080))
-set(udp(src=81,dst=6632))
-set(udp(src=81/0xff00,dst=6632))
-set(udp(src=81))
-set(udp(dst=6633))
-set(sctp(src=82,dst=6633))
-set(sctp(src=82/0xff00,dst=6633))
-set(sctp(src=82))
-set(sctp(dst=6632))
-set(icmp(type=1,code=2))
-set(ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no))
-set(ipv6(src=::1,dst=::2))
-set(ipv6(label=0,proto=10,tclass=0x70,hlimit=128,frag=no))
-set(ipv6(label=0,proto=10,hlimit=128))
-set(ipv6(label=0/0xfff,proto=10,tclass=0x70/0x70))
-set(ipv6(label=0))
-set(icmpv6(type=1,code=2))
-set(vlan(vid=5))
-set(vlan(vid=3,pcp=5))
-set(vlan(vid=3,pcp=5,cfi=0))
-set(vlan(vid=5/0x3))
-set(vlan(vid=5/0x1)),3
-push_vlan(vid=12,pcp=0)
-push_vlan(vid=13,pcp=5,cfi=0)
-push_vlan(tpid=0x9100,vid=13,pcp=5)
-push_vlan(tpid=0x9100,vid=13,pcp=5,cfi=0)
-pop_vlan
-sample(sample=9.7%,actions(1,2,3,push_vlan(vid=1,pcp=2)))
-set(tunnel(tun_id=0xabcdef1234567890,src=1.1.1.1,dst=2.2.2.2,ttl=64,flags(df|csum|key)))
-set(tunnel(tun_id=0xabcdef1234567890,src=1.1.1.1,dst=2.2.2.2,ttl=64,flags(key)))
-tnl_pop(4)
-tnl_push(tnl_port(4),header(size=42,type=3,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x2000,proto=0x6558),key=0x1e241)),out_port(1))
-tnl_push(tnl_port(4),header(size=46,type=3,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0xa000,proto=0x6558),csum=0x0,key=0x1e241)),out_port(1))
-tnl_push(tnl_port(6),header(size=50,type=4,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0x0),vxlan(flags=0x8000000,vni=0x1c7)),out_port(1))
-tnl_push(tnl_port(6),header(size=50,type=5,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=6081,csum=0x0),geneve(oam,vni=0x1c7)),out_port(1))
-tnl_push(tnl_port(6),header(size=58,type=5,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=6081,csum=0x0),geneve(crit,vni=0x1c7,options({class=0xffff,type=0x80,len=4,0xa}))),out_port(1))
-tnl_push(tnl_port(6),header(size=50,type=5,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=6081,csum=0xffff),geneve(vni=0x1c7)),out_port(1))
-tnl_push(tnl_port(4),header(size=62,type=109,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::92,label=0,proto=47,tclass=0x0,hlimit=64),gre((flags=0x2000,proto=0x6558),key=0x1e241)),out_port(1))
-tnl_push(tnl_port(4),header(size=66,type=109,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::92,label=0,proto=47,tclass=0x0,hlimit=64),gre((flags=0xa000,proto=0x6558),csum=0x0,key=0x1e241)),out_port(1))
-tnl_push(tnl_port(6),header(size=70,type=4,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::92,label=0,proto=17,tclass=0x0,hlimit=64),udp(src=0,dst=4789,csum=0x0),vxlan(flags=0x8000000,vni=0x1c7)),out_port(1))
-tnl_push(tnl_port(6),header(size=70,type=5,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::92,label=0,proto=17,tclass=0x0,hlimit=64),udp(src=0,dst=6081,csum=0x0),geneve(oam,vni=0x1c7)),out_port(1))
-tnl_push(tnl_port(6),header(size=78,type=5,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::92,label=0,proto=17,tclass=0x0,hlimit=64),udp(src=0,dst=6081,csum=0x0),geneve(crit,vni=0x1c7,options({class=0xffff,type=0x80,len=4,0xa}))),out_port(1))
-tnl_push(tnl_port(6),header(size=70,type=5,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::92,label=0,proto=17,tclass=0x0,hlimit=64),udp(src=0,dst=6081,csum=0xffff),geneve(vni=0x1c7)),out_port(1))
-ct
-ct(commit)
-ct(commit,zone=5)
-ct(commit,mark=0xa0a0a0a0/0xfefefefe)
-ct(commit,label=0x1234567890abcdef1234567890abcdef/0xf1f2f3f4f5f6f7f8f9f0fafbfcfdfeff)
-ct(commit,helper=ftp)
-ct(commit,helper=tftp)
-ct(nat)
-ct(commit,nat(src))
-ct(commit,nat(dst))
-ct(commit,nat(src=10.0.0.240,random))
-ct(commit,nat(src=10.0.0.240:32768-65535,random))
-ct(commit,nat(dst=10.0.0.128-10.0.0.254,hash))
-ct(commit,nat(src=10.0.0.240-10.0.0.254:32768-65535,persistent))
-ct(commit,nat(src=fe80::20c:29ff:fe88:a18b,random))
-ct(commit,nat(src=fe80::20c:29ff:fe88:1-fe80::20c:29ff:fe88:a18b,random))
-ct(commit,nat(src=[[fe80::20c:29ff:fe88:1]]-[[fe80::20c:29ff:fe88:a18b]]:255-4096,random))
-ct(commit,helper=ftp,nat(src=10.1.1.240-10.1.1.255))
-ct(force_commit)
-ct(force_commit,zone=5)
-ct(force_commit,mark=0xa0a0a0a0/0xfefefefe)
-ct(force_commit,label=0x1234567890abcdef1234567890abcdef/0xf1f2f3f4f5f6f7f8f9f0fafbfcfdfeff)
-ct(force_commit,helper=ftp)
-ct(nat)
-ct(force_commit,nat(src))
-ct(force_commit,nat(dst))
-ct(force_commit,nat(src=10.0.0.240,random))
-ct(force_commit,nat(src=10.0.0.240:32768-65535,random))
-ct(force_commit,nat(dst=10.0.0.128-10.0.0.254,hash))
-ct(force_commit,nat(src=10.0.0.240-10.0.0.254:32768-65535,persistent))
-ct(force_commit,nat(src=fe80::20c:29ff:fe88:a18b,random))
-ct(force_commit,nat(src=fe80::20c:29ff:fe88:1-fe80::20c:29ff:fe88:a18b,random))
-ct(force_commit,nat(src=[[fe80::20c:29ff:fe88:1]]-[[fe80::20c:29ff:fe88:a18b]]:255-4096,random))
-ct(force_commit,helper=ftp,nat(src=10.1.1.240-10.1.1.255))
-ct_clear
-trunc(100)
-clone(1)
-clone(clone(push_vlan(vid=12,pcp=0),2),1)
-set(tunnel(tun_id=0x1,dst=1.1.1.1,ttl=64,erspan(ver=1,idx=0x7),flags(df|key)))
-set(tunnel(tun_id=0x1,dst=1.1.1.1,ttl=64,erspan(ver=2,dir=1,hwid=0x1),flags(df|key)))
-check_pkt_len(size=200,gt(4),le(5))
-check_pkt_len(size=200,gt(drop),le(5))
-check_pkt_len(size=200,gt(ct(nat)),le(drop))
-check_pkt_len(size=200,gt(set(eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15))),le(set(eth(src=00:01:02:03:04:06,dst=10:11:12:13:14:16))))
-])
-AT_CHECK_UNQUOTED([ovstest test-odp parse-actions < actions.txt], [0],
-  [`cat actions.txt`
-])
-AT_CLEANUP
-
-AT_SETUP([OVS datapath actions parsing and formatting - invalid forms])
-dnl This caused a hang in older versions.
-AT_CHECK([echo 'encap_nsh@:{@' | ovstest test-odp parse-actions
-], [0], [dnl
-odp_actions_from_string: error
-])
-AT_CLEANUP
-
-AT_SETUP([OVS datapath keys parsing and formatting - 33 nested encap ])
-AT_DATA([odp-in.txt], [dnl
-encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap()))))))))))))))))))))))))))))))))
-])
-AT_CHECK_UNQUOTED([ovstest test-odp parse-keys < odp-in.txt], [0], [dnl
-odp_flow_from_string: error (syntax error at encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap(encap())))))))))))))))))))))))))))))))))
-])
-AT_CLEANUP
diff --git a/tests/ofp-actions.at b/tests/ofp-actions.at
deleted file mode 100644
index 746af4f8a..000000000
--- a/tests/ofp-actions.at
+++ /dev/null
@@ -1,912 +0,0 @@
-AT_BANNER([OpenFlow actions])
-
-AT_SETUP([OpenFlow 1.0 action translation])
-AT_KEYWORDS([ofp-actions OF1.0])
-AT_DATA([test-data], [dnl
-# actions=LOCAL
-0000 0008 fffe 04d2
-
-# actions=CONTROLLER:1234
-0000 0008 fffd 04d2
-
-# actions=mod_vlan_vid:9
-0001 0008 0009 0000
-
-# actions=mod_vlan_pcp:6
-0002 0008 06 000000
-
-# actions=strip_vlan
-0003 0008 00000000
-
-# actions=mod_dl_src:00:11:22:33:44:55
-0004 0010 001122334455 000000000000
-
-# actions=mod_dl_dst:10:20:30:40:50:60
-0005 0010 102030405060 000000000000
-
-# actions=mod_nw_src:1.2.3.4
-0006 0008 01020304
-
-# actions=mod_nw_dst:192.168.0.1
-0007 0008 c0a80001
-
-# actions=mod_nw_tos:48
-0008 0008 30 000000
-
-# actions=mod_tp_src:80
-0009 0008 0050 0000
-
-# actions=mod_tp_dst:443
-000a 0008 01bb 0000
-
-# actions=enqueue:10:55
-000b 0010 000a 000000000000 00000037
-
-# actions=resubmit:5
-ffff 0010 00002320 0001 0005 00000000
-
-# actions=set_tunnel:0x12345678
-ffff 0010 00002320 0002 0000 12345678
-
-# actions=set_queue:2309737729
-ffff 0010 00002320 0004 0000 89abcd01
-
-# actions=pop_queue
-ffff 0010 00002320 0005 000000000000
-
-# actions=move:NXM_OF_IN_PORT[]->NXM_OF_VLAN_TCI[]
-ffff 0018 00002320 0006 0010 0000 0000 00000002 00000802
-
-# actions=load:0xf009->NXM_OF_VLAN_TCI[]
-ffff 0018 00002320 0007 000f 00000802 000000000000f009
-
-# actions=note:11.e9.9a.ad.67.f3
-ffff 0010 00002320 0008 11e99aad67f3
-
-# actions=set_tunnel64:0xc426384d49c53d60
-ffff 0018 00002320 0009 000000000000 c426384d49c53d60
-
-# actions=set_tunnel64:0x885f3298
-ffff 0018 00002320 0009 000000000000 00000000885f3298
-
-# bad OpenFlow10 actions: OFPBIC_UNSUP_INST
-& ofp_actions|WARN|write_metadata instruction not allowed here
-ffff 0020 00002320 0016 000000000000 fedcba9876543210 ffffffffffffffff
-
-# bad OpenFlow10 actions: OFPBIC_UNSUP_INST
-& ofp_actions|WARN|write_metadata instruction not allowed here
-ffff 0020 00002320 0016 000000000000 fedcba9876543210 ffff0000ffff0000
-
-# actions=multipath(eth_src,50,modulo_n,1,0,NXM_NX_REG0[])
-ffff 0020 00002320 000a 0000 0032 0000 0000 0000 0000 0000 0000 001f 00010004
-
-# actions=bundle(eth_src,0,hrw,ofport,slaves:4,8)
-ffff 0028 00002320 000c 0001 0000 0000 00000002 0002 0000 00000000 00000000 dnl
-0004 0008 00000000
-
-# actions=bundle_load(eth_src,0,hrw,ofport,NXM_NX_REG0[],slaves:4,8)
-ffff 0028 00002320 000d 0001 0000 0000 00000002 0002 001f 00010004 00000000 dnl
-0004 0008 00000000
-
-# actions=resubmit(10,5)
-ffff 0010 00002320 000e 000a 05 000000
-
-# actions=resubmit(10,5,ct)
-ffff 0010 00002320 002c 000a 05 000000
-
-# actions=output:NXM_NX_REG1[5..10]
-ffff 0018 00002320 000f 0145 00010204 ffff 000000000000
-
-# actions=learn(table=2,idle_timeout=10,hard_timeout=20,fin_idle_timeout=2,fin_hard_timeout=4,priority=80,cookie=0x123456789abcdef0,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],output:NXM_OF_IN_PORT[])
-ffff 0048 00002320 0010 000a 0014 0050 123456789abcdef0 0000 02 00 0002 0004 dnl
-000c 00000802 0000 00000802 0000 dnl
-0030 00000406 0000 00000206 0000 dnl
-1010 00000002 0000 dnl
-00000000
-
-# actions=exit
-ffff 0010 00002320 0011 000000000000
-
-# actions=dec_ttl
-ffff 0010 00002320 0012 000000000000
-
-# actions=fin_timeout(idle_timeout=10,hard_timeout=20)
-ffff 0010 00002320 0013 000a 0014 0000
-
-# actions=controller(reason=invalid_ttl,max_len=1234,id=5678)
-ffff 0010 00002320 0014 04d2 162e 02 00
-
-# actions=controller(reason=invalid_ttl,max_len=1234,id=5678,userdata=01.02.03.04.05,pause)
-ffff 0040 00002320 0025   000000000000 dnl
-0000 0008 04d2   0000 dnl
-0001 0008 162e   0000 dnl
-0002 0005 02   000000 dnl
-0003 0009 0102030405   00000000000000 dnl
-0004 0004   00000000
-
-# actions=dec_ttl(32768,12345,90,765,1024)
-ffff 0020 00002320 0015 000500000000 80003039005A02fd 0400000000000000
-
-# actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
-ffff 0018 00002320 001d 3039 00005BA0 00008707 0000B26E
-
-# actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789)
-ffff 0020 00002320 0026 3039 00005BA0 00008707 0000B26E DDD50000 00000000
-
-# actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789,egress)
-ffff 0020 00002320 0029 3039 00005BA0 00008707 0000B26E DDD50200 00000000
-
-# bad OpenFlow10 actions: OFPBAC_BAD_LEN
-& ofp_actions|WARN|OpenFlow action OFPAT_OUTPUT length 240 exceeds action buffer length 8
-& ofp_actions|WARN|bad action at offset 0 (OFPBAC_BAD_LEN):
-& 00000000  00 00 00 f0 00 00 00 00-
-00 00 00 f0 00 00 00 00
-
-# bad OpenFlow10 actions: OFPBAC_BAD_LEN
-& ofp_actions|WARN|OpenFlow action OFPAT_OUTPUT length 16 not in valid range [[8,8]]
-& ofp_actions|WARN|bad action at offset 0 (OFPBAC_BAD_LEN):
-& 00000000  00 00 00 10 ff fe ff ff-00 00 00 00 00 00 00 00
-00 00 00 10 ff fe ff ff 00 00 00 00 00 00 00 00
-
-# bad OpenFlow10 actions: OFPBAC_BAD_LEN
-& ofp_actions|WARN|OpenFlow action NXAST_DEC_TTL_CNT_IDS length 17 is not a multiple of 8
-ffff 0011 00002320 0015 0001 00000000 0000000000000000
-
-# bad OpenFlow10 actions: OFPBAC_BAD_OUT_PORT
-0000 0008 ffff 0000
-
-# actions=ct()
-ffff 0018 00002320 0023 0000 00000000 0000 FF 000000 0000
-
-# actions=ct(commit)
-ffff 0018 00002320 0023 0001 00000000 0000 FF 000000 0000
-
-# actions=ct(commit,force)
-ffff 0018 00002320 0023 0003 00000000 0000 FF 000000 0000
-
-# bad OpenFlow10 actions: OFPBAC_BAD_ARGUMENT
-ffff 0018 00002320 0023 0002 00000000 0000 FF 000000 0000
-
-# actions=ct(table=10)
-ffff 0018 00002320 0023 0000 00000000 0000 0A 000000 0000
-
-# actions=ct(zone=10)
-ffff 0018 00002320 0023 0000 00000000 000A FF 000000 0000
-
-# actions=ct(zone=NXM_NX_REG0[0..15])
-ffff 0018 00002320 0023 0000 00010004 000F FF 000000 0000
-
-dnl Can't read 8 bits from register into 16-bit zone.
-# bad OpenFlow10 actions: OFPBAC_BAD_SET_LEN
-ffff 0018 00002320 0023 0000 00010004 0007 FF 000000 0000
-
-dnl Can't read 32 bits from register into 16-bit zone.
-# bad OpenFlow10 actions: OFPBAC_BAD_SET_LEN
-ffff 0018 00002320 0023 0000 00010004 001F FF 000000 0000
-
-# actions=ct(commit,exec(load:0xf009->NXM_NX_CT_MARK[]))
-ffff 0030 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0018 00002320 0007 001f 0001d604 000000000000f009
-
-# actions=ct(commit,force,exec(load:0xf009->NXM_NX_CT_MARK[]))
-ffff 0030 00002320 0023 0003 00000000 0000 FF 000000 0000 dnl
-ffff 0018 00002320 0007 001f 0001d604 000000000000f009
-
-# actions=ct(commit,exec(load:0->NXM_NX_CT_LABEL[64..127],load:0x1d->NXM_NX_CT_LABEL[0..63]))
-ffff 0048 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0018 00002320 0007 103f 0001d810 0000 0000 0000 0000 dnl
-ffff 0018 00002320 0007 003f 0001d810 0000 0000 0000 001d
-
-# bad OpenFlow10 actions: OFPBAC_BAD_SET_ARGUMENT
-& ofp_actions|WARN|cannot set CT fields outside of ct action
-ffff 0018 00002320 0007 001f 0001d604 000000000000f009
-
-# bad OpenFlow10 actions: OFPBAC_BAD_SET_ARGUMENT
-& meta_flow|WARN|destination field ct_zone is not writable
-ffff 0030 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0018 00002320 0007 000f 0001d504 000000000000f009
-
-# bad OpenFlow10 actions: OFPBAC_BAD_ARGUMENT
-& ofp_actions|WARN|ct action doesn't support nested action ct
-ffff 0030 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0018 00002320 0023 0000 00000000 0000 FF 000000 0000
-
-# bad OpenFlow10 actions: OFPBAC_BAD_ARGUMENT
-& ofp_actions|WARN|ct action doesn't support nested modification of reg0
-ffff 0030 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0018 00002320 0007 001f 00010004 000000000000f009
-
-# actions=ct(alg=ftp)
-ffff 0018 00002320 0023 0000 00000000 0000 FF 000000 0015
-
-# actions=ct(alg=tftp)
-ffff 0018 00002320 0023 0000 00000000 0000 FF 000000 0045
-
-# actions=ct(commit,nat(src))
-ffff 0028 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0010 00002320 0024 00 00 0001 0000
-
-# actions=ct(commit,nat(dst))
-ffff 0028 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0010 00002320 0024 00 00 0002 0000
-
-# actions=ct(nat)
-ffff 0028 00002320 0023 0000 00000000 0000 FF 000000 0000 dnl
-ffff 0010 00002320 0024 00 00 0000 0000
-
-# actions=ct(commit,nat(src=10.0.0.240,random))
-ffff 0030 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0018 00002320 0024 00 00 0011 0001 0a0000f0 00000000
-
-# actions=ct(commit,nat(src=10.0.0.240:32768-65535,random))
-ffff 0030 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0018 00002320 0024 00 00 0011 0031 0a0000f0 8000ffff
-
-# actions=ct(commit,nat(dst=10.0.0.128-10.0.0.254,hash))
-ffff 0030 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0018 00002320 0024 00 00 000a 0003 0a000080 0a0000fe
-
-# actions=ct(commit,nat(src=10.0.0.240-10.0.0.254:32768-65535,persistent))
-ffff 0038 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0020 00002320 0024 00 00 0005 0033 0a0000f0 0a0000fe 8000ffff 00000000
-
-# actions=ct(commit,nat(src=fe80::20c:29ff:fe88:a18b,random))
-ffff 0038 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0020 00002320 0024 00 00 0011 0004 fe800000 00000000 020c 29ff fe88 a18b
-
-# actions=ct(commit,nat(src=fe80::20c:29ff:fe88:1-fe80::20c:29ff:fe88:a18b,random))
-ffff 0048 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0030 00002320 0024 00 00 0011 000c fe800000 00000000 020c 29ff fe88 0001 fe800000 00000000 020c 29ff fe88 a18b
-
-# actions=ct(commit,nat(src=[fe80::20c:29ff:fe88:1]-[fe80::20c:29ff:fe88:a18b]:255-4096,random))
-ffff 0050 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0038 00002320 0024 00 00 0011 003c dnl
-fe800000 00000000 020c 29ff fe88 0001 dnl
-fe800000 00000000 020c 29ff fe88 a18b dnl
-00ff1000 00000000
-
-# actions=ct_clear
-ffff 0010 00002320 002b 000000000000
-
-# actions=output(port=1,max_len=100)
-ffff 0010 00002320 0027 0001 00000064
-
-# actions=clone(mod_vlan_vid:5,output:10)
-ffff 0020 00002320 002a 000000000000 dnl
-0001 0008 0005 0000 dnl
-0000 0008 000a 0000
-
-# actions=learn(table=2,priority=0,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],output:NXM_OF_IN_PORT[])
-ffff 0050 00002320 002d 0000 0000 0000 0000000000000000 0000 02 00 0000 0000 00000000 0000 0000 dnl
-000c 00000802 0000 00000802 0000 dnl
-0030 00000406 0000 00000206 0000 dnl
-1010 00000002 0000 dnl
-00000000
-
-# actions=learn(table=2,idle_timeout=10,hard_timeout=20,fin_idle_timeout=2,fin_hard_timeout=4,priority=80,cookie=0x123456789abcdef0,limit=1,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],output:NXM_OF_IN_PORT[])
-ffff 0050 00002320 002d 000a 0014 0050 123456789abcdef0 0000 02 00 0002 0004 00000001 0000 0000 dnl
-000c 00000802 0000 00000802 0000 dnl
-0030 00000406 0000 00000206 0000 dnl
-1010 00000002 0000 dnl
-00000000
-
-# actions=learn(table=2,idle_timeout=10,hard_timeout=20,fin_idle_timeout=2,fin_hard_timeout=4,priority=80,cookie=0x123456789abcdef0,limit=1,result_dst=NXM_NX_REG0[8],NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],output:NXM_OF_IN_PORT[])
-ffff 0050 00002320 002d 000a 0014 0050 123456789abcdef0 0004 02 00 0002 0004 00000001 0008 0000 dnl
-00010004 dnl
-000c 00000802 0000 00000802 0000 dnl
-0030 00000406 0000 00000206 0000 dnl
-1010 00000002 0000
-
-# actions=group:5
-ffff 0010 00002320 0028 0000 00000005
-
-# bad OpenFlow10 actions: NXBRC_MUST_BE_ZERO
-ffff 0018 00002320 0025 0000 0005 0000 1122334455 000005
-
-# bad OpenFlow10 actions: NXBRC_MUST_BE_ZERO
-ffff 0018 00002320 0025 0000 0005 5000 1122334455 000000
-
-# bad OpenFlow10 actions: OFPBAC_BAD_ARGUMENT
-ffff 0048 00002320 0023 0001 00000000 0000 FF 000000 0000 dnl
-ffff 0030 00002320 0024 00 00 0011 000c fe800000 00000000 020c 29ff fe88 a18b fe800000 00000000 020c 29ff fe88 0001
-
-# actions=check_pkt_larger(1500)->NXM_NX_REG0[0]
-ffff 0018 00002320 0031 05dc 000000010004000000000000
-
-# actions=check_pkt_larger(1000)->NXM_NX_XXREG1[4]
-ffff 0018 00002320 0031 03e8 00040001e010000000000000
-
-])
-sed '/^[[#&]]/d' < test-data > input.txt
-sed -n 's/^# //p; /^$/p' < test-data > expout
-sed -n 's/^& //p' < test-data > experr
-AT_CAPTURE_FILE([input.txt])
-AT_CAPTURE_FILE([expout])
-AT_CAPTURE_FILE([experr])
-AT_CHECK(
-  [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-actions OpenFlow10 < input.txt],
-  [0], [expout], [experr])
-AT_CLEANUP
-
-AT_SETUP([OpenFlow 1.0 "instruction" translations])
-AT_KEYWORDS([ofp-actions OF1.0 instruction])
-AT_DATA([test-data], [dnl
-dnl Try a couple of ordinary actions to make sure they're accepted,
-dnl but there's no point in retrying all the actions from the previous test.
-# actions=LOCAL
-0000 0008 fffe 04d2
-
-# actions=mod_dl_src:00:11:22:33:44:55
-0004 0010 001122334455 000000000000
-
-dnl Now check that write_metadata is accepted.
-# actions=write_metadata:0xfedcba9876543210
-ffff 0020 00002320 0016 000000000000 fedcba9876543210 ffffffffffffffff
-
-# actions=write_metadata:0xfedcba9876543210/0xffff0000ffff0000
-ffff 0020 00002320 0016 000000000000 fedcba9876543210 ffff0000ffff0000
-
-])
-sed '/^[[#&]]/d' < test-data > input.txt
-sed -n 's/^# //p; /^$/p' < test-data > expout
-sed -n 's/^& //p' < test-data > experr
-AT_CAPTURE_FILE([input.txt])
-AT_CAPTURE_FILE([expout])
-AT_CAPTURE_FILE([experr])
-AT_CHECK(
-  [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-instructions OpenFlow10 < input.txt],
-  [0], [expout], [experr])
-AT_CLEANUP
-
-AT_SETUP([OpenFlow 1.1 action translation])
-AT_KEYWORDS([ofp-actions OF1.1])
-AT_DATA([test-data], [dnl
-# actions=LOCAL
-0000 0010 fffffffe 04d2 000000000000
-
-# actions=CONTROLLER:1234
-0000 0010 fffffffd 04d2 000000000000
-
-# actions=set_vlan_vid:9
-0001 0008 0009 0000
-
-# actions=set_vlan_pcp:6
-0002 0008 06 000000
-
-# actions=mod_dl_src:00:11:22:33:44:55
-0003 0010 001122334455 000000000000
-
-# actions=mod_dl_dst:10:20:30:40:50:60
-0004 0010 102030405060 000000000000
-
-# actions=mod_nw_src:1.2.3.4
-0005 0008 01020304
-
-# actions=mod_nw_dst:192.168.0.1
-0006 0008 c0a80001
-
-# actions=mod_nw_tos:48
-0007 0008 30 000000
-
-# actions=mod_nw_ecn:2
-0008 0008 02 000000
-
-# actions=mod_tp_src:80
-0009 0008 0050 0000
-
-# actions=mod_tp_dst:443
-000a 0008 01bb 0000
-
-# actions=pop_vlan
-0012 0008 00000000
-
-# actions=set_queue:2309737729
-0015 0008 89abcd01
-
-dnl 802.1ad isn't supported at the moment
-dnl # actions=push_vlan:0x88a8
-dnl 0011 0008 88a8 0000
-# actions=push_vlan:0x8100
-0011 0008 8100 0000
-
-# actions=resubmit:5
-ffff 0010 00002320 0001 0005 00000000
-
-# actions=set_tunnel:0x12345678
-ffff 0010 00002320 0002 0000 12345678
-
-# actions=pop_queue
-ffff 0010 00002320 0005 000000000000
-
-# actions=move:NXM_OF_IN_PORT[]->NXM_OF_VLAN_TCI[]
-ffff 0018 00002320 0006 0010 0000 0000 00000002 00000802
-
-# actions=load:0xf009->NXM_OF_VLAN_TCI[]
-ffff 0018 00002320 0007 000f 00000802 000000000000f009
-
-# actions=note:11.e9.9a.ad.67.f3
-ffff 0010 00002320 0008 11e99aad67f3
-
-# actions=set_tunnel64:0xc426384d49c53d60
-ffff 0018 00002320 0009 000000000000 c426384d49c53d60
-
-# actions=set_tunnel64:0x885f3298
-ffff 0018 00002320 0009 000000000000 00000000885f3298
-
-dnl Write-Metadata is only allowed in contexts that allow instructions.
-& ofp_actions|WARN|write_metadata instruction not allowed here
-# bad OpenFlow11 actions: OFPBIC_UNSUP_INST
-ffff 0020 00002320 0016 000000000000 fedcba9876543210 ffffffffffffffff
-
-# actions=multipath(eth_src,50,modulo_n,1,0,NXM_NX_REG0[])
-ffff 0020 00002320 000a 0000 0032 0000 0000 0000 0000 0000 0000 001f 00010004
-
-# actions=bundle(eth_src,0,hrw,ofport,slaves:4,8)
-ffff 0028 00002320 000c 0001 0000 0000 00000002 0002 0000 00000000 00000000 dnl
-0004 0008 00000000
-
-# actions=bundle_load(eth_src,0,hrw,ofport,NXM_NX_REG0[],slaves:4,8)
-ffff 0028 00002320 000d 0001 0000 0000 00000002 0002 001f 00010004 00000000 dnl
-0004 0008 00000000
-
-# actions=resubmit(10,5)
-ffff 0010 00002320 000e 000a 05 000000
-
-# actions=resubmit(10,5,ct)
-ffff 0010 00002320 002c 000a 05 000000
-
-# actions=output:NXM_NX_REG1[5..10]
-ffff 0018 00002320 000f 0145 00010204 ffff 000000000000
-
-# actions=learn(table=2,idle_timeout=10,hard_timeout=20,fin_idle_timeout=2,fin_hard_timeout=4,priority=80,cookie=0x123456789abcdef0,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],output:NXM_OF_IN_PORT[])
-ffff 0048 00002320 0010 000a 0014 0050 123456789abcdef0 0000 02 00 0002 0004 dnl
-000c 00000802 0000 00000802 0000 dnl
-0030 00000406 0000 00000206 0000 dnl
-1010 00000002 0000 dnl
-00000000
-
-# actions=exit
-ffff 0010 00002320 0011 000000000000
-
-dnl OpenFlow 1.1 OFPAT_DEC_TTL
-# actions=dec_ttl
-0018 0008 00000000
-
-# actions=fin_timeout(idle_timeout=10,hard_timeout=20)
-ffff 0010 00002320 0013 000a 0014 0000
-
-# actions=controller(reason=invalid_ttl,max_len=1234,id=5678)
-ffff 0010 00002320 0014 04d2 162e 02 00
-
-# actions=dec_ttl(32768,12345,90,765,1024)
-ffff 0020 00002320 0015 000500000000 80003039005A02fd 0400000000000000
-
-# actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
-ffff 0018 00002320 001d 3039 00005BA0 00008707 0000B26E
-
-# bad OpenFlow11 actions: OFPBAC_BAD_OUT_PORT
-& ofp_actions|WARN|bad action at offset 0 (OFPBAC_BAD_OUT_PORT):
-& 00000000  00 00 00 10 ff ff ff ff-00 00 00 00 00 00 00 00
-0000 0010 ffffffff 0000 000000000000
-
-])
-sed '/^[[#&]]/d' < test-data > input.txt
-sed -n 's/^# //p; /^$/p' < test-data > expout
-sed -n 's/^& //p' < test-data > experr
-AT_CAPTURE_FILE([input.txt])
-AT_CAPTURE_FILE([expout])
-AT_CAPTURE_FILE([experr])
-AT_CHECK(
-  [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-actions OpenFlow11 < input.txt],
-  [0], [expout], [experr])
-AT_CLEANUP
-
-AT_SETUP([OpenFlow 1.1 instruction translation])
-AT_KEYWORDS([OF1.1 instruction ofp-actions])
-AT_DATA([test-data], [dnl
-# actions=LOCAL
-0004 0018 00000000 dnl
-0000 0010 fffffffe 04d2 000000000000
-
-dnl Apply-Actions non-zero padding
-# actions=drop
-#  0: 00 -> (none)
-#  1: 04 -> (none)
-#  2: 00 -> (none)
-#  3: 08 -> (none)
-#  4: 00 -> (none)
-#  5: 00 -> (none)
-#  6: 00 -> (none)
-#  7: 01 -> (none)
-0004 0008 00000001
-
-dnl Check that an empty Apply-Actions instruction gets dropped.
-# actions=drop
-#  0: 00 -> (none)
-#  1: 04 -> (none)
-#  2: 00 -> (none)
-#  3: 08 -> (none)
-#  4: 00 -> (none)
-#  5: 00 -> (none)
-#  6: 00 -> (none)
-#  7: 00 -> (none)
-0004 0008 00000000
-
-dnl Duplicate instruction type:
-# bad OpenFlow11 instructions: OFPBIC_DUP_INST
-0004 0008 00000000 0004 0008 00000000
-
-dnl Instructions not multiple of 8 in length.
-& ofp_actions|WARN|OpenFlow message instructions length 9 is not a multiple of 8
-# bad OpenFlow11 instructions: OFPBIC_BAD_LEN
-0004 0009 01 00000000
-
-dnl Goto-Table instruction too long.
-# bad OpenFlow11 instructions: OFPBIC_BAD_LEN
-0001 0010 01 000000 0000000000000000
-
-dnl Goto-Table 1 instruction non-zero padding
-# actions=goto_table:1
-#  7: 01 -> 00
-0001 0008 01 000001
-
-dnl Goto-Table 1 instruction go back to the previous table.
-# bad OpenFlow11 instructions: OFPBIC_BAD_TABLE_ID
-2,0001 0008 01 000000
-
-dnl Goto-Table 1
-# actions=goto_table:1
-0001 0008 01 000000
-
-dnl Write-Metadata.
-# actions=write_metadata:0xfedcba9876543210
-0002 0018 00000000 fedcba9876543210 ffffffffffffffff
-
-dnl Write-Metadata as Nicira extension action is transformed into instruction.
-# actions=write_metadata:0xfedcba9876543210
-#  1: 04 -> 02
-#  3: 28 -> 18
-#  8: ff -> fe
-#  9: ff -> dc
-# 10: 00 -> ba
-# 11: 20 -> 98
-# 12: 00 -> 76
-# 13: 00 -> 54
-# 14: 23 -> 32
-# 15: 20 -> 10
-# 16: 00 -> ff
-# 17: 16 -> ff
-# 18: 00 -> ff
-# 19: 00 -> ff
-# 20: 00 -> ff
-# 21: 00 -> ff
-# 22: 00 -> ff
-# 23: 00 -> ff
-# 24: fe -> (none)
-# 25: dc -> (none)
-# 26: ba -> (none)
-# 27: 98 -> (none)
-# 28: 76 -> (none)
-# 29: 54 -> (none)
-# 30: 32 -> (none)
-# 31: 10 -> (none)
-# 32: ff -> (none)
-# 33: ff -> (none)
-# 34: ff -> (none)
-# 35: ff -> (none)
-# 36: ff -> (none)
-# 37: ff -> (none)
-# 38: ff -> (none)
-# 39: ff -> (none)
-0004 0028 00000000 ffff 0020 00002320 0016 000000000000 fedcba9876543210 ffffffffffffffff
-
-dnl Write-Metadata with mask.
-# actions=write_metadata:0xfedcba9876543210/0xff00ff00ff00ff00
-0002 0018 00000000 fedcba9876543210 ff00ff00ff00ff00
-
-dnl Write-Metadata too short.
-# bad OpenFlow11 instructions: OFPBIC_BAD_LEN
-0002 0010 00000000 fedcba9876543210
-
-dnl Write-Metadata too long.
-# bad OpenFlow11 instructions: OFPBIC_BAD_LEN
-0002 0020 00000000 fedcba9876543210 ffffffffffffffff 0000000000000000
-
-dnl Write-Metadata duplicated.
-# bad OpenFlow11 instructions: OFPBIC_DUP_INST
-0002 0018 00000000 fedcba9876543210 ff00ff00ff00ff00 0002 0018 00000000 fedcba9876543210 ff00ff00ff00ff00
-
-dnl Write-Metadata in wrong position (OpenFlow 1.1+ disregards the order
-dnl and OVS reorders it to the canonical order)
-# actions=write_metadata:0xfedcba9876543210,goto_table:1
-#  1: 01 -> 02
-#  3: 08 -> 18
-#  4: 01 -> 00
-#  8: 00 -> fe
-#  9: 02 -> dc
-# 10: 00 -> ba
-# 11: 18 -> 98
-# 12: 00 -> 76
-# 13: 00 -> 54
-# 14: 00 -> 32
-# 15: 00 -> 10
-# 16: fe -> ff
-# 17: dc -> ff
-# 18: ba -> ff
-# 19: 98 -> ff
-# 20: 76 -> ff
-# 21: 54 -> ff
-# 22: 32 -> ff
-# 23: 10 -> ff
-# 24: ff -> 00
-# 25: ff -> 01
-# 26: ff -> 00
-# 27: ff -> 08
-# 28: ff -> 01
-# 29: ff -> 00
-# 30: ff -> 00
-# 31: ff -> 00
-0001 0008 01 000000 0002 0018 00000000 fedcba9876543210 ffffffffffffffff
-
-dnl empty Write-Actions non-zero padding
-# actions=write_actions(drop)
-#  0: 00 -> (none)
-#  1: 03 -> (none)
-#  2: 00 -> (none)
-#  3: 08 -> (none)
-#  4: 00 -> (none)
-#  5: 00 -> (none)
-#  6: 00 -> (none)
-#  7: 01 -> (none)
-0003 0008 00000001
-
-dnl Check that an empty Write-Actions instruction gets dropped.
-# actions=write_actions(drop)
-#  0: 00 -> (none)
-#  1: 03 -> (none)
-#  2: 00 -> (none)
-#  3: 08 -> (none)
-#  4: 00 -> (none)
-#  5: 00 -> (none)
-#  6: 00 -> (none)
-#  7: 00 -> (none)
-0003 0008 00000000
-
-dnl Clear-Actions too-long
-# bad OpenFlow11 instructions: OFPBIC_BAD_LEN
-0005 0010 00000000 0000000000000000
-
-dnl Clear-Actions non-zero padding
-# actions=clear_actions
-#  7: 01 -> 00
-0005 0008 00000001
-
-dnl Clear-Actions non-zero padding
-# actions=clear_actions
-#  4: 01 -> 00
-0005 0008 01 000000
-
-dnl Clear-Actions
-# actions=clear_actions
-0005 0008 00000000
-
-dnl Experimenter actions not supported yet.
-# bad OpenFlow11 instructions: OFPBIC_BAD_EXPERIMENTER
-ffff 0008 01 000000
-
-dnl Bad instruction number (0 not assigned).
-# bad OpenFlow11 instructions: OFPBIC_UNKNOWN_INST
-0000 0008 01 000000
-
-])
-sed '/^[[#&]]/d' < test-data > input.txt
-sed -n 's/^# //p; /^$/p' < test-data > expout
-sed -n 's/^& //p' < test-data > experr
-AT_CAPTURE_FILE([input.txt])
-AT_CAPTURE_FILE([expout])
-AT_CAPTURE_FILE([experr])
-AT_CHECK(
-  [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-instructions OpenFlow11 < input.txt],
-  [0], [expout], [experr])
-AT_CLEANUP
-
-dnl Our primary goal here is to verify OpenFlow 1.2-specific changes,
-dnl so the list of tests is short.
-AT_SETUP([OpenFlow 1.2 action translation])
-AT_KEYWORDS([ofp-actions OF1.2])
-AT_DATA([test-data], [dnl
-# actions=LOCAL
-0000 0010 fffffffe 04d2 000000000000
-
-# bad OpenFlow12 actions: OFPBAC_BAD_SET_MASK
-& ofp_actions|WARN|bad action at offset 0 (OFPBAC_BAD_SET_MASK):
-& 00000000  00 19 00 18 80 00 09 0c-00 00 00 00 12 34 00 00
-& 00000010  00 00 ff ff 00 00 00 00-
-0019 0018 8000090c 000000001234 00000000ffff 00000000
-
-])
-sed '/^[[#&]]/d' < test-data > input.txt
-sed -n 's/^# //p; /^$/p' < test-data > expout
-sed -n 's/^& //p' < test-data > experr
-AT_CAPTURE_FILE([input.txt])
-AT_CAPTURE_FILE([expout])
-AT_CAPTURE_FILE([experr])
-AT_CHECK(
-  [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-actions OpenFlow12 < input.txt],
-  [0], [expout], [experr])
-AT_CLEANUP
-
-dnl Our primary goal here is to verify OpenFlow 1.3-specific changes,
-dnl so the list of tests is short.
-AT_SETUP([OpenFlow 1.3 action translation])
-AT_KEYWORDS([ofp-actions OF1.3])
-AT_DATA([test-data], [dnl
-# actions=LOCAL
-0000 0010 fffffffe 04d2 000000000000
-
-dnl Check the Nicira extension form of "move".
-# actions=move:NXM_OF_IN_PORT[]->NXM_OF_VLAN_TCI[]
-ffff 0018 00002320 0006 0010 0000 0000 00000002 00000802
-
-dnl Check the ONF extension form of "copy_field".
-# actions=move:NXM_OF_IN_PORT[]->NXM_OF_VLAN_TCI[]
-ffff 0020 4f4e4600 0c80 0000 0010 0000 0000 0000 00000002 00000802 00000000
-
-dnl Check OpenFlow v1.3.4 Conformance Test: 430.500.
-# bad OpenFlow13 actions: OFPBAC_BAD_SET_TYPE
-& ofp_actions|WARN|bad action at offset 0 (OFPBAC_BAD_SET_TYPE):
-& 00000000  00 19 00 08 80 00 fe 00-00 00 00 10 00 00 00 01
-& 00000010  00 00 00 00 00 00 00 00-
-0019 0008 8000fe00 000000100000 000100000000 00000000
-
-dnl Check OpenFlow v1.3.4 Conformance Test: 430.510.
-# bad OpenFlow13 actions: OFPBAC_BAD_SET_LEN
-& ofp_actions|WARN|bad action at offset 0 (OFPBAC_BAD_SET_LEN):
-& 00000000  00 19 00 10 80 00 08 07-00 01 02 03 04 05 00 00
-& 00000010  00 00 00 10 00 00 00 01-
-0019 0010 80000807 000102030405 000000000010 00000001
-
-])
-sed '/^[[#&]]/d' < test-data > input.txt
-sed -n 's/^# //p; /^$/p' < test-data > expout
-sed -n 's/^& //p' < test-data > experr
-AT_CAPTURE_FILE([input.txt])
-AT_CAPTURE_FILE([expout])
-AT_CAPTURE_FILE([experr])
-AT_CHECK(
-  [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-actions OpenFlow13 < input.txt],
-  [0], [expout], [experr])
-AT_CLEANUP
-
-dnl Our primary goal here is to verify that OpenFlow 1.5-specific changes,
-dnl so the list of tests is short.
-AT_SETUP([OpenFlow 1.5 action translation])
-AT_KEYWORDS([ofp-actions OF1.5])
-AT_DATA([test-data], [dnl
-# actions=LOCAL
-0000 0010 fffffffe 04d2 000000000000
-
-# actions=move:NXM_OF_IN_PORT[]->NXM_OF_VLAN_TCI[]
-001c 0018 0010 0000 0000 0000 00000002 00000802 00000000
-
-# actions=set_field:00:00:00:00:12:34/00:00:00:00:ff:ff->eth_src
-0019 0018 8000090c 000000001234 00000000ffff 00000000
-
-])
-sed '/^[[#&]]/d' < test-data > input.txt
-sed -n 's/^# //p; /^$/p' < test-data > expout
-sed -n 's/^& //p' < test-data > experr
-AT_CAPTURE_FILE([input.txt])
-AT_CAPTURE_FILE([expout])
-AT_CAPTURE_FILE([experr])
-AT_CHECK(
-  [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-actions OpenFlow15 < input.txt],
-  [0], [expout], [experr])
-AT_CLEANUP
-
-AT_SETUP([ofp-actions - inconsistent MPLS actions])
-OVS_VSWITCHD_START
-dnl OK: Use fin_timeout action on TCP flow
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-flow br0 'tcp actions=fin_timeout(idle_timeout=1)'])
-dnl Bad: Use fin_timeout action on TCP flow that has been converted to MPLS
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-flow br0 'tcp actions=push_mpls:0x8847,fin_timeout(idle_timeout=1)'],
-         [1], [], [dnl
-ovs-ofctl: none of the usable flow formats (OpenFlow10,NXM) is among the allowed flow formats (OpenFlow11)
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([reg_load <-> set_field translation corner case])
-AT_KEYWORDS([ofp-actions])
-OVS_VSWITCHD_START
-dnl In OpenFlow 1.3, set_field always sets all the bits in the field,
-dnl but when we translate to NXAST_LOAD we need to only set the bits that
-dnl actually exist (e.g. mpls_label only has 20 bits) otherwise OVS rejects
-dnl the "load" action as invalid.  Check that we do this correctly.
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 mpls,actions=set_field:10-\>mpls_label])
-AT_CHECK([ovs-ofctl -O OpenFlow10 dump-flows br0 | ofctl_strip], [0], [dnl
-NXST_FLOW reply:
- mpls actions=load:0xa->OXM_OF_MPLS_LABEL[[]]
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([enqueue action for OF1.1+])
-AT_KEYWORDS([ofp-actions])
-OVS_VSWITCHD_START
-dnl OpenFlow 1.0 has an "enqueue" action.  For OpenFlow 1.1+, we translate
-dnl it to a series of actions that accomplish the same thing.
-AT_CHECK([ovs-ofctl -O OpenFlow10 add-flow br0 'actions=enqueue(123,456)'])
-AT_CHECK([ovs-ofctl -O OpenFlow10 dump-flows br0 | ofctl_strip], [0], [dnl
-NXST_FLOW reply:
- actions=enqueue:123:456
-])
-AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip], [0], [dnl
-OFPST_FLOW reply (OF1.3):
- reset_counts actions=set_queue:456,output:123,pop_queue
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([mod_nw_ttl action for OF1.0])
-AT_KEYWORDS([ofp-actions])
-OVS_VSWITCHD_START
-dnl OpenFlow 1.1+ have a mod_nw_ttl action.  For OpenFlow 1.0, we translate
-dnl it to an Open vSwitch extension.
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'ip,actions=mod_nw_ttl:123'])
-AT_CHECK([ovs-ofctl -O OpenFlow10 dump-flows br0 | ofctl_strip], [0], [dnl
-NXST_FLOW reply:
- ip actions=load:0x7b->NXM_NX_IP_TTL[[]]
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip], [0], [dnl
-OFPST_FLOW reply (OF1.1):
- ip actions=mod_nw_ttl:123
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([mod_nw_ecn action translation])
-AT_KEYWORDS([ofp-actions])
-OVS_VSWITCHD_START
-
-dnl OpenFlow 1.1, but no other version, has a "mod_nw_ecn" action.
-dnl Check that we translate it properly for OF1.0 and OF1.2.
-dnl (OF1.3+ should be the same as OF1.2.)
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'ip,actions=mod_nw_ecn:2'])
-AT_CHECK([ovs-ofctl -O OpenFlow10 dump-flows br0 | ofctl_strip], [0], [dnl
-NXST_FLOW reply:
- ip actions=load:0x2->NXM_NX_IP_ECN[[]]
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip], [0], [dnl
-OFPST_FLOW reply (OF1.1):
- ip actions=mod_nw_ecn:2
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip], [0], [dnl
-OFPST_FLOW reply (OF1.2):
- ip actions=set_field:2->nw_ecn
-])
-
-dnl Check that OF1.2+ set_field to set ECN is translated into the OF1.1
-dnl mod_nw_ecn action.
-dnl
-dnl We don't do anything equivalent for OF1.0 reg_load because we prefer
-dnl that anything that comes in as reg_load gets translated back to reg_load
-dnl on output.  Perhaps this is somewhat inconsistent but it's what OVS
-dnl has done for multiple versions.
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip,actions=set_field:2->ip_ecn'])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip], [0], [dnl
-OFPST_FLOW reply (OF1.1):
- ip actions=mod_nw_ecn:2
-])
-
-dnl Check that OF1.2+ set_field to set ECN is translated for earlier OF
-dnl versions.
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl -O OpenFlow10 add-flow br0 'ip,actions=set_field:2->ip_ecn'])
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'ip,actions=set_field:2->ip_ecn'])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
diff --git a/tests/ofp-errors.at b/tests/ofp-errors.at
deleted file mode 100644
index da3aca3af..000000000
--- a/tests/ofp-errors.at
+++ /dev/null
@@ -1,232 +0,0 @@
-AT_BANNER([ofp-errors tests])
-
-AT_SETUP([OFPT_ERROR with type OFPET_HELLO_FAILED - OF1.0])
-AT_KEYWORDS([ofp-print ofp-errors])
-AT_CHECK([ovs-ofctl ofp-print 010100170000000000000001657874726120646174610a], [0], [dnl
-OFPT_ERROR (xid=0x0): OFPHFC_EPERM
-extra data\012
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_ERROR with type OFPET_HELLO_FAILED - OF1.1])
-AT_KEYWORDS([ofp-print ofp-errors])
-AT_CHECK([ovs-ofctl ofp-print 020100170000000000000001657874726120646174610a], [0], [dnl
-OFPT_ERROR (OF1.1) (xid=0x0): OFPHFC_EPERM
-extra data\012
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_ERROR with type OFPET_BAD_REQUEST - OF1.0])
-AT_KEYWORDS([ofp-print ofp-errors])
-AT_CHECK([ovs-ofctl ofp-print 0101001400000000000100060105ccddeeff0011], [0], [dnl
-OFPT_ERROR (xid=0x0): OFPBRC_BAD_LEN
-OFPT_FEATURES_REQUEST (xid=0xeeff0011):
-(***truncated to 8 bytes from 52445***)
-00000000  01 05 cc dd ee ff 00 11-                        |........        |
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_ERROR prints type of truncated inner messages])
-AT_KEYWORDS([ofp-print ofp-errors])
-AT_CHECK([ovs-ofctl ofp-print "0101004c092529d500010006 \
-01 06 00 e0 00 00 00 01 00 00 50 54 00 00 00 01 \
-00 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
-ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01"], [0], [dnl
-OFPT_ERROR (xid=0x92529d5): OFPBRC_BAD_LEN
-OFPT_FEATURES_REPLY (xid=0x1):
-(***truncated to 64 bytes from 224***)
-00000000  01 06 00 e0 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
-00000010  00 00 01 00 02 00 00 00-00 00 00 87 00 00 0f ff |................|
-00000020  ff fe 50 54 00 00 00 01-62 72 30 00 00 00 00 00 |..PT....br0.....|
-00000030  00 00 00 00 00 00 00 00-00 00 00 01 00 00 00 01 |................|
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_ERROR with code OFPBMC_BAD_PREREQ - OF1.0])
-AT_KEYWORDS([ofp-print ofp-errors])
-AT_CHECK([ovs-ofctl ofp-print '0101001c55555555 b0c20000 0000232000010104 0102000811111111'], [0], [dnl
-OFPT_ERROR (xid=0x55555555): OFPBMC_BAD_PREREQ
-OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_ERROR with code OFPBMC_BAD_PREREQ - OF1.1])
-AT_KEYWORDS([ofp-print ofp-errors])
-AT_CHECK([ovs-ofctl ofp-print '0201001c55555555 b0c20000 0000232000010104 0102000811111111'], [0], [dnl
-OFPT_ERROR (OF1.1) (xid=0x55555555): OFPBMC_BAD_PREREQ
-OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
-])
-AT_CLEANUP
-
-dnl Error type 3, code 1 is OFPFMFC_OVERLAP in OF1.0
-dnl and OFPBIC_UNSUP_INST in OF1.1, so check that value in both versions.
-AT_SETUP([OFPT_ERROR with type OFPFMFC_OVERLAP - OF1.0])
-AT_KEYWORDS([ofp-print ofp-errors])
-AT_CHECK([ovs-ofctl ofp-print 0101001400000000000300010106ccddeeff0011], [0], [dnl
-OFPT_ERROR (xid=0x0): OFPFMFC_OVERLAP
-OFPT_FEATURES_REPLY (xid=0xeeff0011):
-(***truncated to 8 bytes from 52445***)
-00000000  01 06 cc dd ee ff 00 11-                        |........        |
-])
-AT_CLEANUP
-AT_SETUP([OFPT_ERROR with type OFPBIC_UNSUP_INST - OF1.1])
-AT_KEYWORDS([ofp-print ofp-errors])
-AT_CHECK([ovs-ofctl ofp-print 0201001400000000000300010206ccddeeff0011], [0], [dnl
-OFPT_ERROR (OF1.1) (xid=0x0): OFPBIC_UNSUP_INST
-OFPT_FEATURES_REPLY (OF1.1) (xid=0xeeff0011):
-(***truncated to 8 bytes from 52445***)
-00000000  02 06 cc dd ee ff 00 11-                        |........        |
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_ERROR with type OFPBIC_DUP_INST - OF1.4])
-AT_KEYWORDS([ofp-print ofp-errors])
-AT_CHECK([ovs-ofctl ofp-print 0501001400000000000300090206ccddeeff0011], [0], [dnl
-OFPT_ERROR (OF1.4) (xid=0x0): OFPBIC_DUP_INST
-OFPT_FEATURES_REPLY (OF1.1) (xid=0xeeff0011):
-(***truncated to 8 bytes from 52445***)
-00000000  02 06 cc dd ee ff 00 11-                        |........        |
-])
-AT_CLEANUP
-
-dnl OF1.1 had OFPBIC_UNSUP_EXP_INST as 3,5.
-dnl OF1.2 broke it into OFPBIC_BAD_EXPERIMENTER as 3,5
-dnl                 and OFPBIC_BAD_EXT_TYPE as 3,6.
-dnl Thus, for OF1.1 we translate both of the latter error codes into 3,5.
-AT_SETUP([encoding OFPBIC_* experimenter errors])
-AT_KEYWORDS([ofp-print ofp-errors])
-AT_CHECK([ovs-ofctl print-error OFPBIC_BAD_EXPERIMENTER], [0], [dnl
-OpenFlow 1.1: vendor 0, type 3, code 5
-OpenFlow 1.2: vendor 0, type 3, code 5
-OpenFlow 1.3: vendor 0, type 3, code 5
-OpenFlow 1.4: vendor 0, type 3, code 5
-OpenFlow 1.5: vendor 0, type 3, code 5
-])
-AT_CHECK([ovs-ofctl print-error OFPBIC_BAD_EXP_TYPE], [0], [dnl
-OpenFlow 1.1: vendor 0, type 3, code 5
-OpenFlow 1.2: vendor 0, type 3, code 6
-OpenFlow 1.3: vendor 0, type 3, code 6
-OpenFlow 1.4: vendor 0, type 3, code 6
-OpenFlow 1.5: vendor 0, type 3, code 6
-])
-AT_CLEANUP
-
-dnl The "bad role" error was a Nicira extension in OpenFlow 1.0 and 1.1.
-dnl It was adopted as an official error code in OpenFlow 1.2.
-AT_SETUP([encoding errors extension that became official])
-AT_KEYWORDS([ofp-print ofp-errors])
-AT_CHECK(
-  [ovs-ofctl encode-error-reply OFPRRFC_BAD_ROLE 0100000812345678], [0], [dnl
-00000000  01 01 00 1c 12 34 56 78-b0 c2 00 00 00 00 23 20
-00000010  00 01 02 01 01 00 00 08-12 34 56 78
-])
-AT_CHECK(
-  [ovs-ofctl encode-error-reply OFPRRFC_BAD_ROLE 0200000812345678], [0], [dnl
-00000000  02 01 00 1c 12 34 56 78-b0 c2 00 00 00 00 23 20
-00000010  00 01 02 01 02 00 00 08-12 34 56 78
-])
-AT_CHECK(
-  [ovs-ofctl encode-error-reply OFPRRFC_BAD_ROLE 0300000812345678], [0], [dnl
-00000000  03 01 00 14 12 34 56 78-00 0b 00 02 03 00 00 08
-00000010  12 34 56 78
-])
-AT_CLEANUP
-
-AT_SETUP([decoding OFPBIC_* experimenter errors])
-AT_KEYWORDS([ofp-print ofp-errors])
-AT_CHECK([ovs-ofctl ofp-print '0201001455555555 00030005 0102000811111111'], [0], [dnl
-OFPT_ERROR (OF1.1) (xid=0x55555555): OFPBIC_BAD_EXPERIMENTER
-OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
-])
-AT_CHECK([ovs-ofctl ofp-print '0301001455555555 00030005 0102000811111111'], [0], [dnl
-OFPT_ERROR (OF1.2) (xid=0x55555555): OFPBIC_BAD_EXPERIMENTER
-OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
-])
-AT_CHECK([ovs-ofctl ofp-print '0301001455555555 00030006 0102000811111111'], [0], [dnl
-OFPT_ERROR (OF1.2) (xid=0x55555555): OFPBIC_BAD_EXP_TYPE
-OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
-])
-AT_CLEANUP
-
-AT_SETUP([decoding experimenter errors])
-AT_KEYWORDS([ofp-print ofp-errors])
-AT_CHECK([ovs-ofctl ofp-print '0101001c55555555 b0c20000 0000232000010203 0102000811111111'], [0], [dnl
-OFPT_ERROR (xid=0x55555555): NXBRC_MUST_BE_ZERO
-OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
-])
-AT_CHECK([ovs-ofctl ofp-print '0201001c55555555 b0c20000 0000232000010203 0102000811111111'], [0], [dnl
-OFPT_ERROR (OF1.1) (xid=0x55555555): NXBRC_MUST_BE_ZERO
-OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
-])
-AT_CHECK([ovs-ofctl ofp-print '0301001855555555 ffff0004 00002320 0102000811111111'], [0], [dnl
-OFPT_ERROR (OF1.2) (xid=0x55555555): NXBRC_MUST_BE_ZERO
-OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
-])
-
-AT_CHECK([ovs-ofctl ofp-print '0301001812345678 ffff0a28 4f4e4600 0300000812345678'], [0], [dnl
-OFPT_ERROR (OF1.2) (xid=0x12345678): OFPBIC_DUP_INST
-OFPT_HELLO (OF1.2) (xid=0x12345678):
- version bitmap: 0x01, 0x02, 0x03
-])
-AT_CHECK([ovs-ofctl ofp-print '0401001812345678 ffff0a28 4f4e4600 0400000812345678'], [0], [dnl
-OFPT_ERROR (OF1.3) (xid=0x12345678): OFPBIC_DUP_INST
-OFPT_HELLO (OF1.3) (xid=0x12345678):
- version bitmap: 0x01, 0x02, 0x03, 0x04
-])
-AT_CHECK([ovs-ofctl ofp-print '0501001412345678 00030009 0500000812345678'], [0], [dnl
-OFPT_ERROR (OF1.4) (xid=0x12345678): OFPBIC_DUP_INST
-OFPT_HELLO (OF1.4) (xid=0x12345678):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05
-])
-AT_CLEANUP
-
-AT_SETUP([encoding experimenter errors])
-AT_KEYWORDS([ofp-print ofp-errors])
-# Demonstrate that a Nicira extension error gets encoded correctly
-# using the Nicira error extension format in OF1.0 and OF1.1, and
-# correctly using the standard experimenter format in OF1.2.
-AT_CHECK(
-  [ovs-ofctl encode-error-reply NXBRC_MUST_BE_ZERO 0100000812345678], [0], [dnl
-00000000  01 01 00 1c 12 34 56 78-b0 c2 00 00 00 00 23 20
-00000010  00 01 02 03 01 00 00 08-12 34 56 78
-])
-AT_CHECK(
-  [ovs-ofctl encode-error-reply NXBRC_MUST_BE_ZERO 0200000812345678], [0], [dnl
-00000000  02 01 00 1c 12 34 56 78-b0 c2 00 00 00 00 23 20
-00000010  00 01 02 03 02 00 00 08-12 34 56 78
-])
-AT_CHECK(
-  [ovs-ofctl encode-error-reply NXBRC_MUST_BE_ZERO 0300000812345678], [0], [dnl
-00000000  03 01 00 18 12 34 56 78-ff ff 00 04 00 00 23 20
-00000010  03 00 00 08 12 34 56 78
-])
-
-# Check that OFPERR_OFPBIC_DUP_INST is:
-#    - not encodable in OF1.0 (OF1.0 doesn't have instructions, after all).
-#    - encoded as a Nicira extension in OF1.1.
-#    - encoded as an ONF extension in OF1.2 and OF1.3.
-#    - encoded in the standard form in OF1.4.
-AT_CHECK(
-  [ovs-ofctl '-vPATTERN:console:%c|%p|%m' encode-error-reply OFPBIC_DUP_INST 0100000812345678], [0], [dnl
-00000000  01 01 00 1c 12 34 56 78-b0 c2 00 00 00 00 23 20
-00000010  00 01 02 09 01 00 00 08-12 34 56 78
-], [ofp_errors|ERR|cannot encode OFPBIC_DUP_INST for OpenFlow 1.0
-])
-AT_CHECK([ovs-ofctl encode-error-reply OFPBIC_DUP_INST 0200000812345678], [0],
-[00000000  02 01 00 1c 12 34 56 78-b0 c2 00 00 00 00 23 20
-00000010  00 03 01 00 02 00 00 08-12 34 56 78
-])
-AT_CHECK([ovs-ofctl encode-error-reply OFPBIC_DUP_INST 0300000812345678], [0],
-[00000000  03 01 00 18 12 34 56 78-ff ff 0a 28 4f 4e 46 00
-00000010  03 00 00 08 12 34 56 78
-])
-AT_CHECK([ovs-ofctl encode-error-reply OFPBIC_DUP_INST 0400000812345678], [0],
-[00000000  04 01 00 18 12 34 56 78-ff ff 0a 28 4f 4e 46 00
-00000010  04 00 00 08 12 34 56 78
-])
-AT_CHECK([ovs-ofctl encode-error-reply OFPBIC_DUP_INST 0500000812345678], [0],
-[00000000  05 01 00 14 12 34 56 78-00 03 00 09 05 00 00 08
-00000010  12 34 56 78
-])
-AT_CLEANUP
diff --git a/tests/ofp-print.at b/tests/ofp-print.at
deleted file mode 100644
index fe8ccdf30..000000000
--- a/tests/ofp-print.at
+++ /dev/null
@@ -1,4060 +0,0 @@
-AT_BANNER([ofp-print])
-
-AT_SETUP([empty])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print ''], [0], [OpenFlow message is empty
-])
-AT_CLEANUP
-
-AT_SETUP([too short])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print aabb], [0], [dnl
-OpenFlow packet too short (only 2 bytes):
-00000000  aa bb                                           |..              |
-])
-AT_CLEANUP
-
-AT_SETUP([wrong OpenFlow version])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print 00bb0008eeff0011],
-  [0], [dnl
-***decode error: OFPBRC_BAD_TYPE***
-00000000  00 bb 00 08 ee ff 00 11-                        |........        |
-], [ofp_msgs|WARN|unknown OpenFlow message (version 0, type 187)
-])
-AT_CLEANUP
-
-AT_SETUP([truncated message])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print 0110ccddeeff0011], [0], [dnl
-(***truncated to 8 bytes from 52445***)
-00000000  01 10 cc dd ee ff 00 11-                        |........        |
-])
-AT_CLEANUP
-
-AT_SETUP([message only uses part of buffer])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print 01100009eeff00112233], [0], [dnl
-(***only uses 9 bytes out of 10***)
-00000000  01 10 00 09 ee ff 00 11-22 33                   |........"3      |
-])
-# "
-AT_CLEANUP
-
-AT_SETUP([OFPT_HELLO - ordinary])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print 0100000800000000], [0], [dnl
-OFPT_HELLO (xid=0x0):
- version bitmap: 0x01
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_HELLO with extra data])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print 0100001300000000657874726120646174610a], [0],
-[dnl
-OFPT_HELLO (xid=0x0):
- version bitmap: 0x01
- unknown data in hello:
-00000000  01 00 00 13 00 00 00 00-65 78 74 72 61 20 64 61 |........extra da|
-00000010  74 61 0a                                        |ta.             |
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_HELLO with version bitmap])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "01 00 00 10 00 00 00 00 00 01 00 08 00 00 00 f0"], [0],
-[dnl
-OFPT_HELLO (xid=0x0):
- version bitmap: 0x04, 0x05, 0x06, 0x07
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_HELLO with version bitmap and extra data])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 00 00 1b 00 00 00 00 ff ff 00 06 01 02 00 00 \
-00 01 00 08 00 00 00 f0 61 62 63"], [0],
-[dnl
-OFPT_HELLO (xid=0x0):
- version bitmap: 0x04, 0x05, 0x06, 0x07
- unknown data in hello:
-00000000  01 00 00 1b 00 00 00 00-ff ff 00 06 01 02 00 00 |................|
-00000010  00 01 00 08 00 00 00 f0-61 62 63                |........abc     |
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_HELLO with higher than supported version])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "0f 00 00 08 00 00 00 00"], [0],
-[dnl
-OFPT_HELLO (OF 0x0f) (xid=0x0):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f
-])
-AT_CHECK([ovs-ofctl ofp-print "40 00 00 08 00 00 00 00"], [0],
-[dnl
-OFPT_HELLO (OF 0x40) (xid=0x0):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
-])
-AT_CHECK([ovs-ofctl ofp-print "3f 00 00 18 00 00 00 00 00 01 00 0c aa aa aa aa aa aa aa aa 00 00 00 00"], [0],
-[dnl
-OFPT_HELLO (OF 0x3f) (xid=0x0):
- version bitmap: 0x01, 0x03, 0x05, 0x07, 0x09, 0x0b, 0x0d, 0x0f, 0x11, 0x13, 0x15, 0x17, 0x19, 0x1b, 0x1d, 0x1f
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_HELLO with contradictory version bitmaps])
-AT_KEYWORDS([ofp-print])
-dnl Bitmap claims support for no versions at all.
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "01 00 00 10 00 00 00 00 00 01 00 08 00 00 00 00"], [0],
-[OFPT_HELLO (xid=0x0):
- version bitmap: 0x01
- unknown data in hello:
-00000000  01 00 00 10 00 00 00 00-00 01 00 08 00 00 00 00 |................|
-], [dnl
-ofp_util|WARN|peer does not support any OpenFlow version (between 0x01 and 0x1f)
-])
-dnl Bitmap claims support for only versions above 0x1f.
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "3f 00 00 18 00 00 00 00 00 01 00 0c 00 00 00 00 aa aa aa aa 00 00 00 00"], [0],
-[OFPT_HELLO (OF 0x3f) (xid=0x0):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
- unknown data in hello:
-00000000  3f 00 00 18 00 00 00 00-00 01 00 0c 00 00 00 00 |?...............|
-00000010  aa aa aa aa 00 00 00 00-                        |........        |
-], [dnl
-ofp_util|WARN|peer does not support any OpenFlow version (between 0x01 and 0x1f)
-])
-dnl Bitmap claims support for nonexistent version 0x00.
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "01 00 00 10 00 00 00 00 00 01 00 08 00 00 00 f1"], [0], [dnl
-OFPT_HELLO (xid=0x0):
- version bitmap: 0x04, 0x05, 0x06, 0x07
-], [dnl
-ofp_util|WARN|peer claims to support invalid OpenFlow version 0x00
-])
-dnl Bitmap claims support for only nonexistent version 0x00.
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "01 00 00 10 00 00 00 00 00 01 00 08 00 00 00 01"], [0], [dnl
-OFPT_HELLO (xid=0x0):
- version bitmap: 0x01
- unknown data in hello:
-00000000  01 00 00 10 00 00 00 00-00 01 00 08 00 00 00 01 |................|
-], [dnl
-ofp_util|WARN|peer claims to support invalid OpenFlow version 0x00
-ofp_util|WARN|peer does not support any OpenFlow version (between 0x01 and 0x1f)
-])
-AT_CLEANUP
-
-dnl OFPT_ERROR tests are in ofp-errors.at.
-
-AT_SETUP([OFPT_ECHO_REQUEST, empty payload])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '01 02 00 08 00 00 00 01'], [0], [dnl
-OFPT_ECHO_REQUEST (xid=0x1): 0 bytes of payload
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_ECHO_REQUEST, 5-byte payload])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '0102000d00000001 25 53 54 1a 9d'], [0], [dnl
-OFPT_ECHO_REQUEST (xid=0x1): 5 bytes of payload
-00000000  25 53 54 1a 9d                                  |%ST..           |
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_ECHO_REPLY, empty payload])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '01 03 00 08 00 00 00 01'], [0], [dnl
-OFPT_ECHO_REPLY (xid=0x1): 0 bytes of payload
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_ECHO_REPLY, 5-byte payload])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '0103000d0000000ba330efaf9e'], [0], [dnl
-OFPT_ECHO_REPLY (xid=0xb): 5 bytes of payload
-00000000  a3 30 ef af 9e                                  |.0...           |
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FEATURES_REQUEST])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '0105000800000001'], [0], [dnl
-OFPT_FEATURES_REQUEST (xid=0x1):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FEATURES_REPLY - OF1.0])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 06 00 e0 00 00 00 01 00 00 50 54 00 00 00 01 \
-00 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
-ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
-00 02 50 54 00 00 00 03 65 74 68 32 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
-00 01 50 54 00 00 00 02 65 74 68 31 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
-"], [0], [dnl
-OFPT_FEATURES_REPLY (xid=0x1): dpid:0000505400000001
-n_tables:2, n_buffers:256
-capabilities: FLOW_STATS TABLE_STATS PORT_STATS ARP_MATCH_IP
-actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
- 1(eth1): addr:50:54:00:00:00:02
-     config:     0
-     state:      0
-     current:    100MB-FD AUTO_NEG
-     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     speed: 100 Mbps now, 100 Mbps max
- 2(eth2): addr:50:54:00:00:00:03
-     config:     0
-     state:      0
-     current:    100MB-FD AUTO_NEG
-     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     speed: 100 Mbps now, 100 Mbps max
- 3(eth0): addr:50:54:00:00:00:01
-     config:     0
-     state:      0
-     current:    100MB-FD AUTO_NEG
-     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     speed: 100 Mbps now, 100 Mbps max
- LOCAL(br0): addr:50:54:00:00:00:01
-     config:     PORT_DOWN
-     state:      LINK_DOWN
-     speed: 0 Mbps now, 0 Mbps max
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port - OF1.0])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 06 00 dc 00 00 00 01 00 00 50 54 00 00 00 01 \
-00 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
-ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
-00 02 50 54 00 00 00 03 65 74 68 32 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
-00 01 50 54 00 00 00 02 65 74 68 31 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 02 08 00 00 02 8f 00 00 02 8f \
-"], [0], [dnl
-***decode error: OFPBRC_BAD_LEN***
-00000000  01 06 00 dc 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
-00000010  00 00 01 00 02 00 00 00-00 00 00 87 00 00 0f ff |................|
-00000020  ff fe 50 54 00 00 00 01-62 72 30 00 00 00 00 00 |..PT....br0.....|
-00000030  00 00 00 00 00 00 00 00-00 00 00 01 00 00 00 01 |................|
-00000040  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
-00000050  00 03 50 54 00 00 00 01-65 74 68 30 00 00 00 00 |..PT....eth0....|
-00000060  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
-00000070  00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
-00000080  00 02 50 54 00 00 00 03-65 74 68 32 00 00 00 00 |..PT....eth2....|
-00000090  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
-000000a0  00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
-000000b0  00 01 50 54 00 00 00 02-65 74 68 31 00 00 00 00 |..PT....eth1....|
-000000c0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
-000000d0  00 00 02 08 00 00 02 8f-00 00 02 8f             |............    |
-], [stderr])
-AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
-received OFPT_FEATURES_REPLY with incorrect length 220 (must be exactly 32 bytes or longer by an integer multiple of 48 bytes)
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FEATURES_REPLY - OF1.1])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-02 06 00 a0 00 00 00 01 00 00 50 54 00 00 00 01 \
-00 00 01 00 02 00 00 00 00 00 00 87 00 00 00 00 \
-ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
-62 72 30 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
-00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
-65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
-00 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
-"], [0], [dnl
-OFPT_FEATURES_REPLY (OF1.1) (xid=0x1): dpid:0000505400000001
-n_tables:2, n_buffers:256
-capabilities: FLOW_STATS TABLE_STATS PORT_STATS ARP_MATCH_IP
- 3(eth0): addr:50:54:00:00:00:01
-     config:     0
-     state:      0
-     current:    100MB-FD AUTO_NEG
-     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     speed: 100 Mbps now, 100 Mbps max
- LOCAL(br0): addr:50:54:00:00:00:01
-     config:     PORT_DOWN
-     state:      LINK_DOWN
-     speed: 100 Mbps now, 100 Mbps max
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port - OF1.1])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-02 06 00 90 00 00 00 01 00 00 50 54 00 00 00 01 \
-00 00 01 00 02 00 00 00 00 00 00 87 00 00 00 00 \
-ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
-62 72 30 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
-00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
-65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
-"], [0], [dnl
-***decode error: OFPBRC_BAD_LEN***
-00000000  02 06 00 90 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
-00000010  00 00 01 00 02 00 00 00-00 00 00 87 00 00 00 00 |................|
-00000020  ff ff ff fe 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
-00000030  62 72 30 00 00 00 00 00-00 00 00 00 00 00 00 00 |br0.............|
-00000040  00 00 00 01 00 00 00 01-00 00 00 00 00 00 00 00 |................|
-00000050  00 00 00 00 00 00 00 00-00 01 86 a0 00 01 86 a0 |................|
-00000060  00 00 00 03 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
-00000070  65 74 68 30 00 00 00 00-00 00 00 00 00 00 00 00 |eth0............|
-00000080  00 00 00 00 00 00 00 00-00 00 20 08 00 00 28 0f |.......... ...@{:@.|
-], [stderr])
-AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
-received OFPT_FEATURES_REPLY with incorrect length 144 (must be exactly 32 bytes or longer by an integer multiple of 64 bytes)
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FEATURES_REPLY - OF1.2])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 06 00 a0 00 00 00 01 00 00 50 54 00 00 00 01 \
-00 00 01 00 ff 00 00 00 00 00 01 77 00 00 00 00 \
-ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
-62 72 30 0a 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
-00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
-65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
-00 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
-"], [0], [dnl
-OFPT_FEATURES_REPLY (OF1.2) (xid=0x1): dpid:0000505400000001
-n_tables:255, n_buffers:256
-capabilities: FLOW_STATS TABLE_STATS PORT_STATS IP_REASM QUEUE_STATS PORT_BLOCKED
- 3(eth0): addr:50:54:00:00:00:01
-     config:     0
-     state:      0
-     current:    100MB-FD AUTO_NEG
-     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     speed: 100 Mbps now, 100 Mbps max
- LOCAL(br0): addr:50:54:00:00:00:01
-     config:     PORT_DOWN
-     state:      LINK_DOWN
-     speed: 100 Mbps now, 100 Mbps max
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port - OF1.2])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 06 00 a0 00 00 00 01 00 00 50 54 00 00 00 01 \
-00 00 01 00 ff 00 00 00 00 00 01 77 00 00 00 00 \
-ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
-62 72 30 0a 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
-00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
-65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
-"], [0], [dnl
-OFPT_FEATURES_REPLY (OF1.2) (xid=0x1):
-(***truncated to 144 bytes from 160***)
-00000000  03 06 00 a0 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
-00000010  00 00 01 00 ff 00 00 00-00 00 01 77 00 00 00 00 |...........w....|
-00000020  ff ff ff fe 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
-00000030  62 72 30 0a 00 00 00 00-00 00 00 00 00 00 00 00 |br0.............|
-00000040  00 00 00 01 00 00 00 01-00 00 00 00 00 00 00 00 |................|
-00000050  00 00 00 00 00 00 00 00-00 01 86 a0 00 01 86 a0 |................|
-00000060  00 00 00 03 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
-00000070  65 74 68 30 00 00 00 00-00 00 00 00 00 00 00 00 |eth0............|
-00000080  00 00 00 00 00 00 00 00-00 00 20 08 00 00 28 0f |.......... ...@{:@.|
-], [stderr])
-AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FEATURES_REPLY - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 06 00 20 00 00 00 01 00 00 50 54 00 00 00 01 \
-00 00 01 00 ff 00 00 00 00 00 01 77 00 00 00 00 \
-"], [0], [dnl
-OFPT_FEATURES_REPLY (OF1.3) (xid=0x1): dpid:0000505400000001
-n_tables:255, n_buffers:256
-capabilities: FLOW_STATS TABLE_STATS PORT_STATS IP_REASM QUEUE_STATS PORT_BLOCKED
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FEATURES_REPLY - OF1.4])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 06 00 20 00 00 00 01 00 00 50 54 00 00 00 01 \
-00 00 01 00 ff 00 00 00 00 00 07 6f 00 00 00 00 \
-"], [0], [dnl
-OFPT_FEATURES_REPLY (OF1.4) (xid=0x1): dpid:0000505400000001
-n_tables:255, n_buffers:256
-capabilities: FLOW_STATS TABLE_STATS PORT_STATS GROUP_STATS IP_REASM QUEUE_STATS PORT_BLOCKED BUNDLES FLOW_MONITORING
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FEATURES_REPLY - OF1.5])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 06 00 20 00 00 00 01 00 00 50 54 00 00 00 01 \
-00 00 01 00 ff 00 00 00 00 00 07 6f 00 00 00 00 \
-"], [0], [dnl
-OFPT_FEATURES_REPLY (OF1.5) (xid=0x1): dpid:0000505400000001
-n_tables:255, n_buffers:256
-capabilities: FLOW_STATS TABLE_STATS PORT_STATS GROUP_STATS IP_REASM QUEUE_STATS PORT_BLOCKED BUNDLES FLOW_MONITORING
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FEATURES_REPLY - with auxiliary_id - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 06 00 20 00 00 00 01 00 00 50 54 00 00 00 01 \
-00 00 01 00 ff 01 00 00 00 00 01 77 00 00 00 00 \
-"], [0], [dnl
-OFPT_FEATURES_REPLY (OF1.3) (xid=0x1): dpid:0000505400000001
-n_tables:255, n_buffers:256, auxiliary_id:1
-capabilities: FLOW_STATS TABLE_STATS PORT_STATS IP_REASM QUEUE_STATS PORT_BLOCKED
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_GET_CONFIG_REQUEST])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '0107000800000001'], [0], [dnl
-OFPT_GET_CONFIG_REQUEST (xid=0x1):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_GET_CONFIG_REPLY, most common form])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 00 00 00'], [0], [dnl
-OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0
-])
-AT_CLEANUP
-
-
-AT_SETUP([OFPT_GET_CONFIG_REPLY, frags and miss_send_len])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 02 00 ff'], [0], [dnl
-OFPT_GET_CONFIG_REPLY (xid=0x3): frags=reassemble miss_send_len=255
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_IN - OF1.0])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 0a 00 4e 00 00 00 00 00 00 01 11 00 3c 00 03 \
-00 00 50 54 00 00 00 06 50 54 00 00 00 05 08 00 \
-45 00 00 28 bd 12 00 00 40 06 3c 6a c0 a8 00 01 \
-c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
-50 02 02 00 26 e8 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=3 (via no_match) data_len=60 buffer=0x00000111
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=10031,tp_dst=0,tcp_flags=syn tcp_csum:26e8
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_IN - OF1.0, with hex output of packet data])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 0a 00 4e 00 00 00 00 00 00 01 11 00 3c 00 03 \
-00 00 50 54 00 00 00 06 50 54 00 00 00 05 08 00 \
-45 00 00 28 bd 12 00 00 40 06 3c 6a c0 a8 00 01 \
-c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
-50 10 02 00 26 e8 00 00 00 00 00 00 00 00 \
-" 3], [0], [dnl
-OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=3 (via no_match) data_len=60 buffer=0x00000111
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=10031,tp_dst=0,tcp_flags=ack tcp_csum:26e8
-00000000  50 54 00 00 00 06 50 54-00 00 00 05 08 00 45 00
-00000010  00 28 bd 12 00 00 40 06-3c 6a c0 a8 00 01 c0 a8
-00000020  00 02 27 2f 00 00 78 50-cc 5b 57 af 42 1e 50 10
-00000030  02 00 26 e8 00 00 00 00-00 00 00 00
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_IN - OF1.1])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-02 0a 00 54 00 00 00 00 00 00 01 11 00 00 00 03 \
-00 00 00 03 00 3c 00 00 \
-50 54 00 00 00 06 50 54 00 00 00 05 08 00 \
-45 00 00 28 bd 12 00 00 40 06 3c 6a c0 a8 00 01 \
-c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
-50 02 02 00 26 e8 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPT_PACKET_IN (OF1.1) (xid=0x0): total_len=60 in_port=3 (via no_match) data_len=60 buffer=0x00000111
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=10031,tp_dst=0,tcp_flags=syn tcp_csum:26e8
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_IN - OF1.2])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 0a 00 4c 00 00 00 00 ff ff ff 00 00 2a 00 00 \
-00 01 00 0c 80 00 00 04 ff ff ff fe 00 00 00 00 \
-00 00 ff ff ff ff ff ff 00 23 20 83 c1 5f 80 35 \
-00 01 08 00 06 04 00 01 00 23 20 83 c1 5f 00 00 \
-00 00 00 23 20 83 c1 5f 00 00 00 00 \
-"], [0], [dnl
-OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
-rarp,vlan_tci=0x0000,dl_src=00:23:20:83:c1:5f,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=1,arp_sha=00:23:20:83:c1:5f,arp_tha=00:23:20:83:c1:5f
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_IN - OF1.2, with hex output of packet data])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 0a 00 4c 00 00 00 00 ff ff ff 00 00 2a 00 00 \
-00 01 00 0c 80 00 00 04 ff ff ff fe 00 00 00 00 \
-00 00 ff ff ff ff ff ff 00 23 20 83 c1 5f 80 35 \
-00 01 08 00 06 04 00 03 00 23 20 83 c1 5f 00 00 \
-00 00 00 23 20 83 c1 5f 00 00 00 00 \
-" 3], [0], [dnl
-OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
-rarp,vlan_tci=0x0000,dl_src=00:23:20:83:c1:5f,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=3,arp_sha=00:23:20:83:c1:5f,arp_tha=00:23:20:83:c1:5f
-00000000  ff ff ff ff ff ff 00 23-20 83 c1 5f 80 35 00 01
-00000010  08 00 06 04 00 03 00 23-20 83 c1 5f 00 00 00 00
-00000020  00 23 20 83 c1 5f 00 00-00 00
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_IN - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 0a 00 54 00 00 00 00 ff ff ff 00 00 2a 00 00 \
-01 02 03 04 05 06 07 08 00 01 00 0c 80 00 00 04 \
-ff ff ff fe 00 00 00 00 00 00 ff ff ff ff ff ff \
-00 23 20 83 c1 5f 80 35 00 01 08 00 06 04 00 03 \
-00 23 20 83 c1 5f 00 00 00 00 00 23 20 83 c1 5f \
-00 00 00 00 \
-"], [0], [dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x102030405060708 total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
-rarp,vlan_tci=0x0000,dl_src=00:23:20:83:c1:5f,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=3,arp_sha=00:23:20:83:c1:5f,arp_tha=00:23:20:83:c1:5f
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_IN - OF1.4])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 0a 00 54 00 00 00 00 ff ff ff 00 00 2a 00 00 \
-01 02 03 04 05 06 07 08 00 01 00 0c 80 00 00 04 \
-ff ff ff fe 00 00 00 00 00 00 ff ff ff ff ff ff \
-00 23 20 83 c1 5f 80 35 00 01 08 00 06 04 00 03 \
-00 23 20 83 c1 5f 00 00 00 00 00 23 20 83 c1 5f \
-00 00 00 00 \
-"], [0], [dnl
-OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x102030405060708 total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
-rarp,vlan_tci=0x0000,dl_src=00:23:20:83:c1:5f,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=3,arp_sha=00:23:20:83:c1:5f,arp_tha=00:23:20:83:c1:5f
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_IN - OF1.5])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 0a 00 54 00 00 00 00 ff ff ff 00 00 2a 00 00 \
-01 02 03 04 05 06 07 08 00 01 00 0c 80 00 00 04 \
-ff ff ff fe 00 00 00 00 00 00 ff ff ff ff ff ff \
-00 23 20 83 c1 5f 80 35 00 01 08 00 06 04 00 03 \
-00 23 20 83 c1 5f 00 00 00 00 00 23 20 83 c1 5f \
-00 00 00 00 \
-"], [0], [dnl
-OFPT_PACKET_IN (OF1.5) (xid=0x0): cookie=0x102030405060708 total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
-rarp,vlan_tci=0x0000,dl_src=00:23:20:83:c1:5f,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=3,arp_sha=00:23:20:83:c1:5f,arp_tha=00:23:20:83:c1:5f
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_IN - OF1.3, with hex output of packet data])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 0a 00 54 00 00 00 00 ff ff ff 00 00 2a 00 00 \
-01 02 03 04 05 06 07 08 00 01 00 0c 80 00 00 04 \
-ff ff ff fe 00 00 00 00 00 00 ff ff ff ff ff ff \
-00 23 20 83 c1 5f 80 35 00 01 08 00 06 04 00 03 \
-00 23 20 83 c1 5f 00 00 00 00 00 23 20 83 c1 5f \
-00 00 00 00 \
-" 3], [0], [dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x102030405060708 total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
-rarp,vlan_tci=0x0000,dl_src=00:23:20:83:c1:5f,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=3,arp_sha=00:23:20:83:c1:5f,arp_tha=00:23:20:83:c1:5f
-00000000  ff ff ff ff ff ff 00 23-20 83 c1 5f 80 35 00 01
-00000010  08 00 06 04 00 03 00 23-20 83 c1 5f 00 00 00 00
-00000020  00 23 20 83 c1 5f 00 00-00 00
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FLOW_REMOVED - OF1.0])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 0b 00 58 00 00 00 00 00 00 00 00 00 03 50 54 \
-00 00 00 05 50 54 00 00 00 06 ff ff 00 00 08 06 \
-00 02 00 00 c0 a8 00 01 c0 a8 00 02 00 00 00 00 \
-00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 05 \
-30 e0 35 00 00 05 00 00 00 00 00 00 00 00 00 01 \
-00 00 00 00 00 00 00 3c \
-"], [0], [dnl
-OFPT_FLOW_REMOVED (xid=0x0): priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 reason=idle duration5.820s idle5 pkts1 bytes60
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FLOW_REMOVED - OF1.2])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 0b 00 40 00 00 00 00 fe dc ba 98 76 54 32 10 \
-80 00 01 05 00 00 00 01 00 98 96 80 00 3c 00 78 \
-00 00 00 00 00 12 d6 87 00 00 00 00 6f 68 ba 66 \
-00 01 00 0a 80 00 0c 02 10 09 00 00 00 00 00 00"], [0], [dnl
-OFPT_FLOW_REMOVED (OF1.2) (xid=0x0): dl_vlan=9 reason=hard table_id=5 cookie:0xfedcba9876543210 duration1.010s idle60 hard120 pkts1234567 bytes1869134438
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FLOW_REMOVED - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 0b 00 40 00 00 00 00 fe dc ba 98 76 54 32 10 \
-80 00 01 05 00 00 00 01 00 98 96 80 00 3c 00 78 \
-00 00 00 00 00 12 d6 87 00 00 00 00 6f 68 ba 66 \
-00 01 00 0a 80 00 0c 02 10 09 00 00 00 00 00 00"], [0], [dnl
-OFPT_FLOW_REMOVED (OF1.3) (xid=0x0): dl_vlan=9 reason=hard table_id=5 cookie:0xfedcba9876543210 duration1.010s idle60 hard120 pkts1234567 bytes1869134438
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FLOW_REMOVED - OF1.5])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 0b 00 80 00 00 00 02 01 00 00 00 11 00 22 00 \
-00 00 00 00 00 00 00 01 00 01 00 2d 80 00 00 04 \
-00 00 00 02 80 00 06 06 52 54 00 c3 00 89 80 00 \
-0a 02 08 00 80 00 10 01 00 80 00 04 08 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 34 80 02 00 08 \
-00 00 00 98 29 e6 ed c0 80 02 02 08 00 00 00 98 \
-00 00 00 00 80 02 08 08 00 00 00 00 00 00 00 02 \
-80 02 0a 08 00 00 00 00 00 00 00 80 00 00 00 00 \
-"], [0], [dnl
-OFPT_FLOW_REMOVED (OF1.5) (xid=0x2): priority=0,ip,metadata=0,in_port=2,dl_dst=52:54:00:c3:00:89,nw_tos=0 reason=idle table_id=1 cookie:0x1 duration152.703s idle4352 hard8704 pkts2 bytes128
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PORT_STATUS - OF1.0])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 0c 00 40 00 00 00 00 02 00 00 00 00 00 00 00 \
-00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
-00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
-"], [0], [dnl
-OFPT_PORT_STATUS (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
-     config:     PORT_DOWN
-     state:      LINK_DOWN
-     current:    100MB-FD AUTO_NEG
-     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     speed: 100 Mbps now, 100 Mbps max
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PORT_STATUS - OF1.1])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-02 0c 00 50 00 00 00 00 02 00 00 00 00 00 00 00 \
-00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
-65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
-00 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
-"], [0], [dnl
-OFPT_PORT_STATUS (OF1.1) (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
-     config:     0
-     state:      0
-     current:    100MB-FD AUTO_NEG
-     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     speed: 100 Mbps now, 100 Mbps max
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PORT_STATUS - OF1.4])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 0c 00 58 00 00 00 00 02 00 00 00 00 00 00 00 \
-00 00 00 03 00 48 00 00 50 54 00 00 00 01 00 00 \
-65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 \
-00 00 20 08 00 00 28 0f 00 00 28 0f 00 00 00 00 \
-00 01 86 a0 00 01 86 a0 \
-"], [0], [dnl
-OFPT_PORT_STATUS (OF1.4) (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
-     config:     0
-     state:      0
-     current:    100MB-FD AUTO_NEG
-     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     speed: 100 Mbps now, 100 Mbps max
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_OUT - OF1.0])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 0d 00 54 00 00 00 00 00 00 01 14 00 01 00 08 \
-00 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
-00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
-b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
-00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
-00 00 00 00 \
-"], [0], [dnl
-OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 buffer=0x00000114
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_OUT - OF1.0, with packet])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 0d 00 54 00 00 00 00 ff ff ff ff 00 01 00 08 \
-00 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
-00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
-b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
-00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
-00 00 00 00 \
-"], [0], [dnl
-OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 data_len=60
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=11104,tcp_flags=rst|ack tcp_csum:6d75
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_OUT - OF1.0, with hex output of packet data])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 0d 00 54 00 00 00 00 ff ff ff ff 00 01 00 08 \
-00 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
-00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
-b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
-00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
-00 00 00 00 \
-" 3], [0], [dnl
-OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 data_len=60
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=11104,tcp_flags=rst|ack tcp_csum:6d75
-00000000  50 54 00 00 00 05 50 54-00 00 00 06 08 00 45 00
-00000010  00 28 00 00 40 00 40 06-b9 7c c0 a8 00 02 c0 a8
-00000020  00 01 00 00 2b 60 00 00-00 00 6a 4f 2b 58 50 14
-00000030  00 00 6d 75 00 00 00 00-00 00 00 00
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_OUT - OF1.1])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 0d 00 28 88 58 df c5 ff ff ff 00 ff ff ff fe \
-00 10 00 00 00 00 00 00 00 00 00 10 ff ff ff fb \
-05 dc 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPT_PACKET_OUT (OF1.2) (xid=0x8858dfc5): in_port=LOCAL actions=FLOOD buffer=0xffffff00
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_OUT - OF1.1, with packet])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 0d 00 64 88 58 df c5 ff ff ff ff ff ff ff fe \
-00 10 00 00 00 00 00 00 00 00 00 10 ff ff ff fb \
-05 dc 00 00 00 00 00 00 50 54 00 00 00 05 50 54 \
-00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
-b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
-00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
-00 00 00 00 \
-"], [0], [dnl
-OFPT_PACKET_OUT (OF1.2) (xid=0x8858dfc5): in_port=LOCAL actions=FLOOD data_len=60
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=11104,tcp_flags=rst|ack tcp_csum:6d75
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_OUT - OF1.5])
-AT_KEYWORDS([ofp-print packet-out])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 0d 00 30 11 22 33 44 ff ff ff 00 00 10 00 00 \
-00 01 00 10 80 00 00 04 00 00 00 01 00 00 00 00 \
-00 00 00 10 ff ff ff fb 05 dc 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPT_PACKET_OUT (OF1.5) (xid=0x11223344): in_port=1 actions=FLOOD buffer=0xffffff00
-])
-
-dnl missing in_port
-AT_CHECK([ovs-ofctl ofp-print "\
-06 0d 00 40 11 22 33 44 ff ff ff 00 00 10 00 00 \
-00 01 00 20 80 00 04 08 00 00 00 00 00 00 00 03 \
-80 00 4C 08 00 00 00 00 00 00 00 05 00 00 00 00 \
-00 00 00 10 ff ff ff fb 05 dc 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPT_PACKET_OUT (OF1.5) (xid=0x11223344): ***decode error: OFPBRC_BAD_PORT***
-00000000  06 0d 00 40 11 22 33 44-ff ff ff 00 00 10 00 00 |... at ."3D........|
-00000010  00 01 00 20 80 00 04 08-00 00 00 00 00 00 00 03 |... ............|
-00000020  80 00 4c 08 00 00 00 00-00 00 00 05 00 00 00 00 |..L.............|
-00000030  00 00 00 10 ff ff ff fb-05 dc 00 00 00 00 00 00 |................|
-])
-
-AT_CHECK([ovs-ofctl ofp-print "\
-06 0d 00 48 11 22 33 44 ff ff ff 00 00 10 00 00 \
-00 01 00 28 80 00 00 04 00 00 00 01 80 00 04 08 \
-00 00 00 00 00 00 00 03 80 00 4C 08 00 00 00 00 \
-00 00 00 05 00 00 00 00 00 00 00 10 ff ff ff fb \
-05 dc 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPT_PACKET_OUT (OF1.5) (xid=0x11223344): tun_id=0x5,metadata=0x3,in_port=1 actions=FLOOD buffer=0xffffff00
-])
-
-dnl include non pipeline field
-AT_CHECK([ovs-ofctl ofp-print "\
-06 0d 00 38 11 22 33 44 ff ff ff 00 00 10 00 00 \
-00 01 00 18 80 00 00 04 00 00 00 01 80 00 16 04 \
-11 22 33 44 00 00 00 00 00 00 00 10 ff ff ff fb \
-05 dc 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPT_PACKET_OUT (OF1.5) (xid=0x11223344): ***decode error: OFPBRC_PIPELINE_FIELDS_ONLY***
-00000000  06 0d 00 38 11 22 33 44-ff ff ff 00 00 10 00 00 |...8."3D........|
-dnl "
-00000010  00 01 00 18 80 00 00 04-00 00 00 01 80 00 16 04 |................|
-00000020  11 22 33 44 00 00 00 00-00 00 00 10 ff ff ff fb |."3D............|
-00000030  05 dc 00 00 00 00 00 00-                        |........        |
-])
-
-AT_CLEANUP
-
-AT_SETUP([OFPT_PACKET_OUT - OF1.5, with packet])
-AT_KEYWORDS([ofp-print packet-out])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 0d 00 74 11 22 33 44 ff ff ff ff 00 10 00 00 \
-00 01 00 18 80 00 00 04 00 00 00 01 80 00 04 08 \
-00 00 00 00 00 00 00 03 00 00 00 10 ff ff ff fb \
-05 dc 00 00 00 00 00 00 50 54 00 00 00 05 50 54 \
-00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
-b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
-00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
-00 00 00 00
-"], [0], [dnl
-OFPT_PACKET_OUT (OF1.5) (xid=0x11223344): metadata=0x3,in_port=1 actions=FLOOD data_len=60
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=11104,tcp_flags=rst|ack tcp_csum:6d75
-])
-AT_CLEANUP
-
-# The flow is formatted with cls_rule_format() for the low-verbosity case.
-AT_SETUP([OFPT_FLOW_MOD - OF1.0 - low verbosity])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
-00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
-00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
-00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
-" 2], [0], [dnl
-OFPT_FLOW_MOD (xid=0x0): ADD priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 idle:5 buf:0x10e out_port:0 actions=output:3
-], [dnl
-ofp_match|INFO|normalization changed ofp_match, details:
-ofp_match|INFO| pre: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0
-ofp_match|INFO|post: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2
-])
-AT_CLEANUP
-
-# The flow is formatted with cls_rule_format() for the low-verbosity case.
-AT_SETUP([OFPT_FLOW_MOD - OF1.1 - low verbosity])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-020e 0090 01020304 \
-da1aa3e035d87158 ffffffffffffffff \
-02 01 003c 0078 9c40 ffffffff ffffffff ffffffff 0003 \
-0000 \
-\
-0000 0058 00000000 000003f7 \
-000000000000ffffffffffff 000000000000ffffffffffff \
-0000 00 00 0806 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 \
-00000000 00 000000 0000000000000000ffffffffffffffff \
-\
-0001 0008 03 000000 \
-" 2], [0], [dnl
-OFPT_FLOW_MOD (OF1.1) (xid=0x1020304): MOD table:2 priority=40000,arp,arp_spa=192.168.128.0/24 cookie:0xda1aa3e035d87158/0xffffffffffffffff idle:60 hard:120 send_flow_rem check_overlap actions=goto_table:3
-])
-AT_CLEANUP
-
-# The flow is formatted with cls_rule_format() for the low-verbosity case.
-AT_SETUP([OFPT_FLOW_MOD - OF1.2 - low verbosity])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-03 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
-ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
-50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
-80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
-00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
-00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
-00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
-" 2], [0], [dnl
-OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD table:1 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 actions=output:3
-], [dnl
-])
-AT_CLEANUP
-
-# The flow is formatted with ofp10_match_to_string() for the
-# high-verbosity case.
-AT_SETUP([OFPT_FLOW_MOD - OF1.0 - high verbosity])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
-00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
-00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
-00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
-" 3], [0], [dnl
-OFPT_FLOW_MOD (xid=0x0): ADD arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 idle:5 pri:65535 buf:0x10e out_port:0 actions=output:3
-], [dnl
-ofp_match|INFO|normalization changed ofp_match, details:
-ofp_match|INFO| pre: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0
-ofp_match|INFO|post: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2
-])
-AT_CLEANUP
-
-# The flow is formatted with cls_rule_format() for the low-verbosity case.
-AT_SETUP([OFPT_FLOW_MOD - OF1.2 - low verbosity])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-03 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
-ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
-50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
-80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
-00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
-00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
-00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
-" 2], [0], [dnl
-OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD table:1 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 actions=output:3
-], [dnl
-])
-AT_CLEANUP
-
-# The flow is formatted with cls_rule_format() for the low-verbosity case.
-AT_SETUP([OFPT_FLOW_MOD - OF1.3 - flags - low verbosity])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-04 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
-ff ff ff ff ff ff ff ff ff ff ff ff 00 1f 00 00 \
-00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
-50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
-80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
-00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
-00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
-00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
-" 2], [0], [dnl
-OFPT_FLOW_MOD (OF1.3) (xid=0x2): ADD table:1 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 send_flow_rem check_overlap reset_counts no_packet_counts no_byte_counts actions=output:3
-], [dnl
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field ip_src])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-03 0e 00 58 52 33 45 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
-ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
-00 04 00 18 00 00 00 00 00 19 00 10 80 00 16 04 \
-c0 a8 03 5c 00 00 00 00                         \
-" 2], [0], [dnl
-OFPT_FLOW_MOD (OF1.2) (xid=0x52334502): ADD priority=255,ip actions=set_field:192.168.3.92->ip_src
-], [dnl
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field ip_dst])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-03 0e 00 58 52 33 45 07 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
-ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
-00 04 00 18 00 00 00 00 00 19 00 10 80 00 18 04 \
-c0 a8 4a 7a 00 00 00 00                         \
-" 2], [0], [dnl
-OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,ip actions=set_field:192.168.74.122->ip_dst
-], [dnl
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field sctp_src])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-03 0e 00 58 52 33 45 07 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
-ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
-00 04 00 18 00 00 00 00 00 19 00 10 80 00 22 02 \
-0d 06 00 00 00 00 00 00                         \
-" 2], [0], [dnl
-OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,sctp actions=set_field:3334->sctp_src
-], [dnl
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field sctp_dst])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-03 0e 00 58 52 33 45 07 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
-ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
-00 04 00 18 00 00 00 00 00 19 00 10 80 00 24 02 \
-11 5d 00 00 00 00 00 00                         \
-" 2], [0], [dnl
-OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,sctp actions=set_field:4445->sctp_dst
-], [dnl
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FLOW_MOD - OF1.2 - experimenter OXM])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-03 0e 00 48 52 33 45 07 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
-ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 01 00 14 ff ff 01 0c 00 00 23 20 01 23 45 67 \
-0f ff ff ff 00 00 00 00
-" 2], [0], [dnl
-OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,dp_hash=0x1234567/0xfffffff actions=drop
-], [dnl
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field nd_target, nd_sll])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-03 0e 00 78 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
-ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 01 00 14 80 00 0a 02 86 dd 80 00 14 01 3a 80 \
-00 3a 01 87 00 00 00 00 00 04 00 30 00 00 00 00 \
-00 19 00 18 80 00 3e 10 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 01 00 19 00 10 80 00 40 06 \
-aa aa aa aa aa aa 00 00
-" 2], [0], [dnl
-OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD priority=255,icmp6,icmp_type=135 actions=set_field:::1->nd_target,set_field:aa:aa:aa:aa:aa:aa->nd_sll
-], [dnl
-])
-AT_CLEANUP
-
-dnl This triggered a buggy "instructions out of order" message earlier.
-AT_SETUP([OFPT_FLOW_MOD - OF1.3 - meter])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 0e 00 40 cf fe 6b 86 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 e8 \
-ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 01 00 04 00 00 00 00 00 06 00 08 00 00 00 01"], [0], [dnl
-OFPT_FLOW_MOD (OF1.3) (xid=0xcffe6b86): ADD priority=1000 actions=meter:1
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field ip_src])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-03 13 00 68 52 33 45 04 00 01 00 00 00 00 00 00 \
-00 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
-00 04 00 18 00 00 00 00 00 19 00 10 80 00 16 04 \
-c0 a8 03 5c 00 00 00 00                         \
-" 2], [0], [dnl
-OFPST_FLOW reply (OF1.2) (xid=0x52334504):
- cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,ip actions=set_field:192.168.3.92->ip_src
-], [dnl
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field ip_dst])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-03 13 00 68 52 33 45 09 00 01 00 00 00 00 00 00 \
-00 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
-00 04 00 18 00 00 00 00 00 19 00 10 80 00 18 04 \
-c0 a8 4a 7a 00 00 00 00                         \
-" 2], [0], [dnl
-OFPST_FLOW reply (OF1.2) (xid=0x52334509):
- cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,ip actions=set_field:192.168.74.122->ip_dst
-], [dnl
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field sctp_src])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-03 13 00 68 52 33 45 04 00 01 00 00 00 00 00 00 \
-00 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
-00 04 00 18 00 00 00 00 00 19 00 10 80 00 22 02 \
-0d 06 00 00 00 00 00 00                         \
-" 2], [0], [dnl
-OFPST_FLOW reply (OF1.2) (xid=0x52334504):
- cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,sctp actions=set_field:3334->sctp_src
-], [dnl
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field sctp_dst])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-03 13 00 68 52 33 45 09 00 01 00 00 00 00 00 00 \
-00 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
-00 04 00 18 00 00 00 00 00 19 00 10 80 00 24 02 \
-11 5d 00 00 00 00 00 00                         \
-" 2], [0], [dnl
-OFPST_FLOW reply (OF1.2) (xid=0x52334509):
- cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,sctp actions=set_field:4445->sctp_dst
-], [dnl
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PORT_MOD - OF1.0])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 0f 00 20 00 00 00 03 00 03 50 54 00 00 00 01 \
-00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
-" 3], [0], [dnl
-OFPT_PORT_MOD (xid=0x3): port: 3: addr:50:54:00:00:00:01
-     config: PORT_DOWN
-     mask:   PORT_DOWN
-     advertise: UNCHANGED
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PORT_MOD - OF1.1])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-02 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
-50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
-00 00 00 00 00 00 00 00 \
-" 3], [0], [dnl
-OFPT_PORT_MOD (OF1.1) (xid=0x3): port: 3: addr:50:54:00:00:00:01
-     config: PORT_DOWN
-     mask:   PORT_DOWN
-     advertise: UNCHANGED
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PORT_MOD - OF1.2])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
-50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
-00 00 00 00 00 00 00 00 \
-" 3], [0], [dnl
-OFPT_PORT_MOD (OF1.2) (xid=0x3): port: 3: addr:50:54:00:00:00:01
-     config: PORT_DOWN
-     mask:   PORT_DOWN
-     advertise: UNCHANGED
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PORT_MOD - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
-50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
-00 00 00 00 00 00 00 00 \
-" 3], [0], [dnl
-OFPT_PORT_MOD (OF1.3) (xid=0x3): port: 3: addr:50:54:00:00:00:01
-     config: PORT_DOWN
-     mask:   PORT_DOWN
-     advertise: UNCHANGED
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_PORT_MOD - OF1.4])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
-50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
-00 00 00 08 00 00 00 01
-" 3], [0], [dnl
-OFPT_PORT_MOD (OF1.4) (xid=0x3): port: 3: addr:50:54:00:00:00:01
-     config: PORT_DOWN
-     mask:   PORT_DOWN
-     advertise: 10MB-HD
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_TABLE_MOD - OF1.1])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-02 11 00 10 00 00 00 02 02 00 00 00 00 00 00 02 \
-" 3], [0], [dnl
-OFPT_TABLE_MOD (OF1.1) (xid=0x2): table_id=2, flow_miss_config=drop
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_TABLE_MOD - OF1.2])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 11 00 10 00 00 00 02 02 00 00 00 00 00 00 01 \
-" 3], [0], [dnl
-OFPT_TABLE_MOD (OF1.2) (xid=0x2): table_id=2, flow_miss_config=continue
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_TABLE_MOD - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 11 00 10 00 00 00 02 02 00 00 00 00 00 00 00 \
-" 3], [0], [dnl
-OFPT_TABLE_MOD (OF1.3) (xid=0x2): table_id=2
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_TABLE_MOD - OF1.4])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 11 00 10 00 00 00 02 02 00 00 00 00 00 00 00 \
-" 3], [0], [dnl
-OFPT_TABLE_MOD (OF1.4) (xid=0x2): table_id=2, eviction=off, vacancy=off
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_DESC request])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100000000"], [0], [dnl
-OFPST_DESC request (xid=0x1):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_DESC reply])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 04 2c 00 00 00 01 00 00 00 00 4e 69 63 69 \
-72 61 2c 20 49 6e 63 2e 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 4f 70 65 6e \
-20 76 53 77 69 74 63 68 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 31 2e 31 2e \
-30 70 72 65 32 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPST_DESC reply (xid=0x1):
-Manufacturer: Nicira, Inc.
-Hardware: Open vSwitch
-Software: 1.1.0pre2
-Serial Num: None
-DP Description: None
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_FLOW request - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 10 00 38 00 00 00 04 00 01 00 00 00 38 20 ff \
-ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 ff 00 ff ff \
-"], [0], [dnl
-OFPST_FLOW request (xid=0x4):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_FLOW request - OF1.2])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 12 00 38 00 00 00 02 00 01 00 00 00 00 00 00 \
-ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 01 00 04 00 00 00 00 \
-"], [0], [dnl
-OFPST_FLOW request (OF1.2) (xid=0x2):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_FLOW request - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 12 00 38 00 00 00 02 00 01 00 00 00 00 00 00 \
-ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 01 00 04 00 00 00 00 \
-"], [0], [dnl
-OFPST_FLOW request (OF1.3) (xid=0x2):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_FLOW request - OF1.5])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 12 00 38 00 00 00 04 00 01 00 00 00 00 00 00 \
-ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 01 00 04 00 00 00 00 \
-"], [0], [dnl
-OFPST_FLOW request (OF1.5) (xid=0x4):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_FLOW reply - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 01 e4 00 00 00 04 00 01 00 00 00 60 00 00 \
-00 00 00 00 00 03 50 54 00 00 00 05 50 54 00 00 \
-00 06 ff ff 00 00 08 06 00 02 00 00 c0 a8 00 01 \
-c0 a8 00 02 00 00 00 00 00 00 00 04 0b eb c2 00 \
-ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
-00 00 00 3c 00 00 00 08 00 01 00 00 00 60 00 00 \
-00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
-00 05 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 02 \
-c0 a8 00 01 00 00 00 00 00 00 00 08 35 a4 e9 00 \
-ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
-00 00 04 fa 00 00 00 08 00 03 00 00 00 60 00 00 \
-00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
-00 05 ff ff 00 00 08 06 00 01 00 00 c0 a8 00 02 \
-c0 a8 00 01 00 00 00 00 00 00 00 04 10 b0 76 00 \
-ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
-00 00 00 3c 00 00 00 08 00 03 00 00 00 60 00 00 \
-00 00 00 01 00 03 50 54 00 00 00 05 50 54 00 00 \
-00 06 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 01 \
-c0 a8 00 02 00 08 00 00 00 00 00 09 05 b8 d8 00 \
-80 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
-00 00 04 fa 00 00 00 08 00 01 00 00 \
-00 58 02 00 00 3f ff ff 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPST_FLOW reply (xid=0x4):
- cookie=0x0, duration=4.200s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 actions=output:1
- cookie=0x0, duration=8.900s, table=0, n_packets=13, n_bytes=1274, idle_timeout=5, priority=65535,icmp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,icmp_type=0,icmp_code=0 actions=output:3
- cookie=0x0, duration=4.280s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=1,nw_tos=0,tp_src=0,tp_dst=0 actions=output:3
- cookie=0x0, duration=9.096s, table=0, n_packets=13, n_bytes=1274, idle_timeout=5, icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,icmp_type=8,icmp_code=0 actions=output:1
- cookie=0x0, duration=0s, table=2, n_packets=0, n_bytes=0, actions=drop
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_FLOW reply - OF1.2])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 13 01 78 00 00 00 02 00 01 00 00 00 00 00 00 \
-00 78 00 00 00 00 00 03 01 5e f3 c0 80 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 62 \
-00 01 00 2d 80 00 00 04 00 00 00 02 80 00 06 06 \
-ca da ad d6 0d 37 80 00 0a 02 08 00 80 00 10 01 \
-00 80 00 04 08 00 00 00 00 00 00 00 00 00 00 00 \
-00 04 00 18 00 00 00 00 00 00 00 10 00 00 00 02 \
-05 dc 00 00 00 00 00 00 00 78 00 00 00 00 00 04 \
-20 7c 0a 40 80 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 \
-00 00 00 00 00 00 00 8c 00 01 00 2d 80 00 00 04 \
-00 00 00 02 80 00 06 06 52 54 00 c3 00 89 80 00 \
-0a 02 08 00 80 00 10 01 00 80 00 04 08 00 00 00 \
-00 00 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
-00 00 00 10 00 00 00 02 05 dc 00 00 00 00 00 00 \
-00 78 00 00 00 00 00 04 20 a9 d1 00 80 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 2a \
-00 01 00 2d 80 00 00 04 00 00 00 02 80 00 06 06 \
-52 54 00 97 00 69 80 00 0a 02 08 00 80 00 10 01 \
-00 80 00 04 08 00 00 00 00 00 00 00 00 00 00 00 \
-00 04 00 18 00 00 00 00 00 00 00 10 00 00 00 02 \
-05 dc 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPST_FLOW reply (OF1.2) (xid=0x2):
- cookie=0x0, duration=3.023s, table=0, n_packets=1, n_bytes=98, ip,metadata=0,in_port=2,dl_dst=ca:da:ad:d6:0d:37,nw_tos=0 actions=output:2
- cookie=0x0, duration=4.545s, table=0, n_packets=2, n_bytes=140, ip,metadata=0,in_port=2,dl_dst=52:54:00:c3:00:89,nw_tos=0 actions=output:2
- cookie=0x0, duration=4.548s, table=0, n_packets=1, n_bytes=42, ip,metadata=0,in_port=2,dl_dst=52:54:00:97:00:69,nw_tos=0 actions=output:2
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_FLOW reply - OF1.5])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 13 01 00 00 00 00 04 00 01 00 00 00 00 00 00 \
-00 78 00 00 00 00 80 00 00 00 00 00 00 05 00 00 \
-00 00 00 00 00 00 00 00 00 01 00 0c 80 00 00 04 \
-00 00 00 02 00 00 00 00 00 00 00 34 80 02 00 08 \
-00 00 00 c4 0b 06 e0 40 80 02 02 08 00 00 00 c4 \
-00 00 00 00 80 02 08 08 00 00 00 00 00 00 00 02 \
-80 02 0a 08 00 00 00 00 00 00 00 80 00 00 00 00 \
-00 04 00 18 00 00 00 00 00 00 00 10 ff ff ff fa \
-00 00 00 00 00 00 00 00 00 78 00 00 00 00 0f a0 \
-00 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 \
-00 01 00 0c 80 00 00 04 00 00 00 03 00 00 00 00 \
-00 00 00 34 80 02 00 08 00 00 00 b3 25 40 be 40 \
-80 02 02 08 00 00 00 b3 00 00 00 00 80 02 08 08 \
-00 00 00 00 00 00 00 02 80 02 0a 08 00 00 00 00 \
-00 00 00 80 00 00 00 00 00 04 00 18 00 00 00 00 \
-00 00 00 10 ff ff ff fa 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPST_FLOW reply (OF1.5) (xid=0x4):
- cookie=0x0, duration=196.185s, table=0, n_packets=2, n_bytes=128, send_flow_rem reset_counts idle_age=196, in_port=2 actions=NORMAL
- cookie=0x0, duration=179.625s, table=0, n_packets=2, n_bytes=128, send_flow_rem reset_counts idle_age=179, priority=4000,in_port=3 actions=NORMAL
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_AGGREGATE request - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 10 00 38 00 00 00 04 00 02 00 00 00 38 20 ff \
-ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 ff 00 ff ff \
-"], [0], [dnl
-OFPST_AGGREGATE request (xid=0x4):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_AGGREGATE request - OF1.2])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 12 00 38 00 00 00 02 00 02 00 00 00 00 00 00 \
-ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 01 00 04 00 00 00 00 \
-"], [0], [dnl
-OFPST_AGGREGATE request (OF1.2) (xid=0x2):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_AGGREGATE request - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 12 00 38 00 00 00 02 00 02 00 00 00 00 00 00 \
-ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 01 00 04 00 00 00 00 \
-"], [0], [dnl
-OFPST_AGGREGATE request (OF1.3) (xid=0x2):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_AGGREGATE request - OF1.5])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 12 00 60 00 00 00 04 00 02 00 00 00 00 00 00 \
-ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 01 00 04 00 00 00 00 00 00 00 24 80 02 06 04 \
-00 00 00 00 80 02 08 08 00 00 00 00 00 00 00 00 \
-80 02 0a 08 00 00 00 00 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPST_AGGREGATE request (OF1.5) (xid=0x4):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_AGGREGATE reply - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 00 24 00 00 00 04 00 02 00 00 00 00 00 00 \
-00 00 01 82 00 00 00 00 00 00 93 78 00 00 00 04 \
-00 00 00 00 \
-"], [0], [dnl
-OFPST_AGGREGATE reply (xid=0x4): packet_count=386 byte_count=37752 flow_count=4
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_AGGREGATE reply - OF1.2])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 13 00 28 00 00 00 02 00 02 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 79 00 00 00 00 00 00 4b 4f \
-00 00 00 03 00 00 00 00 \
-"], [0], [dnl
-OFPST_AGGREGATE reply (OF1.2) (xid=0x2): packet_count=121 byte_count=19279 flow_count=3
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_AGGREGATE reply - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 13 00 28 00 00 00 02 00 02 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 79 00 00 00 00 00 00 4b 4f \
-00 00 00 03 00 00 00 00 \
-"], [0], [dnl
-OFPST_AGGREGATE reply (OF1.3) (xid=0x2): packet_count=121 byte_count=19279 flow_count=3
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_AGGREGATE reply - OF1.5])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 13 00 38 00 00 00 04 00 02 00 00 00 00 00 00 \
-00 00 00 24 80 02 06 04 00 00 00 03 80 02 08 08 \
-00 00 00 00 00 00 00 79 80 02 0a 08 00 00 00 00 \
-00 00 4b 4f 00 00 00 00 \
-"], [0], [dnl
-OFPST_AGGREGATE reply (OF1.5) (xid=0x4): packet_count=121 byte_count=19279 flow_count=3
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_TABLE request - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100030000"], [0], [dnl
-OFPST_TABLE request (xid=0x1):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_TABLE request - OF1.1])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "02120010000000020003000000000000"], [0], [dnl
-OFPST_TABLE request (OF1.1) (xid=0x2):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_TABLE request - OF1.2])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "03120010000000020003000000000000"], [0], [dnl
-OFPST_TABLE request (OF1.2) (xid=0x2):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_TABLE request - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "04120010000000020003000000000000"], [0], [dnl
-OFPST_TABLE request (OF1.3) (xid=0x2):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_TABLE reply - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 00 4c 00 00 00 01 00 03 00 00 00 00 00 00 \
-63 6c 61 73 73 69 66 69 65 72 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 3f ff ff 00 10 00 00 00 00 00 0b 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPST_TABLE reply (xid=0x1):
-  table 0 ("classifier"):
-    active=11, lookup=0, matched=0
-    max_entries=1048576
-    matching:
-      in_port: exact match or wildcard
-      eth_src: exact match or wildcard
-      eth_dst: exact match or wildcard
-      eth_type: exact match or wildcard
-      vlan_vid: exact match or wildcard
-      vlan_pcp: exact match or wildcard
-      ip_src: exact match or wildcard
-      ip_dst: exact match or wildcard
-      nw_proto: exact match or wildcard
-      nw_tos: exact match or wildcard
-      tcp_src: exact match or wildcard
-      tcp_dst: exact match or wildcard
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_TABLE reply - OF1.2])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-(echo 'OFPST_TABLE reply (OF1.2) (xid=0x2):
-  table 0 ("classifier"):
-    active=1, lookup=74614, matched=106024
-    config=controller
-    max_entries=1000000
-    instructions (table miss and others):
-      instructions: write_metadata,goto_table
-      Write-Actions and Apply-Actions features:
-        supported on Set-Field: metadata in_port_oxm eth_src eth_dst eth_type vlan_vid vlan_pcp mpls_label mpls_tc ip_src ip_dst ipv6_src ipv6_dst ipv6_label nw_proto ip_dscp nw_ecn arp_op arp_spa arp_tpa arp_sha arp_tha tcp_src tcp_dst udp_src udp_dst sctp_src sctp_dst icmp_type icmp_code icmpv6_type icmpv6_code nd_target nd_sll nd_tll
-    matching:
-      metadata: exact match or wildcard
-      in_port_oxm: exact match or wildcard
-      eth_src: exact match or wildcard
-      eth_dst: exact match or wildcard
-      eth_type: exact match or wildcard
-      vlan_vid: exact match or wildcard
-      vlan_pcp: exact match or wildcard
-      mpls_label: exact match or wildcard
-      mpls_tc: exact match or wildcard
-      ip_src: exact match or wildcard
-      ip_dst: exact match or wildcard
-      ipv6_src: exact match or wildcard
-      ipv6_dst: exact match or wildcard
-      ipv6_label: exact match or wildcard
-      nw_proto: exact match or wildcard
-      ip_dscp: exact match or wildcard
-      nw_ecn: exact match or wildcard
-      arp_op: exact match or wildcard
-      arp_spa: exact match or wildcard
-      arp_tpa: exact match or wildcard
-      arp_sha: exact match or wildcard
-      arp_tha: exact match or wildcard
-      tcp_src: exact match or wildcard
-      tcp_dst: exact match or wildcard
-      udp_src: exact match or wildcard
-      udp_dst: exact match or wildcard
-      sctp_src: exact match or wildcard
-      sctp_dst: exact match or wildcard
-      icmp_type: exact match or wildcard
-      icmp_code: exact match or wildcard
-      icmpv6_type: exact match or wildcard
-      icmpv6_code: exact match or wildcard
-      nd_target: exact match or wildcard
-      nd_sll: exact match or wildcard
-      nd_tll: exact match or wildcard
-
-  table 1 ("table1"):
-    active=0, lookup=0, matched=0
-    (same features)
-'
- for i in `seq 2 253`; do
-     printf '  table %d ("table%d"): ditto\n' $i $i
- done
- echo '  table 254 ("table254"):
-    active=2, lookup=0, matched=0
-    (same features)') > expout
-
-(pad32="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
- pad7="00 00 00 00 00 00 00 "
- mid="00 00 00 0f ff ff ff ff \
-00 00 00 0f ff ff ff ff 00 00 00 00 00 00 00 00 \
-00 00 00 0f ff ff ff ff 00 00 00 0f ff ff ff ff \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 07 00 00 00 00 00 0f 42 40 "
- tail="00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
-
- printf "03 13 7f 90 00 00 00 02 00 03 00 00 00 00 00 00 "
-
- x=0
- printf "%02x $pad7" $x
- printf "%s$pad32" "classifier" | od -A n -t x1 -v -N 32 | tr '\n' ' '
- printf "$mid 00 00 00 01  "
- printf "00 00 00 00 00 01 23 76 00 00 00 00 00 01 9e 28 "
-
- x=1
- while test $x -lt 254; do
-   printf "%02x $pad7" $x
-   printf "%s$pad32" "table$x" | od -A n -t x1 -v -N 32 | tr '\n' ' '
-   printf "$mid 00 00 00 00 $tail "
-   x=`expr $x + 1`
- done
-
- x=254
- printf "%02x $pad7" $x
- printf "%s$pad32" "table$x" | od -A n -t x1 -v -N 32 | tr '\n' ' '
- printf "$mid 00 00 00 02 $tail") > in
-AT_CHECK([ovs-ofctl ofp-print - < in], [0], [expout])
-AT_CLEANUP
-
-AT_SETUP([OFPST_TABLE reply - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 13 00 40 00 00 00 01 00 03 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 0b 00 00 00 00 00 00 02 00 \
-00 00 00 00 00 00 01 00 01 00 00 00 00 00 00 0c \
-00 00 00 00 00 00 02 01 00 00 00 00 00 00 01 01 \
-"], [0], [dnl
-OFPST_TABLE reply (OF1.3) (xid=0x1):
-  table 0:
-    active=11, lookup=512, matched=256
-
-  table 1:
-    active=12, lookup=513, matched=257
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_PORT request - 1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 10 00 14 00 00 00 01 00 04 00 00 ff ff 00 00 \
-00 00 00 00 \
-"], [0], [dnl
-OFPST_PORT request (xid=0x1): port_no=ANY
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_PORT request - 1.1])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-02 12 00 18 00 00 00 02 00 04 00 00 00 00 00 00 \
-ff ff ff ff 00 00 00 00 \
-"], [0], [dnl
-OFPST_PORT request (OF1.1) (xid=0x2): port_no=ANY
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_PORT request - 1.2])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 12 00 18 00 00 00 02 00 04 00 00 00 00 00 00 \
-ff ff ff ff 00 00 00 00 \
-"], [0], [dnl
-OFPST_PORT request (OF1.2) (xid=0x2): port_no=ANY
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_PORT request - 1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 12 00 18 00 00 00 02 00 04 00 00 00 00 00 00 \
-ff ff ff ff 00 00 00 00 \
-"], [0], [dnl
-OFPST_PORT request (OF1.3) (xid=0x2): port_no=ANY
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_PORT reply - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 01 ac 00 00 00 01 00 04 00 00 00 03 00 00 \
-00 00 00 00 00 00 00 00 00 00 4d 20 00 00 00 00 \
-00 00 14 32 00 00 00 00 00 0f 60 4e 00 00 00 00 \
-00 05 71 bc 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 ff fe 00 00 00 00 00 00 00 00 00 00 \
-00 00 02 ac 00 00 00 00 00 00 01 f5 00 00 00 00 \
-00 01 0c 8c 00 00 00 00 00 00 db 1c 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
-00 00 00 00 00 00 00 00 00 00 06 be 00 00 00 00 \
-00 00 05 84 00 00 00 00 00 02 34 b4 00 00 00 00 \
-00 02 23 d4 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 \
-00 00 14 12 00 00 00 00 00 00 14 66 00 00 00 00 \
-00 04 a2 54 00 00 00 00 00 05 8a 1e 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPST_PORT reply (xid=0x1): 4 ports
-  port  3: rx pkts=19744, bytes=1007694, drop=0, errs=0, frame=0, over=0, crc=0
-           tx pkts=5170, bytes=356796, drop=0, errs=0, coll=0
-  port LOCAL: rx pkts=684, bytes=68748, drop=0, errs=0, frame=0, over=0, crc=0
-           tx pkts=501, bytes=56092, drop=0, errs=0, coll=0
-  port  2: rx pkts=1726, bytes=144564, drop=0, errs=0, frame=0, over=0, crc=0
-           tx pkts=1412, bytes=140244, drop=0, errs=0, coll=0
-  port  1: rx pkts=5138, bytes=303700, drop=0, errs=0, frame=0, over=0, crc=0
-           tx pkts=5222, bytes=363038, drop=0, errs=0, coll=0
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_PORT reply - OF1.2])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 13 01 48 00 00 00 02 00 04 00 00 00 00 00 00 \
-00 00 00 02 00 00 00 00 00 00 00 00 00 01 95 56 \
-00 00 00 00 00 00 00 88 00 00 00 00 02 5d 08 98 \
-00 00 00 00 00 00 2c f8 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 ff ff ff fe 00 00 00 00 \
-00 00 00 00 00 00 00 44 00 00 00 00 00 00 9d 2c \
-00 00 00 00 00 00 16 7c 00 00 00 00 01 1e 36 44 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 44 \
-00 00 00 00 00 00 9d 2c 00 00 00 00 00 00 16 7c \
-00 00 00 00 01 1e 36 44 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPST_PORT reply (OF1.2) (xid=0x2): 3 ports
-  port  2: rx pkts=103766, bytes=39651480, drop=0, errs=0, frame=0, over=0, crc=0
-           tx pkts=136, bytes=11512, drop=0, errs=0, coll=0
-  port LOCAL: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
-           tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
-  port  1: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
-           tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_PORT reply - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 13 01 60 00 00 00 02 00 04 00 00 00 00 00 00 \
-00 00 00 02 00 00 00 00 00 00 00 00 00 01 95 56 \
-00 00 00 00 00 00 00 88 00 00 00 00 02 5d 08 98 \
-00 00 00 00 00 00 2c f8 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 01 00 0f 42 40 \
-ff ff ff fe 00 00 00 00 \
-00 00 00 00 00 00 00 44 00 00 00 00 00 00 9d 2c \
-00 00 00 00 00 00 16 7c 00 00 00 00 01 1e 36 44 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-ff ff ff ff ff ff ff ff \
-00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 44 \
-00 00 00 00 00 00 9d 2c 00 00 00 00 00 00 16 7c \
-00 00 00 00 01 1e 36 44 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 07 54 d4 c0 \
-"], [0], [dnl
-OFPST_PORT reply (OF1.3) (xid=0x2): 3 ports
-  port  2: rx pkts=103766, bytes=39651480, drop=0, errs=0, frame=0, over=0, crc=0
-           tx pkts=136, bytes=11512, drop=0, errs=0, coll=0
-           duration=1.001s
-  port LOCAL: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
-           tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
-  port  1: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
-           tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
-           duration=0.123s
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_PORT reply - OF1.4])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 13 00 88 00 00 00 02 00 04 00 00 00 00 00 00 \
-00 78 00 00 00 00 00 02 00 00 00 01 00 0f 42 40 \
-00 00 00 00 00 01 95 56 00 00 00 00 00 00 00 88 \
-00 00 00 00 02 5d 08 98 00 00 00 00 00 00 2c f8 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 28 00 00 00 00 00 00 00 00 00 00 00 fc \
-00 00 00 00 00 00 00 fd 00 00 00 00 00 00 00 fe \
-00 00 00 00 00 00 00 ff \
-"], [0], [dnl
-OFPST_PORT reply (OF1.4) (xid=0x2): 1 ports
-  port  2: rx pkts=103766, bytes=39651480, drop=0, errs=0, frame=252, over=253, crc=254
-           tx pkts=136, bytes=11512, drop=0, errs=0, coll=255
-           duration=1.001s
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_QUEUE request - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 10 00 14 00 00 00 01 00 05 00 00 ff fc 00 00 \
-ff ff ff ff \
-"], [0], [dnl
-OFPST_QUEUE request (xid=0x1): port=ANY queue=ALL
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_QUEUE request - OF1.1])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-02 12 00 18 00 00 00 02 00 05 00 00 00 00 00 00 \
-ff ff ff ff ff ff ff ff \
-"], [0], [dnl
-OFPST_QUEUE request (OF1.1) (xid=0x2): port=ANY queue=ALL
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_QUEUE request - OF1.2])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 12 00 18 00 00 00 02 00 05 00 00 00 00 00 00 \
-ff ff ff ff ff ff ff ff \
-"], [0], [dnl
-OFPST_QUEUE request (OF1.2) (xid=0x2): port=ANY queue=ALL
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_QUEUE request - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 12 00 18 00 00 00 02 00 05 00 00 00 00 00 00 \
-ff ff ff ff ff ff ff ff \
-"], [0], [dnl
-OFPST_QUEUE request (OF1.3) (xid=0x2): port=ANY queue=ALL
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_QUEUE reply - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 00 cc 00 00 00 01 00 05 00 00 00 03 00 00 \
-00 00 00 01 00 00 00 00 00 00 01 2e 00 00 00 00 \
-00 00 00 01 00 00 00 00 00 00 00 00 00 03 00 00 \
-00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
-00 00 00 01 00 00 00 00 00 00 08 34 00 00 00 00 \
-00 00 00 14 00 00 00 00 00 00 00 00 00 02 00 00 \
-00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
-00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
-00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPST_QUEUE reply (xid=0x1): 6 queues
-  port 3 queue 1: bytes=302, pkts=1, errors=0, duration=?
-  port 3 queue 2: bytes=0, pkts=0, errors=0, duration=?
-  port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=?
-  port 2 queue 2: bytes=0, pkts=0, errors=0, duration=?
-  port 1 queue 1: bytes=0, pkts=0, errors=0, duration=?
-  port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_QUEUE reply - OF1.1])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-02 13 00 d0 00 00 00 01 00 05 00 00 00 00 00 00 \
-00 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
-00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
-00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
-00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPST_QUEUE reply (OF1.1) (xid=0x1): 6 queues
-  port 3 queue 1: bytes=302, pkts=1, errors=0, duration=?
-  port 3 queue 2: bytes=0, pkts=0, errors=0, duration=?
-  port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=?
-  port 2 queue 2: bytes=0, pkts=0, errors=0, duration=?
-  port 1 queue 1: bytes=0, pkts=0, errors=0, duration=?
-  port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_QUEUE reply - OF1.2])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 13 00 d0 00 00 00 01 00 05 00 00 00 00 00 00 \
-00 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
-00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
-00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
-00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPST_QUEUE reply (OF1.2) (xid=0x1): 6 queues
-  port 3 queue 1: bytes=302, pkts=1, errors=0, duration=?
-  port 3 queue 2: bytes=0, pkts=0, errors=0, duration=?
-  port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=?
-  port 2 queue 2: bytes=0, pkts=0, errors=0, duration=?
-  port 1 queue 1: bytes=0, pkts=0, errors=0, duration=?
-  port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_QUEUE reply - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 13 01 00 00 00 00 01 00 05 00 00 00 00 00 00 \
-00 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
-00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 64 1d cd 65 00 \
-00 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 64 1d cd 65 00 \
-00 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
-00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
-00 00 00 64 1d cd 65 00 \
-00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 64 1d cd 65 00 \
-00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 64 1d cd 65 00 \
-00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-ff ff ff ff ff ff ff ff \
-"], [0], [dnl
-OFPST_QUEUE reply (OF1.3) (xid=0x1): 6 queues
-  port 3 queue 1: bytes=302, pkts=1, errors=0, duration=100.500s
-  port 3 queue 2: bytes=0, pkts=0, errors=0, duration=100.500s
-  port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=100.500s
-  port 2 queue 2: bytes=0, pkts=0, errors=0, duration=100.500s
-  port 1 queue 1: bytes=0, pkts=0, errors=0, duration=100.500s
-  port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_QUEUE reply - OF1.4])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 13 01 30 00 00 00 01 00 05 00 00 00 00 00 00 \
-00 30 00 00 00 00 00 00 \
-00 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
-00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 64 1d cd 65 00 00 30 00 00 00 00 00 00 \
-00 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 64 1d cd 65 00 00 30 00 00 00 00 00 00 \
-00 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
-00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
-00 00 00 64 1d cd 65 00 00 30 00 00 00 00 00 00 \
-00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 64 1d cd 65 00 00 30 00 00 00 00 00 00 \
-00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 64 1d cd 65 00 00 30 00 00 00 00 00 00 \
-00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-ff ff ff ff ff ff ff ff \
-"], [0], [dnl
-OFPST_QUEUE reply (OF1.4) (xid=0x1): 6 queues
-  port 3 queue 1: bytes=302, pkts=1, errors=0, duration=100.500s
-  port 3 queue 2: bytes=0, pkts=0, errors=0, duration=100.500s
-  port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=100.500s
-  port 2 queue 2: bytes=0, pkts=0, errors=0, duration=100.500s
-  port 1 queue 1: bytes=0, pkts=0, errors=0, duration=100.500s
-  port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_GROUP request - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 07 00 00 00 00 \
-ff ff ff ff 00 00 00 00 \
-"], [0], [NXST_GROUP request (xid=0x4): group_id=ANY
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_GROUP request - OF1.1])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-02 12 00 18 00 00 00 02 00 06 00 00 00 00 00 00 \
-ff ff ff ff 00 00 00 00 \
-"], [0], [OFPST_GROUP request (OF1.1) (xid=0x2): group_id=ANY
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_GROUP reply - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 00 b8 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 07 00 00 00 00 \
-00 58 00 00 87 65 43 21 00 00 00 04 00 00 00 00 \
-00 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
-00 00 00 12 1d cd 65 00 \
-00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
-00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
-00 00 00 00 00 00 66 66 00 00 00 00 00 33 33 33 \
-00 48 00 00 00 00 00 05 00 00 00 02 00 00 00 00 \
-00 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
-00 00 00 10 1d cd 65 00 \
-00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
-00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
-"], [0], [dnl
-NXST_GROUP reply (xid=0x4):
- group_id=2271560481,duration=18.500s,ref_count=4,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962,bucket2:packet_count=26214,byte_count=3355443
- group_id=5,duration=16.500s,ref_count=2,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_GROUP reply - OF1.1])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-02 13 00 a0 00 00 00 02 00 06 00 00 00 00 00 00 \
-00 50 00 00 87 65 43 21 00 00 00 04 00 00 00 00 \
-00 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
-00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
-00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
-00 00 00 00 00 00 66 66 00 00 00 00 00 33 33 33 \
-00 40 00 00 00 00 00 05 00 00 00 02 00 00 00 00 \
-00 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
-00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
-00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
-"], [0], [dnl
-OFPST_GROUP reply (OF1.1) (xid=0x2):
- group_id=2271560481,ref_count=4,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962,bucket2:packet_count=26214,byte_count=3355443
- group_id=5,ref_count=2,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_GROUP reply - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 13 00 b0 00 00 00 02 00 06 00 00 00 00 00 00 \
-00 58 00 00 87 65 43 21 00 00 00 04 00 00 00 00 \
-00 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
-00 00 00 12 1d cd 65 00 \
-00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
-00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
-00 00 00 00 00 00 66 66 00 00 00 00 00 33 33 33 \
-00 48 00 00 00 00 00 05 00 00 00 02 00 00 00 00 \
-00 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
-00 00 00 10 1d cd 65 00 \
-00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
-00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
-"], [0], [dnl
-OFPST_GROUP reply (OF1.3) (xid=0x2):
- group_id=2271560481,duration=18.500s,ref_count=4,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962,bucket2:packet_count=26214,byte_count=3355443
- group_id=5,duration=16.500s,ref_count=2,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_GROUP_DESC request - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 08 00 00 00 00 \
-00 00 00 01 00 00 00 00
-"], [0], [NXST_GROUP_DESC request (xid=0x4): group_id=1
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_GROUP_DESC request - OF1.1])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-02 12 00 10 00 00 00 02 00 07 00 00 00 00 00 00 \
-"], [0], [OFPST_GROUP_DESC request (OF1.1) (xid=0x2): group_id=ALL
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_GROUP_DESC request - OF1.5])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 12 00 18 00 00 00 02 00 07 00 00 00 00 00 00 \
-00 00 00 01 00 00 00 00
-"], [0], [OFPST_GROUP_DESC request (OF1.5) (xid=0x2): group_id=1
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_GROUP_DESC reply - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 00 c8 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 08 00 00 00 00 \
-00 b0 01 00 00 00 20 00 00 60 00 00 00 00 00 00 \
-00 20 00 08 00 00 00 00 00 00 00 08 00 01 00 00 \
-00 00 00 08 00 64 00 00 \
-00 01 00 08 00 00 00 01 \
-00 20 00 08 00 00 00 01 00 00 00 08 00 02 00 00 \
-00 00 00 08 00 c8 00 00 \
-00 01 00 08 00 00 00 02 \
-00 20 00 08 00 00 00 02 00 00 00 08 00 03 00 00 \
-00 00 00 08 00 c8 00 00 \
-00 01 00 08 00 00 00 03 \
-ff ff 00 3b 00 00 15 40 00 00 00 01 00 00 00 00 \
-68 61 73 68 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 \
-80 00 18 04 ff ff ff 00 80 00 1a 02 ff ff 80 00 \
-14 01 ff 00 00 00 00 00 \
-"], [0], [dnl
-NXST_GROUP_DESC reply (xid=0x4):
- group_id=8192,type=select,selection_method=hash,fields(ip_dst=255.255.255.0,nw_proto,tcp_src),bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_GROUP_DESC reply - OF1.1])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-02 13 00 78 00 00 00 02 00 07 00 00 00 00 00 00 \
-00 68 01 00 00 00 20 00 \
-00 20 00 64 00 00 00 01 ff ff ff ff 00 00 00 00 \
-00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 20 00 c8 00 00 00 02 ff ff ff ff 00 00 00 00 \
-00 00 00 10 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 20 00 c8 00 00 00 03 ff ff ff ff 00 00 00 00 \
-00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.1) (xid=0x2):
- group_id=8192,type=select,bucket=weight:100,watch_port:1,actions=output:1,bucket=weight:200,watch_port:2,actions=output:2,bucket=weight:200,watch_port:3,actions=output:3
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_GROUP_DESC reply - OF1.5])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 13 00 d8 00 00 00 02 00 07 00 00 00 00 00 00 \
-00 c8 01 00 00 00 20 00 00 78 00 00 00 00 00 00 \
-00 28 00 10 00 00 00 00 00 00 00 10 00 00 00 01 \
-00 00 00 00 00 00 00 00 00 00 00 08 00 64 00 00 \
-00 01 00 08 00 00 00 01 \
-00 28 00 10 00 00 00 01 00 00 00 10 00 00 00 02 \
-00 00 00 00 00 00 00 00 00 00 00 08 00 c8 00 00 \
-00 01 00 08 00 00 00 02 \
-00 28 00 10 00 00 00 02 00 00 00 10 00 00 00 03 \
-00 00 00 00 00 00 00 00 00 00 00 08 00 c8 00 00 \
-00 01 00 08 00 00 00 03 \
-ff ff 00 3b 00 00 15 40 00 00 00 01 00 00 00 00 \
-68 61 73 68 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 \
-80 00 18 04 ff ff ff 00 80 00 1a 02 ff ff 80 00 \
-14 01 ff 00 00 00 00 00 \
-"], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5) (xid=0x2):
- group_id=8192,type=select,selection_method=hash,fields(ip_dst=255.255.255.0,nw_proto,tcp_src),bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_GROUP_FEATURES request])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 10 00 18 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 09 00 00 00 00 \
-"], [0], [NXST_GROUP_FEATURES request (xid=0x4):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_GROUP_FEATURES request])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 12 00 10 00 00 00 02 00 08 00 00 00 00 00 00 \
-"], [0], [OFPST_GROUP_FEATURES request (OF1.2) (xid=0x2):
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_GROUP_FEATURES reply])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 00 40 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 09 00 00 00 00 \
-00 00 00 0f 00 00 00 0f \
-00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 \
-00 00 00 01 00 00 00 07 00 00 00 0f 00 00 00 1f \
-"], [0], [dnl
-NXST_GROUP_FEATURES reply (xid=0x4):
- Group table:
-    Types:  0xf
-    Capabilities:  0xf
-    all group:
-       max_groups=0x1
-       actions: output
-    select group:
-       max_groups=0x2
-       actions: output set_vlan_vid set_vlan_pcp
-    indirect group:
-       max_groups=0x3
-       actions: output set_vlan_vid set_vlan_pcp strip_vlan
-    fast failover group:
-       max_groups=0x4
-       actions: output set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_GROUP_FEATURES reply])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 13 00 38 00 00 00 02 00 08 00 00 00 00 00 00 \
-00 00 00 0f 00 00 00 0f \
-00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 \
-00 00 00 01 00 02 00 01 00 06 00 01 00 0e 00 01 \
-"], [0], [dnl
-OFPST_GROUP_FEATURES reply (OF1.2) (xid=0x2):
- Group table:
-    Types:  0xf
-    Capabilities:  0xf
-    all group:
-       max_groups=0x1
-       actions: output
-    select group:
-       max_groups=0x2
-       actions: output push_vlan
-    indirect group:
-       max_groups=0x3
-       actions: output strip_vlan push_vlan
-    fast failover group:
-       max_groups=0x4
-       actions: output strip_vlan push_vlan push_mpls
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_PORT_DESC request - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "0110000c00000001000d0000"], [0], [dnl
-OFPST_PORT_DESC request (xid=0x1): port=ANY
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_PORT_DESC request - OF1.5])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 12 00 18 00 00 00 02 00 0d 00 00 00 00 00 00 \
-00 00 00 05 00 00 00 00"], [0], [dnl
-OFPST_PORT_DESC request (OF1.5) (xid=0x2): port=5
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_PORT_DESC reply - OF1.0])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 00 3c 00 00 00 00 00 0d 00 00 00 03 50 54 \
-00 00 00 01 65 74 68 30 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 01 00 00 00 01 00 00 02 08 \
-00 00 02 8f 00 00 02 8f 00 00 00 00 \
-"], [0], [dnl
-OFPST_PORT_DESC reply (xid=0x0):
- 3(eth0): addr:50:54:00:00:00:01
-     config:     PORT_DOWN
-     state:      LINK_DOWN
-     current:    100MB-FD AUTO_NEG
-     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     speed: 100 Mbps now, 100 Mbps max
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_PORT_DESC reply - OF1.4])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 13 00 58 00 00 00 02 00 0d 00 00 00 00 00 00 \
-00 00 00 03 00 48 00 00 50 54 00 00 00 01 00 00 \
-65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 \
-00 00 20 08 00 00 28 0f 00 00 28 0f 00 00 00 00 \
-00 01 86 a0 00 01 86 a0 \
-"], [0], [dnl
-OFPST_PORT_DESC reply (OF1.4) (xid=0x2):
- 3(eth0): addr:50:54:00:00:00:01
-     config:     0
-     state:      0
-     current:    100MB-FD AUTO_NEG
-     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
-     speed: 100 Mbps now, 100 Mbps max
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_METER_MOD request - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 1d 00 20 00 00 00 02 00 00 00 0d 00 00 00 05 \
-00 01 00 10 00 00 04 00 00 00 00 80 00 00 00 00 \
-"], [0], [dnl
-OFPT_METER_MOD (OF1.3) (xid=0x2): ADD meter=5 kbps burst stats bands=
-type=drop rate=1024 burst_size=128
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_METER_MOD request - bad band - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 1d 00 20 85 01 d7 38 00 00 00 00 00 00 00 01
-00 05 00 10 00 00 00 02 00 00 00 02 00 00 00 00
-"], [0], [dnl
-OFPT_METER_MOD (OF1.3) (xid=0x8501d738): ***decode error: OFPMMFC_BAD_BAND***
-00000000  04 1d 00 20 85 01 d7 38-00 00 00 00 00 00 00 01 |... ...8........|
-00000010  00 05 00 10 00 00 00 02-00 00 00 02 00 00 00 00 |................|
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_METER_MOD request - bad command - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 1d 00 10 28 a6 26 52 00 08 00 00 00 00 00 01
-"], [0], [dnl
-OFPT_METER_MOD (OF1.3) (xid=0x28a62652): ***decode error: OFPMMFC_BAD_COMMAND***
-00000000  04 1d 00 10 28 a6 26 52-00 08 00 00 00 00 00 01 |....@{:@.&R........|
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_METER_MOD request - bad flags - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 1d 00 20 82 b3 a1 a4 00 00 00 03 00 00 00 01 \
-00 01 00 10 00 00 00 02 00 00 00 02 00 00 00 00 \
-"], [0], [dnl
-OFPT_METER_MOD (OF1.3) (xid=0x82b3a1a4): ***decode error: OFPMMFC_BAD_FLAGS***
-00000000  04 1d 00 20 82 b3 a1 a4-00 00 00 03 00 00 00 01 |... ............|
-00000010  00 01 00 10 00 00 00 02-00 00 00 02 00 00 00 00 |................|
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_METER request - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "041200180000000200090000000000000000000100000000"], [0], [dnl
-OFPST_METER request (OF1.3) (xid=0x2): meter=1
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_METER_CONFIG request - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "0412001800000002000a0000000000000000000100000000"], [0], [dnl
-OFPST_METER_CONFIG request (OF1.3) (xid=0x2): meter=1
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_METER_FEATURES request - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "0412001000000002000b000000000000"], [0], [dnl
-OFPST_METER_FEATURES request (OF1.3) (xid=0x2):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_METER_FEATURES reply - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 13 00 20 00 00 00 02 00 0b 00 00 00 00 00 00 \
-00 01 00 00 00 00 00 06 00 00 00 0F 10 02 00 00 \
-"], [0], [dnl
-OFPST_METER_FEATURES reply (OF1.3) (xid=0x2):
-max_meter:65536 max_bands:16 max_color:2
-band_types: drop dscp_remark
-capabilities: kbps pktps burst stats
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_METER_CONFIG reply - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 13 00 50 00 00 00 02 00 0a 00 00 00 00 00 00 \
-00 28 00 05 00 00 00 01 \
-00 01 00 10 00 01 00 00 00 00 05 00 00 00 00 00 \
-00 02 00 10 00 10 00 00 00 00 f0 00 00 00 00 00 \
-00 18 00 09 00 00 00 02 \
-00 01 00 10 00 02 00 00 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPST_METER_CONFIG reply (OF1.3) (xid=0x2):
-meter=1 kbps burst bands=
-type=drop rate=65536 burst_size=1280
-type=dscp_remark rate=1048576 burst_size=61440 prec_level=0
-
-meter=2 kbps stats bands=
-type=drop rate=131072
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_METER reply - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 13 00 90 00 00 00 02 00 09 00 00 00 00 00 00 \
-00 00 00 01 00 48 00 00 00 00 00 00 00 00 00 05 \
-00 00 00 00 00 00 10 00 00 00 00 00 00 02 30 00 \
-00 00 01 8a 0a 6e 23 44 \
-00 00 00 00 00 00 00 7e 00 00 00 00 00 00 34 33 \
-00 00 00 00 00 00 00 e7 00 00 00 00 00 00 94 2e \
-00 00 00 02 00 38 00 00 00 00 00 00 00 00 00 02 \
-00 00 00 00 00 00 02 00 00 00 00 00 00 00 30 00 \
-00 00 01 87 0a 23 6e 44 \
-00 00 00 00 00 00 00 2a 00 00 00 00 00 00 04 33 \
-"], [0], [dnl
-OFPST_METER reply (OF1.3) (xid=0x2):
-meter:1 flow_count:5 packet_in_count:4096 byte_in_count:143360 duration:394.174990148s bands:
-0: packet_count:126 byte_count:13363
-1: packet_count:231 byte_count:37934
-
-meter:2 flow_count:2 packet_in_count:512 byte_in_count:12288 duration:391.170094148s bands:
-0: packet_count:42 byte_count:1075
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_TABLE_FEATURES request - OF1.3])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 13 09 40 00 00 00 d5 00 0c 00 01 00 00 00 00 \
-09 30 00 00 00 00 00 00 74 61 62 6c 65 30 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff \
-ff ff ff ff ff ff ff ff 00 00 00 03 00 0f 42 40 \
-00 00 00 2c 00 01 00 08 00 00 00 00 00 02 00 08 \
-00 00 00 00 00 03 00 08 00 00 00 00 00 04 00 08 \
-00 00 00 00 00 05 00 08 00 00 00 00 00 00 00 00 \
-00 01 00 2c 00 01 00 08 00 00 00 00 00 02 00 08 \
-00 00 00 00 00 03 00 08 00 00 00 00 00 04 00 08 \
-00 00 00 00 00 05 00 08 00 00 00 00 00 00 00 00 \
-00 02 01 01 01 02 03 04 05 06 07 08 09 0a 0b 0c \
-0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c \
-1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c \
-2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c \
-3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c \
-4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 5b 5c \
-5d 5e 5f 60 61 62 63 64 65 66 67 68 69 6a 6b 6c \
-6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 7b 7c \
-7d 7e 7f 80 81 82 83 84 85 86 87 88 89 8a 8b 8c \
-8d 8e 8f 90 91 92 93 94 95 96 97 98 99 9a 9b 9c \
-9d 9e 9f a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac \
-ad ae af b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc \
-bd be bf c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc \
-cd ce cf d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db dc \
-dd de df e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec \
-ed ee ef f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 fa fb fc \
-fd 00 00 00 00 00 00 00 00 03 01 01 01 02 03 04 \
-05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 \
-15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 \
-25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 \
-35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 \
-45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 \
-55 56 57 58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 \
-65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 \
-75 76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82 83 84 \
-85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 93 94 \
-95 96 97 98 99 9a 9b 9c 9d 9e 9f a0 a1 a2 a3 a4 \
-a5 a6 a7 a8 a9 aa ab ac ad ae af b0 b1 b2 b3 b4 \
-b5 b6 b7 b8 b9 ba bb bc bd be bf c0 c1 c2 c3 c4 \
-c5 c6 c7 c8 c9 ca cb cc cd ce cf d0 d1 d2 d3 d4 \
-d5 d6 d7 d8 d9 da db dc dd de df e0 e1 e2 e3 e4 \
-e5 e6 e7 e8 e9 ea eb ec ed ee ef f0 f1 f2 f3 f4 \
-f5 f6 f7 f8 f9 fa fb fc fd 00 00 00 00 00 00 00 \
-00 04 00 84 00 00 00 08 00 00 00 00 00 0b 00 08 \
-00 00 00 00 00 0c 00 08 00 00 00 00 00 0f 00 08 \
-00 00 00 00 00 10 00 08 00 00 00 00 00 11 00 08 \
-00 00 00 00 00 12 00 08 00 00 00 00 00 13 00 08 \
-00 00 00 00 00 14 00 08 00 00 00 00 00 15 00 08 \
-00 00 00 00 00 16 00 08 00 00 00 00 00 17 00 08 \
-00 00 00 00 00 18 00 08 00 00 00 00 00 19 00 08 \
-00 00 00 00 00 1a 00 08 00 00 00 00 00 1b 00 08 \
-00 00 00 00 00 00 00 00 00 05 00 84 00 00 00 08 \
-00 00 00 00 00 0b 00 08 00 00 00 00 00 0c 00 08 \
-00 00 00 00 00 0f 00 08 00 00 00 00 00 10 00 08 \
-00 00 00 00 00 11 00 08 00 00 00 00 00 12 00 08 \
-00 00 00 00 00 13 00 08 00 00 00 00 00 14 00 08 \
-00 00 00 00 00 15 00 08 00 00 00 00 00 16 00 08 \
-00 00 00 00 00 17 00 08 00 00 00 00 00 18 00 08 \
-00 00 00 00 00 19 00 08 00 00 00 00 00 1a 00 08 \
-00 00 00 00 00 1b 00 08 00 00 00 00 00 00 00 00 \
-00 06 00 84 00 00 00 08 00 00 00 00 00 0b 00 08 \
-00 00 00 00 00 0c 00 08 00 00 00 00 00 0f 00 08 \
-00 00 00 00 00 10 00 08 00 00 00 00 00 11 00 08 \
-00 00 00 00 00 12 00 08 00 00 00 00 00 13 00 08 \
-00 00 00 00 00 14 00 08 00 00 00 00 00 15 00 08 \
-00 00 00 00 00 16 00 08 00 00 00 00 00 17 00 08 \
-00 00 00 00 00 18 00 08 00 00 00 00 00 19 00 08 \
-00 00 00 00 00 1a 00 08 00 00 00 00 00 1b 00 08 \
-00 00 00 00 00 00 00 00 00 07 00 84 00 00 00 08 \
-00 00 00 00 00 0b 00 08 00 00 00 00 00 0c 00 08 \
-00 00 00 00 00 0f 00 08 00 00 00 00 00 10 00 08 \
-00 00 00 00 00 11 00 08 00 00 00 00 00 12 00 08 \
-00 00 00 00 00 13 00 08 00 00 00 00 00 14 00 08 \
-00 00 00 00 00 15 00 08 00 00 00 00 00 16 00 08 \
-00 00 00 00 00 17 00 08 00 00 00 00 00 18 00 08 \
-00 00 00 00 00 19 00 08 00 00 00 00 00 1a 00 08 \
-00 00 00 00 00 1b 00 08 00 00 00 00 00 00 00 00 \
-00 08 00 dc 80 00 4c 08 00 01 3e 04 00 01 40 04 \
-80 00 04 08 00 00 00 02 80 00 00 04 00 01 42 04 \
-00 01 00 04 00 01 02 04 00 01 04 04 00 01 06 04 \
-00 01 08 04 00 01 0a 04 00 01 0c 04 00 01 0e 04 \
-80 00 08 06 80 00 06 06 80 00 0a 02 00 00 08 02 \
-80 00 0c 02 80 00 0e 01 80 00 44 04 80 00 46 01 \
-80 00 48 01 80 00 16 04 80 00 18 04 80 00 34 10 \
-80 00 36 10 80 00 38 04 80 00 14 01 00 00 0a 01 \
-80 00 10 01 80 00 12 01 00 01 3a 01 00 01 34 01 \
-80 00 2a 02 80 00 2c 04 80 00 2e 04 80 00 30 06 \
-80 00 32 06 80 00 1a 02 80 00 1c 02 00 01 44 02 \
-80 00 1e 02 80 00 20 02 80 00 22 02 80 00 24 02 \
-80 00 26 01 80 00 28 01 80 00 3a 01 80 00 3c 01 \
-80 00 3e 10 80 00 40 06 80 00 42 06 00 00 00 00 \
-00 0a 00 dc 80 00 4c 08 00 01 3e 04 00 01 40 04 \
-80 00 04 08 00 00 00 02 80 00 00 04 00 01 42 04 \
-00 01 00 04 00 01 02 04 00 01 04 04 00 01 06 04 \
-00 01 08 04 00 01 0a 04 00 01 0c 04 00 01 0e 04 \
-80 00 08 06 80 00 06 06 80 00 0a 02 00 00 08 02 \
-80 00 0c 02 80 00 0e 01 80 00 44 04 80 00 46 01 \
-80 00 48 01 80 00 16 04 80 00 18 04 80 00 34 10 \
-80 00 36 10 80 00 38 04 80 00 14 01 00 00 0a 01 \
-80 00 10 01 80 00 12 01 00 01 3a 01 00 01 34 01 \
-80 00 2a 02 80 00 2c 04 80 00 2e 04 80 00 30 06 \
-80 00 32 06 80 00 1a 02 80 00 1c 02 00 01 44 02 \
-80 00 1e 02 80 00 20 02 80 00 22 02 80 00 24 02 \
-80 00 26 01 80 00 28 01 80 00 3a 01 80 00 3c 01 \
-80 00 3e 10 80 00 40 06 80 00 42 06 00 00 00 00 \
-00 0c 00 a8 80 00 4c 08 00 01 3e 04 00 01 40 04 \
-80 00 04 08 00 00 00 02 80 00 00 04 00 01 42 04 \
-00 01 00 04 00 01 02 04 00 01 04 04 00 01 06 04 \
-00 01 08 04 00 01 0a 04 00 01 0c 04 00 01 0e 04 \
-80 00 08 06 80 00 06 06 00 00 08 02 80 00 0c 02 \
-80 00 0e 01 80 00 44 04 80 00 46 01 80 00 16 04 \
-80 00 18 04 80 00 34 10 80 00 36 10 00 00 0a 01 \
-80 00 10 01 80 00 12 01 00 01 3a 01 80 00 2a 02 \
-80 00 2c 04 80 00 2e 04 80 00 30 06 80 00 32 06 \
-80 00 1a 02 80 00 1c 02 80 00 1e 02 80 00 20 02 \
-80 00 22 02 80 00 24 02 00 0d 00 a8 80 00 4c 08 \
-00 01 3e 04 00 01 40 04 80 00 04 08 00 00 00 02 \
-80 00 00 04 00 01 42 04 00 01 00 04 00 01 02 04 \
-00 01 04 04 00 01 06 04 00 01 08 04 00 01 0a 04 \
-00 01 0c 04 00 01 0e 04 80 00 08 06 80 00 06 06 \
-00 00 08 02 80 00 0c 02 80 00 0e 01 80 00 44 04 \
-80 00 46 01 80 00 16 04 80 00 18 04 80 00 34 10 \
-80 00 36 10 00 00 0a 01 80 00 10 01 80 00 12 01 \
-00 01 3a 01 80 00 2a 02 80 00 2c 04 80 00 2e 04 \
-80 00 30 06 80 00 32 06 80 00 1a 02 80 00 1c 02 \
-80 00 1e 02 80 00 20 02 80 00 22 02 80 00 24 02 \
-00 0e 00 a8 80 00 4c 08 00 01 3e 04 00 01 40 04 \
-80 00 04 08 00 00 00 02 80 00 00 04 00 01 42 04 \
-00 01 00 04 00 01 02 04 00 01 04 04 00 01 06 04 \
-00 01 08 04 00 01 0a 04 00 01 0c 04 00 01 0e 04 \
-80 00 08 06 80 00 06 06 00 00 08 02 80 00 0c 02 \
-80 00 0e 01 80 00 44 04 80 00 46 01 80 00 16 04 \
-80 00 18 04 80 00 34 10 80 00 36 10 00 00 0a 01 \
-80 00 10 01 80 00 12 01 00 01 3a 01 80 00 2a 02 \
-80 00 2c 04 80 00 2e 04 80 00 30 06 80 00 32 06 \
-80 00 1a 02 80 00 1c 02 80 00 1e 02 80 00 20 02 \
-80 00 22 02 80 00 24 02 00 0f 00 a8 80 00 4c 08 \
-00 01 3e 04 00 01 40 04 80 00 04 08 00 00 00 02 \
-80 00 00 04 00 01 42 04 00 01 00 04 00 01 02 04 \
-00 01 04 04 00 01 06 04 00 01 08 04 00 01 0a 04 \
-00 01 0c 04 00 01 0e 04 80 00 08 06 80 00 06 06 \
-00 00 08 02 80 00 0c 02 80 00 0e 01 80 00 44 04 \
-80 00 46 01 80 00 16 04 80 00 18 04 80 00 34 10 \
-80 00 36 10 00 00 0a 01 80 00 10 01 80 00 12 01 \
-00 01 3a 01 80 00 2a 02 80 00 2c 04 80 00 2e 04 \
-80 00 30 06 80 00 32 06 80 00 1a 02 80 00 1c 02 \
-80 00 1e 02 80 00 20 02 80 00 22 02 80 00 24 02 \
-"], [0], [OFPST_TABLE_FEATURES reply (OF1.3) (xid=0xd5): flags=[[more]]
-  table 0 ("table0"):
-    metadata: match=0xffffffffffffffff write=0xffffffffffffffff
-    max_entries=1000000
-    instructions (table miss and others):
-      next tables: 1-253
-      instructions: apply_actions,clear_actions,write_actions,write_metadata,goto_table
-      Write-Actions and Apply-Actions features:
-        actions: output group set_field strip_vlan push_vlan mod_nw_ttl dec_ttl set_mpls_ttl dec_mpls_ttl push_mpls pop_mpls set_queue
-        supported on Set-Field: tun_id tun_src tun_dst metadata in_port in_port_oxm pkt_mark reg0 reg1 reg2 reg3 reg4 reg5 reg6 reg7 eth_src eth_dst vlan_tci vlan_vid vlan_pcp mpls_label mpls_tc ip_src ip_dst ipv6_src ipv6_dst nw_tos ip_dscp nw_ecn nw_ttl arp_op arp_spa arp_tpa arp_sha arp_tha tcp_src tcp_dst udp_src udp_dst sctp_src sctp_dst
-    matching:
-      tun_id: exact match or wildcard
-      tun_src: exact match or wildcard
-      tun_dst: exact match or wildcard
-      metadata: exact match or wildcard
-      in_port: exact match or wildcard
-      in_port_oxm: exact match or wildcard
-      pkt_mark: exact match or wildcard
-      reg0: exact match or wildcard
-      reg1: exact match or wildcard
-      reg2: exact match or wildcard
-      reg3: exact match or wildcard
-      reg4: exact match or wildcard
-      reg5: exact match or wildcard
-      reg6: exact match or wildcard
-      reg7: exact match or wildcard
-      eth_src: exact match or wildcard
-      eth_dst: exact match or wildcard
-      eth_type: exact match or wildcard
-      vlan_tci: exact match or wildcard
-      vlan_vid: exact match or wildcard
-      vlan_pcp: exact match or wildcard
-      mpls_label: exact match or wildcard
-      mpls_tc: exact match or wildcard
-      mpls_bos: exact match or wildcard
-      ip_src: exact match or wildcard
-      ip_dst: exact match or wildcard
-      ipv6_src: exact match or wildcard
-      ipv6_dst: exact match or wildcard
-      ipv6_label: exact match or wildcard
-      nw_proto: exact match or wildcard
-      nw_tos: exact match or wildcard
-      ip_dscp: exact match or wildcard
-      nw_ecn: exact match or wildcard
-      nw_ttl: exact match or wildcard
-      ip_frag: exact match or wildcard
-      arp_op: exact match or wildcard
-      arp_spa: exact match or wildcard
-      arp_tpa: exact match or wildcard
-      arp_sha: exact match or wildcard
-      arp_tha: exact match or wildcard
-      tcp_src: exact match or wildcard
-      tcp_dst: exact match or wildcard
-      tcp_flags: exact match or wildcard
-      udp_src: exact match or wildcard
-      udp_dst: exact match or wildcard
-      sctp_src: exact match or wildcard
-      sctp_dst: exact match or wildcard
-      icmp_type: exact match or wildcard
-      icmp_code: exact match or wildcard
-      icmpv6_type: exact match or wildcard
-      icmpv6_code: exact match or wildcard
-      nd_target: exact match or wildcard
-      nd_sll: exact match or wildcard
-      nd_tll: exact match or wildcard
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BARRIER_REQUEST - OF1.0])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '01 12 00 08 00 00 00 01'], [0], [dnl
-OFPT_BARRIER_REQUEST (xid=0x1):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BARRIER_REQUEST - OF1.1])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '02 14 00 08 00 00 00 01'], [0], [dnl
-OFPT_BARRIER_REQUEST (OF1.1) (xid=0x1):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BARRIER_REQUEST - OF1.2])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '03 14 00 08 00 00 00 01'], [0], [dnl
-OFPT_BARRIER_REQUEST (OF1.2) (xid=0x1):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BARRIER_REQUEST - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '04 14 00 08 00 00 00 01'], [0], [dnl
-OFPT_BARRIER_REQUEST (OF1.3) (xid=0x1):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BARRIER_REPLY - OF1.0])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '01 13 00 08 00 00 00 01'], [0], [dnl
-OFPT_BARRIER_REPLY (xid=0x1):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BARRIER_REPLY - OF1.1])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '02 15 00 08 00 00 00 01'], [0], [dnl
-OFPT_BARRIER_REPLY (OF1.1) (xid=0x1):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BARRIER_REPLY - OF1.2])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '03 15 00 08 00 00 00 01'], [0], [dnl
-OFPT_BARRIER_REPLY (OF1.2) (xid=0x1):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BARRIER_REPLY - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print '04 15 00 08 00 00 00 01'], [0], [dnl
-OFPT_BARRIER_REPLY (OF1.3) (xid=0x1):
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_QUEUE_GET_CONFIG_REQUEST - OF1.0])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "01 14 00 0c 00 00 00 01 00 01 00 00"], [0], [dnl
-OFPT_QUEUE_GET_CONFIG_REQUEST (xid=0x1): port=1
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_QUEUE_GET_CONFIG_REQUEST - OF1.2])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 16 00 10 00 00 00 01 00 00 00 01 00 00 00 00"], [0], [dnl
-OFPT_QUEUE_GET_CONFIG_REQUEST (OF1.2) (xid=0x1): port=1
-])
-AT_CLEANUP
-
-AT_SETUP([OFPST_QUEUE_DESC request - OF1.4])
-AT_KEYWORDS([ofp-print OFPT_QUEUE_GET_CONFIG_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 12 00 18 00 00 00 01 00 0f 00 00 00 00 00 00 \
-00 00 00 01 00 00 00 02"], [0],
-  [OFPST_QUEUE_DESC request (OF1.4) (xid=0x1): port=1 queue=2
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_QUEUE_GET_CONFIG_REPLY - OF1.0])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "01 15 00 40 00 00 00 01 \
-00 01 00 00 00 00 00 00 \
-00 00 55 55 00 28 00 00 \
-00 01 00 10 00 00 00 00 01 f4 00 00 00 00 00 00 \
-00 02 00 10 00 00 00 00 02 ee 00 00 00 00 00 00 \
-00 00 44 44 00 08 00 00 \
-"], [0], [dnl
-OFPT_QUEUE_GET_CONFIG_REPLY (xid=0x1): port=1
-queue 17476:
-queue 21845: min_rate:50.0% max_rate:75.0%
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_QUEUE_GET_CONFIG_REPLY - OF1.1])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "02 17 00 40 00 00 00 01 \
-00 00 00 01 00 00 00 00 \
-00 00 55 55 00 28 00 00 \
-00 01 00 10 00 00 00 00 01 f4 00 00 00 00 00 00 \
-00 02 00 10 00 00 00 00 02 ee 00 00 00 00 00 00 \
-00 00 44 44 00 08 00 00 \
-"], [0], [dnl
-OFPT_QUEUE_GET_CONFIG_REPLY (OF1.1) (xid=0x1): port=1
-queue 17476:
-queue 21845: min_rate:50.0% max_rate:75.0%
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_QUEUE_GET_CONFIG_REPLY - OF1.2])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "03 17 00 50 00 00 00 01 \
-00 00 00 01 00 00 00 00 \
-00 00 55 55 00 00 00 01 00 30 00 00 00 00 00 00 \
-00 01 00 10 00 00 00 00 01 f4 00 00 00 00 00 00 \
-00 02 00 10 00 00 00 00 02 ee 00 00 00 00 00 00 \
-00 00 44 44 00 08 00 01 00 10 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPT_QUEUE_GET_CONFIG_REPLY (OF1.2) (xid=0x1): port=1
-queue 17476:
-queue 21845: min_rate:50.0% max_rate:75.0%
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_QUEUE_GET_CONFIG_REPLY - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "04 17 00 50 00 00 00 01 \
-00 00 00 01 00 00 00 00 \
-00 00 55 55 00 00 00 01 00 30 00 00 00 00 00 00 \
-00 01 00 10 00 00 00 00 01 f4 00 00 00 00 00 00 \
-00 02 00 10 00 00 00 00 02 ee 00 00 00 00 00 00 \
-00 00 44 44 00 08 00 01 00 10 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPT_QUEUE_GET_CONFIG_REPLY (OF1.3) (xid=0x1): port=1
-queue 17476:
-queue 21845: min_rate:50.0% max_rate:75.0%
-])
-AT_CLEANUP
-
-# OF1.4 renamed OFPT_QUEUE_GET_CONFIG_REPLY to OFPST_QUEUE_DESC.
-AT_SETUP([OFPST_QUEUE_DESC reply - OF1.4])
-AT_KEYWORDS([ofp-print OFPT_QUEUE_GET_CONFIG_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 13 00 48 00 00 00 01 00 0f 00 00 00 00 00 00 \
-
-00 00 00 01 00 00 55 55 00 20 00 00 00 00 00 00 \
-00 01 00 08 01 f4 00 00 \
-00 02 00 08 02 ee 00 00 \
-
-00 00 00 02 00 00 44 44 00 18 00 00 00 00 00 00 \
-00 02 00 08 00 64 00 00 \
-"], [0], [dnl
-OFPST_QUEUE_DESC reply (OF1.4) (xid=0x1): port=1
-queue 21845: min_rate:50.0% max_rate:75.0%
-port=2
-queue 17476: max_rate:10.0%
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_SET_ASYNC - OF1.3])
-AT_KEYWORDS([ofp-print])
-dnl This message has bit 12 set for the PACKET_IN messages (master and slave).
-dnl Those aren't supported bits so they get silently ignored on decoding.
-dnl That seems reasonable because OF1.3 doesn't define any error codes for
-dnl OFPT_SET_ASYNC.
-AT_CHECK([ovs-ofctl ofp-print "\
-04 1c 00 20 00 00 00 00 00 00 10 05 00 00 10 07 \
-00 00 00 03 00 00 00 07 00 00 00 00 00 00 00 03 \
-"], [0], [dnl
-OFPT_SET_ASYNC (OF1.3) (xid=0x0):
- master:
-       PACKET_IN: no_match invalid_ttl
-     PORT_STATUS: add delete
-    FLOW_REMOVED: (off)
-     ROLE_STATUS: (off)
-    TABLE_STATUS: (off)
-  REQUESTFORWARD: (off)
-
- slave:
-       PACKET_IN: no_match action invalid_ttl
-     PORT_STATUS: add delete modify
-    FLOW_REMOVED: idle hard
-     ROLE_STATUS: (off)
-    TABLE_STATUS: (off)
-  REQUESTFORWARD: (off)
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_ROLE_REQUEST - OF1.2])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 18 00 18 00 00 00 02 00 00 00 02 00 00 00 00 \
-00 00 00 00 00 00 00 03 \
-"], [0], [dnl
-OFPT_ROLE_REQUEST (OF1.2) (xid=0x2): role=master generation_id=3
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_ROLE_REQUEST - nochange - OF1.2])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 18 00 18 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPT_ROLE_REQUEST (OF1.2) (xid=0x2): role=nochange
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_ROLE_REQUEST])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0a \
-00 00 00 01 \
-"], [0], [dnl
-NXT_ROLE_REQUEST (xid=0x2): role=master
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_ROLE_REPLY - OF1.2])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-03 19 00 18 00 00 00 02 00 00 00 03 00 00 00 00 \
-12 34 56 78 ab cd ef 90 \
-"], [0], [dnl
-OFPT_ROLE_REPLY (OF1.2) (xid=0x2): role=slave generation_id=1311768467750121360
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_ROLE_REPLY])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0b \
-00 00 00 02 \
-"], [0], [dnl
-NXT_ROLE_REPLY (xid=0x2): role=slave
-])
-AT_CLEANUP
-
-AT_SETUP([OFP_ROLE_STATUS - master, experimenter - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 04 00 20 00 00 00 0a 4f 4e 46 00 00 00 07 77 \
-00 00 00 02 02 00 00 00 ff ff ff ff ff ff ff ff \
-"], [0], [dnl
-ONFT_ROLE_STATUS (OF1.3) (xid=0xa): role=master reason=experimenter_data_changed
-])
-AT_CLEANUP
-
-AT_SETUP([OFP_ROLE_STATUS - master, config - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 04 00 20 00 00 00 0a 4f 4e 46 00 00 00 07 77 \
-00 00 00 02 01 00 00 00 ff ff ff ff ff ff ff ff \
-"], [0], [dnl
-ONFT_ROLE_STATUS (OF1.3) (xid=0xa): role=master reason=configuration_changed
-])
-AT_CLEANUP
-
-AT_SETUP([OFP_ROLE_STATUS - master, config,generation - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-04 04 00 20 00 00 00 0a 4f 4e 46 00 00 00 07 77 \
-00 00 00 02 01 00 00 00 00 00 00 00 00 00 00 10 \
-"], [0], [dnl
-ONFT_ROLE_STATUS (OF1.3) (xid=0xa): role=master generation_id=16 reason=configuration_changed
-])
-AT_CLEANUP
-
-AT_SETUP([OFP_ROLE_STATUS - master, experimenter - OF1.4])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 1e 00 18 00 00 00 0a \
-00 00 00 02 02 00 00 00 ff ff ff ff ff ff ff ff \
-"], [0], [dnl
-OFPT_ROLE_STATUS (OF1.4) (xid=0xa): role=master reason=experimenter_data_changed
-])
-AT_CLEANUP
-
-AT_SETUP([OFP_ROLE_STATUS - master, config - OF1.4])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 1e 00 18 00 00 00 0a \
-00 00 00 02 01 00 00 00 ff ff ff ff ff ff ff ff \
-"], [0], [dnl
-OFPT_ROLE_STATUS (OF1.4) (xid=0xa): role=master reason=configuration_changed
-])
-AT_CLEANUP
-
-AT_SETUP([OFP_ROLE_STATUS - master, config,generation - OF1.4])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 1e 00 18 00 00 00 0a \
-00 00 00 02 01 00 00 00 00 00 00 00 00 00 00 10 \
-"], [0], [dnl
-OFPT_ROLE_STATUS (OF1.4) (xid=0xa): role=master generation_id=16 reason=configuration_changed
-])
-AT_CLEANUP
-
-AT_SETUP([OFP_REQUESTFORWARD - OF1.4])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 20 00 18 00 00 00 02 \
-05 0f 00 10 02 00 00 00 \
-00 00 00 00 00 00 00 01 \
-"], [0], [dnl
-OFPT_REQUESTFORWARD (OF1.4) (xid=0x2): reason=group_mod
- ADD group_id=1,type=all
-])
-AT_CLEANUP
-
-AT_SETUP([OFP_REQUESTFORWARD - OF1.4])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 20 00 18 00 00 00 02 \
-05 0f 00 10 02 00 00 00 \
-00 01 01 00 00 00 00 01 \
-"], [0], [dnl
-OFPT_REQUESTFORWARD (OF1.4) (xid=0x2): reason=group_mod
- MOD group_id=1,type=select
-])
-AT_CLEANUP
-
-AT_SETUP([OFP_REQUESTFORWARD - OF1.4])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 20 00 18 00 00 00 02 \
-05 1d 00 10 02 00 00 00 \
-00 00 00 00 00 00 00 01 \
-"], [0], [dnl
-OFPT_REQUESTFORWARD (OF1.4) (xid=0x2): reason=meter_mod ADD meter=1 bands=
-])
-AT_CLEANUP
-
-AT_SETUP([OFP_REQUESTFORWARD - OF1.4])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 20 00 18 00 00 00 02 \
-05 1d 00 10 02 00 00 00 \
-00 01 01 00 00 00 00 01 \
-"], [0], [dnl
-OFPT_REQUESTFORWARD (OF1.4) (xid=0x2): reason=meter_mod MOD meter=1 flags:0x100 bands=
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_REQUESTFORWARD - inner NXT_GROUP_MOD])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-dnl OF version 1.0; type=extension:
-01 04 \
-dnl size in bytes:
-00 b8 \
-dnl xid:
-00 00 00 02 \
-dnl Nicira vendor number:
-00 00 23 20 \
-dnl subtype (message id number = 132 in this case)
-00 00 00 84 \
-dnl inner msg copied and pasted from NXT_GROUP_MOD test above:
-01 04 00 a8 00 00 00 02 00 00 23 20 00 00 00 1f 00 00 01 00 87 65 43 21 \
-00 60 00 00 ff ff ff ff 00 20 00 08 00 00 00 00 00 00 00 08 00 01 00 00 \
-00 00 00 08 00 64 00 00 00 01 00 08 00 00 00 01 00 20 00 08 00 00 00 01 \
-00 00 00 08 00 02 00 00 00 00 00 08 00 c8 00 00 00 01 00 08 00 00 00 02 \
-00 20 00 08 00 00 00 02 00 00 00 08 00 03 00 00 00 00 00 08 00 c8 00 00 \
-00 01 00 08 00 00 00 03 ff ff 00 28 00 00 15 40 00 00 00 01 00 00 00 00 \
-68 61 73 68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 \
-"], [0], [dnl
-NXT_REQUESTFORWARD (xid=0x2): reason=group_mod
- ADD group_id=2271560481,type=select,selection_method=hash,selection_method_param=7,bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_REQUESTFORWARD - inner OFPT_GROUP_MOD - OF1.1])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-dnl OF Version 1.1; type=extension:
-02 04 \
-dnl size in bytes:
-00 80 \
-dnl xid:
-00 00 00 02 \
-dnl Nicira vendor number:
-00 00 23 20 \
-dnl subtype (message id number = 132 in this case)
-00 00 00 84 \
-dnl inner msg copied and pasted from OFPT_GROUP_MOD OF1.1 test above:
-02 0f 00 70 11 22 33 44 00 00 01 00 87 65 43 21 \
-00 20 00 64 00 00 00 01 ff ff ff ff 00 00 00 00 \
-00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 20 00 c8 00 00 00 02 ff ff ff ff 00 00 00 00 \
-00 00 00 10 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 20 00 c8 00 00 00 03 ff ff ff ff 00 00 00 00 \
-00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-NXT_REQUESTFORWARD (OF1.1) (xid=0x2): reason=group_mod
- ADD group_id=2271560481,type=select,bucket=weight:100,watch_port:1,actions=output:1,bucket=weight:200,watch_port:2,actions=output:2,bucket=weight:200,watch_port:3,actions=output:3
-])
-AT_CLEANUP
-
-AT_SETUP([ONFT_REQUESTFORWARD - inner OFPT_METER_MOD - OF1.3])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-dnl OF Version 1.3; type=extension:
-04 04 \
-dnl size in bytes:
-00 30 \
-dnl xid:
-00 00 00 02 \
-dnl ONF vendor number:
-4F 4E 46 00 \
-dnl subtype (message id number = 2350 in this case)
-00 00 09 2e \
-dnl inner msg copied and pasted from the valid OFPT_METER_MOD OF1.3 test:
-04 1d 00 20 00 00 00 02 00 00 00 0d 00 00 00 05 \
-00 01 00 10 00 00 04 00 00 00 00 80 00 00 00 00 \
-"], [0], [dnl
-ONFT_REQUESTFORWARD (OF1.3) (xid=0x2): reason=meter_mod ADD meter=5 kbps burst stats bands=
-type=drop rate=1024 burst_size=128
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_SET_PACKET_IN])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 10 \
-00 00 00 01 \
-"], [0], [dnl
-NXT_SET_PACKET_IN_FORMAT (xid=0x2): format=nxt_packet_in
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_PACKET_IN])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 ba 00 00 00 00 00 00 23 20 00 00 00 11 \
-ff ff ff ff 00 40 01 07 00 00 00 00 00 00 00 09 \
-00 4e 00 00 00 00 00 00 00 00 00 02 00 01 00 01 \
-20 08 00 00 00 00 00 00 00 06 00 01 00 04 00 00 \
-00 01 00 01 02 04 00 00 00 02 00 01 04 04 00 00 \
-00 03 00 01 06 04 00 00 00 04 00 01 08 04 00 00 \
-00 05 80 00 05 10 5a 5a 5a 5a 5a 5a 5a 5a ff ff \
-ff ff ff ff ff ff 00 00 00 00 82 82 82 82 82 82 \
-80 81 81 81 81 81 81 00 00 50 08 00 45 00 00 28 \
-00 00 00 00 00 06 32 05 53 53 53 53 54 54 54 54 \
-00 55 00 56 00 00 00 00 00 00 00 00 50 02 00 00 \
-31 6d 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,metadata=0x5a5a5a5a5a5a5a5a,in_port=1 (via action) data_len=64 (unbuffered)
-tcp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86,tcp_flags=syn tcp_csum:316d
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_PACKET_IN, with hex output of packet data])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 ba 00 00 00 00 00 00 23 20 00 00 00 11 \
-ff ff ff ff 00 40 01 07 00 00 00 00 00 00 00 09 \
-00 4e 00 00 00 00 00 00 00 00 00 02 00 01 00 01 \
-20 08 00 00 00 00 00 00 00 06 00 01 00 04 00 00 \
-00 01 00 01 02 04 00 00 00 02 00 01 04 04 00 00 \
-00 03 00 01 06 04 00 00 00 04 00 01 08 04 00 00 \
-00 05 80 00 05 10 5a 5a 5a 5a 5a 5a 5a 5a ff ff \
-ff ff ff ff ff ff 00 00 00 00 82 82 82 82 82 82 \
-80 81 81 81 81 81 81 00 00 50 08 00 45 00 00 28 \
-00 00 00 00 00 06 32 05 53 53 53 53 54 54 54 54 \
-00 55 00 56 00 00 00 00 00 00 00 00 50 01 00 00 \
-31 6d 00 00 00 00 00 00 00 00 \
-" 3], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,metadata=0x5a5a5a5a5a5a5a5a,in_port=1 (via action) data_len=64 (unbuffered)
-tcp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86,tcp_flags=fin tcp_csum:316d
-00000000  82 82 82 82 82 82 80 81-81 81 81 81 81 00 00 50
-00000010  08 00 45 00 00 28 00 00-00 00 00 06 32 05 53 53
-00000020  53 53 54 54 54 54 00 55-00 56 00 00 00 00 00 00
-00000030  00 00 50 01 00 00 31 6d-00 00 00 00 00 00 00 00
-])
-AT_CLEANUP
-
-AT_SETUP([NX_PACKET_IN2])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "
-01 04 0098 00000000 00002320 0000001e
-0000 0034
-  82 82 82 82 82 82 80 81 81 81 81 81 81 00 00 50
-  08 00 45 00 00 28 00 00 00 00 00 06 32 05 53 53
-  53 53 54 54 54 54 00 55 00 56 00 00 00 00 00 00   00000000
-0001 0008 00000040
-0002 0008 00000114
-0003 0005 07   000000
-0004 0010 00000000   fedcba9876543210
-0005 0005 01   000000
-0006 0010 80000408 5a5a5a5a5a5a5a5a
-0007 0009 0102030405  00000000000000
-"
-], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): table_id=7 cookie=0xfedcba9876543210 total_len=64 metadata=0x5a5a5a5a5a5a5a5a (via action) data_len=48 buffer=0x00000114
- userdata=01.02.03.04.05
-ip,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=0.0.0.0,nw_dst=0.0.0.0,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=0
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_SET_ASYNC_CONFIG])
-AT_KEYWORDS([ofp-print])
-dnl This message has bit 12 set for the PACKET_IN messages (master and slave).
-dnl Those aren't supported bits so they get silently ignored on decoding.
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 28 00 00 00 00 00 00 23 20 00 00 00 13 \
-00 00 10 05 00 00 10 07 00 00 00 03 00 00 00 07 \
-00 00 00 00 00 00 00 03 \
-"], [0], [dnl
-NXT_SET_ASYNC_CONFIG (xid=0x0):
- master:
-       PACKET_IN: no_match invalid_ttl
-     PORT_STATUS: add delete
-    FLOW_REMOVED: (off)
-     ROLE_STATUS: (off)
-    TABLE_STATUS: (off)
-  REQUESTFORWARD: (off)
-
- slave:
-       PACKET_IN: no_match action invalid_ttl
-     PORT_STATUS: add delete modify
-    FLOW_REMOVED: idle hard
-     ROLE_STATUS: (off)
-    TABLE_STATUS: (off)
-  REQUESTFORWARD: (off)
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_SET_ASYNC_CONFIG])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 1c 00 38 00 00 00 02 00 00 00 08 00 00 00 05 \
-00 01 00 08 00 00 00 02 00 02 00 08 00 00 00 02 \
-00 03 00 08 00 00 00 05 00 04 00 08 00 00 00 1c \
-00 05 00 08 00 00 00 05 \
-"], [0], [dnl
-OFPT_SET_ASYNC (OF1.4) (xid=0x2):
- master:
-       PACKET_IN: action
-     PORT_STATUS: add modify
-    FLOW_REMOVED: idle delete
-     ROLE_STATUS: (off)
-    TABLE_STATUS: (off)
-  REQUESTFORWARD: (off)
-
- slave:
-       PACKET_IN: no_match invalid_ttl
-     PORT_STATUS: delete
-    FLOW_REMOVED: delete group_delete meter_delete
-     ROLE_STATUS: (off)
-    TABLE_STATUS: (off)
-  REQUESTFORWARD: (off)
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_SET_ASYNC_CONFIG - invalid mask - OF1.4])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 1c 00 38 00 00 00 02 00 00 00 08 00 00 00 40 \
-00 01 00 08 00 00 00 02 00 02 00 08 00 00 00 02 \
-00 03 00 08 00 00 00 05 00 04 00 08 00 00 00 1c \
-00 05 00 08 00 00 00 05 \
-"], [0], [dnl
-OFPT_SET_ASYNC (OF1.4) (xid=0x2): ***decode error: OFPACFC_INVALID***
-00000000  05 1c 00 38 00 00 00 02-00 00 00 08 00 00 00 40 |...8...........@|
-00000010  00 01 00 08 00 00 00 02-00 02 00 08 00 00 00 02 |................|
-00000020  00 03 00 08 00 00 00 05-00 04 00 08 00 00 00 1c |................|
-00000030  00 05 00 08 00 00 00 05-                        |........        |
-], [stderr])
-AT_CHECK([sed 's/.*|//' stderr], [0],
-  [bad value 0x40 for PACKET_IN (allowed mask 0x3f)
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_SET_ASYNC_CONFIG - unsupported configuration - OF1.4])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 1c 00 38 00 00 00 02 00 00 00 08 00 00 00 05 \
-00 11 00 08 00 00 00 02 00 02 00 08 00 00 00 02 \
-00 03 00 08 00 00 00 05 00 04 00 08 00 00 00 1c \
-00 05 00 08 00 00 00 05\
-"], [0], [dnl
-OFPT_SET_ASYNC (OF1.4) (xid=0x2): ***decode error: OFPACFC_UNSUPPORTED***
-00000000  05 1c 00 38 00 00 00 02-00 00 00 08 00 00 00 05 |...8............|
-00000010  00 11 00 08 00 00 00 02-00 02 00 08 00 00 00 02 |................|
-00000020  00 03 00 08 00 00 00 05-00 04 00 08 00 00 00 1c |................|
-00000030  00 05 00 08 00 00 00 05-                        |........        |
-], [stderr])
-AT_CHECK([sed 's/.*|//' stderr], [0],
-  [unknown async config property type 17
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_SET_CONTROLLER_ID])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 18 00 00 00 03 00 00 23 20 00 00 00 14 \
-00 00 00 00 00 00 00 7b \
-"], [0], [dnl
-NXT_SET_CONTROLLER_ID (xid=0x3): id=123
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_FLOW_MONITOR_CANCEL])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 14 00 00 00 03 00 00 23 20 00 00 00 15 \
-01 02 30 40 \
-"], [0], [dnl
-NXT_FLOW_MONITOR_CANCEL (xid=0x3): id=16920640
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_FLOW_MONITOR_PAUSED])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 10 00 00 00 03 00 00 23 20 00 00 00 16 \
-"], [0], [dnl
-NXT_FLOW_MONITOR_PAUSED (xid=0x3):
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_FLOW_MONITOR_RESUMED])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 10 00 00 00 03 00 00 23 20 00 00 00 17 \
-"], [0], [dnl
-NXT_FLOW_MONITOR_RESUMED (xid=0x3):
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_SET_FLOW_FORMAT])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0c \
-00 00 00 02 \
-"], [0], [dnl
-NXT_SET_FLOW_FORMAT (xid=0x2): format=nxm
-])
-AT_CLEANUP
-
-# The flow is formatted with cls_rule_format() for the low-verbosity case.
-AT_SETUP([NXT_FLOW_MOD, low verbosity])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
-ff ff ff ff 00 10 00 00 00 14 00 00 00 00 00 00 \
-00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
-00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
-00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
-" 2], [0], [dnl
-NXT_FLOW_MOD (xid=0x2): ADD reg0=0x7b,tun_id=0x1c8 out_port:16 actions=load:0x5->NXM_NX_REG0[[]]
-])
-AT_CLEANUP
-
-# The flow is formatted with ofp10_match_to_string() for the
-# low-verbosity case.
-AT_SETUP([NXT_FLOW_MOD, high verbosity])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
-ff ff ff ff 01 00 00 00 00 14 00 00 00 00 00 00 \
-00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
-00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
-00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
-" 3], [0], [dnl
-NXT_FLOW_MOD (xid=0x2): ADD NXM_NX_TUN_ID(00000000000001c8), NXM_NX_REG0(0000007b) out_port:256 actions=load:0x5->NXM_NX_REG0[[]]
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_GROUP_MOD add - OF1.0])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 a8 00 00 00 02 00 00 23 20 00 00 00 1f \
-00 00 01 00 87 65 43 21 \
-00 60 00 00 ff ff ff ff \
-\
-00 20 00 08 00 00 00 00 00 00 00 08 00 01 00 00 \
-00 00 00 08 00 64 00 00 00 01 00 08 00 00 00 01 \
-\
-00 20 00 08 00 00 00 01 00 00 00 08 00 02 00 00 \
-00 00 00 08 00 c8 00 00 00 01 00 08 00 00 00 02
-\
-00 20 00 08 00 00 00 02 00 00 00 08 00 03 00 00 \
-00 00 00 08 00 c8 00 00 00 01 00 08 00 00 00 03 \
-ff ff 00 28 00 00 15 40 00 00 00 01 00 00 00 00 \
-68 61 73 68 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 07 \
-"], [0], [dnl
-NXT_GROUP_MOD (xid=0x2):
- ADD group_id=2271560481,type=select,selection_method=hash,selection_method_param=7,bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_GROUP_MOD - OF1.1])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-02 0f 00 70 11 22 33 44 00 00 01 00 87 65 43 21 \
-00 20 00 64 00 00 00 01 ff ff ff ff 00 00 00 00 \
-00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 20 00 c8 00 00 00 02 ff ff ff ff 00 00 00 00 \
-00 00 00 10 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 20 00 c8 00 00 00 03 ff ff ff ff 00 00 00 00 \
-00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPT_GROUP_MOD (OF1.1) (xid=0x11223344):
- ADD group_id=2271560481,type=select,bucket=weight:100,watch_port:1,actions=output:1,bucket=weight:200,watch_port:2,actions=output:2,bucket=weight:200,watch_port:3,actions=output:3
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_GROUP_MOD add - OF1.5])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 0f 00 b8 11 22 33 44 00 00 01 00 87 65 43 21 \
-00 78 00 00 ff ff ff ff 00 28 00 10 00 00 00 00 \
-00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 08 00 64 00 00 00 01 00 08 00 00 00 01 \
-00 28 00 10 00 00 00 01 00 00 00 10 00 00 00 02 \
-00 00 00 00 00 00 00 00 00 00 00 08 00 c8 00 00 \
-00 01 00 08 00 00 00 02 00 28 00 10 00 00 00 02 \
-00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
-00 00 00 08 00 c8 00 00 00 01 00 08 00 00 00 03 \
-ff ff 00 28 00 00 15 40 00 00 00 01 00 00 00 00 \
-68 61 73 68 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 07 \
-"], [0], [dnl
-OFPT_GROUP_MOD (OF1.5) (xid=0x11223344):
- ADD group_id=2271560481,type=select,selection_method=hash,selection_method_param=7,bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_GROUP_MOD insert bucket - OF1.5])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 0f 00 90 11 22 33 44 00 03 01 00 87 65 43 21 \
-00 78 00 00 ff ff ff fd 00 28 00 10 00 00 00 00 \
-00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 08 00 64 00 00 00 01 00 08 00 00 00 01 \
-00 28 00 10 00 00 00 01 00 00 00 10 00 00 00 02 \
-00 00 00 00 00 00 00 00 00 00 00 08 00 c8 00 00 \
-00 01 00 08 00 00 00 02 00 28 00 10 00 00 00 02 \
-00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
-00 00 00 08 00 c8 00 00 00 01 00 08 00 00 00 03 \
-"], [0], [dnl
-OFPT_GROUP_MOD (OF1.5) (xid=0x11223344):
- INSERT_BUCKET command_bucket_id:first,group_id=2271560481,bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_FLOW_REMOVED])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 78 00 00 00 00 00 00 23 20 00 00 00 0e \
-00 00 00 00 00 00 00 00 ff ff 00 02 00 00 00 06 \
-01 6e 36 00 00 05 00 3c 00 00 00 00 00 00 00 01 \
-00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
-02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
-00 05 00 00 06 02 08 06 00 00 08 02 00 00 00 00 \
-1e 02 00 02 00 00 20 04 c0 a8 00 01 00 00 22 04 \
-c0 a8 00 02 00 00 00 00 \
-"], [0], [dnl
-NXT_FLOW_REMOVED (xid=0x0): priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2 reason=idle table_id=1 duration6.024s idle5 pkts1 bytes60
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_FLOW_MOD_TABLE_ID])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 18 01 02 03 04 00 00 23 20 00 00 00 0f \
-01 00 00 00 00 00 00 00 \
-"], [0], [dnl
-NXT_FLOW_MOD_TABLE_ID (xid=0x1020304): enable
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_RESUME])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 0038 01020304 00002320 0000001c \
-0000 0012 ffffffffffff 102030405060 1234 000000000000 \
-0006 000a 00000002 fffd 000000000000
-"], [0], [dnl
-NXT_RESUME (xid=0x1020304): total_len=14 in_port=CONTROLLER (via no_match) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=10:20:30:40:50:60,dl_dst=ff:ff:ff:ff:ff:ff,dl_type=0x1234
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_FLOW request])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
-00 00 00 00 00 00 00 00 ff ff 00 00 ff 00 00 00 \
-"], [0], [dnl
-NXST_FLOW request (xid=0x4):
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_FLOW reply])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 08 18 00 00 00 04 ff ff 00 00 00 00 23 20 \
-00 00 00 00 00 00 00 00 00 88 00 00 00 00 00 01 \
-02 dc 6c 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
-00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
-02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
-00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
-0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
-a8 00 02 00 00 0c 01 06 00 00 12 02 09 e7 00 00 \
-14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
-00 88 00 00 00 00 00 03 32 11 62 00 ff ff 00 05 \
-00 00 00 4c 00 03 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
-00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
-00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
-00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
-a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
-00 00 12 02 09 e4 00 00 14 02 00 00 00 00 00 00 \
-00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
-33 f9 aa 00 ff ff 00 05 00 00 00 4c 00 05 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
-00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
-02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
-00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
-0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
-a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
-14 02 09 e5 00 00 00 00 00 00 00 08 00 03 00 00 \
-00 88 00 00 00 00 00 04 2d 0f a5 00 ff ff 00 05 \
-00 00 00 4c 00 01 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
-00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
-00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
-00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
-a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
-00 00 12 02 09 e3 00 00 14 02 00 00 00 00 00 00 \
-00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
-34 73 bc 00 ff ff 00 05 00 0a 00 4c 00 03 00 03 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
-00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
-02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
-00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
-0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
-a8 00 02 00 00 0c 01 06 00 00 12 02 09 e5 00 00 \
-14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
-00 88 00 00 00 00 00 05 28 0d e8 00 ff ff 00 05 \
-00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
-00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
-00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
-00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
-a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
-00 00 12 02 09 e2 00 00 14 02 00 00 00 00 00 00 \
-00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 01 \
-02 62 5a 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
-00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
-02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
-00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
-0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
-a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
-14 02 09 e7 00 00 00 00 00 00 00 08 00 03 00 00 \
-00 88 00 00 00 00 00 01 38 be 5e 00 ff ff 00 05 \
-00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
-00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
-00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
-00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
-a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
-00 00 12 02 00 00 00 00 14 02 09 e6 00 00 00 00 \
-00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 04 \
-27 d0 df 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
-00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
-02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
-00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
-0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
-a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
-14 02 09 e3 00 00 00 00 00 00 00 08 00 03 00 00 \
-00 88 00 00 00 00 00 03 2c d2 9c 00 ff ff 00 05 \
-00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
-00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
-00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
-00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
-a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
-00 00 12 02 00 00 00 00 14 02 09 e4 00 00 00 00 \
-00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
-0a 40 83 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
-00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
-02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
-00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
-0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
-a8 00 02 00 00 0c 01 06 00 00 12 02 09 e8 00 00 \
-14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
-00 88 00 00 00 00 00 05 25 31 7c 00 ff ff 00 05 \
-00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
-00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
-00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
-00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
-a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
-00 00 12 02 00 00 00 00 14 02 09 e2 00 00 00 00 \
-00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
-04 c4 b4 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
-00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
-02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
-00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
-0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
-a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
-14 02 09 e8 00 00 00 00 00 00 00 08 00 03 00 00 \
-00 88 00 00 00 00 00 01 39 38 70 00 ff ff 00 05 \
-00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
-00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
-00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
-00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
-a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
-00 00 12 02 09 e6 00 00 14 02 00 00 00 00 00 00 \
-00 00 00 08 00 01 00 00 00 60 00 00 00 00 00 e4 \
-2e 7d db 00 80 00 00 00 00 00 00 14 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 00 01 20 08 00 00 00 00 \
-00 00 01 c8 00 01 00 04 00 00 00 7b 00 00 00 00 \
-ff ff 00 18 00 00 23 20 00 07 00 1f 00 01 00 04 \
-00 00 00 00 00 00 00 05 \
-00 30 01 00 00 00 0e 10 00 07 a1 20 80 00 00 00 \
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 64 00 00 00 00 00 00 19 00 \
-"], [0],
-[[NXST_FLOW reply (xid=0x4):
- cookie=0x0, duration=1.048s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,tp_src=2535,tp_dst=0 actions=output:1
- cookie=0x0, duration=3.840s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, idle_age=2, priority=65535,tcp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,tp_src=2532,tp_dst=0 actions=output:1
- cookie=0x0, duration=2.872s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, idle_age=4, priority=65535,tcp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,tp_src=0,tp_dst=2533 actions=output:3
- cookie=0x0, duration=4.756s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, idle_age=0, priority=65535,tcp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,tp_src=2531,tp_dst=0 actions=output:1
- cookie=0x0, duration=2.880s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, hard_timeout=10, idle_age=2, priority=65535,tcp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,tp_src=2533,tp_dst=0 actions=output:1
- cookie=0x0, duration=5.672s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,tp_src=2530,tp_dst=0 actions=output:1
- cookie=0x0, duration=1.040s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,tp_src=0,tp_dst=2535 actions=output:3
- cookie=0x0, duration=1.952s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,tp_src=0,tp_dst=2534 actions=output:3
- cookie=0x0, duration=4.668s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,tp_src=0,tp_dst=2531 actions=output:3
- cookie=0x0, duration=3.752s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,tp_src=0,tp_dst=2532 actions=output:3
- cookie=0x0, duration=0.172s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,tp_src=2536,tp_dst=0 actions=output:1
- cookie=0x0, duration=5.624s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,tp_src=0,tp_dst=2530 actions=output:3
- cookie=0x0, duration=0.080s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,tp_src=0,tp_dst=2536 actions=output:3
- cookie=0x0, duration=1.960s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,tp_src=2534,tp_dst=0 actions=output:1
- cookie=0x0, duration=228.780s, table=0, n_packets=0, n_bytes=0, reg0=0x7b,tun_id=0x1c8 actions=load:0x5->NXM_NX_REG0[]
- cookie=0x0, duration=3600.0005s, table=1, n_packets=100, n_bytes=6400, actions=drop
-]])
-AT_CLEANUP
-
-AT_SETUP([NXST_AGGREGATE request])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
-00 00 00 01 00 00 00 00 ff ff 00 00 ff 00 00 00 \
-"], [0], [dnl
-NXST_AGGREGATE request (xid=0x4):
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_AGGREGATE reply])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 00 30 00 00 00 04 ff ff 00 00 00 00 23 20 \
-00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 07 \
-00 00 00 00 00 00 01 a4 00 00 00 07 00 00 00 00 \
-"], [0], [dnl
-NXST_AGGREGATE reply (xid=0x4): packet_count=7 byte_count=420 flow_count=7
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_FLOW_MONITOR request])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 10 00 40 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 02 00 00 00 00 \
-00 00 40 00 00 3f ff fe 00 00 01 00 00 00 00 00 \
-00 00 20 00 00 04 ff ff 00 06 02 00 00 00 00 00 00 00 00 02 00 01 00 00 \
-"], [0], [dnl
-NXST_FLOW_MONITOR request (xid=0x4):
- id=16384 flags=initial,add,delete,modify,actions,own out_port=LOCAL table=1
- id=8192 flags=delete table=2 in_port=1
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_FLOW_MONITOR reply])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 00 40 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 02 00 00 00 00 \
-00 20 00 01 00 05 80 00 00 05 00 10 00 06 01 00 12 34 56 78 9a bc de f0 \
-00 00 00 02 00 01 00 00 \
-00 08 00 03 00 01 86 a0 \
-"], [0], [dnl
-NXST_FLOW_MONITOR reply (xid=0x4):
- event=DELETED reason=eviction table=1 idle_timeout=5 hard_timeout=16 cookie=0x123456789abcdef0 in_port=1
- event=ABBREV xid=0x186a0
-])
-AT_CLEANUP
-
-
-AT_SETUP([OFPT_BUNDLE_CONTROL - atomic OPEN_REQUEST])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 21 00 10 00 00 00 00 \
-00 00 00 01 00 00 00 01 \
-"], [0], [dnl
-OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
- bundle_id=0x1 type=OPEN_REQUEST flags=atomic
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_CONTROL - ordered OPEN_REQUEST])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 21 00 10 00 00 00 00 \
-00 00 00 01 00 00 00 02 \
-"], [0], [dnl
-OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_CONTROL - atomic ordered OPEN_REQUEST])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 21 00 10 00 00 00 00 \
-00 00 00 01 00 00 00 03 \
-"], [0], [dnl
-OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
- bundle_id=0x1 type=OPEN_REQUEST flags=atomic ordered
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_CONTROL - OPEN_REPLY])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 21 00 10 00 00 00 00 \
-00 00 00 01 00 01 00 01 \
-"], [0], [dnl
-OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
- bundle_id=0x1 type=OPEN_REPLY flags=atomic
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_CONTROL - CLOSE_REQUEST])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 21 00 10 00 00 00 00 \
-00 00 00 01 00 02 00 01 \
-"], [0], [dnl
-OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
- bundle_id=0x1 type=CLOSE_REQUEST flags=atomic
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_CONTROL - CLOSE_REPLY])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 21 00 10 00 00 00 00 \
-00 00 00 01 00 03 00 01 \
-"], [0], [dnl
-OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
- bundle_id=0x1 type=CLOSE_REPLY flags=atomic
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_CONTROL - COMMIT_REQUEST])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 21 00 10 00 00 00 00 \
-00 00 00 01 00 04 00 01 \
-"], [0], [dnl
-OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
- bundle_id=0x1 type=COMMIT_REQUEST flags=atomic
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_CONTROL - COMMIT_REPLY])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 21 00 10 00 00 00 00 \
-00 00 00 01 00 05 00 01 \
-"], [0], [dnl
-OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
- bundle_id=0x1 type=COMMIT_REPLY flags=atomic
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_CONTROL - DISCARD_REQUEST])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 21 00 10 00 00 00 00 \
-00 00 00 01 00 06 00 01 \
-"], [0], [dnl
-OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
- bundle_id=0x1 type=DISCARD_REQUEST flags=atomic
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_CONTROL - DISCARD_REPLY])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 21 00 10 00 00 00 00 \
-00 00 00 01 00 07 00 01 \
-"], [0], [dnl
-OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
- bundle_id=0x1 type=DISCARD_REPLY flags=atomic
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - verify xid])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 22 00 20 00 00 00 00 00 00 00 01 00 00 00 01 \
-05 00 00 08 00 00 00 01 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPT_BUNDLE_ADD_MESSAGE (OF1.4) (xid=0x0): ***decode error: OFPBFC_MSG_BAD_XID***
-00000000  05 22 00 20 00 00 00 00-00 00 00 01 00 00 00 01 |.". ............|
-00000010  05 00 00 08 00 00 00 01-00 00 00 00 00 00 00 00 |................|
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - reject OFPT_HELLO])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
-05 22 00 20 00 00 00 00 00 00 00 01 00 00 00 01 \
-05 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPT_BUNDLE_ADD_MESSAGE (OF1.4) (xid=0x0): ***decode error: OFPBFC_MSG_UNSUP***
-00000000  05 22 00 20 00 00 00 00-00 00 00 01 00 00 00 01 |.". ............|
-00000010  05 00 00 10 00 00 00 00-00 00 00 00 00 00 00 00 |................|
-], [dnl
-ofp_bundle|WARN|OFPT_HELLO message not allowed inside OFPT14_BUNDLE_ADD_MESSAGE
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - FLOW_MOD])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 22 00 a0 00 00 00 02 00 00 00 01 00 00 00 01 \
-05 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
-ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
-50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
-80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
-00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
-00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
-00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-OFPT_BUNDLE_ADD_MESSAGE (OF1.4) (xid=0x2):
- bundle_id=0x1 flags=atomic
-OFPT_FLOW_MOD (OF1.4) (xid=0x2): ADD table:1 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 actions=output:3
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - PORT_MOD])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 22 00 38 00 00 00 03 00 00 00 01 00 00 00 01 \
-05 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
-50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
-00 00 00 08 00 00 00 01
-"], [0], [dnl
-OFPT_BUNDLE_ADD_MESSAGE (OF1.4) (xid=0x3):
- bundle_id=0x1 flags=atomic
-OFPT_PORT_MOD (OF1.4) (xid=0x3): port: 3: addr:50:54:00:00:00:01
-     config: PORT_DOWN
-     mask:   PORT_DOWN
-     advertise: 10MB-HD
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - GROUP_MOD])
-AT_KEYWORDS([ofp-print bundle])
-AT_CHECK([ovs-ofctl ofp-print "\
-06 22 00 c8 00 00 00 03 00 00 00 01 00 00 00 01 \
-06 0f 00 b8 00 00 00 03 00 00 01 00 87 65 43 21 \
-00 78 00 00 ff ff ff ff 00 28 00 10 00 00 00 00 \
-00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
-00 00 00 08 00 64 00 00 00 01 00 08 00 00 00 01 \
-00 28 00 10 00 00 00 01 00 00 00 10 00 00 00 02 \
-00 00 00 00 00 00 00 00 00 00 00 08 00 c8 00 00 \
-00 01 00 08 00 00 00 02 00 28 00 10 00 00 00 02 \
-00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
-00 00 00 08 00 c8 00 00 00 01 00 08 00 00 00 03 \
-ff ff 00 28 00 00 15 40 00 00 00 01 00 00 00 00 \
-68 61 73 68 00 00 00 00 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 07 \
-"], [0], [dnl
-OFPT_BUNDLE_ADD_MESSAGE (OF1.5) (xid=0x3):
- bundle_id=0x1 flags=atomic
-OFPT_GROUP_MOD (OF1.5) (xid=0x3):
- ADD group_id=2271560481,type=select,selection_method=hash,selection_method_param=7,bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3
-])
-AT_CLEANUP
-
-AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - PACKET_OUT])
-AT_KEYWORDS([ofp-print bundle packet-out])
-AT_CHECK([ovs-ofctl ofp-print "\
-05 22 00 74 00 00 00 03 00 00 00 01 00 00 00 01 \
-05 0d 00 64 00 00 00 03 ff ff ff ff ff ff ff fe \
-00 10 00 00 00 00 00 00 00 00 00 10 ff ff ff fb \
-05 dc 00 00 00 00 00 00 50 54 00 00 00 05 50 54 \
-00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
-b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
-00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
-00 00 00 00 \
-"], [0], [dnl
-OFPT_BUNDLE_ADD_MESSAGE (OF1.4) (xid=0x3):
- bundle_id=0x1 flags=atomic
-OFPT_PACKET_OUT (OF1.4) (xid=0x3): in_port=LOCAL actions=FLOOD data_len=60
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=11104,tcp_flags=rst|ack tcp_csum:6d75
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_IPFIX_BRIDGE - request])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 10 00 18 00 00 00 02 \
-ff ff 00 00 00 00 23 20 00 00 00 03 00 00 00 00 \
-"], [0], [dnl
-NXST_IPFIX_BRIDGE request (xid=0x2):
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_IPFIX_BRIDGE - reply])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 00 70 00 00 00 02 \
-ff ff 00 00 00 00 23 20 00 00 00 03 00 00 00 00\
-00 00 00 00 00 00 00 01 \
-00 00 00 00 00 00 00 10 \
-00 00 00 00 00 00 00 78 \
-00 00 00 00 00 00 00 f0 \
-00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 a0 \
-00 00 00 00 00 00 00 02 \
-00 00 00 00 00 00 00 03 \
-00 00 00 00 00 00 00 04 \
-00 00 00 00 00 00 00 05 \
-00 00 00 00 00 00 00 00 \
-"], [0], [dnl
-NXST_IPFIX_BRIDGE reply (xid=0x2):
-  bridge ipfix: flows=1, current flows=16, sampled pkts=120, ipv4 ok=240, ipv6 ok=0, tx pkts=4
-                pkts errs=160, ipv4 errs=2, ipv6 errs=3, tx errs=5
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_IPFIX_FLOW - request])
-AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 10 00 18 00 00 00 02 \
-ff ff 00 00 00 00 23 20 00 00 00 04 00 00 00 00 \
-"], [0], [dnl
-NXST_IPFIX_FLOW request (xid=0x2):
-])
-AT_CLEANUP
-
-AT_SETUP([NXST_IPFIX_FLOW - reply])
-AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 11 00 C8 00 00 00 02 \
-ff ff 00 00 00 00 23 20 00 00 00 04 00 00 00 00\
-00 00 00 00 00 00 00 01 \
-00 00 00 00 00 00 00 10 \
-00 00 00 00 00 00 00 78 \
-00 00 00 00 00 00 00 f0 \
-00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 a0 \
-00 00 00 10 00 00 00 02 \
-00 00 00 00 00 00 00 03 \
-00 00 00 00 00 00 00 04 \
-00 00 00 00 00 00 00 05 \
-00 00 00 01 00 00 00 00 \
-00 00 00 00 00 00 00 01 \
-00 00 00 00 00 00 00 10 \
-00 00 00 00 00 00 00 78 \
-00 00 00 00 00 00 00 f0 \
-00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 a0 \
-00 00 00 10 00 00 00 02 \
-00 00 00 00 00 00 00 03 \
-00 00 00 00 00 00 00 04 \
-00 00 00 00 00 00 00 05 \
-00 00 00 02 00 00 00 00 \
-"], [0], [dnl
-NXST_IPFIX_FLOW reply (xid=0x2): 2 ids
-  id   1: flows=1, current flows=16, sampled pkts=120, ipv4 ok=240, ipv6 ok=0, tx pkts=4
-          pkts errs=160, ipv4 errs=68719476738, ipv6 errs=3, tx errs=5
-  id   2: flows=1, current flows=16, sampled pkts=120, ipv4 ok=240, ipv6 ok=0, tx pkts=4
-          pkts errs=160, ipv4 errs=68719476738, ipv6 errs=3, tx errs=5
-])
-AT_CLEANUP
-
-AT_SETUP([NXT_CT_FLUSH_ZONE])
-AT_KEYWORDS([ofp-print])
-AT_CHECK([ovs-ofctl ofp-print "\
-01 04 00 18 00 00 00 03 00 00 23 20 00 00 00 1d \
-00 00 00 00 00 00 00 0d \
-"], [0], [dnl
-NXT_CT_FLUSH_ZONE (xid=0x3): zone_id=13
-])
-AT_CLEANUP
diff --git a/tests/ofp-util.at b/tests/ofp-util.at
deleted file mode 100644
index c242f6402..000000000
--- a/tests/ofp-util.at
+++ /dev/null
@@ -1,95 +0,0 @@
-AT_BANNER([OpenFlow utilities])
-
-AT_SETUP([encoding hellos])
-dnl All versions up to a max version supported:
-AT_CHECK([ovs-ofctl encode-hello 0x2], [0], [dnl
-00000000  01 00 00 08 00 00 00 01
-OFPT_HELLO (xid=0x1):
- version bitmap: 0x01
-])
-AT_CHECK([ovs-ofctl encode-hello 0x6], [0], [dnl
-00000000  02 00 00 08 00 00 00 01
-OFPT_HELLO (OF1.1) (xid=0x1):
- version bitmap: 0x01, 0x02
-])
-AT_CHECK([ovs-ofctl encode-hello 0xe], [0], [dnl
-00000000  03 00 00 08 00 00 00 01
-OFPT_HELLO (OF1.2) (xid=0x1):
- version bitmap: 0x01, 0x02, 0x03
-])
-AT_CHECK([ovs-ofctl encode-hello 0x1e], [0], [dnl
-00000000  04 00 00 08 00 00 00 01
-OFPT_HELLO (OF1.3) (xid=0x1):
- version bitmap: 0x01, 0x02, 0x03, 0x04
-])
-AT_CHECK([ovs-ofctl encode-hello 0x3e], [0], [dnl
-00000000  05 00 00 08 00 00 00 01
-OFPT_HELLO (OF1.4) (xid=0x1):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05
-])
-
-dnl Some versions below max version missing.
-AT_CHECK([ovs-ofctl encode-hello 0xc], [0], [dnl
-00000000  03 00 00 10 00 00 00 01-00 01 00 08 00 00 00 0c
-OFPT_HELLO (OF1.2) (xid=0x1):
- version bitmap: 0x02, 0x03
-])
-AT_CHECK([ovs-ofctl encode-hello 0xa], [0], [dnl
-00000000  03 00 00 10 00 00 00 01-00 01 00 08 00 00 00 0a
-OFPT_HELLO (OF1.2) (xid=0x1):
- version bitmap: 0x01, 0x03
-])
-AT_CHECK([ovs-ofctl encode-hello 0x8], [0], [dnl
-00000000  03 00 00 10 00 00 00 01-00 01 00 08 00 00 00 08
-OFPT_HELLO (OF1.2) (xid=0x1):
- version bitmap: 0x03
-])
-AT_CHECK([ovs-ofctl encode-hello 0x4], [0], [dnl
-00000000  02 00 00 10 00 00 00 01-00 01 00 08 00 00 00 04
-OFPT_HELLO (OF1.1) (xid=0x1):
- version bitmap: 0x02
-])
-AT_CLEANUP
-
-AT_SETUP([parsing key-value pairs])
-dnl Key-only basics.
-AT_CHECK([ovs-ofctl parse-key-value a a,b 'a b' 'a	b' 'a
-b'], 0, [a
-a, b
-a, b
-a, b
-a, b
-])
-
-dnl Key-value basics.
-AT_CHECK([ovs-ofctl parse-key-value a:b a=b a:b,c=d 'a=b c' 'a(b)' 'a(b),c(d)'], 0,
-[a=b
-a=b
-a=b, c=d
-a=b, c
-a=b
-a=b, c=d
-])
-
-dnl Values that contain nested delimiters.
-AT_CHECK([ovs-ofctl parse-key-value 'a:(b,c)' 'a:b(c,d)e' 'a(b,c(d,e),f)'], 0,
-[a=(b,c)
-a=b(c,d)e
-a=b,c(d,e),f
-])
-
-dnl Extraneous delimiters.
-AT_CHECK([ovs-ofctl parse-key-value a,,b ',a  b' ' a b ,'], 0, [a, b
-a, b
-a, b
-])
-
-dnl Missing right parentheses.
-dnl
-dnl m4 can't handle unbalanced parentheses so we use @{:@, which
-dnl Autotest replaces by a left parenthesis.
-AT_CHECK([ovs-ofctl parse-key-value 'a@{:@b' 'a@{:@b(c)' 'a=b@{:@c'], 0, [a=b
-a=b(c)
-a=b@{:@c
-])
-AT_CLEANUP
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
deleted file mode 100644
index 9b0231b88..000000000
--- a/tests/ofproto-dpif.at
+++ /dev/null
@@ -1,10668 +0,0 @@
-AT_BANNER([ofproto-dpif])
-
-m4_divert_push([PREPARE_TESTS])
-
-# Helper function to check the spread of dp_hash flows over buckets in the datapath
-check_dpflow_stats () {
-    min_flows=$1
-    min_buckets=$2
-    dpflows=`cat`
-    if [[ $# -eq 3 ]]; then
-        echo "$dpflows" | grep "actions:hash"
-        n_flows=`echo "$dpflows" | grep -c dp_hash`
-        n_buckets=`echo "$dpflows" | grep dp_hash | grep -o "actions:[[0-9]]*" | sort | uniq -c | wc -l`
-    else
-        n_flows=`echo "$dpflows" | wc -l`
-        n_buckets=`echo "$dpflows" | grep -o "actions:[[0-9]]*" | sort | uniq -c | wc -l`
-    fi
-    if [[ $n_flows -ge $min_flows ]]; then flows=ok; else flows=nok; fi
-    if [[ $n_buckets -ge $min_buckets ]]; then buckets=ok; else buckets=nok; fi
-    echo "n_flows=$flows n_buckets=$buckets"
-}
-
-m4_divert_pop([PREPARE_TESTS])
-
-
-AT_SETUP([ofproto-dpif - revalidator/wait])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl revalidator/wait])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - active-backup bonding])
-# Create br0 with interfaces p1, p2 and p7, creating bond0 with p1 and p2
-#    and br1 with interfaces p3, p4 and p8.
-# toggle p1,p2 of bond0 up and down to test bonding in active-backup mode.
-OVS_VSWITCHD_START(
-  [add-bond br0 bond0 p1 p2 bond_mode=active-backup --\
-   set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
-   set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
-   add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-                  fail-mode=secure -- \
-   add-port br1 p3 -- set interface p3 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=3 -- \
-   add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=4 -- \
-   add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
-WAIT_FOR_DUMMY_PORTS([p3], [p4])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-AT_CHECK([ovs-ofctl add-flow br1 action=normal])
-ovs-appctl netdev-dummy/set-admin-state up
-ovs-appctl time/warp 100
-ovs-appctl netdev-dummy/set-admin-state p2 down
-ovs-appctl time/stop
-ovs-appctl time/warp 100
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-ovs-appctl time/warp 100
-ovs-appctl netdev-dummy/set-admin-state p2 up
-ovs-appctl netdev-dummy/set-admin-state p1 down
-ovs-appctl time/warp 100
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0d),eth_type(0x0800),ipv4(src=10.0.0.5,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0e),eth_type(0x0800),ipv4(src=10.0.0.6,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-ovs-appctl time/warp 200 100
-sleep 1
-AT_CHECK([grep 'in_port([[348]])' ovs-vswitchd.log | filter_flow_install | strip_xout], [0], [dnl
-recirc_id(0),in_port(3),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(3),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(4),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0d),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(4),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0e),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(4),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8035), actions: <del>
-recirc_id(0),in_port(4),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8035), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - balance-slb bonding])
-# Create br0 with interfaces bond0(p1, p2, p3) and p7,
-#    and br1 with interfaces p4, p5, p6 and p8.
-#    p1 <-> p4, p2 <-> p5, p3 <-> p6
-# Send some traffic, make sure the traffic are spread based on source mac.
-OVS_VSWITCHD_START(
-  [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-slb --\
-   set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
-   set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
-   set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \
-   add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-                  fail-mode=secure -- \
-   add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \
-   add-port br1 p5 -- set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \
-   add-port br1 p6 -- set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \
-   add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
-WAIT_FOR_DUMMY_PORTS([p4], [p5], [p6])
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-AT_CHECK([ovs-ofctl add-flow br1 action=normal])
-AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
-])
-ovs-appctl time/stop
-ovs-appctl time/warp 100
-(
-for i in `seq 0 100 |xargs printf '%02x\n'`;
-    do
-    pkt="in_port(7),eth(src=50:54:00:00:00:$i,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
-    AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
-    done
-)
-ovs-appctl time/warp 100
-AT_CHECK([ovs-appctl dpif/dump-flows br1 > br1_flows.txt])
-# Make sure there is resonable distribution to all three ports.
-# We don't want to make this check precise, in case hash function changes.
-AT_CHECK([test `egrep 'in_port\(4\)' br1_flows.txt |wc -l` -gt 3])
-AT_CHECK([test `egrep 'in_port\(5\)' br1_flows.txt |wc -l` -gt 3])
-AT_CHECK([test `egrep 'in_port\(6\)' br1_flows.txt |wc -l` -gt 3])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - balance-tcp bonding])
-# Create br0 with interfaces bond0(p1, p2, p3) and p7,
-#    and br1 with interfaces bond1(p4, p5, p6) and p8.
-#    bond0 <-> bond1
-# Send some traffic, make sure the traffic are spread based on L4 headers.
-OVS_VSWITCHD_START(
-  [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-tcp lacp=active \
-        other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\
-   set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
-   set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
-   set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \
-   add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-                  fail-mode=secure -- \
-   add-bond br1 bond1 p4 p5 p6 bond_mode=balance-tcp lacp=active \
-        other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\
-   set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \
-   set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \
-   set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \
-   add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
-AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
-])
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-AT_CHECK([ovs-ofctl add-flow br1 action=normal])
-AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
-], [])
-OVS_WAIT_WHILE([ovs-appctl bond/show | grep "may_enable: false"])
-ovs-appctl time/stop
-ovs-appctl time/warp 100
-ovs-appctl lacp/show > lacp.txt
-ovs-appctl bond/show > bond.txt
-(
-for i in `seq 0 255` ;
-    do
-    pkt="in_port(7),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=$i),tcp_flags(ack)"
-    AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
-    done
-)
-ovs-appctl time/warp 300 100
-AT_CHECK([ovs-appctl dpif/dump-flows br0 |grep tcp > br0_flows.txt])
-AT_CHECK([ovs-appctl dpif/dump-flows br1 |grep tcp > br1_flows.txt])
-# Make sure there is resonable distribution to all three ports.
-# We don't want to make this check precise, in case hash function changes.
-AT_CHECK([test `grep in_port.4 br1_flows.txt |wc -l` -gt 24])
-AT_CHECK([test `grep in_port.5 br1_flows.txt |wc -l` -gt 24])
-AT_CHECK([test `grep in_port.6 br1_flows.txt |wc -l` -gt 24])
-
-OVS_VSWITCHD_STOP()
-AT_CLEANUP
-
-# Makes sure recirculation does not change the way packet is handled.
-AT_SETUP([ofproto-dpif - balance-tcp bonding, different recirc flow ])
-OVS_VSWITCHD_START(
-  [add-bond br0 bond0 p1 p2 bond_mode=balance-tcp lacp=active \
-       other-config:lacp-time=fast other-config:bond-rebalance-interval=0 -- \
-   set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
-   set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-       fail-mode=standalone -- \
-   add-bond br1 bond1 p3 p4 bond_mode=balance-tcp lacp=active \
-       other-config:lacp-time=fast other-config:bond-rebalance-interval=0 -- \
-   set interface p3 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=3 -- \
-   set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=4 -- \
-   add-port br1 br1- -- set interface br1- type=patch options:peer=br1+ ofport_request=100 -- \
-   add-br br-int -- \
-   set bridge br-int other-config:hwaddr=aa:77:aa:77:00:00 -- \
-   set bridge br-int datapath-type=dummy other-config:datapath-id=1235 \
-       fail-mode=secure -- \
-   add-port br-int br1+ -- set interface br1+ type=patch options:peer=br1- ofport_request=101 -- \
-   add-port br-int p5 -- set interface p5 ofport_request=5 type=dummy
-])
-AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
-])
-
-# Waits for all ifaces enabled.
-OVS_WAIT_UNTIL([test `ovs-appctl bond/show | grep -- "may_enable: true" |  wc -l` -ge 4])
-
-# The dl_vlan flow should not be ever matched,
-# since recirculation should not change the flow handling.
-AT_DATA([flows.txt], [dnl
-table=0 priority=1 in_port=5 actions=mod_vlan_vid:1,output(101)
-table=0 priority=2 in_port=5 dl_vlan=1 actions=drop
-])
-AT_CHECK([ovs-ofctl add-flows br-int flows.txt])
-
-# Sends a packet to trigger recirculation.
-AT_CHECK([ovs-appctl netdev-dummy/receive p5 "in_port(5),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1)"])
-
-# Collects flow stats.
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-
-# Checks the flow stats in br1, should only be one flow with non-zero
-# 'n_packets' from internal table.
-AT_CHECK([ovs-appctl bridge/dump-flows br1 | ofctl_strip | grep -- "n_packets" | grep -- "table_id" | sed -e 's/output:[[0-9]][[0-9]]*/output/'] , [0], [dnl
-table_id=254, n_packets=1, n_bytes=38, priority=20,recirc_id=0x0,dp_hash=0x0/0xff,actions=output
-])
-
-# Checks the flow stats in br-int, should be only one match.
-AT_CHECK([ovs-ofctl dump-flows br-int | ofctl_strip | sort], [0], [dnl
- n_packets=1, n_bytes=34, priority=1,in_port=5 actions=mod_vlan_vid:1,output:101
- priority=2,in_port=5,dl_vlan=1 actions=drop
-NXST_FLOW reply:
-])
-
-OVS_VSWITCHD_STOP()
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - resubmit])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11 12 13 14 15 16 17 18 19 20 21
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 priority=1000 icmp actions=output(10),resubmit(2),output(19),resubmit(3),output(21)
-table=0 in_port=2 priority=1500 icmp actions=output(11),resubmit(,1),output(16),resubmit(2,1),output(18)
-table=0 in_port=3 priority=2000 icmp actions=output(20)
-table=1 in_port=1 priority=1000 icmp actions=output(12),resubmit(4,1),output(13),resubmit(3),output(15)
-table=1 in_port=2 priority=1500 icmp actions=output(17),resubmit(,2)
-table=1 in_port=3 priority=1500 icmp actions=output(14),resubmit(,2)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=p1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 10,11,12,13,14,15,16,17,18,19,20,21
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - goto table])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11
-echo "table=0 in_port=1 actions=output(10),goto_table(1)" > flows.txt
-for i in `seq 1 63`; do echo "table=$i actions=goto_table($(($i+1)))"; done >> flows.txt
-echo "table=64 actions=output(11)" >> flows.txt
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 10,11
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - write actions])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11 12 13
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
-table=1 ip actions=write_actions(output(13)),goto_table(2)
-table=2 ip actions=set_field:192.168.3.91->ip_src,output(11)
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
-Datapath actions: 10,set(ipv4(src=192.168.3.91)),11,set(ipv4(src=192.168.3.90)),13
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - modify IPv6 Neighbor Solitication (ND)])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11 12 13
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1,icmp6,icmpv6_type=135 actions=output(10),write_actions(set_field:fe80::3->nd_target,set_field:aa:aa:aa:aa:aa:aa->nd_sll,output(12)),goto_table(1)
-table=1 icmp6 actions=write_actions(output(13)),goto_table(2)
-table=2 in_port=1,icmp6,icmpv6_type=135 actions=set_field:fe80::4->nd_target,set_field:cc:cc:cc:cc:cc:cc->nd_sll,output(11)
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,icmp6,ipv6_src=fe80::1,ipv6_dst=fe80::2,nw_tos=0,nw_ttl=128,icmpv6_type=135,nd_target=fe80::2020,nd_sll=66:55:44:33:22:11'], [0], [stdout])
-AT_CHECK([tail -4 stdout], [0],
-  [Megaflow: recirc_id=0,eth,icmp6,in_port=1,nw_frag=no,icmp_type=0x87/0xff,icmp_code=0x0/0xff,nd_target=fe80::2020,nd_sll=66:55:44:33:22:11
-Datapath actions: 10,set(nd(target=fe80::4,sll=cc:cc:cc:cc:cc:cc)),11,set(nd(target=fe80::3,sll=aa:aa:aa:aa:aa:aa)),13
-This flow is handled by the userspace slow path because it:
-  - Uses action(s) not supported by datapath.
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - clear actions])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11 12
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
-table=1 tcp actions=set_field:91->tp_src,output(11),clear_actions
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=9'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,tcp,in_port=1,nw_frag=no,tp_src=8
-Datapath actions: 10,set(tcp(src=91)),11
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - group chaining])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=set_field:192.168.3.90->ip_src,group:123,bucket=output:11'])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=123,type=all,bucket=output:10'])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - all group in action list])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,set_field:192.168.3.90->ip_src,bucket=output:11'])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
-# Must match on the source address to be able to restore it's value for
-# the second bucket
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
-Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - indirect group in action list])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 10
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - group actions have no effect afterwards])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=set_field:192.168.3.90->ip_src,output:10'])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234,output:10'])
-
-for d in 0 1 2 3; do
-    pkt="in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:1),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.1.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
-done
-
-AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/dp_hash(.*\/0xf)/dp_hash(0xXXXX\/0xf)/' |  sed 's/packets.*actions:/actions:/' | strip_ufid | strip_used | sort], [0], [dnl
-flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions:hash(sym_l4(0)),recirc(0x1)
-recirc_id(0x1),dp_hash(0xXXXX/0xf),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(src=192.168.0.1,frag=no), actions:set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),10
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - all group in action set])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,set_field:192.168.3.90->ip_src,bucket=output:11'])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
-# Must match on the source address to be able to restore it's value for
-# the third bucket
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
-Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - indirect group in action set])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 10
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - patch port with action set])
-OVS_VSWITCHD_START([ \
-    add-br br1 -- \
-    set bridge br1 datapath-type=dummy fail-mode=secure -- \
-    add-port br0 patch10 -- \
-    set interface patch10 type=patch options:peer=patch20 ofport_request=10 -- \
-    add-port br1 patch20 -- \
-    set interface patch20 type=patch options:peer=patch10 ofport_request=20
-    ])
-add_of_ports br0 1
-add_of_ports br1 2
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br1 'ip actions=write_actions(pop_vlan,output:2)'])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=output:10'])
-AT_CHECK([ovs-appctl ofproto/trace br1 'in_port=20,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_vlan=100,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: pop_vlan,2
-])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_vlan=100,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: pop_vlan,2
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - select group])
-
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11
-
-ovs-appctl vlog/set ofproto_dpif:file:dbg
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11'])
-AT_CHECK([grep -A6 "Constructing select group 1234" ovs-vswitchd.log | sed 's/^.*ofproto_dpif/ofproto_dpif/'], [0], [dnl
-ofproto_dpif|DBG|Constructing select group 1234
-ofproto_dpif|DBG|No selection method specified. Trying dp_hash.
-ofproto_dpif|DBG|  Minimum weight: 1, total weight: 2
-ofproto_dpif|DBG|  Using 16 hash values:
-ofproto_dpif|DBG|  Bucket 0: weight=1, target=8.00 hits=8
-ofproto_dpif|DBG|  Bucket 1: weight=1, target=8.00 hits=8
-ofproto_dpif|DBG|Use dp_hash with 16 hash values using algorithm 1.
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
-
-# Try a bunch of different flows and make sure that they get distributed
-# # at least somewhat.
-for d in 0 1 2 3; do
-    for s in 1 2 3 4 ; do
-        pkt="in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:1),eth_type(0x0800),ipv4(src=192.168.0.$s,dst=192.168.1.$d,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-        AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
-    done
-done
-
-AT_CHECK([ovs-appctl dpctl/dump-flows | sort | strip_ufid | strip_used | check_dpflow_stats 5 2 dp_hash], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:15, bytes:1590, used:0.0s, actions:hash(sym_l4(0)),recirc(0x1)
-n_flows=ok n_buckets=ok
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - select group with watch port])
-
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=watch_port:10,output:10,bucket=output:11'])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
-
-for d in 0 1 2 3; do
-        pkt="in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:1),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-        AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
-done
-
-AT_CHECK([ovs-appctl dpctl/dump-flows | sort| sed 's/dp_hash(.*\/0xf)/dp_hash(0xXXXX\/0xf)/' | strip_ufid | strip_used], [0], [dnl
-flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:3, bytes:318, used:0.0s, actions:hash(sym_l4(0)),recirc(0x1)
-recirc_id(0x1),dp_hash(0xXXXX/0xf),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:3, bytes:318, used:0.0s, actions:11
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - select group with weights])
-
-# Helper function to check the accuracy of distribution of packets over buckets
-check_group_stats () {
-    buckets=`grep -o 'packet_count=[[0-9]]*' | cut -d'=' -f2 | tail -n +2`
-    i=0
-    for bucket in $buckets; do
-        min=$1
-        shift
-        if [[ $bucket -ge $min ]]; then
-            echo "bucket$i >= $min"
-        else
-            echo "bucket$i < $min"
-        fi
-        i=`expr $i + 1`
-        if [[ $i -ge 4 ]]; then break; fi
-    done
-}
-
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11 12 13 14
-
-ovs-appctl vlog/set ofproto_dpif:file:dbg
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-group br0 'group_id=1234,type=select,bucket=weight:5,output:10,bucket=weight:10,output:11,bucket=weight:25,output:12,bucket=weight:60,output:13,bucket=weight:0,output:14'])
-AT_CHECK([grep -A9 "Constructing select group 1234" ovs-vswitchd.log | sed 's/^.*ofproto_dpif/ofproto_dpif/'], [0], [dnl
-ofproto_dpif|DBG|Constructing select group 1234
-ofproto_dpif|DBG|No selection method specified. Trying dp_hash.
-ofproto_dpif|DBG|  Minimum weight: 5, total weight: 100
-ofproto_dpif|DBG|  Using 32 hash values:
-ofproto_dpif|DBG|  Bucket 0: weight=5, target=1.60 hits=2
-ofproto_dpif|DBG|  Bucket 1: weight=10, target=3.20 hits=3
-ofproto_dpif|DBG|  Bucket 2: weight=25, target=8.00 hits=8
-ofproto_dpif|DBG|  Bucket 3: weight=60, target=19.20 hits=19
-ofproto_dpif|DBG|  Bucket 4: weight=0, target=0.00 hits=0
-ofproto_dpif|DBG|Use dp_hash with 32 hash values using algorithm 1.
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
-
-# Try 1000 different flows and make sure that they get distributed according to weights
-for d1 in 0 1 2 3 4 5 6 7 8 9 ; do
-  for d2 in 0 1 2 3 4 5 6 7 8 9 ; do
-    for s in 0 1 2 3 4 5 6 7 8 9 ; do
-      pkt="in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:1),eth_type(0x0800),ipv4(src=192.168.1.$s,dst=192.168.$d1.$d2,proto=6,tos=0,ttl=128,frag=no),tcp(src=1000$s,dst=1000)"
-      AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
-    done
-  done
-done
-
-# Check balanced distribution over 32 dp_hash values
-AT_CHECK([ovs-appctl dpctl/dump-flows | sort | strip_ufid | strip_used | check_dpflow_stats 32 4 dp_hash], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:999, bytes:117882, used:0.0s, actions:hash(sym_l4(0)),recirc(0x1)
-n_flows=ok n_buckets=ok
-])
-
-# Check that actual distribution over the buckets is reasonably accurate:
-                ideal weights       dp_hash values
-#   bucket0:    5%*1000 = 50        2/32*1000 = 63
-#   bucket1:    10%*1000 = 100      3/32*1000 = 94
-#   bucket2:    25%*1000 = 250      8/32*1000 = 250
-#   bucket3:    60%*1000 = 600      19/32*1000 = 594
-#   bucket4:    0                   0
-
-ovs-appctl time/warp 1000
-AT_CHECK([ovs-ofctl -O OpenFlow13 dump-group-stats br0 | sed 's/duration=[[0-9]]\.[[0-9]]*s,//' | check_group_stats 40 80 200 500],
-[0], [dnl
-bucket0 >= 40
-bucket1 >= 80
-bucket2 >= 200
-bucket3 >= 500
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - select group with explicit dp_hash selection method])
-
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11
-
-ovs-appctl vlog/set ofproto_dpif:file:dbg
-AT_CHECK([ovs-ofctl -O OpenFlow15 add-group br0 'group_id=1234,type=select,selection_method=dp_hash,bucket=output:10,bucket=output:11'])
-AT_CHECK([grep -A6 "Constructing select group 1234" ovs-vswitchd.log | sed 's/^.*ofproto_dpif/ofproto_dpif/'], [0], [dnl
-ofproto_dpif|DBG|Constructing select group 1234
-ofproto_dpif|DBG|Selection method specified: dp_hash.
-ofproto_dpif|DBG|  Minimum weight: 1, total weight: 2
-ofproto_dpif|DBG|  Using 16 hash values:
-ofproto_dpif|DBG|  Bucket 0: weight=1, target=8.00 hits=8
-ofproto_dpif|DBG|  Bucket 1: weight=1, target=8.00 hits=8
-ofproto_dpif|DBG|Use dp_hash with 16 hash values using algorithm 0.
-])
-
-# Fall back to legacy hash with zero buckets
-AT_CHECK([ovs-ofctl -O OpenFlow15 add-group br0 'group_id=1235,type=select,selection_method=dp_hash'])
-AT_CHECK([grep -A3 "Constructing select group 1235" ovs-vswitchd.log | sed 's/^.*ofproto_dpif/ofproto_dpif/'], [0], [dnl
-ofproto_dpif|DBG|Constructing select group 1235
-ofproto_dpif|DBG|Selection method specified: dp_hash.
-ofproto_dpif|DBG|  Don't apply dp_hash method without buckets.
-ofproto_dpif|DBG|Falling back to default hash method.
-])
-
-# Fall back to legacy hash with zero buckets
-AT_CHECK([ovs-ofctl -O OpenFlow15 add-group br0 'group_id=1236,type=select,selection_method=dp_hash,bucket=weight=1,output:10,bucket=weight=1000,output:11'])
-AT_CHECK([grep -A4 "Constructing select group 1236" ovs-vswitchd.log | sed 's/^.*ofproto_dpif/ofproto_dpif/'], [0], [dnl
-ofproto_dpif|DBG|Constructing select group 1236
-ofproto_dpif|DBG|Selection method specified: dp_hash.
-ofproto_dpif|DBG|  Minimum weight: 1, total weight: 1001
-ofproto_dpif|DBG|  Too many hash values required: 1024
-ofproto_dpif|DBG|Falling back to default hash method.
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - select group with legacy hash selection method])
-
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11
-
-ovs-appctl vlog/set ofproto_dpif:file:dbg
-AT_CHECK([ovs-ofctl -O OpenFlow15 add-group br0 'group_id=1234,type=select,selection_method=hash,bucket=output:10,bucket=output:11'])
-AT_CHECK([grep -A2 "Constructing select group 1234" ovs-vswitchd.log | sed 's/^.*ofproto_dpif/ofproto_dpif/'], [0], [dnl
-ofproto_dpif|DBG|Constructing select group 1234
-ofproto_dpif|DBG|Selection method specified: hash.
-ofproto_dpif|DBG|No hash fields. Falling back to default hash method.
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow15 add-flow br0 'ip actions=write_actions(group:1234)'])
-
-# Try 16 flows with differing default hash values.
-for d in 0 1 2 3; do
-    for s in 1 2 3 4 ; do
-        pkt="in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:1),eth_type(0x0800),ipv4(src=192.168.0.$s,dst=192.168.1.$d,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-        AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
-    done
-done
-
-# Check that the packets installed 16 data path flows and each of the two
-# buckets is hit at least once.
-AT_CHECK([ovs-appctl dpctl/dump-flows | strip_ufid | strip_used | sort | check_dpflow_stats 16 2], [0], [dnl
-n_flows=ok n_buckets=ok
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - select group with custom hash selection method])
-
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11
-
-# Check that parse failures after 'fields' parsing work
-AT_CHECK([ovs-ofctl -O OpenFlow10 add-group br0 'group_id=1,type=select,fields(eth_dst),bukket=output:10'], [1], ,[dnl
-ovs-ofctl: unknown keyword bukket
-])
-
-# Check that fields are rejected without "selection_method=hash".
-AT_CHECK([ovs-ofctl -O OpenFlow15 add-group br0 'group_id=1235,type=select,fields(eth_dst,ip_dst,tcp_dst),bucket=output:10,bucket=output:11'], 1, [], [dnl
-ovs-ofctl: fields may only be specified with "selection_method=hash"
-])
-
-# Check that selection_method_param without selection_method is rejected.
-AT_CHECK([ovs-ofctl -O OpenFlow15 add-group br0 'group_id=1235,type=select,selection_method_param=1,bucket=output:10,bucket=output:11'], 1, [], [dnl
-ovs-ofctl: selection_method_param is only allowed with "selection_method"
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow15 add-group br0 'group_id=1234,type=select,selection_method=hash,fields(eth_dst,ip_dst,tcp_dst),bucket=output:10,bucket=output:11'])
-AT_CHECK([ovs-ofctl -O OpenFlow15 add-flow br0 'ip actions=write_actions(group:1234)'])
-
-# Try 16 flows with differing custom hash and check that they give rise to
-# 16 data path flows and each of the two buckets is hit at least once
-for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
-    pkt="in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:$d),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
-done
-
-AT_CHECK([ovs-appctl dpctl/dump-flows | strip_ufid | strip_used | sort | check_dpflow_stats 16 2], [0], [dnl
-n_flows=ok n_buckets=ok
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-
-# Try 16 flows that differ only in fields that are not part of the custom
-# hash and check that there is only a single datapath flow
-for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
-    pkt="in_port(1),eth(src=50:54:00:00:00:$d,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
-done
-
-AT_CHECK([ovs-appctl dpctl/dump-flows | grep -c recirc_id], [0], [dnl
-1
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - fast failover group])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=ff,bucket=watch_port:10,output:10,bucket=watch_port:11,output:11'])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 10
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - group stats single bucket])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,weight=2000,bucket=output:11,weight=0'])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
-(
-for i in `seq 0 2`;
-    do
-    pkt="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
-    done
-)
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sort], [0], [dnl
- group_id=1234,ref_count=1,packet_count=3,byte_count=318,bucket0:packet_count=3,byte_count=318,bucket1:packet_count=0,byte_count=0
-OFPST_GROUP reply (OF1.2):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - group stats all buckets])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:11'])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
-(
-for i in `seq 0 2`;
-    do
-    pkt="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
-    done
-)
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sort], [0], [dnl
- group_id=1234,ref_count=1,packet_count=3,byte_count=318,bucket0:packet_count=3,byte_count=318,bucket1:packet_count=3,byte_count=318
-OFPST_GROUP reply (OF1.2):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - registers])
-OVS_VSWITCHD_START
-add_of_ports br0 20 21 22 33 90
-AT_DATA([flows.txt], [dnl
-in_port=90                 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:91
-in_port=91                 actions=resubmit:5,resubmit:6,resubmit:7,resubmit:92
-in_port=92                 actions=resubmit:8,resubmit:9,resubmit:10,resubmit:11,resubmit:93
-in_port=93                 actions=resubmit:12,resubmit:13,resubmit:14,resubmit:15
-
-in_port=2                  actions=load:0x000db000->NXM_NX_REG0[[]]
-in_port=3                  actions=load:0xdea->NXM_NX_REG0[[20..31]]
-in_port=4                  actions=load:0xeef->NXM_NX_REG0[[0..11]]
-in_port=5                  actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]]
-in_port=6                  actions=load:0x22222222->NXM_NX_REG2[[]]
-in_port=7                  actions=move:NXM_NX_REG1[[20..31]]->NXM_NX_REG2[[0..11]]
-in_port=8                  actions=move:NXM_NX_REG1[[0..11]]->NXM_NX_REG2[[20..31]]
-in_port=9,reg0=0xdeadbeef  actions=output:20
-in_port=10,reg1=0xdeadbeef actions=output:21
-in_port=11,reg2=0xeef22dea actions=output:22
-
-dnl Sanilty check all registers
-in_port=12 actions=load:0x10->NXM_NX_REG0[[]],load:0x11->NXM_NX_REG1[[]],load:0x12->NXM_NX_REG2[[]]
-in_port=13 actions=load:0x13->NXM_NX_REG3[[]],load:0x14->NXM_NX_REG4[[]],load:0x15->NXM_NX_REG5[[]]
-in_port=14 actions=load:0x16->NXM_NX_REG6[[]],load:0x17->NXM_NX_REG7[[]]
-in_port=15,reg0=0x10,reg1=0x11,reg2=0x12,reg3=0x13,reg4=0x14,reg5=0x15,reg6=0x16,reg7=0x17 actions=output:33
-
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 20,21,22,33
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Tests that the standardized xregs are mapped onto the legacy OVS registers
-dnl in the manner documented in ovs-ofctl(8).
-AT_SETUP([ofproto-dpif - extended registers])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-AT_DATA([flows.txt], [dnl
-table=0     actions=load:0xfedcba9876543210->OXM_OF_PKT_REG1[[]],resubmit(,1)
-table=1,reg2=0xfedcba98,reg3=0x76543210   actions=2
-
-# These low-priority rules shouldn't match.  They're here only to make really
-# sure that the test fails if either of the above rules fails to match.
-table=0,priority=0                        actions=3
-table=1,priority=0                        actions=3
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Tests that the standardized xxregs are mapped onto the legacy OVS
-dnl registers in the manner documented in ovs-ofctl(8).
-AT_SETUP([ofproto-dpif - extended-extended registers])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-AT_DATA([flows.txt], [dnl
-table=0 actions=load:0x0123456789abcdeffedcba9876543210->NXM_NX_XXREG1[[]],resubmit(,1)
-table=1,reg4=0x01234567,reg5=0x89abcdef,reg6=0xfedcba98,reg7=0x76543210   actions=2
-
-# These low-priority rules shouldn't match.  They're here only to make really
-# sure that the test fails if either of the above rules fails to match.
-table=0,priority=0                        actions=3
-table=1,priority=0                        actions=3
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - load and move order])
-OVS_VSWITCHD_START
-add_of_ports br0 1 10 11
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,move:NXM_NX_REG1[[]]->NXM_OF_IP_SRC[[]],bucket=output:11'])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(load:0xffffffff->NXM_NX_REG1[[]],move:NXM_NX_REG1[[]]->NXM_NX_REG2[[]],group:1234)'])
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
-Datapath actions: set(ipv4(src=255.255.255.255)),10,set(ipv4(src=192.168.0.1)),11
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Tests that 1.5 copy-field can copy into the standardized xregs.
-AT_SETUP([ofproto-dpif - copy-field into extended registers])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-AT_DATA([flows.txt], [dnl
-table=0     actions=move:OXM_OF_ETH_SRC[[0..47]]->OXM_OF_PKT_REG0[[0..47]],goto_table(1)
-table=1,xreg0=0x0000505400000005   actions=2
-
-# These low-priority rules shouldn't match.  They're here only to make really
-# sure that the test fails if either of the above rules fails to match.
-table=0,priority=0                        actions=3
-table=1,priority=0                        actions=3
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Tests that 1.5 set-field with mask in the metadata register.
-AT_SETUP([ofproto-dpif - masked set-field into metadata])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-AT_DATA([flows.txt], [dnl
-table=0     actions=set_field:0xfafafafa5a5a5a5a->metadata,goto_table(1)
-table=1     actions=set_field:0x6b/0xff->metadata,goto_table(2)
-table=2,metadata=0xfafafafa5a5a5a6b  actions=2
-
-# These low-priority rules shouldn't match.  They're here only to make really
-# sure that the test fails if either of the above rules fails to match.
-table=0,priority=0                        actions=3
-table=1,priority=0                        actions=3
-table=2,priority=0                        actions=3
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - actset_output])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3 4 5 6 7 8 9 10 11 12 13
-AT_DATA([flows.txt], [dnl
-table=0,actset_output=unset     actions=write_actions(output(2)),goto_table(1)
-table=1     actions=move:ONFOXM_ET_ACTSET_OUTPUT[[0..31]]->OXM_OF_PKT_REG0[[0..31]],goto_table(2)
-
-# Verify that actset_output got set.
-table=2,priority=20,actset_output=2  actions=4,goto_table(3)
-table=2,priority=10                  actions=5,goto_table(3)
-
-# Verify that xreg0 got copied properly from actset_output.
-table=3,priority=20,xreg0=2  actions=6,goto_table(4)
-table=3,priority=10          actions=7,goto_table(4)
-
-# Verify that xxreg0 got copied properly from actset_output.
-table=3,priority=20,xxreg0=2  actions=6,goto_table(4)
-table=3,priority=10           actions=7,goto_table(4)
-
-# Verify that adding a group action unsets actset_output,
-# even if output follows group.
-table=4 actions=write_actions(group(5),output(10)),goto_table(5)
-table=5,priority=20,actset_output=unset  actions=8,goto_table(6)
-table=5,priority=10                      actions=9,goto_table(6)
-
-# Verify that adding another output action doesn't change actset_output
-# (since there's still a group).
-table=6 actions=write_actions(output(3)),goto_table(7)
-table=7,priority=20,actset_output=unset  actions=10,goto_table(8)
-table=7,priority=10                      actions=11,goto_table(8)
-
-# Verify that clearing the action set, then writing an output action,
-# causes actset_output to be set again.
-table=8,actions=clear_actions,write_actions(output(3),output(2)),goto_table(9)
-table=9,priority=20,actset_output=2 actions=12
-table=9,priority=10                 actions=13
-])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-group br0 'group_id=5,type=all,bucket=output:1'])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [Datapath actions: 4,6,8,10,12,2
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - push-pop])
-OVS_VSWITCHD_START
-add_of_ports br0 20 21 22 33 90
-AT_DATA([flows.txt], [dnl
-in_port=90           actions=load:20->NXM_NX_REG0[[0..7]],load:21->NXM_NX_REG1[[0..7]],load:22->NXM_NX_REG2[[0..7]], load:33->NXM_NX_REG3[[0..7]], push:NXM_NX_REG0[[]], push:NXM_NX_REG1[[0..7]],push:NXM_NX_REG2[[0..15]], push:NXM_NX_REG3[[]], resubmit:2, resubmit:3, resubmit:4, resubmit:5
-in_port=2            actions=pop:NXM_NX_REG0[[0..7]],output:NXM_NX_REG0[[]]
-in_port=3            actions=pop:NXM_NX_REG1[[0..7]],output:NXM_NX_REG1[[]]
-in_port=4            actions=pop:NXM_NX_REG2[[0..15]],output:NXM_NX_REG2[[]]
-in_port=5            actions=pop:NXM_NX_REG3[[]],output:NXM_NX_REG3[[]]
-
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 33,22,21,20
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - output])
-OVS_VSWITCHD_START
-add_of_ports br0 1 9 10 11 55 66 77 88
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7,resubmit:8
-in_port=2 actions=output:9
-in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]]
-in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11
-in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]]
-in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]]
-in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]]
-in_port=8 actions=1,9,load:9->NXM_OF_IN_PORT[[]],1,9
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 9,55,10,55,66,11,77,88,9,1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - dec_ttl])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3 4
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 action=dec_ttl,output:2,resubmit(1,1),output:4
-table=1 in_port=1 action=dec_ttl,output:3
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)' -generate], [0], [stdout])
-AT_CHECK([tail -4 stdout], [0], [
-Final flow: ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=111,nw_tos=0,nw_ecn=0,nw_ttl=1
-Megaflow: recirc_id=0,eth,ip,in_port=1,nw_ttl=2,nw_frag=no
-Datapath actions: set(ipv4(ttl=1)),2,userspace(pid=0,controller(reason=2,dont_send=0,continuation=0,recirc_id=1,rule_cookie=0,controller_id=0,max_len=65535)),4
-])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=3,frag=no)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,in_port=1,nw_ttl=3,nw_frag=no
-Datapath actions: set(ipv4(ttl=2)),2,set(ipv4(ttl=1)),3,4
-])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ipv6,in_port=1,nw_ttl=128,nw_frag=no
-Datapath actions: set(ipv6(hlimit=127)),2,set(ipv6(hlimit=126)),3,4
-])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl -P nxt_packet_in monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)'
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=34 in_port=1 (via invalid_ttl) data_len=34 (unbuffered)
-ip,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=111,nw_tos=0,nw_ecn=0,nw_ttl=1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
-dnl buffer to be resized just before pushing the id of the dec_ttl action.
-dnl Thus the implementation must account for this by using the
-dnl reallocated buffer rather than the original buffer.
-dnl
-dnl A number of similar rules are added to try and exercise
-dnl xrealloc sufficiently that it returns a different base pointer
-AT_SETUP([ofproto-dpif - dec_ttl without arguments at offset 32 in ofpacts])
-OVS_VSWITCHD_START
-add_of_ports br0 1
-(for i in `seq 0 255`; do
-  printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl,controller\n" $i
- done) > flows.txt
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
-dnl buffer to be resized just before pushing the id of the dec_ttl action.
-dnl Thus the implementation must account for this by using the
-dnl reallocated buffer rather than the original buffer.
-dnl
-dnl A number of similar rules are added to try and exercise
-dnl xrealloc sufficiently that it returns a different base pointer
-AT_SETUP([ofproto-dpif - dec_ttl with arguments at offset 32 in ofpacts])
-OVS_VSWITCHD_START
-add_of_ports br0 1
-(for i in `seq 0 255`; do
-  printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl(1),controller\n" $i
- done) > flows.txt
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl A note action at offset 24 in ofpacts will cause the ofpacts
-dnl buffer to be resized just before pushing the id of the dec_ttl action.
-dnl Thus the implementation must account for this by using the
-dnl reallocated buffer rather than the original buffer.
-dnl
-dnl A number of similar rules are added to try and exercise
-dnl xrealloc sufficiently that it returns a different base pointer
-AT_SETUP([ofproto-dpif - note at offset 24 in ofpacts])
-OVS_VSWITCHD_START
-add_of_ports br0 1
-(for i in `seq 0 255`; do
-  printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,note:ff,controller\n" $i
- done) > flows.txt
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl As of OVS-2.5, a note action after 4 set_field actions are likely to
-dnl trigger ofpbuf reallocation during decode (~1KB into ofpacts buffer).
-dnl Using `make check-valgrind' here checks for use-after-free in this
-dnl codepath.
-AT_SETUP([ofproto-dpif - note action deep inside ofpacts])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 'actions=set_field:0x1->metadata,set_field:0x2->metadata,set_field:0x3->metadata,set_field:0x4->metadata,note:00000000000000000000000000000000,note:00000000000000000000000000000000'])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - output, OFPP_NONE ingress port])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-
-# "in_port" defaults to OFPP_NONE if it's not specified.
-flow="icmp,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,icmp_type=8,icmp_code=0"
-AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
-AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //' | tr "," "\n" | sort -n], [0], [dnl
-1
-2
-100
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - DSCP])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
-add_of_ports br0 9
-AT_DATA([flows.txt], [dnl
-actions=output:LOCAL,enqueue:1:1,enqueue:1:2,enqueue:1:2,enqueue:1:1,output:1,mod_nw_tos:0,output:1,output:LOCAL
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-vsctl -- \
-        set Port p1 qos=@newqos --\
-        --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\
-        --id=@q1 create Queue dscp=1 --\
-        --id=@q2 create Queue dscp=2], [0], [ignore])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(9),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0xff,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,skb_priority=0,eth,ip,in_port=9,nw_tos=252,nw_frag=no
-Datapath actions: dnl
-100,dnl
-set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
-set(ipv4(tos=0x8/0xfc)),set(skb_priority(0x2)),1,dnl
-1,dnl
-set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
-set(ipv4(tos=0xfc/0xfc)),set(skb_priority(0)),1,dnl
-set(ipv4(tos=0/0xfc)),1,100
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - output/flood flags])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3 4 5 6 7
-
-AT_DATA([flows.txt], [dnl
-in_port=local actions=local,flood
-in_port=1 actions=flood
-in_port=2 actions=all
-in_port=3 actions=output:LOCAL,output:1,output:2,output:3,output:4,output:5,output:6,output:7
-in_port=4 actions=enqueue:LOCAL:1,enqueue:1:1,enqueue:2:1,enqueue:3:2,enqueue:4:1,enqueue:5:1,enqueue:6:1,enqueue:7:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
-AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
-AT_CHECK([tail -1 stdout \
-| sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
-1
-2
-3
-4
-7
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
-AT_CHECK([tail -1 stdout \
-| sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
-100
-2
-3
-4
-7
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
-AT_CHECK([tail -1 stdout \
-| sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
-1
-100
-3
-4
-6
-7
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(3),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 100,1,2,4,6,7
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(4),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(skb_priority(0x1)),100,1,2,set(skb_priority(0x2)),3,set(skb_priority(0x1)),6,7
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - Default Table Miss - OF1.0 (OFPTC_TABLE_MISS_CONTROLLER)])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-
-AT_CHECK([ovs-ofctl -P nxt_packet_in monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(syn)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:2e7e
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:2e7e
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:2e7e
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
-NXST_FLOW reply:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - Default Table Miss - OF1.3 (OFPTC_TABLE_MISS_DROP)])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl del-flows br0])
-
-AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-dnl Test that missed packets are dropped
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(ack,syn)'
-done
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
-OFPST_FLOW reply (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTROLLER])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
-
-AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(urg|rst)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (xid=0x0): total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:2e5c
-dnl
-OFPT_PACKET_IN (xid=0x0): total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:2e5c
-dnl
-OFPT_PACKET_IN (xid=0x0): total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:2e5c
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=3, n_bytes=162, actions=goto_table:1
-OFPST_FLOW reply (OF1.2):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTROLLER])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
-
-AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
-done
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=3, n_bytes=354, actions=resubmit(1,1)
-OFPST_FLOW reply (OF1.2):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_CONTINUE])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl add-flow br0 'table=1 dl_src=10:11:11:11:11:11 actions=controller'])
-AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
-
-dnl Miss table 0, Hit table 1
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=118 in_port=1 (via action) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=118 in_port=1 (via action) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=118 in_port=1 (via action) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-])
-
-dnl Hit table 0, Miss all other tables, sent to controller
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=118 in_port=1 (via no_match) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=118 in_port=1 (via no_match) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=118 in_port=1 (via no_match) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- table=1, n_packets=3, n_bytes=354, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
-OFPST_FLOW reply (OF1.2):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTINUE])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_DATA([flows.txt], [dnl
-table=0 actions=goto_table(1)
-table=2 dl_src=10:11:11:11:11:11 actions=controller
-])
-AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
-
-dnl Hit table 0, Miss table 1, Hit table 2
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=118 in_port=1 (via action) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=118 in_port=1 (via action) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=118 in_port=1 (via action) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-])
-
-dnl Hit table 1, Miss all other tables, sent to controller
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=118 in_port=1 (via no_match) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=118 in_port=1 (via no_match) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=118 in_port=1 (via no_match) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=6, n_bytes=708, actions=goto_table:1
- table=2, n_packets=3, n_bytes=354, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
-OFPST_FLOW reply (OF1.2):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTINUE])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_DATA([flows.txt], [dnl
-table=0 actions=resubmit(1,1)
-table=2 dl_src=10:11:11:11:11:11 actions=controller
-])
-AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
-
-dnl Hit table 0, Miss table 1, Dropped
-AT_CHECK([ovs-ofctl monitor br0 65534 -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
-done
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-])
-
-dnl Hit table 1, Dropped
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
-done
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=6, n_bytes=708, actions=resubmit(1,1)
- table=2, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
-OFPST_FLOW reply (OF1.2):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_DROP])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
-
-AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-dnl Test that missed packets are dropped
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
-done
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
-NXST_FLOW reply:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_DROP])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
-AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
-
-AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-dnl Test that missed packets are dropped
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
-done
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=3, n_bytes=354, actions=goto_table:1
-OFPST_FLOW reply (OF1.2):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_DROP])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
-AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
-
-AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-dnl Test that missed packets are dropped
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
-done
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=3, n_bytes=354, actions=resubmit(1,1)
-OFPST_FLOW reply (OF1.2):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - controller])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_DATA([flows.txt], [dnl
-cookie=0x0 dl_src=10:11:11:11:11:11 actions=controller
-cookie=0x1 dl_src=20:22:22:22:22:22 actions=controller,resubmit(80,1)
-cookie=0x2 dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,controller
-
-cookie=0x3 table=1 in_port=80 actions=load:1->NXM_NX_REG0[[]],mod_vlan_vid:80,controller,resubmit(81,2)
-cookie=0x4 table=2 in_port=81 actions=load:2->NXM_NX_REG1[[]],mod_dl_src:80:81:81:81:81:81,controller,resubmit(82,3)
-cookie=0x5 table=3 in_port=82 actions=load:3->NXM_NX_REG2[[]],mod_dl_dst:82:82:82:82:82:82,controller,resubmit(83,4)
-cookie=0x6 table=4 in_port=83 actions=load:4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,controller,resubmit(84,5)
-cookie=0x7 table=5 in_port=84 actions=load:5->NXM_NX_REG4[[]],load:6->NXM_NX_TUN_ID[[]],mod_nw_dst:84.84.84.84,controller,resubmit(85,6)
-cookie=0x8 table=6 in_port=85 actions=mod_tp_src:85,controller,resubmit(86,7)
-cookie=0x9 table=7 in_port=86 actions=mod_tp_dst:86,controller,controller
-cookie=0xa dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,controller
-cookie=0xd dl_src=80:88:88:88:88:88 arp actions=load:2->OXM_OF_ARP_OP[[]],controller,load:0xc0a88001->OXM_OF_ARP_SPA[[]],controller,load:0x404444444441->OXM_OF_ARP_THA[[]],load:0x01010101->OXM_OF_ARP_SPA[[]],load:0x02020202->OXM_OF_ARP_TPA[[]],controller
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-dnl Flow miss.
-AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (xid=0x0): total_len=118 in_port=1 (via no_match) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-dnl
-OFPT_PACKET_IN (xid=0x0): total_len=118 in_port=1 (via no_match) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-dnl
-OFPT_PACKET_IN (xid=0x0): total_len=118 in_port=1 (via no_match) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-])
-
-dnl Singleton controller action.
-AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (xid=0x0): total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-OFPT_PACKET_IN (xid=0x0): total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-OFPT_PACKET_IN (xid=0x0): total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-])
-
-dnl Modified controller action.
-AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=30:33:33:33:33:33,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x001)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,dl_vlan=15,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:2e7e
-dnl
-OFPT_PACKET_IN (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,dl_vlan=15,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:2e7e
-dnl
-OFPT_PACKET_IN (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,dl_vlan=15,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:2e7e
-])
-
-dnl Modified VLAN controller action.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:41,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-ip,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-ip,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-ip,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
-])
-
-dnl Checksum TCP.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=20:22:22:22:22:22,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=11),tcp_flags(0x001)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:2e7d
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=58 reg0=0x1,in_port=1 (via action) data_len=58 (unbuffered)
-tcp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:2e7d
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=58 reg0=0x1,reg1=0x2,in_port=1 (via action) data_len=58 (unbuffered)
-tcp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:2e7d
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=58 reg0=0x1,reg1=0x2,reg2=0x3,in_port=1 (via action) data_len=58 (unbuffered)
-tcp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:2e7d
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=58 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,in_port=1 (via action) data_len=58 (unbuffered)
-tcp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:4880
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=58 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=58 (unbuffered)
-tcp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:6082
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=58 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=58 (unbuffered)
-tcp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=11,tcp_flags=fin tcp_csum:6035
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=58 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=58 (unbuffered)
-tcp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=86,tcp_flags=fin tcp_csum:5fea
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=58 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=58 (unbuffered)
-tcp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=86,tcp_flags=fin tcp_csum:5fea
-])
-
-dnl Checksum UDP.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 ; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 20 22 22 22 22 22 08 00 45 00 00 1C 00 00 00 00 00 11 00 00 C0 A8 00 01 C0 A8 00 02 00 08 00 0B 00 00 12 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 reg0=0x1,in_port=1 (via action) data_len=64 (unbuffered)
-udp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 reg0=0x1,reg1=0x2,in_port=1 (via action) data_len=64 (unbuffered)
-udp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,in_port=1 (via action) data_len=64 (unbuffered)
-udp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,in_port=1 (via action) data_len=64 (unbuffered)
-udp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:2c37
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
-udp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:4439
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
-udp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=11 udp_csum:43ec
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
-udp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
-udp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1
-])
-
-dnl Modified ARP controller action.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=80:88:88:88:88:88,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
-done
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Checksum SCTP.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 ; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 20 22 22 22 22 22 08 00 45 00 00 24 00 00 00 00 00 84 00 00 C0 A8 00 01 C0 A8 00 02 04 58 08 af 00 00 00 00 d9 d7 91 57 01 00 00 34 cf 28 ec 4e 00 01 40 00 00 0a ff ff b7 53 24 19 00 05 00 08 7f 00 00 01 00 05 00 08 c0 a8 02 07 00 0c 00 06 00 05 00 00 80 00 00 04 c0 00 00 04'
-done
-
-AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=98 in_port=1 (via action) data_len=98 (unbuffered)
-sctp,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=102 reg0=0x1,in_port=1 (via action) data_len=102 (unbuffered)
-sctp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=102 reg0=0x1,reg1=0x2,in_port=1 (via action) data_len=102 (unbuffered)
-sctp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,in_port=1 (via action) data_len=102 (unbuffered)
-sctp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,in_port=1 (via action) data_len=102 (unbuffered)
-sctp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered)
-sctp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered)
-sctp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=2223 sctp_csum:dd778f5f
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered)
-sctp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 sctp_csum:62051f56
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered)
-sctp,dl_vlan=80,dl_vlan_pcp=0,vlan_tci1=0x0000,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 sctp_csum:62051f56
-])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, n_packets=3, n_bytes=212, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1)
- cookie=0x2, n_packets=3, n_bytes=162, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535
- cookie=0x3, table=1, n_packets=3, n_bytes=212, in_port=80 actions=load:0x1->NXM_NX_REG0[[]],mod_vlan_vid:80,CONTROLLER:65535,resubmit(81,2)
- cookie=0x4, table=2, n_packets=3, n_bytes=212, in_port=81 actions=load:0x2->NXM_NX_REG1[[]],mod_dl_src:80:81:81:81:81:81,CONTROLLER:65535,resubmit(82,3)
- cookie=0x5, table=3, n_packets=3, n_bytes=212, in_port=82 actions=load:0x3->NXM_NX_REG2[[]],mod_dl_dst:82:82:82:82:82:82,CONTROLLER:65535,resubmit(83,4)
- cookie=0x6, table=4, n_packets=3, n_bytes=212, in_port=83 actions=load:0x4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,CONTROLLER:65535,resubmit(84,5)
- cookie=0x7, table=5, n_packets=3, n_bytes=212, in_port=84 actions=load:0x5->NXM_NX_REG4[[]],load:0x6->NXM_NX_TUN_ID[[]],mod_nw_dst:84.84.84.84,CONTROLLER:65535,resubmit(85,6)
- cookie=0x8, table=6, n_packets=3, n_bytes=212, in_port=85 actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
- cookie=0x9, table=7, n_packets=3, n_bytes=212, in_port=86 actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=102, dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=126, arp,dl_src=80:88:88:88:88:88 actions=load:0x2->NXM_OF_ARP_OP[[]],CONTROLLER:65535,load:0xc0a88001->NXM_OF_ARP_SPA[[]],CONTROLLER:65535,load:0x404444444441->NXM_NX_ARP_THA[[]],load:0x1010101->NXM_OF_ARP_SPA[[]],load:0x2020202->NXM_OF_ARP_TPA[[]],CONTROLLER:65535
- n_packets=3, n_bytes=162, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
-NXST_FLOW reply:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - controller with slow-path action])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=1,actions=debug_slow,controller"])
-
-AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
-done
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 3])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (xid=0x0): total_len=118 in_port=1 (via action) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-dnl
-OFPT_PACKET_IN (xid=0x0): total_len=118 in_port=1 (via action) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-dnl
-OFPT_PACKET_IN (xid=0x0): total_len=118 in_port=1 (via action) data_len=118 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:4a2c
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - controller action without megaflows])
-OVS_VSWITCHD_START
-add_of_ports br0 1
-
-AT_CHECK([ovs-ofctl add-flow br0 in_port=1,action=controller])
-AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [dnl
-megaflows disabled
-])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'])
-done
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 4])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
-flow-dump from non-dpdk interfaces:
-packets:1, bytes:14, used:0.001s, actions:userspace(pid=0,controller(reason=1,dont_send=0,continuation=0,recirc_id=1,rule_cookie=0,controller_id=0,max_len=65535))
-])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
-])
-
-AT_CHECK([ovs-appctl revalidator/purge])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-dnl Add a controller meter.
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-meter br0 'meter=controller pktps stats bands=type=drop rate=2'])
-
-dnl Advance time by 1 second.
-AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
-
-for i in `seq 1 8`; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x4321)'])
-done
-
-AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
-flow-dump from non-dpdk interfaces:
-packets:7, bytes:98, used:0.001s, actions:sample(sample=100.0%,actions(meter(0),userspace(pid=0,controller(reason=1,dont_send=0,continuation=0,recirc_id=2,rule_cookie=0,controller_id=0,max_len=65535))))
-])
-
-AT_CHECK([ovs-appctl time/warp 1], [0], [ignore])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-dnl Out of 8 packets we sent, two were passed by the rate limiter, and
-dnl the rest of packets were blocked.
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x4321
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x4321
-])
-dnl Check meter stats to make it gives the same picture;
-dnl 7 packets hit the meter, but 6 packets are dropped by band0.
-AT_CHECK([ovs-ofctl -O OpenFlow13 meter-stats br0 | strip_timers], [0], [dnl
-OFPST_METER reply (OF1.3) (xid=0x2):
-meter:controller flow_count:0 packet_in_count:8 byte_in_count:112 duration:0.0s bands:
-0: packet_count:6 byte_count:84
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - MPLS handling])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_DATA([flows.txt], [dnl
-cookie=0xa dl_src=40:44:44:44:44:42 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller
-cookie=0xa dl_src=41:44:44:44:44:42 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],pop_mpls:0x0800,controller
-cookie=0xa dl_src=40:44:44:44:44:43 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller
-cookie=0xa dl_src=40:44:44:44:44:44 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller
-cookie=0xa dl_src=40:44:44:44:44:45 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,controller
-cookie=0xa dl_src=40:44:44:44:44:46 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),controller
-cookie=0xa dl_src=40:44:44:44:44:47 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,set_mpls_ttl(10),controller
-cookie=0xa dl_src=40:44:44:44:44:48 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),dec_mpls_ttl,controller
-cookie=0xa mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:10->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
-cookie=0xb dl_src=50:55:55:55:55:55 dl_type=0x8847 actions=load:1000->OXM_OF_MPLS_LABEL[[]],controller
-cookie=0xd dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,controller
-cookie=0xc dl_src=70:77:77:77:77:77 actions=push_mpls:0x8848,load:1000->OXM_OF_MPLS_LABEL[[]],load:7->OXM_OF_MPLS_TC[[]],controller
-
-cookie=0xd dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,controller
-cookie=0xd dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->OXM_OF_IPV4_DST[[]],controller
-cookie=0xd dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:OXM_OF_IPV4_DST[[]]->OXM_OF_IPV4_SRC[[]],controller
-cookie=0xd dl_src=60:66:66:66:00:04 actions=pop_mpls:0x0800,push:OXM_OF_IPV4_DST[[]],pop:OXM_OF_IPV4_SRC[[]],controller
-cookie=0xd dl_src=60:66:66:66:00:05 actions=pop_mpls:0x0800,multipath(eth_src,50,modulo_n,1,0,OXM_OF_IPV4_SRC[[0..7]]),controller
-cookie=0xd dl_src=60:66:66:66:00:06 actions=pop_mpls:0x0800,bundle_load(eth_src,50,hrw,ofport,OXM_OF_IPV4_SRC[[0..15]],slaves:1,2),controller
-cookie=0xd dl_src=60:66:66:66:00:07 actions=pop_mpls:0x0800,learn(table=1,hard_timeout=60,eth_type=0x800,nw_proto=6,OXM_OF_IPV4_SRC[[]]=OXM_OF_IPV4_DST[[]]),controller
-
-cookie=0xd dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
-cookie=0xd table=1 arp actions=controller
-
-cookie=0xdeadbeef table=2 dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48
-cookie=0xd dl_src=60:66:66:66:00:09 actions=resubmit(,2),controller
-cookie=0xd dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,controller
-cookie=0xd dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,controller
-
-cookie=0xd dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,controller
-cookie=0xd dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,controller
-cookie=0xd dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:3->OXM_OF_MPLS_TC[[]],controller
-
-cookie=0xd dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,controller
-cookie=0xe dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,controller
-cookie=0xe dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,controller
-
-cookie=0xe dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,controller
-cookie=0xe dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,controller
-cookie=0xe dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,controller
-
-cookie=0xf dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,controller
-cookie=0xf dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,controller
-cookie=0xf dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,controller
-
-cookie=0x5 dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,controller
-cookie=0x5 dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,controller
-cookie=0x5 dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,controller
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-dnl Modified MPLS controller action.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:42,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=17,tos=0,ttl=64,frag=no),udp(src=7777,dst=80)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=110 in_port=1 (via action) data_len=110 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=110 in_port=1 (via action) data_len=110 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=110 in_port=1 (via action) data_len=110 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
-])
-
-dnl Modified MPLS controller action.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=41:44:44:44:44:42,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=34 in_port=1 (via action) data_len=34 (unbuffered)
-ip,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=34 in_port=1 (via action) data_len=34 (unbuffered)
-ip,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=34 in_port=1 (via action) data_len=34 (unbuffered)
-ip,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
-])
-
-dnl Modified MPLS controller action.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-dnl in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8847),mpls(label=100,tc=3,ttl=64,bos=1)
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:43,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=22 in_port=1 (via action) data_len=22 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=22 in_port=1 (via action) data_len=22 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=22 in_port=1 (via action) data_len=22 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
-])
-
-dnl Modified MPLS controller action.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:44,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no))'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=7,vlan_tci1=0x0000,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=7,vlan_tci1=0x0000,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=7,vlan_tci1=0x0000,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
-])
-
-dnl Modified MPLS controller action.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:45,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
-])
-
-dnl Modified MPLS controller action.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:46,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
-])
-
-dnl Modified MPLS controller action.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:47,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS controller action.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:49,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=3,ttl=64,bos=1)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=22 in_port=1 (via action) data_len=22 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=22 in_port=1 (via action) data_len=22 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=22 in_port=1 (via action) data_len=22 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS controller action.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:48,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=38 in_port=1 (via action) data_len=38 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
-])
-
-dnl Modified MPLS actions.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:55:55:55:55:55,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=100,tc=7,ttl=64,bos=1)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=18 in_port=1 (via action) data_len=18 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=18 in_port=1 (via action) data_len=18 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=18 in_port=1 (via action) data_len=18 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
-])
-
-dnl Modified MPLS ipv6 controller action.
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=70:77:77:77:77:77,dst=50:54:00:00:00:07),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
-])
-
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
-dnl 60:66:66:66:66:66 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
-dnl             (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44)
-
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 66 66 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 40 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-#for i in 2 3; do
-#    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=60:66:66:66:66:66,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=3,ttl=100,bos=1)'
-#done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:00:01 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 01 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:00:02 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 02 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:00:03 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 03 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:00:04 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 04 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:00:05 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 05 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.0,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.0,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.0,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:00:06 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 06 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:00:07 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 07 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is an ARP frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:00:08 > ff:ff:ff:ff:ff:ff, ethertype MPLS unicast (0x8847), length 46: MPLS (label 20, exp 0, [S], ttl 32)
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'ff ff ff ff ff ff 60 66 66 66 00 08 88 47 00 01 41 20 00 01 08 00 06 04 00 02 60 66 66 66 00 08 c0 a8 00 01 ff ff ff ff ff ff ff ff ff ff'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-arp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-arp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-arp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:00:09 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 09 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:00:0a > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 0a 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:00:0b > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 0b 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
-dnl 60:66:66:66:01:00 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
-dnl             (label 20, exp 0, [S], ttl 31)
-dnl             (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl        192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 00 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
-dnl 60:66:66:66:01:01 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
-dnl             (label 20, exp 0, [S], ttl 31)
-dnl             (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl        192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 01 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
-dnl 60:66:66:66:01:02 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
-dnl             (label 20, exp 0, [S], ttl 31)
-dnl             (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl        192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 02 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
-dnl 60:66:66:66:02:00 > 50:54:00:00:02:00, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
-dnl             (label 20, exp 0, [S], ttl 31)
-dnl             (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl        192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 00 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
-dnl 60:66:66:66:02:01 > 50:54:00:00:02:01, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
-dnl             (label 20, exp 0, [S], ttl 31)
-dnl             (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl        192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 01 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
-dnl 60:66:66:66:02:10 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
-dnl             (label 20, exp 0, [S], ttl 31)
-dnl             (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl        192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 10 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
-dnl 60:66:66:66:03:00 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
-dnl             (label 20, exp 0, ttl 31)
-dnl             (label 20, exp 0, [S], ttl 30)
-dnl             (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl        192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 00 88 47 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
-dnl 60:66:66:66:03:01 > 50:54:00:00:00:00, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
-dnl             (label 20, exp 0, ttl 31)
-dnl             (label 20, exp 0, [S], ttl 30)
-dnl             (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl        192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 01 88 48 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
-dnl 60:66:66:66:03:10 > 50:54:00:00:00:00, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
-dnl             (label 20, exp 0, ttl 31)
-dnl             (label 20, exp 0, [S], ttl 30)
-dnl             (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl        192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 10 88 47 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:04:00 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 00 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:04:01 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 01 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:04:10 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 10 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata <  ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:05:00 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 00 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:05:01 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 01 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:05:10 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 10 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x5, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,CONTROLLER:65535
- cookie=0x5, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
- cookie=0x5, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=102, dl_src=40:44:44:44:44:45 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=102, dl_src=40:44:44:44:44:46 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=102, dl_src=40:44:44:44:44:47 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,set_mpls_ttl(10),CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=102, dl_src=40:44:44:44:44:48 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),dec_mpls_ttl,CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=102, dl_src=41:44:44:44:44:42 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],pop_mpls:0x0800,CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=114, dl_src=40:44:44:44:44:44 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=318, dl_src=40:44:44:44:44:42 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=54, dl_src=40:44:44:44:44:43 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=54, mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
- cookie=0xb, n_packets=3, n_bytes=54, mpls,dl_src=50:55:55:55:55:55 actions=load:0x3e8->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
- cookie=0xc, n_packets=3, n_bytes=162, dl_src=70:77:77:77:77:77 actions=push_mpls:0x8848,load:0x3e8->OXM_OF_MPLS_LABEL[[]],load:0x7->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=138, dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
- cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->NXM_OF_IP_DST[[]],CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:NXM_OF_IP_DST[[]]->NXM_OF_IP_SRC[[]],CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:04 actions=pop_mpls:0x0800,push:NXM_OF_IP_DST[[]],pop:NXM_OF_IP_SRC[[]],CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:05 actions=pop_mpls:0x0800,multipath(eth_src,50,modulo_n,1,0,NXM_OF_IP_SRC[[0..7]]),CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:06 actions=pop_mpls:0x0800,bundle_load(eth_src,50,hrw,ofport,NXM_OF_IP_SRC[[0..15]],slaves:1,2),CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:07 actions=pop_mpls:0x0800,learn(table=1,hard_timeout=60,eth_type=0x800,nw_proto=6,NXM_OF_IP_SRC[[]]=NXM_OF_IP_DST[[]]),CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:09 actions=resubmit(,2),CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
- cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,CONTROLLER:65535
- cookie=0xd, table=1, n_packets=3, n_bytes=126, arp actions=CONTROLLER:65535
- cookie=0xdeadbeef, table=2, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48
- cookie=0xe, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
- cookie=0xe, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
- cookie=0xe, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,CONTROLLER:65535
- cookie=0xe, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535
- cookie=0xe, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
- cookie=0xf, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,CONTROLLER:65535
- cookie=0xf, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
- cookie=0xf, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
-NXST_FLOW reply:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - MPLS handling with goto_table])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_DATA([flows.txt], [dnl
-table=0 mplsm actions=pop_mpls:0x800,goto_table(1)
-table=1 ip,ip_dscp=8 actions=controller
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
-
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:00:08 > 50:54:00:00:00:01, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 01 60 66 66 66 00 08 88 48 00 01 41 20 45 20 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,goto_table:1
- table=1, n_packets=3, n_bytes=174, ip,nw_tos=32 actions=CONTROLLER:65535
-OFPST_FLOW reply (OF1.2):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - MPLS handling with write_actions])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-dnl N.B: The first (and only) action that accesses L3 data after the
-dnl pop_mpls action is present in write_actions. This exercises recirculation
-dnl triggered in write_actions due to a previous action not in write actions.
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_DATA([flows.txt], [dnl
-mplsm actions=pop_mpls:0x800,write_actions(dec_ttl,controller)
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
-
-dnl Modified MPLS pop action.
-dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
-dnl 60:66:66:66:00:08 > 50:54:00:00:00:01, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
-dnl             (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
-dnl         192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
-AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 01 60 66 66 66 00 08 88 48 00 01 41 20 45 20 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-dnl
-OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,write_actions(dec_ttl,CONTROLLER:65535)
-OFPST_FLOW reply (OF1.2):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.0)])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-# A table-miss flow has priority 0 and no match
-AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flow br0 'priority=0 actions=output:CONTROLLER'])
-
-dnl Singleton controller action.
-AT_CHECK([ovs-ofctl monitor -P standard --protocols=OpenFlow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (xid=0x0): total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (xid=0x0): total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (xid=0x0): total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl --protocols=OpenFlow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=3, n_bytes=162, priority=0 actions=CONTROLLER:65535
-NXST_FLOW reply:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.3)])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-# A table-miss flow has priority 0 and no match
-AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
-
-dnl Singleton controller action.
-AT_CHECK([ovs-ofctl monitor -P standard --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=3, n_bytes=162, priority=0 actions=CONTROLLER:65535
-OFPST_FLOW reply (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - table-miss flow with async config (OpenFlow 1.3)])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-ovs-appctl time/stop
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-# A table-miss flow has priority 0 and no match
-AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
-
-dnl Singleton controller action.
-AT_CHECK([ovs-ofctl monitor -P standard --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-# Become slave (OF 1.3), which should disable everything except port status.
-ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001
-
-# Ensure that ovs-vswitchd gets a chance to reply before sending another command.
-ovs-appctl time/warp 500 100
-
-# Use OF 1.3 OFPT_SET_ASYNC to enable OFPR_NO_MATCH for slave only.
-ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000000000000100000000000000000000000000000000
-
-ovs-appctl time/warp 500 100
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-send: OFPT_ROLE_REQUEST (OF1.3) (xid=0x2): role=slave generation_id=1
-OFPT_ROLE_REPLY (OF1.3) (xid=0x2): role=slave generation_id=1
-dnl
-send: OFPT_SET_ASYNC (OF1.3) (xid=0x2):
- master:
-       PACKET_IN: (off)
-     PORT_STATUS: (off)
-    FLOW_REMOVED: (off)
-     ROLE_STATUS: (off)
-    TABLE_STATUS: (off)
-  REQUESTFORWARD: (off)
-
- slave:
-       PACKET_IN: no_match
-     PORT_STATUS: (off)
-    FLOW_REMOVED: (off)
-     ROLE_STATUS: (off)
-    TABLE_STATUS: (off)
-  REQUESTFORWARD: (off)
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=3, n_bytes=162, priority=0 actions=CONTROLLER:65535
-OFPST_FLOW reply (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.4)])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-# A table-miss flow has priority 0 and no match
-AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'priority=0 actions=output:CONTROLLER'])
-
-dnl Singleton controller action.
-AT_CHECK([ovs-ofctl monitor -P standard --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
-done
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via no_match) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=3, n_bytes=162, priority=0 actions=CONTROLLER:65535
-OFPST_FLOW reply (OF1.4):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.3)])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
-table=1 actions=output(CONTROLLER),goto_table(2)
-table=2 actions=group:1234
-])
-AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
-AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flows br0 flows.txt])
-
-dnl Singleton controller action.
-AT_CHECK([ovs-ofctl monitor -P standard --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
-done
-AT_CHECK([ovs-ofctl packet-out br0 'in_port=NONE, packet=505400000007101111111111080045000028000000004006f97cc0a80001c0a800020008000a0000000000000000500200002e7d0000, actions=controller'])
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 7])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): total_len=54 in_port=ANY (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=3, n_bytes=162, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
- table=1, n_packets=3, n_bytes=162, actions=CONTROLLER:65535,goto_table:2
- table=2, n_packets=3, n_bytes=162, actions=group:1234
-OFPST_FLOW reply (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.4)])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
-table=1 actions=output(CONTROLLER),goto_table(2)
-table=2 actions=group:1234
-])
-AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
-AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flows br0 flows.txt])
-
-dnl Singleton controller action.
-AT_CHECK([ovs-ofctl monitor -P standard --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3 ; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
-done
-AT_CHECK([ovs-ofctl packet-out br0 'in_port=NONE, packet=505400000007101111111111080045000028000000004006f97cc0a80001c0a800020008000a0000000000000000500200002e7d0000, actions=controller'])
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 7])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=54 in_port=1 (via group) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via action_set) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=54 in_port=1 (via group) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via action_set) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=54 in_port=1 (via action) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=54 in_port=1 (via group) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=54 in_port=1 (via action_set) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-dnl
-OFPT_PACKET_IN (OF1.4) (xid=0x0): total_len=54 in_port=ANY (via packet_out) data_len=54 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:2e7d
-])
-
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=3, n_bytes=162, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
- table=1, n_packets=3, n_bytes=162, actions=CONTROLLER:65535,goto_table:2
- table=2, n_packets=3, n_bytes=162, actions=group:1234
-OFPST_FLOW reply (OF1.4):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.3)])
-
-OVS_VSWITCHD_START([dnl
-    set bridge br0 datapath_type=dummy \
-        protocols=OpenFlow10,OpenFlow13,OpenFlow14,OpenFlow15 -- \
-    add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
-
-AT_CHECK([
-    ovs-ofctl -OOpenFlow13 del-flows br0
-    ovs-ofctl -OOpenFlow13 add-group br0 "group_id=6000,type=all,bucket=actions=controller,bucket=actions=resubmit(,48),bucket=actions=resubmit(,81)"
-    ovs-ofctl -OOpenFlow13 add-flow br0 "table=0, in_port=1, vlan_tci=0x0000/0x1fff actions=write_metadata:0x67870000000000/0xffffff0000000001,goto_table:17"
-    ovs-ofctl -OOpenFlow13 add-flow br0 "table=17,  priority=10,metadata=0x67870000000000/0xffffff0000000000 actions=write_metadata:0xe067870000000000/0xfffffffffffffffe,goto_table:60"
-    ovs-ofctl -OOpenFlow13 add-flow br0 "table=60,  priority=0 actions=resubmit(,17)"
-    ovs-ofctl -OOpenFlow13 add-flow br0 "table=17,  priority=10,metadata=0xe067870000000000/0xffffff0000000000 actions=write_metadata:0x67871d4d000000/0xfffffffffffffffe,goto_table:43"
-    ovs-ofctl -OOpenFlow13 add-flow br0 "table=43,  priority=100,icmp actions=group:6000"
-    ovs-ofctl -OOpenFlow13 add-flow br0 "table=48, priority=0 actions=resubmit(,49),resubmit(,50)"
-    ovs-ofctl -OOpenFlow13 add-flow br0 "table=50, priority=0 actions=controller"
-], [0], [ignore])
-
-AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive p1 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 1])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=43 cookie=0x0 total_len=98 metadata=0x67871d4d000000,in_port=1 (via action) data_len=98 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=3a:6d:d2:09:9c:ab,dl_dst=1e:2c:e9:2a:66:9e,nw_src=192.168.10.10,nw_dst=192.168.10.30,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:6f20
-dnl
-OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=50 cookie=0x0 total_len=98 metadata=0x67871d4d000000,in_port=1 (via no_match) data_len=98 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=3a:6d:d2:09:9c:ab,dl_dst=1e:2c:e9:2a:66:9e,nw_src=192.168.10.10,nw_dst=192.168.10.30,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:6f20
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - ARP modification slow-path])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-
-ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap
-ovs-ofctl add-flow br0 'in_port=1,arp actions=load:2->OXM_OF_ARP_OP[[]],2,load:0xc0a88001->OXM_OF_ARP_SPA[[]],2,load:0x404444444441->OXM_OF_ARP_THA[[]],2'
-
-# Input some packets that should follow the arp modification slow-path.
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=80:88:88:88:88:88,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
-done
-AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
-
-# Check the packets that were output.
-AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl
-arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
-arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
-arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
-arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
-arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
-arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
-arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
-arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
-arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - VLAN handling])
-OVS_VSWITCHD_START(
-  [set Bridge br0 fail-mode=standalone -- \
-   add-port br0 p1                                  trunks=10,12 -- \
-   add-port br0 p2                           tag=10              -- \
-   add-port br0 p3                           tag=12              \
-                   other-config:priority-tags=true               -- \
-   add-port br0 p4                           tag=12              -- \
-   add-port br0 p5 vlan_mode=native-tagged   tag=10              -- \
-   add-port br0 p6 vlan_mode=native-tagged   tag=10 trunks=10,12 -- \
-   add-port br0 p7 vlan_mode=native-untagged tag=12              -- \
-   add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \
-                   other-config:priority-tags=true               -- \
-   add-port br0 p9 vlan_mode=dot1q-tunnel    tag=10              other-config:qinq-ethtype=802.1q  -- \
-   add-port br0 p10 vlan_mode=dot1q-tunnel   tag=10 cvlans=10,12 other-config:qinq-ethtype=802.1q  -- \
-   add-port br0 p11 vlan_mode=dot1q-tunnel   tag=12              other-config:qinq-ethtype=802.1q  -- \
-   add-port br0 p12 vlan_mode=dot1q-tunnel   tag=12              other-config:qinq-ethtype=802.1q  \
-                   other-config:priority-tags=true               -- \
-   set Interface p1 type=dummy -- \
-   set Interface p2 type=dummy -- \
-   set Interface p3 type=dummy -- \
-   set Interface p4 type=dummy -- \
-   set Interface p5 type=dummy -- \
-   set Interface p6 type=dummy -- \
-   set Interface p7 type=dummy -- \
-   set Interface p8 type=dummy -- \
-   set Interface p9 type=dummy -- \
-   set Interface p10 type=dummy -- \
-   set Interface p11 type=dummy -- \
-   set Interface p12 type=dummy --])
-
-dnl Each of these specifies an in_port by number, a VLAN VID (or "none"),
-dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath
-dnl actions.
-for tuple in \
-        "100 none 0 drop" \
-        "100 0    0 drop" \
-        "100 0    1 drop" \
-        "100 10   0 1,5,6,7,8,pop_vlan,2,9" \
-        "100 10   1 1,5,6,7,8,pop_vlan,2,9" \
-        "100 11   0 5,7" \
-        "100 11   1 5,7" \
-        "100 12   0 1,5,6,pop_vlan,3,4,7,8,11,12" \
-        "100 12   1 1,5,6,pop_vlan,4,7,11,push_vlan(vid=0,pcp=1),3,8,12" \
-        "1  none 0 drop" \
-        "1  0    0 drop" \
-        "1  0    1 drop" \
-        "1  10   0 5,6,7,8,100,pop_vlan,2,9" \
-        "1  10   1 5,6,7,8,100,pop_vlan,2,9" \
-        "1  11   0 drop" \
-        "1  11   1 drop" \
-        "1  12   0 5,6,100,pop_vlan,3,4,7,8,11,12" \
-        "1  12   1 5,6,100,pop_vlan,4,7,11,push_vlan(vid=0,pcp=1),3,8,12" \
-        "2  none 0 9,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
-        "2  0    0 pop_vlan,9,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
-        "2  0    1 pop_vlan,9,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \
-        "2  10   0 drop" \
-        "2  10   1 drop" \
-        "2  11   0 drop" \
-        "2  11   1 drop" \
-        "2  12   0 drop" \
-        "2  12   1 drop" \
-        "3  none 0 4,7,8,11,12,push_vlan(vid=12,pcp=0),1,5,6,100" \
-        "3  0    0 pop_vlan,4,7,8,11,12,push_vlan(vid=12,pcp=0),1,5,6,100" \
-        "3  0    1 8,12,pop_vlan,4,7,11,push_vlan(vid=12,pcp=1),1,5,6,100" \
-        "3  10   0 drop" \
-        "3  10   1 drop" \
-        "3  11   0 drop" \
-        "3  11   1 drop" \
-        "3  12   0 drop" \
-        "3  12   1 drop" \
-        "4  none 0 3,7,8,11,12,push_vlan(vid=12,pcp=0),1,5,6,100" \
-        "4  0    0 pop_vlan,3,7,8,11,12,push_vlan(vid=12,pcp=0),1,5,6,100" \
-        "4  0    1 3,8,12,pop_vlan,7,11,push_vlan(vid=12,pcp=1),1,5,6,100" \
-        "4  10   0 drop" \
-        "4  10   1 drop" \
-        "4  11   0 drop" \
-        "4  11   1 drop" \
-        "4  12   0 drop" \
-        "4  12   1 drop" \
-        "5  none 0 2,9,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
-        "5  0    0 pop_vlan,2,9,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
-        "5  0    1 pop_vlan,2,9,push_vlan(vid=10,pcp=1),1,6,7,8,100" \
-        "5  10   0 1,6,7,8,100,pop_vlan,2,9" \
-        "5  10   1 1,6,7,8,100,pop_vlan,2,9" \
-        "5  11   0 7,100" \
-        "5  11   1 7,100" \
-        "5  12   0 1,6,100,pop_vlan,3,4,7,8,11,12" \
-        "5  12   1 1,6,100,pop_vlan,4,7,11,push_vlan(vid=0,pcp=1),3,8,12" \
-        "6  none 0 2,9,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
-        "6  0    0 pop_vlan,2,9,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
-        "6  0    1 pop_vlan,2,9,push_vlan(vid=10,pcp=1),1,5,7,8,100" \
-        "6  10   0 1,5,7,8,100,pop_vlan,2,9" \
-        "6  10   1 1,5,7,8,100,pop_vlan,2,9" \
-        "6  11   0 drop" \
-        "6  11   1 drop" \
-        "6  12   0 1,5,100,pop_vlan,3,4,7,8,11,12" \
-        "6  12   1 1,5,100,pop_vlan,4,7,11,push_vlan(vid=0,pcp=1),3,8,12" \
-        "7  none 0 3,4,8,11,12,push_vlan(vid=12,pcp=0),1,5,6,100" \
-        "7  0    0 pop_vlan,3,4,8,11,12,push_vlan(vid=12,pcp=0),1,5,6,100" \
-        "7  0    1 3,8,12,pop_vlan,4,11,push_vlan(vid=12,pcp=1),1,5,6,100" \
-        "7  10   0 1,5,6,8,100,pop_vlan,2,9" \
-        "7  10   1 1,5,6,8,100,pop_vlan,2,9" \
-        "7  11   0 5,100" \
-        "7  11   1 5,100" \
-        "7  12   0 1,5,6,100,pop_vlan,3,4,8,11,12" \
-        "7  12   1 1,5,6,100,pop_vlan,4,11,push_vlan(vid=0,pcp=1),3,8,12" \
-        "8  none 0 3,4,7,11,12,push_vlan(vid=12,pcp=0),1,5,6,100" \
-        "8  0    0 pop_vlan,3,4,7,11,12,push_vlan(vid=12,pcp=0),1,5,6,100" \
-        "8  0    1 3,12,pop_vlan,4,7,11,push_vlan(vid=12,pcp=1),1,5,6,100" \
-        "8  10   0 1,5,6,7,100,pop_vlan,2,9" \
-        "8  10   1 1,5,6,7,100,pop_vlan,2,9" \
-        "8  11   0 drop" \
-        "8  11   1 drop" \
-        "8  12   0 1,5,6,100,pop_vlan,3,4,7,11,12" \
-        "8  12   1 1,5,6,100,pop_vlan,4,7,11,push_vlan(vid=0,pcp=1),3,12" \
-        "9  none 0 2,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
-        "9  10   0 10,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
-        "9  11   0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
-        "10 none 0 drop" \
-        "10 0    0 drop" \
-        "10 11   0 drop" \
-        "10 12   0 9,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
-        "11 10   0 7,8,12,push_vlan(vid=12,pcp=0),1,5,6,100" \
-        "11 10   1 7,8,12,push_vlan(vid=12,pcp=0),1,5,6,100"
-do
-  set $tuple
-  in_port=$1
-  vlan=$2
-  pcp=$3
-  expected=$4
-
-  if test $vlan = none; then
-    flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)"
-  else
-    flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8100),vlan(vid=$vlan,pcp=$pcp),encap(eth_type(0xabcd))"
-  fi
-
-  echo "----------------------------------------------------------------------"
-  echo "in_port=$in_port vlan=$vlan pcp=$pcp"
-
-  AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-  actual=`tail -1 stdout | sed 's/Datapath actions: //'`
-
-  AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
-  mv stdout expout
-  AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
-done
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - VLAN depth limit])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
-   add-port br0 p2 -- set Interface p2 type=dummy ofport_request=2 -- \
-   add-port br0 p3 -- set Interface p3 type=dummy ofport_request=3
-])
-
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1,eth_type=0x8100,vlan_tci=0x0010/0x01ff actions=output:2
-table=0 in_port=1,eth_type=0xabcd,vlan_tci=0x0010/0x01ff actions=output:3
-])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
-flow="in_port(1),eth(src=00:11:22:33:44:55,dst=00:22:44:66:88:00),eth_type(0x8100),vlan(vid=16,pcp=0), \
-      encap(eth_type(0x8100),vlan(vid=17,pcp=0),encap(eth_type(0xabcd)))"
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 2
-])
-
-AT_CHECK([ovs-vsctl set Open_vswitch `ovs-vsctl show | head -n1` other_config:vlan-limit=0])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 3
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - Multi-VLAN actions])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
-   add-port br0 p2 -- set Interface p2 type=dummy ofport_request=2
-])
-AT_CHECK([ovs-vsctl set Open_vswitch `ovs-vsctl show | head -n1` other_config:vlan-limit=0])
-
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1,vlan_tci=0x1100/0x1fff actions=pop_vlan,output:2
-table=0 in_port=1,vlan_tci=0x1101/0x1fff actions=push_vlan:0x8100,set_field:0x1201/0x1fff->vlan_tci,output:2
-table=0 in_port=1,vlan_tci=0x1102/0x1fff actions=push_vlan:0x88a8,set_field:0x1202/0x1fff->vlan_tci,output:2
-table=0 in_port=1,vlan_tci=0x1103/0x1fff actions=set_field:0x1203/0x1fff->vlan_tci,output:2
-table=0 in_port=1,vlan_tci=0x1104/0x1fff actions=pop_vlan,goto_table:1
-table=1 vlan_tci=0 actions=output:2
-table=1 vlan_tci=0x1300/0x1fff actions=pop_vlan,output:2
-table=1 vlan_tci=0x1301/0x1fff actions=push_vlan:0x88a8,set_field:0x1401/0x1fff->vlan_tci,output:2
-table=1 vlan_tci=0x1302/0x1fff actions=set_field:0x1402/0x1fff->vlan_tci,output:2
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
-
-check_act() {
-    psd_hdr="in_port(1),eth(src=00:11:22:33:44:55,dst=00:22:44:66:88:00),"
-    AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$psd_hdr$1"], [0], [stdout])
-    AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: $2
-])
-}
-
-check_act "eth_type(0x8100),vlan(vid=0x0100,pcp=0),encap(eth_type(0xabcd))" \
-          "pop_vlan,2"
-
-check_act "eth_type(0x8100),vlan(vid=0x0101,pcp=0),encap(eth_type(0xabcd))" \
-          "push_vlan(vid=513,pcp=0),2"
-
-check_act "eth_type(0x8100),vlan(vid=0x0102,pcp=0),encap(eth_type(0xabcd))" \
-          "push_vlan(tpid=0x88a8,vid=514,pcp=0),2"
-
-check_act "eth_type(0x8100),vlan(vid=0x0103,pcp=0),encap(eth_type(0xabcd))" \
-          "pop_vlan,push_vlan(vid=515,pcp=0),2"
-
-check_act "eth_type(0x8100),vlan(vid=0x0104,pcp=0),encap(eth_type(0xabcd))" \
-          "pop_vlan,2"
-
-check_act "eth_type(0x88a8),vlan(vid=0x0104,pcp=0),encap(eth_type(0x8100),\
-vlan(vid=0x0300,pcp=0),encap(eth_type(0xabcd)))" "pop_vlan,pop_vlan,2"
-
-check_act "eth_type(0x88a8),vlan(vid=0x0104,pcp=0),encap(eth_type(0x8100),\
-vlan(vid=0x0301,pcp=0),encap(eth_type(0xabcd)))" \
-          "pop_vlan,push_vlan(tpid=0x88a8,vid=1025,pcp=0),2"
-
-check_act "eth_type(0x88a8),vlan(vid=0x0104,pcp=0),encap(eth_type(0x8100),\
-vlan(vid=0x0302,pcp=0),encap(eth_type(0xabcd)))" \
-          "pop_vlan,pop_vlan,push_vlan(vid=1026,pcp=0),2"
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - MPLS handling])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_DATA([flows.txt], [dnl
-dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller
-dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller
-dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller
-])
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
-
-dnl In this test, we push an MPLS tag to an ethernet packet.
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:00,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
-done
-OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=122 in_port=1 (via action) data_len=122 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
-00000010  01 40 45 00 00 68 00 00-00 00 40 06 f9 3c c0 a8
-00000020  00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
-00000030  00 00 50 00 00 00 4a 4d-00 00 00 01 02 03 04 05
-00000040  06 07 08 09 0a 0b 0c 0d-0e 0f 10 11 12 13 14 15
-00000050  16 17 18 19 1a 1b 1c 1d-1e 1f 20 21 22 23 24 25
-00000060  26 27 28 29 2a 2b 2c 2d-2e 2f 30 31 32 33 34 35
-00000070  36 37 38 39 3a 3b 3c 3d-3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=122 in_port=1 (via action) data_len=122 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
-00000010  01 40 45 00 00 68 00 00-00 00 40 06 f9 3c c0 a8
-00000020  00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
-00000030  00 00 50 00 00 00 4a 4d-00 00 00 01 02 03 04 05
-00000040  06 07 08 09 0a 0b 0c 0d-0e 0f 10 11 12 13 14 15
-00000050  16 17 18 19 1a 1b 1c 1d-1e 1f 20 21 22 23 24 25
-00000060  26 27 28 29 2a 2b 2c 2d-2e 2f 30 31 32 33 34 35
-00000070  36 37 38 39 3a 3b 3c 3d-3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=122 in_port=1 (via action) data_len=122 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
-00000010  01 40 45 00 00 68 00 00-00 00 40 06 f9 3c c0 a8
-00000020  00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
-00000030  00 00 50 00 00 00 4a 4d-00 00 00 01 02 03 04 05
-00000040  06 07 08 09 0a 0b 0c 0d-0e 0f 10 11 12 13 14 15
-00000050  16 17 18 19 1a 1b 1c 1d-1e 1f 20 21 22 23 24 25
-00000060  26 27 28 29 2a 2b 2c 2d-2e 2f 30 31 32 33 34 35
-00000070  36 37 38 39 3a 3b 3c 3d-3e 3f
-])
-
-dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
-dnl copied exactly, except for the BOS bit.
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:01,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=0,ttl=64,bos=1)'
-done
-OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=22 in_port=1 (via action) data_len=22 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
-00000000  50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
-00000010  a0 40 00 00 a1 40
-dnl
-OFPT_PACKET_IN (OF1.2): total_len=22 in_port=1 (via action) data_len=22 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
-00000000  50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
-00000010  a0 40 00 00 a1 40
-dnl
-OFPT_PACKET_IN (OF1.2): total_len=22 in_port=1 (via action) data_len=22 (unbuffered)
-mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
-00000000  50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
-00000010  a0 40 00 00 a1 40
-])
-
-dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
-dnl copied exactly, except for the BOS bit. The ethertype should be updated
-dnl to the MPLS ethertype of the MPLS push action which differs to that
-dnl of the input packet.
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:02,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=0,ttl=64,bos=1)'
-done
-OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=22 in_port=1 (via action) data_len=22 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
-00000000  50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
-00000010  a0 40 00 00 a1 40
-dnl
-OFPT_PACKET_IN (OF1.2): total_len=22 in_port=1 (via action) data_len=22 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
-00000000  50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
-00000010  a0 40 00 00 a1 40
-dnl
-OFPT_PACKET_IN (OF1.2): total_len=22 in_port=1 (via action) data_len=22 (unbuffered)
-mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
-00000000  50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
-00000010  a0 40 00 00 a1 40
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - VLAN+MPLS handling])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_DATA([flows.txt], [dnl
-cookie=0xa dl_src=40:44:44:44:54:50 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,controller
-cookie=0xa dl_src=40:44:44:44:54:51 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,controller
-cookie=0xa dl_src=40:44:44:44:54:52 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,controller
-cookie=0xa dl_src=40:44:44:44:54:53 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,controller
-cookie=0xa dl_src=40:44:44:44:54:54 actions=push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
-cookie=0xa dl_src=40:44:44:44:54:55 actions=push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
-cookie=0xa dl_src=40:44:44:44:54:56 actions=push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
-cookie=0xa dl_src=40:44:44:44:54:57 actions=push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
-cookie=0xa dl_src=40:44:44:44:54:58,vlan_tci=0x1000/0x1000 actions=load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
-cookie=0xa dl_src=40:44:44:44:54:59,vlan_tci=0x1000/0x1000 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],set_vlan_pcp:1,load:99->OXM_OF_VLAN_VID[[]],controller
-])
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
-
-dnl Modified MPLS controller action.
-dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
-dnl both of these in the final flow
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:50,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
-done
-OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-])
-
-dnl Modified MPLS controller action.
-dnl In this test, the input packet is vlan-tagged, which should be kept as
-dnl inner vlan.
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:51,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
-done
-OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=130 in_port=1 (via action) data_len=130 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,dl_vlan1=88,dl_vlan_pcp1=7,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
-00000010  81 00 e0 58 88 47 00 00-a1 40 45 00 00 68 00 00
-00000020  00 00 40 06 f9 3c c0 a8-00 01 c0 a8 00 02 00 00
-00000030  00 00 00 00 00 00 00 00-00 00 50 00 00 00 4a 4d
-00000040  00 00 00 01 02 03 04 05-06 07 08 09 0a 0b 0c 0d
-00000050  0e 0f 10 11 12 13 14 15-16 17 18 19 1a 1b 1c 1d
-00000060  1e 1f 20 21 22 23 24 25-26 27 28 29 2a 2b 2c 2d
-00000070  2e 2f 30 31 32 33 34 35-36 37 38 39 3a 3b 3c 3d
-00000080  3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=130 in_port=1 (via action) data_len=130 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,dl_vlan1=88,dl_vlan_pcp1=7,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
-00000010  81 00 e0 58 88 47 00 00-a1 40 45 00 00 68 00 00
-00000020  00 00 40 06 f9 3c c0 a8-00 01 c0 a8 00 02 00 00
-00000030  00 00 00 00 00 00 00 00-00 00 50 00 00 00 4a 4d
-00000040  00 00 00 01 02 03 04 05-06 07 08 09 0a 0b 0c 0d
-00000050  0e 0f 10 11 12 13 14 15-16 17 18 19 1a 1b 1c 1d
-00000060  1e 1f 20 21 22 23 24 25-26 27 28 29 2a 2b 2c 2d
-00000070  2e 2f 30 31 32 33 34 35-36 37 38 39 3a 3b 3c 3d
-00000080  3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=130 in_port=1 (via action) data_len=130 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,dl_vlan1=88,dl_vlan_pcp1=7,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
-00000010  81 00 e0 58 88 47 00 00-a1 40 45 00 00 68 00 00
-00000020  00 00 40 06 f9 3c c0 a8-00 01 c0 a8 00 02 00 00
-00000030  00 00 00 00 00 00 00 00-00 00 50 00 00 00 4a 4d
-00000040  00 00 00 01 02 03 04 05-06 07 08 09 0a 0b 0c 0d
-00000050  0e 0f 10 11 12 13 14 15-16 17 18 19 1a 1b 1c 1d
-00000060  1e 1f 20 21 22 23 24 25-26 27 28 29 2a 2b 2c 2d
-00000070  2e 2f 30 31 32 33 34 35-36 37 38 39 3a 3b 3c 3d
-00000080  3e 3f
-])
-
-dnl Modified MPLS controller action.
-dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
-dnl both of these in the final flow
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:52,dst=52:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
-done
-OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-])
-
-dnl Modified MPLS controller action.
-dnl In this test, the input packet is vlan-tagged, which should be kept as
-dnl inner vlan.
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:53,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
-done
-OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=130 in_port=1 (via action) data_len=130 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,dl_vlan1=88,dl_vlan_pcp1=7,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
-00000010  81 00 e0 58 88 47 00 00-a1 40 45 00 00 68 00 00
-00000020  00 00 40 06 f9 3c c0 a8-00 01 c0 a8 00 02 00 00
-00000030  00 00 00 00 00 00 00 00-00 00 50 00 00 00 4a 4d
-00000040  00 00 00 01 02 03 04 05-06 07 08 09 0a 0b 0c 0d
-00000050  0e 0f 10 11 12 13 14 15-16 17 18 19 1a 1b 1c 1d
-00000060  1e 1f 20 21 22 23 24 25-26 27 28 29 2a 2b 2c 2d
-00000070  2e 2f 30 31 32 33 34 35-36 37 38 39 3a 3b 3c 3d
-00000080  3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=130 in_port=1 (via action) data_len=130 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,dl_vlan1=88,dl_vlan_pcp1=7,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
-00000010  81 00 e0 58 88 47 00 00-a1 40 45 00 00 68 00 00
-00000020  00 00 40 06 f9 3c c0 a8-00 01 c0 a8 00 02 00 00
-00000030  00 00 00 00 00 00 00 00-00 00 50 00 00 00 4a 4d
-00000040  00 00 00 01 02 03 04 05-06 07 08 09 0a 0b 0c 0d
-00000050  0e 0f 10 11 12 13 14 15-16 17 18 19 1a 1b 1c 1d
-00000060  1e 1f 20 21 22 23 24 25-26 27 28 29 2a 2b 2c 2d
-00000070  2e 2f 30 31 32 33 34 35-36 37 38 39 3a 3b 3c 3d
-00000080  3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=130 in_port=1 (via action) data_len=130 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,dl_vlan1=88,dl_vlan_pcp1=7,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
-00000010  81 00 e0 58 88 47 00 00-a1 40 45 00 00 68 00 00
-00000020  00 00 40 06 f9 3c c0 a8-00 01 c0 a8 00 02 00 00
-00000030  00 00 00 00 00 00 00 00-00 00 50 00 00 00 4a 4d
-00000040  00 00 00 01 02 03 04 05-06 07 08 09 0a 0b 0c 0d
-00000050  0e 0f 10 11 12 13 14 15-16 17 18 19 1a 1b 1c 1d
-00000060  1e 1f 20 21 22 23 24 25-26 27 28 29 2a 2b 2c 2d
-00000070  2e 2f 30 31 32 33 34 35-36 37 38 39 3a 3b 3c 3d
-00000080  3e 3f
-])
-
-dnl Modified MPLS controller action.
-dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
-dnl actions are reordered, so we see both of these in the final flow.
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:54,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
-done
-OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-])
-
-dnl Modified MPLS controller action.
-dnl In this test, the input packet is vlan-tagged, which should be kept as
-dnl inner vlan.
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:55,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
-done
-OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=130 in_port=1 (via action) data_len=130 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,dl_vlan1=88,dl_vlan_pcp1=7,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
-00000010  81 00 e0 58 88 47 00 00-a1 40 45 00 00 68 00 00
-00000020  00 00 40 06 f9 3c c0 a8-00 01 c0 a8 00 02 00 00
-00000030  00 00 00 00 00 00 00 00-00 00 50 00 00 00 4a 4d
-00000040  00 00 00 01 02 03 04 05-06 07 08 09 0a 0b 0c 0d
-00000050  0e 0f 10 11 12 13 14 15-16 17 18 19 1a 1b 1c 1d
-00000060  1e 1f 20 21 22 23 24 25-26 27 28 29 2a 2b 2c 2d
-00000070  2e 2f 30 31 32 33 34 35-36 37 38 39 3a 3b 3c 3d
-00000080  3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=130 in_port=1 (via action) data_len=130 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,dl_vlan1=88,dl_vlan_pcp1=7,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
-00000010  81 00 e0 58 88 47 00 00-a1 40 45 00 00 68 00 00
-00000020  00 00 40 06 f9 3c c0 a8-00 01 c0 a8 00 02 00 00
-00000030  00 00 00 00 00 00 00 00-00 00 50 00 00 00 4a 4d
-00000040  00 00 00 01 02 03 04 05-06 07 08 09 0a 0b 0c 0d
-00000050  0e 0f 10 11 12 13 14 15-16 17 18 19 1a 1b 1c 1d
-00000060  1e 1f 20 21 22 23 24 25-26 27 28 29 2a 2b 2c 2d
-00000070  2e 2f 30 31 32 33 34 35-36 37 38 39 3a 3b 3c 3d
-00000080  3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=130 in_port=1 (via action) data_len=130 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,dl_vlan1=88,dl_vlan_pcp1=7,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
-00000010  81 00 e0 58 88 47 00 00-a1 40 45 00 00 68 00 00
-00000020  00 00 40 06 f9 3c c0 a8-00 01 c0 a8 00 02 00 00
-00000030  00 00 00 00 00 00 00 00-00 00 50 00 00 00 4a 4d
-00000040  00 00 00 01 02 03 04 05-06 07 08 09 0a 0b 0c 0d
-00000050  0e 0f 10 11 12 13 14 15-16 17 18 19 1a 1b 1c 1d
-00000060  1e 1f 20 21 22 23 24 25-26 27 28 29 2a 2b 2c 2d
-00000070  2e 2f 30 31 32 33 34 35-36 37 38 39 3a 3b 3c 3d
-00000080  3e 3f
-])
-
-dnl Modified MPLS controller action.
-dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
-dnl actions are reordered, so we see both of these in the final flow.
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:56,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
-done
-OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-])
-
-dnl Modified MPLS controller action.
-dnl In this test, the input packet is vlan-tagged, which should be kept as
-dnl inner vlan.
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:57,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
-done
-OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=130 in_port=1 (via action) data_len=130 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,dl_vlan1=88,dl_vlan_pcp1=7,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
-00000010  81 00 e0 58 88 47 00 00-a1 40 45 00 00 68 00 00
-00000020  00 00 40 06 f9 3c c0 a8-00 01 c0 a8 00 02 00 00
-00000030  00 00 00 00 00 00 00 00-00 00 50 00 00 00 4a 4d
-00000040  00 00 00 01 02 03 04 05-06 07 08 09 0a 0b 0c 0d
-00000050  0e 0f 10 11 12 13 14 15-16 17 18 19 1a 1b 1c 1d
-00000060  1e 1f 20 21 22 23 24 25-26 27 28 29 2a 2b 2c 2d
-00000070  2e 2f 30 31 32 33 34 35-36 37 38 39 3a 3b 3c 3d
-00000080  3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=130 in_port=1 (via action) data_len=130 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,dl_vlan1=88,dl_vlan_pcp1=7,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
-00000010  81 00 e0 58 88 47 00 00-a1 40 45 00 00 68 00 00
-00000020  00 00 40 06 f9 3c c0 a8-00 01 c0 a8 00 02 00 00
-00000030  00 00 00 00 00 00 00 00-00 00 50 00 00 00 4a 4d
-00000040  00 00 00 01 02 03 04 05-06 07 08 09 0a 0b 0c 0d
-00000050  0e 0f 10 11 12 13 14 15-16 17 18 19 1a 1b 1c 1d
-00000060  1e 1f 20 21 22 23 24 25-26 27 28 29 2a 2b 2c 2d
-00000070  2e 2f 30 31 32 33 34 35-36 37 38 39 3a 3b 3c 3d
-00000080  3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=130 in_port=1 (via action) data_len=130 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,dl_vlan1=88,dl_vlan_pcp1=7,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
-00000010  81 00 e0 58 88 47 00 00-a1 40 45 00 00 68 00 00
-00000020  00 00 40 06 f9 3c c0 a8-00 01 c0 a8 00 02 00 00
-00000030  00 00 00 00 00 00 00 00-00 00 50 00 00 00 4a 4d
-00000040  00 00 00 01 02 03 04 05-06 07 08 09 0a 0b 0c 0d
-00000050  0e 0f 10 11 12 13 14 15-16 17 18 19 1a 1b 1c 1d
-00000060  1e 1f 20 21 22 23 24 25-26 27 28 29 2a 2b 2c 2d
-00000070  2e 2f 30 31 32 33 34 35-36 37 38 39 3a 3b 3c 3d
-00000080  3e 3f
-])
-
-dnl Modified MPLS controller action.
-dnl In this test, the input packet is vlan-tagged, which should be kept as
-dnl inner vlan.
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:58,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
-done
-OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-])
-
-dnl Modified MPLS controller action.
-dnl In this test, the input packet is vlan-tagged, which should be modified
-dnl before we push MPLS and VLAN tags.
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:59,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
-done
-OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-OFPT_PACKET_IN (OF1.2): total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-mpls,dl_vlan=99,dl_vlan_pcp=1,vlan_tci1=0x0000,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
-00000000  50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
-00000010  88 47 00 00 a1 40 45 00-00 68 00 00 00 00 40 06
-00000020  f9 3c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
-00000030  00 00 00 00 00 00 50 00-00 00 4a 4d 00 00 00 01
-00000040  02 03 04 05 06 07 08 09-0a 0b 0c 0d 0e 0f 10 11
-00000050  12 13 14 15 16 17 18 19-1a 1b 1c 1d 1e 1f 20 21
-00000060  22 23 24 25 26 27 28 29-2a 2b 2c 2d 2e 2f 30 31
-00000070  32 33 34 35 36 37 38 39-3a 3b 3c 3d 3e 3f
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0xa, n_packets=3, n_bytes=354, dl_src=40:44:44:44:54:50 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=354, dl_src=40:44:44:44:54:52 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=354, dl_src=40:44:44:44:54:54 actions=push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=354, dl_src=40:44:44:44:54:56 actions=push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=366, dl_src=40:44:44:44:54:51 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=366, dl_src=40:44:44:44:54:53 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=366, dl_src=40:44:44:44:54:55 actions=push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=366, dl_src=40:44:44:44:54:57 actions=push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=366, vlan_tci=0x1000/0x1000,dl_src=40:44:44:44:54:58 actions=load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
- cookie=0xa, n_packets=3, n_bytes=366, vlan_tci=0x1000/0x1000,dl_src=40:44:44:44:54:59 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],set_field:1->vlan_pcp,load:0x63->OXM_OF_VLAN_VID[[]],CONTROLLER:65535
-OFPST_FLOW reply (OF1.2):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - fragment handling - trace])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3 4 5 6 90
-AT_DATA([flows.txt], [dnl
-priority=75 tcp nw_frag=no    tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
-priority=75 tcp nw_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
-priority=50 tcp nw_frag=no              actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
-priority=50 tcp nw_frag=first           actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
-priority=50 tcp nw_frag=later           actions=output:6
-])
-AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
-
-base_flow="in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=128"
-no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
-first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
-later_flow="$base_flow,frag=later)"
-
-    # mode    no  first  later
-for tuple in \
-    'normal    1     5      6' \
-    'drop      1  drop   drop' \
-    'nx-match  1     2      6'
-do
-  set $tuple
-  mode=$1
-  no=$2
-  first=$3
-  later=$4
-
-  AT_CHECK([ovs-ofctl set-frags br0 $mode])
-  for type in no first later; do
-    eval flow=\$${type}_flow exp_output=\$$type
-    printf "\n%s\n" "----$mode $type-----"
-    AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-    : > expout
-    if test $mode = drop && test $type != no; then
-        echo ' 0. Packets are IP fragments and the fragment handling mode is "drop".' >> expout
-        echo "Datapath actions: $exp_output" >> expout
-    elif test $type = later; then
-        echo "Datapath actions: $exp_output" >> expout
-    else
-        echo "Datapath actions: set(tcp(src=80)),$exp_output" >> expout
-    fi
-    AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout])
-  done
-done
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - fragment handling - upcall])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3 4 5 6 90
-AT_DATA([flows.txt], [dnl
-priority=75 tcp ip_frag=no    tp_dst=80 actions=set_field:81->tcp_dst,output:1
-priority=75 tcp ip_frag=first tp_dst=80 actions=set_field:81->tcp_dst,output:2
-priority=50 tcp ip_frag=no              actions=set_field:81->tcp_dst,output:4
-priority=50 tcp ip_frag=first           actions=set_field:81->tcp_dst,output:5
-priority=50 tcp ip_frag=later           actions=output:6
-])
-AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
-
-base_flow="in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=128"
-no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
-first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
-later_flow="$base_flow,frag=later)"
-
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-mode=normal
-
-AT_CHECK([ovs-ofctl set-frags br0 $mode])
-for type in no first later; do
-  eval flow=\$${type}_flow
-  printf "\n%s\n" "----$mode $type-----"
-
-  AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
-done
-
-AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
-flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),1
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),5
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
-])
-
-mode=drop
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl set-frags br0 $mode])
-for type in no first later; do
-  eval flow=\$${type}_flow
-  printf "\n%s\n" "----$mode $type-----"
-
-  AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
-done
-
-AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
-flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),1
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=first), packets:0, bytes:0, used:never, actions:drop
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=later), packets:0, bytes:0, used:never, actions:drop
-])
-
-mode=nx-match
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl set-frags br0 $mode])
-for type in no first later; do
-  eval flow=\$${type}_flow
-  printf "\n%s\n" "----$mode $type-----"
-
-  AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
-done
-
-AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
-flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),1
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),2
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - fragment handling - actions])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3 4 5 6 90
-
-AT_CHECK([ovs-ofctl add-flow br0 "tcp,ip_frag=later actions=move:OXM_OF_TCP_DST[[0..7]]->OXM_OF_TCP_SRC[[0..7]],output:1"], [1], [], [stderr])
-AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
-source field tcp_dst lacks correct prerequisites
-ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow15 add-flow br0 "tcp,ip_frag=later actions=move:OXM_OF_PKT_REG0[[0..7]]->OXM_OF_TCP_SRC[[0..7]],output:1"], [1], [], [stderr])
-AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
-destination field tcp_src lacks correct prerequisites
-ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=set_field:8888->udp_src,output:1"], [1], [], [stderr])
-AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
-set_field udp_src lacks correct prerequisites
-ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=load:8888->NXM_OF_UDP_DST[[]],output:1"], [1], [], [stderr])
-AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
-set_field udp_dst lacks correct prerequisites
-ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_src,output:1"], [1], [], [stderr])
-AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
-set_field sctp_src lacks correct prerequisites
-ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_dst,output:1"], [1], [], [stderr])
-AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
-set_field sctp_dst lacks correct prerequisites
-ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "tcp,ip_frag=later actions=learn(table=1,hard_timeout=60,eth_type=0x800,nw_proto=6,NXM_OF_IP_SRC[[]]=NXM_OF_IP_DST[[]],NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],output:NXM_NX_REG0[[0..15]]),output:1"], [1], [], [stderr])
-AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
-source field tcp_dst lacks correct prerequisites
-ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
-])
-
-AT_DATA([flows.txt], [dnl
-priority=75 tcp actions=load:42->OXM_OF_TCP_SRC[[0..7]],output:1
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 replace-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-mode=normal
-
-AT_CHECK([ovs-ofctl set-frags br0 $mode])
-for frag in 4000 6000 6008 4010; do
-  printf "\n%s\n" "----$mode $frag-----"
-
-  AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 003c 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016 751e267b 00000000 a002 16d0 1736 0000 02 04 05 b4 04 02 08 0a 2d 25 08 5f 00 00 00 00 01 03 03 07"])
-done
-
-dnl The set_field action only modifies 8 bits of the tcp_src, so both the flow
-dnl wildcard and the set_field action have a mask of 0xFF. Up to (including)
-dnl OVS-2.5, the wildcards and set_field mask are shared internally.
-AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
-flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=33419/0xff), packets:0, bytes:0, used:never, actions:set(tcp(src=42/0xff)),1
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=33419/0xff), packets:0, bytes:0, used:never, actions:set(tcp(src=42/0xff)),1
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:74, used:0.001s, actions:1
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl set-frags br0 $mode])
-for frag in 4000 6000 6008 4010; do
-  printf "\n%s\n" "----$mode $frag truncated transport header -----"
-
-  AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0018 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016"])
-done
-
-AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
-flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=0/0xff), packets:0, bytes:0, used:never, actions:set(tcp(src=42/0xff)),1
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=0/0xff), packets:0, bytes:0, used:never, actions:set(tcp(src=42/0xff)),1
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:38, used:0.001s, actions:1
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl set-frags br0 $mode])
-for frag in 4000 6000 6001 4002; do
-  printf "\n%s\n" "----$mode $frag missing transport header-----"
-
-  AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 2e24 $frag 40 06 465d ac11370d ac11370b"])
-done
-
-AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
-flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=0/0xff), packets:0, bytes:0, used:never, actions:set(tcp(src=42/0xff)),1
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=0/0xff), packets:0, bytes:0, used:never, actions:set(tcp(src=42/0xff)),1
-recirc_id(0),in_port(90),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:34, used:0.001s, actions:1
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - exit])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3 10 11 12 13 14
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=output:10,exit,output:11
-in_port=2 actions=output:12,resubmit:1,output:12
-in_port=3 actions=output:13,resubmit:2,output:14
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 10
-])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 12,10
-])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(3),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 13,12,10
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - mirroring, select_all])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p3 get Port p3 --\
-        --id=@m create Mirror name=mymirror select_all=true output_port=@p3
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=output:2
-in_port=2 actions=output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 3,2
-])
-
-flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 3,1
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - mirroring, select_src])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
-        --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=output:2
-in_port=2 actions=output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 3,2
-])
-
-flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p2 get Port p2 --\
-        --id=@m create Mirror name=mymirror select_all=true output_port=@p2
-
-AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
-
-# "in_port" defaults to OFPP_NONE if it's not specified.
-flow="icmp,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_ttl=128,icmp_type=8,icmp_code=0"
-AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 1,2
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - mirroring, select_dst])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
-        --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=output:2
-in_port=2 actions=output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 2,3
-])
-
-flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 1
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - mirroring, select_vlan])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
-        --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
-
-AT_DATA([flows.txt], [dnl
-in_port=1, actions=output:2
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 2
-])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=10,pcp=0),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0))"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 2
-])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=11,pcp=0),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0))"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 3,2
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - mirroring, output_port])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p3 get Port p3 --\
-        --id=@m create Mirror name=mymirror select_all=true output_port=@p3
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=mod_vlan_vid:17,output:2
-in_port=2 actions=output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 3,push_vlan(vid=17,pcp=0),2
-])
-
-flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 3,1
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - mirroring, output_vlan])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@m create Mirror name=mymirror select_all=true output_vlan=12
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=output:2
-in_port=2 actions=mod_vlan_vid:17,output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-actual=`tail -1 stdout | sed 's/Datapath actions: //'`
-
-expected="2,push_vlan(vid=12,pcp=0),1,2,100"
-AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
-mv stdout expout
-AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
-
-flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-actual=`tail -1 stdout | sed 's/Datapath actions: //'`
-
-expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100"
-AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
-mv stdout expout
-AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# This verifies that we don't get duplicate mirroring when mirror_packet()
-# might be invoked recursively, as a check against regression.
-AT_SETUP([ofproto-dpif - multiple VLAN output mirrors])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        -- set Bridge br0 fail-mode=standalone mirrors=@m1, at m2 \
-        -- --id=@m1 create Mirror name=m1 select_all=true output_vlan=500 \
-        -- --id=@m2 create Mirror name=m2 select_all=true output_vlan=501 \
-        -- set Port br0 tag=0 \
-        -- set Port p1 tag=0 \
-        -- set Port p2 tag=500 \
-        -- set Port p3 tag=501
-
-flow='in_port=1'
-AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
-AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //
-s/,/\
-/g' | sort], [0], [100
-2
-3
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# This test verifies that mirror state is preserved across recirculation.
-#
-# Otherwise, post-recirculation the ingress and the output to port 4
-# would cause the packet to be mirrored to port 3 a second time.
-AT_SETUP([ofproto-dpif - mirroring with recirculation])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3 4
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p3 get Port p3 --\
-        --id=@m create Mirror name=mymirror select_all=true output_port=@p3
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=2,debug_recirc,4
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 3,2,recirc(0x1)
-])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow,recirc_id(1)" -generate], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 4
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# Tests below verify the snaplen support for mirroring
-AT_SETUP([ofproto-dpif - mirroring, select_all with snaplen])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p3 get Port p3 --\
-        --id=@m create Mirror name=mymirror select_all=true output_port=@p3 snaplen=100
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=output:2
-in_port=2 actions=output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: trunc(100),3,2
-])
-
-flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: trunc(100),3,1
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - mirroring, select_all with snaplen and reset snaplen])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p3 get Port p3 --\
-        --id=@m create Mirror name=mymirror select_all=true output_port=@p3 snaplen=100
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=output:2
-in_port=2 actions=output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: trunc(100),3,2
-])
-
-ovs-vsctl set mirror mymirror snaplen=77
-
-flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: trunc(77),3,1
-])
-
-ovs-vsctl set mirror mymirror snaplen=65535
-
-flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 3,1
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - mirroring, select_src with snaplen])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
-        --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3 snaplen=100
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=output:2
-in_port=2 actions=output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: trunc(100),3,2
-])
-
-flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port with snaplen])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p2 get Port p2 --\
-        --id=@m create Mirror name=mymirror select_all=true output_port=@p2 snaplen=100
-
-AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
-
-# "in_port" defaults to OFPP_NONE if it's not specified.
-flow="icmp,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_ttl=128,icmp_type=8,icmp_code=0"
-AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 1,trunc(100),2
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - mirroring, select_dst with snaplen])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
-        --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3 snaplen=100
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=output:2
-in_port=2 actions=output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 2,trunc(100),3
-])
-
-flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 1
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - mirroring, select_vlan with snaplen])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
-        --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3 snaplen=100
-
-AT_DATA([flows.txt], [dnl
-in_port=1, actions=output:2
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 2
-])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=10,pcp=0),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0))"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: 2
-])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=11,pcp=0),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0))"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: trunc(100),3,2
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - mirroring, output_port with snaplen])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p3 get Port p3 --\
-        --id=@m create Mirror name=mymirror select_all=true output_port=@p3 snaplen=100
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=mod_vlan_vid:17,output:2
-in_port=2 actions=output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: trunc(100),3,push_vlan(vid=17,pcp=0),2
-])
-
-flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0],
-  [Datapath actions: trunc(100),3,1
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - mirroring, output_vlan with snaplen])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@m create Mirror name=mymirror select_all=true output_vlan=12 snaplen=100
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=output:2
-in_port=2 actions=mod_vlan_vid:17,output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-actual=`tail -1 stdout | sed 's/Datapath actions: //'`
-dnl Expect: "trunc(100),100,trunc(100),2,trunc(100),1", with different order
-AT_CHECK([echo "$actual" | sed -n 's/.*\(trunc([0-9]*),[0-9]*,trunc([0-9]*),[0-9]*,trunc([0-9]*),[0-9]*\)/\1/p'], [0])
-
-flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
-actual=`tail -1 stdout | sed 's/Datapath actions: //'`
-AT_CHECK([echo "$actual" | sed -n 's/.*\(trunc([0-9]*),[0-9]*,trunc([0-9]*),[0-9]*,trunc([0-9]*),[0-9]*\)/\1/p'], [0])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - multiple VLAN output mirrors with snaplen])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        -- set Bridge br0 fail-mode=standalone mirrors=@m1, at m2 \
-       -- --id=@m1 create Mirror name=m1 select_all=true output_vlan=500 snaplen=200 \
-       -- --id=@m2 create Mirror name=m2 select_all=true output_vlan=501 snaplen=300 \
-       -- set Port br0 tag=0 \
-       -- set Port p1 tag=0 \
-       -- set Port p2 tag=500 \
-       -- set Port p3 tag=501
-
-flow="in_port=1"
-AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
-AT_CHECK([tail -1 stdout | egrep "trunc\(200\),2,trunc\(300\),3,100|trunc\(300\),3,trunc\(200\),2,100"], [0], [stdout])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# This test verifies that the table ID is preserved across recirculation
-# when a resubmit action requires it (because the action is relative to
-# the current table rather than specifying a table).
-AT_SETUP([ofproto-dpif - resubmit with recirculation])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1  actions=2,resubmit(,1)
-table=1 in_port=1  actions=debug_recirc,resubmit:55
-table=1 in_port=55 actions=3
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 2,recirc(0x1)
-])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow,recirc_id(1)" -generate], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 3
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-# This test verifies that tunnel metadata is preserved across
-# recirculation.  At the time of recirculation, fields such as "tun_id"
-# may be set before the tunnel is "valid" (ie, has a destination
-# address), but the field should still be available after recirculation.
-AT_SETUP([ofproto-dpif - resubmit with tun_id])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1  actions=2,load:6->NXM_NX_TUN_ID[[]],resubmit(,1)
-table=1 in_port=1  actions=debug_recirc,resubmit:55
-table=1 in_port=55 actions=3
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
-AT_CHECK([grep "Final flow:" stdout], [0], [Final flow: icmp,tun_id=0x6,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=128,icmp_type=8,icmp_code=0
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow,recirc_id(1)" -generate], [0], [stdout])
-AT_CHECK([grep "Final flow:" stdout], [0], [Final flow: recirc_id=0x1,eth,icmp,tun_id=0x6,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=128,icmp_type=8,icmp_code=0
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-# This test verifies that "resubmit", when it triggers recirculation
-# indirectly through the flow that it recursively invokes, is not
-# re-executed when execution continues later post-recirculation.
-AT_SETUP([ofproto-dpif - recirculation after resubmit])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 actions=resubmit(,1),2
-table=1 in_port=1 actions=debug_recirc
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: recirc(0x1)
-])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow,recirc_id(1)" -generate], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 2
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - debug_slow action])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=1,actions=debug_slow,2"])
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
-AT_CHECK_UNQUOTED([tail -3 stdout], [0], [Datapath actions: 2
-This flow is handled by the userspace slow path because it:
-  - Uses action(s) not supported by datapath.
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-dnl CHECK_CONTINUATION(TITLE, N_PORTS0, N_PORTS1, ACTIONS0, ACTIONS1, [EXTRA_SETUP])
-dnl
-dnl Checks the implementation of the continuation mechanism that allows the
-dnl packet processing pipeline to be paused and resumed.  Starts by creating
-dnl bridge br0 with N_PORTS0 ports numbered 1 through N_PORTS0, and adds the
-dnl flows listed in ACTIONS0 to that bridge.  Then, injects a packet at port 1
-dnl in the bridge, resuming each time the pipeline pauses, and expects a single
-dnl packet to be output at each port 2 through N_PORTS0.  Then, as long as
-dnl ACTIONS0 still contains at least one "pause" action, removes one of them
-dnl and repeats the process.
-dnl
-dnl If N_PORTS1 is nonzero, also creates a bridge br1 and adds ports numbered
-dnl N_PORTS0 + 1 to N_PORTS0 + N_PORTS1 to it, as well as flows ACTIONS1.
-dnl ACTIONS1 may also contain "pause" actions.  Packets are only ever injected
-dnl into port 1 on br0, so br1 only comes into action if a patch port (added
-dnl by EXTRA_SETUP) jumps from one bridge to another.
-dnl
-dnl EXTRA_SETUP is an optional list of extra commands to run after setting up
-dnl both bridges, e.g. to configure mirrors or patch ports.
-m4_define([CHECK_CONTINUATION], [dnl
-    AT_SETUP([ofproto-dpif - continuation - $1])
-    AT_KEYWORDS([continuations pause resume])
-    OVS_VSWITCHD_START
-
-    # count_matches STRING
-    #
-    # Prints on stdout the number of occurrences of STRING in stdin.
-    count_matches () {
-        sed -n ":start
-    s/$[1]//p
-    t start" | wc -l
-    }
-
-    add_of_ports --pcap br0 `seq 1 $2`
-    m4_if([$3], [0], [],
-      [add_of_br 1
-       add_of_ports --pcap br1 `seq m4_eval([$2 + 1]) m4_eval([$2 + $3])`])
-
-    AT_CAPTURE_FILE([ofctl_monitor0.log])
-    AT_CHECK([ovs-ofctl monitor br0 resume --detach --no-chdir --pidfile=ovs-ofctl0.pid 2> ofctl_monitor0.log])
-    m4_if([$3], [0], [],
-      [AT_CAPTURE_FILE([ofctl_monitor1.log])
-       AT_CHECK([ovs-ofctl monitor br1 resume --detach --no-chdir --pidfile=ovs-ofctl1.pid 2> ofctl_monitor1.log])])
-
-    actions0='$4'
-    actions1='$5'
-    $6
-    flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-    n_packets=0
-    n_resumes=0
-    while true; do
-        printf "\n\nactions for br0:\n%s\n" "$actions0"
-        m4_if([$3], [0], [], [printf "actions for br1:\n%s\n" "$actions1"])
-
-        # Add flows.
-        AT_CHECK([echo "$actions0" | sed 's/pause/controller(pause)/g' | ovs-ofctl -O OpenFlow13 add-flows br0 -])
-        m4_if([$3], [0], [],
-            [AT_CHECK([echo "$actions1" | sed 's/pause/controller(pause)/g' | ovs-ofctl -O OpenFlow13 add-flows br1 -])])
-
-        # Make sure the datapath is up-to-date before sending the packet.
-        ovs-appctl revalidator/wait
-
-        # Run a packet through the switch.
-        AT_CHECK([ovs-appctl netdev-dummy/receive p1 "$flow"], [0], [stdout])
-
-        # Wait for the expected number of packets to show up.
-        n_packets=`expr $n_packets + $2 - 1 + $3`
-        echo "waiting for $n_packets packets..."
-        OVS_WAIT_UNTIL([test $n_packets = `ovs-ofctl parse-pcap p*-tx.pcap | wc -l`])
-
-        # Wait for the expected number of NXT_RESUMEs to be logged.
-        n_resumes=$(expr $n_resumes + $(echo "$actions0 $actions1" | count_matches pause) )
-        echo "waiting for $n_resumes NXT_RESUMEs..."
-        OVS_WAIT_UNTIL([test $n_resumes = `cat ofctl_monitor*.log | grep -c NXT_RESUME`])
-
-        # Eliminate one "pause" from the actions.
-        #
-        # If there were none left, then we're done.
-        next_actions0=`echo "$actions0" | sed '1,/pause/s/pause//'`
-        if test X"$actions0" = X"$next_actions0"; then
-            next_actions1=`echo "$actions1" | sed '1,/pause/s/pause//'`
-            if test X"$actions1" = X"$next_actions1"; then
-                break
-            else
-                actions1=$next_actions1
-            fi
-        else
-            actions0=$next_actions0
-        fi
-
-        # Delete all the flows and verify that there are none, so that we
-        # can be sure that our updated flow tables is actually in use
-        # later.
-        AT_CHECK([ovs-ofctl del-flows br0 && ovs-ofctl dump-flows br0 | strip_xids], [0],
-          [NXST_FLOW reply:
-])
-        m4_if([$3], [0], [],
-          [AT_CHECK([ovs-ofctl del-flows br1 && ovs-ofctl dump-flows br1 | strip_xids], [0],
-             [NXST_FLOW reply:
-])])
-    done
-    OVS_VSWITCHD_STOP
-    AT_CLEANUP
-])
-
-# Check that pause at the end of the pipeline works OK.
-#
-# (xlate_continuation() has a special case for no-op actions; this
-# fails without that special case.)
-CHECK_CONTINUATION([pause at end of pipeline], [2], [0], [actions=2 pause])
-
-# Check that remaining actions are preserved following resume.
-CHECK_CONTINUATION([actions], [7], [0],
-  [in_port=1 actions=pause 2 pause 3 pause 4 pause 5 pause 6 pause 7])
-
-# Check that multiple levels of resubmit continue following resume.
-#
-# The "resubmit:55", which is relative to the current table, is
-# particularly interesting because it checks that the notion of the
-# current table is correctly preserved.
-CHECK_CONTINUATION([resubmit], [10], [0],
-  [table=0 in_port=1  actions=pause 2 pause resubmit(,1) pause 10 pause
-   table=1 in_port=1  actions=pause 3 pause resubmit(,2) pause 9 pause
-   table=2 in_port=1  actions=pause 4 pause resubmit(,3) pause 8 pause
-   table=3 in_port=1  actions=pause 5 pause resubmit:55  pause 7 pause
-   table=3 in_port=55 actions=pause 6 pause])
-
-# Check that the action set is preserved across pause/resume.
-CHECK_CONTINUATION([action set], [3], [0],
-  [in_port=1 actions=1 pause resubmit(,1) pause 2
-   table=1 actions=write_actions(3)])
-
-# Check that metadata and the stack used by push and pop is preserved
-# across pause/resume.
-CHECK_CONTINUATION([data stack], [3], [0],
-  [in_port=1 actions=pause dnl
-                     set_field:1->reg0 dnl
-                     pause dnl
-                     set_field:2->reg1 dnl
-                     pause dnl
-                     output:NXM_NX_REG0[[]] dnl
-                     pause dnl
-                     push:NXM_NX_REG1[[]] dnl
-                     dnl
-                     pop:NXM_NX_REG2[[]] dnl
-                     pause dnl
-                     output:NXM_NX_REG2[[]] dnl
-                     pause dnl
-                     3])
-
-# Check that mirror output occurs once and once only, even if
-# separated by pause/resume.
-CHECK_CONTINUATION([mirroring], [5], [0],
-  [in_port=1 actions=pause 2 pause 3 pause 4 pause], [],
-  [ovs-vsctl \
-       set Bridge br0 mirrors=@m --\
-       --id=@p2 get Port p2 --\
-       --id=@p3 get Port p3 --\
-       --id=@p4 get Port p4 --\
-       --id=@p5 get Port p5 --\
-       --id=@m create Mirror name=mymirror select_dst_port=@p2, at p3, at p4 output_port=@p5])
-
-# Check that pause works in the presence of patch ports.
-CHECK_CONTINUATION([patch ports], [4], [1],
-  [table=0 in_port=1  actions=pause 2 resubmit(,1) pause 4
-   table=1 in_port=1  actions=pause 3 pause 10 pause],
-  [table=0 in_port=11 actions=pause 5 pause],
-  [ovs-vsctl \
-       -- add-port br0 patch10 \
-       -- set interface patch10 type=patch options:peer=patch11 \
-                                ofport_request=10 \
-       -- add-port br1 patch11 \
-       -- set interface patch11 type=patch options:peer=patch10 \
-                                ofport_request=11])
-
-AT_SETUP([ofproto-dpif - continuation flow stats])
-AT_KEYWORDS([continuations pause resume])
-OVS_VSWITCHD_START
-
-add_of_ports --pcap br0 `seq 1 2`
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 actions=set_field:1->reg1 controller(pause) resubmit(,2)
-table=2 reg1=0x1 actions=2
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor0.log])
-ovs-ofctl monitor br0 resume --detach --no-chdir \
---pidfile=ovs-ofctl0.pid 2> ofctl_monitor0.log
-
-# Run a packet through the switch.
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 "$flow"], [0], [stdout])
-
-# Check flow stats
-AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sed -n 's/idle_age=[[0-9]]*/idle_age=0/p' | grep 'table=2'], [0], [dnl
- cookie=0x0, duration=0.0s, table=2, n_packets=1, n_bytes=106, idle_age=0, reg1=0x1 actions=output:2
-])
-
-# The packet should be received by port 2
-AT_CHECK([test 1 = `$PYTHON "$top_srcdir/utilities/ovs-pcap.in" p2-tx.pcap | wc -l`])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - continuation with conntrack])
-AT_KEYWORDS([continuations pause resume])
-OVS_VSWITCHD_START
-
-add_of_ports --pcap br0 `seq 1 2`
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-
-AT_DATA([flows.txt], [dnl
-table=0, in_port=1 icmp action=ct(table=1)
-table=1, icmp action=controller(pause) resubmit(,2)
-table=2, in_port=1 icmp ct_state=+trk+new action=output:2
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor0.log])
-ovs-ofctl monitor br0 resume --detach --no-chdir \
---pidfile=ovs-ofctl0.pid 2> ofctl_monitor0.log
-
-# Run a packet through the switch.
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 "$flow"], [0], [stdout])
-
-# Check flow stats
-AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sed -n 's/idle_age=[[0-9]]*/idle_age=0/p' | grep 'table=2'], [0], [dnl
- cookie=0x0, duration=0.0s, table=2, n_packets=1, n_bytes=106, idle_age=0, ct_state=+new+trk,icmp,in_port=1 actions=output:2
-])
-
-# The packet should be received by port 2
-AT_CHECK([test 1 = `$PYTHON "$top_srcdir/utilities/ovs-pcap.in" p2-tx.pcap | wc -l`])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# Check that pause works after the packet is cloned.
-AT_SETUP([ofproto-dpif - continuation after clone])
-AT_KEYWORDS([continuations clone pause resume])
-OVS_VSWITCHD_START
-
-add_of_ports --pcap br0 `seq 1 3`
-
-flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
-
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 actions=set_field:1->reg1 resubmit(,2)
-table=1 reg1=0x5 actions=controller(pause) resubmit(,3)
-table=1 reg1=0x1 actions=2
-table=2 in_port=1 actions=clone(set_field:5->reg1, resubmit(,1))
-table=3 reg1=0x1 actions=3
-table=3 reg1=0x5 actions=2
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor0.log])
-ovs-ofctl monitor br0 resume --detach --no-chdir \
---pidfile=ovs-ofctl0.pid 2> ofctl_monitor0.log
-
-# Run a packet through the switch.
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 "$flow"], [0], [stdout])
-
-ovs-vsctl show
-ovs-ofctl dump-flows br0
-
-# The packet should be received by port 2 and not port 3
-AT_CHECK([test 1 = `$PYTHON "$top_srcdir/utilities/ovs-pcap.in" p2-tx.pcap | wc -l`])
-AT_CHECK([test 0 = `$PYTHON "$top_srcdir/utilities/ovs-pcap.in" p3-tx.pcap | wc -l`])
-
-# NXT_RESUMEs should be 1 and reg1 should be set to 0x5.
-OVS_WAIT_UNTIL([test 1 = `cat ofctl_monitor*.log | grep NXT_RESUME | grep -c reg1=0x5`])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# Two testcases below are for the ofproto/trace command
-# The first one tests all correct syntax:
-# ofproto/trace [dp_name] odp_flow [-generate|packet]
-# ofproto/trace br_name br_flow [-generate|packet]
-AT_SETUP([ofproto-dpif - ofproto/trace command 1])
-OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
-add_of_ports br0 1 2 3
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=output:2
-in_port=2 actions=output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-odp_flow="in_port(p1)"
-br_flow="in_port=1"
-# Test command: ofproto/trace odp_flow with in_port as a name.
-AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: 2
-])
-
-odp_flow="in_port(1)"
-# Test command: ofproto/trace odp_flow
-AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: 2
-])
-
-# Test command: ofproto/trace dp_name odp_flow
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: 2
-])
-# Test commmand: ofproto/trace br_name br_flow
-AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: 2
-])
-
-# Delete the inserted flows
-AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
-AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
-
-# This section below tests the [-generate] option
-odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
-br_flow="arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=ff:ff:ff:ff:ff:ff"
-
-# Test command: ofproto/trace odp_flow
-AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
-# Check for no MAC learning entry
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
- port  VLAN  MAC                Age
-])
-
-# Test command: ofproto/trace br_name br_flow
-AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
-# Check for no MAC learning entry
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
- port  VLAN  MAC                Age
-])
-
-# Test command: ofproto/trace odp_flow -generate
-AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
-# Check for the MAC learning entry
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
- port  VLAN  MAC                Age
-    3     0  50:54:00:00:00:05    ?
-])
-
-# Test command: ofproto/trace dp_name odp_flow -generate
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
-  "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
-  -generate], [0], [stdout])
-# Check for both MAC learning entries
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
- port  VLAN  MAC                Age
-    3     0  50:54:00:00:00:05    ?
-    1     0  50:54:00:00:00:06    ?
-])
-
-# Test command: ofproto/trace br_name br_flow -generate
-AT_CHECK([ovs-appctl ofproto/trace br0 \
-  "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
-  -generate], [0], [stdout])
-# Check for both MAC learning entries.
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
- port  VLAN  MAC                Age
-    3     0  50:54:00:00:00:05    ?
-    1     0  50:54:00:00:00:06    ?
-    2     0  50:54:00:00:00:07    ?
-])
-
-# This section beflow tests the [packet] option
-# The ovs-tcpundump of packets between port1 and port2
-pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
-pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
-
-# Construct the MAC learning table
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
-  "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
-  -generate], [0], [stdout])
-
-# Construct the MAC learning table
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
-  "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
-  -generate], [0], [stdout])
-
-# Test command: ofproto/trace odp_flow packet
-AT_CHECK([ovs-appctl ofproto/trace \
-  "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: 2
-])
-AT_CHECK([head -n 3 stdout], [0], [dnl
-Flow: pkt_mark=0x2,skb_priority=0x1,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
-
-bridge("br0")
-])
-
-# Test command: ofproto/trace dp_name odp_flow packet
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
-  "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: 2
-])
-AT_CHECK([head -n 3 stdout], [0], [dnl
-Flow: pkt_mark=0x2,skb_priority=0x1,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
-
-bridge("br0")
-])
-
-# Test command: ofproto/trace br_name br_flow packet
-AT_CHECK([ovs-appctl ofproto/trace br0 \
-  "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: 1
-])
-AT_CHECK([head -n 3 stdout], [0], [dnl
-Flow: pkt_mark=0x1,skb_priority=0x2,arp,in_port=2,vlan_tci=0x0000,dl_src=50:54:00:00:00:02,dl_dst=50:54:00:00:00:01,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
-
-bridge("br0")
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# The second test tests the corner cases
-AT_SETUP([ofproto-dpif - ofproto/trace command 2])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-
-# Define flows
-odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
-br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
-# Define options
-generate="-generate"
-pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
-
-# Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
-m4_foreach(
-[option],
-[[],
-["$generate"],
-["$pkt"]],
-[AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
-  [2], [], [stderr])
-AT_CHECK([tail -2 stderr], [0], [dnl
-Cannot find the datapath
-ovs-appctl: ovs-vswitchd: server returned an error
-])])
-
-# Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
-m4_foreach(
-[option],
-[[],
-["$generate"],
-["$pkt"]],
-[AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
-  [2], [], [stderr])
-AT_CHECK([tail -2 stderr], [0], [dnl
-Cannot find the datapath
-ovs-appctl: ovs-vswitchd: server returned an error
-])])
-
-# Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
-m4_foreach(
-[option],
-[[],
-["$generate"],
-["$pkt"]],
-[AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
-  [2], [], [stderr])
-AT_CHECK([tail -2 stderr], [0], [dnl
-Cannot find the datapath
-ovs-appctl: ovs-vswitchd: server returned an error
-])])
-
-# Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
-m4_foreach(
-[option],
-[[],
-["$generate"],
-["$pkt"]],
-[AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
-  [2], [], [stderr])
-AT_CHECK([tail -2 stderr], [0], [dnl
-Cannot find the datapath
-ovs-appctl: ovs-vswitchd: server returned an error
-])])
-
-# Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
-m4_foreach(
-[option],
-[[],
-["$generate"],
-["$pkt"]],
-[AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
-  [2], [], [stderr])
-AT_CHECK([tail -2 stderr], [0], [dnl
-ovs-dummy: unknown bridge
-ovs-appctl: ovs-vswitchd: server returned an error
-])])
-
-# Test incorrect command: ofproto/trace br_flow [-generate|packet]
-m4_foreach(
-[option],
-[[],
-["$generate"],
-["$pkt"]],
-[AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
-  [2], [], [stderr])
-AT_CHECK([tail -2 stderr], [0], [dnl
-syntax error at in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02 (or the bridge name was omitted)
-ovs-appctl: ovs-vswitchd: server returned an error
-])])
-
-# Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
-AT_CHECK([ovs-appctl ofproto/trace \
-  ovs-dummy "$odp_flow" garbage_option],
-  [2], [stdout],[stderr])
-AT_CHECK([tail -2 stderr], [0], [dnl
-Trailing garbage in packet data
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-
-# Test incorrect command: ofproto/trace with 0 argument
-AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
-AT_CHECK([tail -2 stderr], [0], [dnl
-"ofproto/trace" command requires at least 1 arguments
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# The third test checks that the output of "ovs-dpctl -m" is valid to trace.
-AT_SETUP([ofproto-dpif - ofproto/trace from dpctl output])
-OVS_VSWITCHD_START([dnl
-    set Open_vSwitch . other_config:max-idle=10000 \
-    -- add-port br0 p1 -- set Interface p1 type=dummy])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-ovs-appctl revalidator/wait
-AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sed 's/, packets.*$//' > dp_flows1.txt])
-
-odp_flow=`cat dp_flows1.txt`
-AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" | sed 's/\([[Ff]]low:\).*/\1 <cleared>/'], [0], [dnl
-Flow: <cleared>
-
-bridge("br0")
--------------
- 0. No match.
-    drop
-
-Final flow: <cleared>
-Megaflow: <cleared>
-Datapath actions: drop
-])
-
-dnl Now, try again without megaflows:
-ovs-appctl upcall/disable-megaflows
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-ovs-appctl revalidator/wait
-AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sed 's/, packets.*$//' > dp_flows2.txt])
-
-odp_flow=`cat dp_flows2.txt`
-AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" | sed 's/\([[Ff]]low:\).*/\1 <cleared>/'], [0], [dnl
-Flow: <cleared>
-
-bridge("br0")
--------------
- 0. No match.
-    drop
-
-Final flow: <cleared>
-Megaflow: <cleared>
-Datapath actions: drop
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - ofproto/trace-packet-out])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=output:2
-in_port=2 actions=output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: push_vlan(vid=123,pcp=0),2
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-m4_define([OFPROTO_TRACE],
-  [flow="$2"
-   AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
-   actual=`tail -1 stdout | sed 's/Datapath actions: //'`
-   expected="$4"
-   AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5],
-     [0], [stdout])
-   mv stdout expout
-   AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5],
-     [0], [expout])])
-
-AT_SETUP([ofproto-dpif - MAC learning])
-OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
-add_of_ports br0 1 2 3
-
-arp='eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
-
-# Trace an ARP packet arriving on p3, to create a MAC learning entry.
-OFPROTO_TRACE(
-  [ovs-dummy],
-  [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
-  [-generate],
-  [1,2,100])
-
-# Check for the MAC learning entry.
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
- port  VLAN  MAC                Age
-    3     0  50:54:00:00:00:05    ?
-])
-
-# Trace a packet arrival destined for the learned MAC.
-# (This will also learn a MAC.)
-OFPROTO_TRACE(
-  [ovs-dummy],
-  [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp],
-  [-generate],
-  [3])
-
-# Check for both MAC learning entries.
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
- port  VLAN  MAC                Age
-    3     0  50:54:00:00:00:05    ?
-    1     0  50:54:00:00:00:06    ?
-])
-
-# Trace a packet arrival that updates the first learned MAC entry.
-OFPROTO_TRACE(
-  [ovs-dummy],
-  [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
-  [-generate],
-  [1,3,100])
-
-# Check that the MAC learning entry was updated.
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
- port  VLAN  MAC                Age
-    1     0  50:54:00:00:00:06    ?
-    2     0  50:54:00:00:00:05    ?
-])
-
-# Add another bridge.
-AT_CHECK(
-  [ovs-vsctl \
-     -- add-br br1 \
-     -- set bridge br1 datapath-type=dummy])
-add_of_ports br1 4 5
-
-# Trace some packet arrivals in br1 to create MAC learning entries there too.
-OFPROTO_TRACE(
-  [ovs-dummy],
-  [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp],
-  [-generate],
-  [5,101])
-OFPROTO_TRACE(
-  [ovs-dummy],
-  [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp],
-  [-generate],
-  [4,101])
-
-# Check that the MAC learning entries were added.
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
- port  VLAN  MAC                Age
-    4     0  50:54:00:00:00:06    ?
-    5     0  50:54:00:00:00:07    ?
-])
-
-# Delete port p1 and see that its MAC learning entry disappeared, and
-# that the MAC learning entry for the same MAC was also deleted from br1.
-AT_CHECK([ovs-vsctl del-port p1])
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
- port  VLAN  MAC                Age
-    2     0  50:54:00:00:00:05    ?
-])
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
- port  VLAN  MAC                Age
-    5     0  50:54:00:00:00:07    ?
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - MAC table overflow])
-OVS_VSWITCHD_START(
-  [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
-add_of_ports br0 1 2 3
-
-arp='eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
-
-AT_CHECK([ovs-appctl time/stop])
-
-# Trace 10 ARP packets arriving on p3, to create MAC learning entries.
-for i in 0 1 2 3 4 5 6 7 8 9; do
-    OFPROTO_TRACE(
-      [ovs-dummy],
-      [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp],
-      [-generate],
-      [1,2,100])
-    ovs-appctl time/warp 1000
-done
-
-# Check for the MAC learning entries.
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
-  [0], [dnl
-    3     0  50:54:00:00:00:00
-    3     0  50:54:00:00:00:01
-    3     0  50:54:00:00:00:02
-    3     0  50:54:00:00:00:03
-    3     0  50:54:00:00:00:04
-    3     0  50:54:00:00:00:05
-    3     0  50:54:00:00:00:06
-    3     0  50:54:00:00:00:07
-    3     0  50:54:00:00:00:08
-    3     0  50:54:00:00:00:09
- port  VLAN  MAC                Age
-])
-
-# Trace another ARP packet on another MAC.
-OFPROTO_TRACE(
-  [ovs-dummy],
-  [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp],
-  [-generate],
-  [1,2,100])
-
-# Check that the new one chased the oldest one out of the table.
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort],
-  [0], [dnl
-    3     0  50:54:00:00:00:01    ?
-    3     0  50:54:00:00:00:02    ?
-    3     0  50:54:00:00:00:03    ?
-    3     0  50:54:00:00:00:04    ?
-    3     0  50:54:00:00:00:05    ?
-    3     0  50:54:00:00:00:06    ?
-    3     0  50:54:00:00:00:07    ?
-    3     0  50:54:00:00:00:08    ?
-    3     0  50:54:00:00:00:09    ?
-    3     0  50:54:00:00:00:10    ?
- port  VLAN  MAC                Age
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - MAC table overflow fairness])
-OVS_VSWITCHD_START(
-  [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
-add_of_ports br0 1 2 3 4 5 6
-
-arp='eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
-
-AT_CHECK([ovs-appctl time/stop])
-
-# Trace packets with 2 different source MACs arriving on each of the 5
-# ports, filling up the 10-entry learning table.
-for i in 0 1 2 3 4 5 6 7 8 9; do
-    p=`expr $i / 2 + 1`
-    ovs-appctl ofproto/trace ovs-dummy "in_port($p),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp" -generate
-    ovs-appctl time/warp 1000
-done
-
-# Check for the MAC learning entries.
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
-  [0], [dnl
-    1     0  50:54:00:00:00:00
-    1     0  50:54:00:00:00:01
-    2     0  50:54:00:00:00:02
-    2     0  50:54:00:00:00:03
-    3     0  50:54:00:00:00:04
-    3     0  50:54:00:00:00:05
-    4     0  50:54:00:00:00:06
-    4     0  50:54:00:00:00:07
-    5     0  50:54:00:00:00:08
-    5     0  50:54:00:00:00:09
- port  VLAN  MAC                Age
-])
-
-# Now trace 16 new MACs on another port.
-for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
-    ovs-appctl ofproto/trace ovs-dummy "in_port(6),eth(src=50:54:00:00:0$i:ff,dst=ff:ff:ff:ff:ff:ff),$arp" -generate
-    ovs-appctl time/warp 1000
-done
-
-# Check the results.
-#
-# Our eviction algorithm on overflow is that an arbitrary (but deterministic)
-# one of the ports with the most learned MACs loses the least recently used
-# one.  Thus, the new port will end up with 3 MACs, 3 of the old ports with 1
-# MAC each, and the other 2 of the old ports with 2 MACs each.
-#
-# (If someone changes lib/heap.c to do something different with equal-priority
-# nodes, then the output below could change, but it would still follow the
-# rules explained above.)
-AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
-  [0], [dnl
-    1     0  50:54:00:00:00:01
-    2     0  50:54:00:00:00:03
-    3     0  50:54:00:00:00:04
-    3     0  50:54:00:00:00:05
-    4     0  50:54:00:00:00:07
-    5     0  50:54:00:00:00:08
-    5     0  50:54:00:00:00:09
-    6     0  50:54:00:00:0d:ff
-    6     0  50:54:00:00:0e:ff
-    6     0  50:54:00:00:0f:ff
- port  VLAN  MAC                Age
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR)
-#
-# Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector
-m4_define([CHECK_SFLOW_SAMPLING_PACKET],
-  [AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
-  OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
-
-  on_exit 'kill `cat test-sflow.pid`'
-  AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore])
-  AT_CAPTURE_FILE([sflow.log])
-  PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
-  ovs-appctl time/stop
-
-  add_of_ports br0 1 2
-  ovs-vsctl \
-     set Interface br0 options:ifindex=1002 -- \
-     set Interface p1 options:ifindex=1004 -- \
-     set Interface p2 options:ifindex=1003 -- \
-     set Bridge br0 sflow=@sf -- \
-     --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
-       header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
-
-  dnl open with ARP packets to seed the bridge-learning.  The output
-  dnl ifIndex numbers should be reported predictably after that.
-  dnl Since we set sampling=1 we should see all of these packets
-  dnl reported. Sorting the output by data-source and seqNo makes
-  dnl it deterministic. Ensuring that we send at least two packets
-  dnl into each port means we get to check the seq nos are
-  dnl incrementing correctly.
-  dnl because packets from different ports can be handled by separate
-  dnl threads, put some sleeps
-
-  ovs-appctl netdev-dummy/receive p1 'in_port(2),eth(src=50:54:00:00:00:05,dst=FF:FF:FF:FF:FF:FF),eth_type(0x0806),arp(sip=192.168.0.2,tip=192.168.0.1,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
-  sleep 1
-  ovs-appctl netdev-dummy/receive p2 'in_port(1),eth(src=50:54:00:00:00:07,dst=FF:FF:FF:FF:FF:FF),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:07,tha=00:00:00:00:00:00)'
-  sleep 1
-  ovs-appctl netdev-dummy/receive p1 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'
-  sleep 1
-  ovs-appctl netdev-dummy/receive p2 'in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)'
-  ovs-appctl netdev-dummy/receive p2 'in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x86dd),ipv6(src=fe80::1,dst=fe80::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'
-
-  dnl sleep long enough to get more than one counter sample
-  dnl from each datasource so we can check sequence numbers
-  ovs-appctl time/warp 2000 100
-  OVS_VSWITCHD_STOP
-  OVS_APP_EXIT_AND_WAIT([test-sflow])
-
-  AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
-        /g' | sed 's/\(.*\)ds=\[::1\]\(.*\)/\1ds=127.0.0.1\2/g' ]], [0], [dnl
-HEADER
-        dgramSeqNo=1
-        ds=127.0.0.1>2:1000
-        fsSeqNo=1
-        in_vlan=0
-        in_priority=0
-        out_vlan=0
-        out_priority=0
-        meanSkip=1
-        samplePool=1
-        dropEvents=0
-        in_ifindex=1004
-        in_format=0
-        out_ifindex=2
-        out_format=2
-        hdr_prot=1
-        pkt_len=46
-        stripped=4
-        hdr_len=42
-        hdr=FF-FF-FF-FF-FF-FF-50-54-00-00-00-05-08-06-00-01-08-00-06-04-00-01-50-54-00-00-00-05-C0-A8-00-02-00-00-00-00-00-00-C0-A8-00-01
-HEADER
-        dgramSeqNo=1
-        ds=127.0.0.1>2:1000
-        fsSeqNo=2
-        in_vlan=0
-        in_priority=0
-        out_vlan=0
-        out_priority=0
-        meanSkip=1
-        samplePool=2
-        dropEvents=0
-        in_ifindex=1003
-        in_format=0
-        out_ifindex=2
-        out_format=2
-        hdr_prot=1
-        pkt_len=46
-        stripped=4
-        hdr_len=42
-        hdr=FF-FF-FF-FF-FF-FF-50-54-00-00-00-07-08-06-00-01-08-00-06-04-00-01-50-54-00-00-00-07-C0-A8-00-01-00-00-00-00-00-00-C0-A8-00-02
-HEADER
-        dgramSeqNo=1
-        ds=127.0.0.1>2:1000
-        fsSeqNo=3
-        in_vlan=0
-        in_priority=0
-        out_vlan=0
-        out_priority=0
-        meanSkip=1
-        samplePool=3
-        dropEvents=0
-        in_ifindex=1004
-        in_format=0
-        out_ifindex=1003
-        out_format=0
-        hdr_prot=1
-        pkt_len=110
-        stripped=4
-        hdr_len=106
-        hdr=50-54-00-00-00-07-50-54-00-00-00-05-08-00-45-00-00-5C-00-00-00-00-40-01-F9-4D-C0-A8-00-01-C0-A8-00-02-08-00-13-FC-00-00-00-00-00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F-10-11-12-13-14-15-16-17-18-19-1A-1B-1C-1D-1E-1F-20-21-22-23-24-25-26-27-28-29-2A-2B-2C-2D-2E-2F-30-31-32-33-34-35-36-37-38-39-3A-3B-3C-3D-3E-3F
-HEADER
-        dgramSeqNo=1
-        ds=127.0.0.1>2:1000
-        fsSeqNo=4
-        in_vlan=0
-        in_priority=0
-        out_vlan=0
-        out_priority=0
-        meanSkip=1
-        samplePool=4
-        dropEvents=0
-        in_ifindex=1003
-        in_format=0
-        out_ifindex=1004
-        out_format=0
-        hdr_prot=1
-        pkt_len=110
-        stripped=4
-        hdr_len=106
-        hdr=50-54-00-00-00-05-50-54-00-00-00-07-08-00-45-00-00-5C-00-00-00-00-40-01-F9-4D-C0-A8-00-02-C0-A8-00-01-00-00-1B-FC-00-00-00-00-00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F-10-11-12-13-14-15-16-17-18-19-1A-1B-1C-1D-1E-1F-20-21-22-23-24-25-26-27-28-29-2A-2B-2C-2D-2E-2F-30-31-32-33-34-35-36-37-38-39-3A-3B-3C-3D-3E-3F
-HEADER
-        dgramSeqNo=1
-        ds=127.0.0.1>2:1000
-        fsSeqNo=5
-        in_vlan=0
-        in_priority=0
-        out_vlan=0
-        out_priority=0
-        meanSkip=1
-        samplePool=5
-        dropEvents=0
-        in_ifindex=1003
-        in_format=0
-        out_ifindex=1004
-        out_format=0
-        hdr_prot=1
-        pkt_len=58
-        stripped=4
-        hdr_len=54
-        hdr=50-54-00-00-00-05-50-54-00-00-00-07-86-DD-67-00-00-00-00-00-0A-80-FE-80-00-00-00-00-00-00-00-00-00-00-00-00-00-01-FE-80-00-00-00-00-00-00-00-00-00-00-00-00-00-02
-])
-
-  AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'ETHCOUNTERS|IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -24 | sed 's/ /\
-        /g' | sed 's/\(.*\)ds=\[::1\]\(.*\)/\1ds=127.0.0.1\2/g' ]], [0], [dnl
-ETHCOUNTERS
-        dot3StatsAlignmentErrors=4294967295
-        dot3StatsFCSErrors=4294967295
-        dot3StatsSingleCollisionFrames=4294967295
-        dot3StatsMultipleCollisionFrames=4294967295
-        dot3StatsSQETestErrors=4294967295
-        dot3StatsDeferredTransmissions=4294967295
-        dot3StatsLateCollisions=4294967295
-        dot3StatsExcessiveCollisions=4294967295
-        dot3StatsInternalMacTransmitErrors=4294967295
-        dot3StatsCarrierSenseErrors=4294967295
-        dot3StatsFrameTooLongs=4294967295
-        dot3StatsInternalMacReceiveErrors=4294967295
-        dot3StatsSymbolErrors=4294967295
-ETHCOUNTERS
-        dot3StatsAlignmentErrors=4294967295
-        dot3StatsFCSErrors=4294967295
-        dot3StatsSingleCollisionFrames=4294967295
-        dot3StatsMultipleCollisionFrames=4294967295
-        dot3StatsSQETestErrors=4294967295
-        dot3StatsDeferredTransmissions=4294967295
-        dot3StatsLateCollisions=4294967295
-        dot3StatsExcessiveCollisions=4294967295
-        dot3StatsInternalMacTransmitErrors=4294967295
-        dot3StatsCarrierSenseErrors=4294967295
-        dot3StatsFrameTooLongs=4294967295
-        dot3StatsInternalMacReceiveErrors=4294967295
-        dot3StatsSymbolErrors=4294967295
-ETHCOUNTERS
-        dot3StatsAlignmentErrors=4294967295
-        dot3StatsFCSErrors=4294967295
-        dot3StatsSingleCollisionFrames=4294967295
-        dot3StatsMultipleCollisionFrames=4294967295
-        dot3StatsSQETestErrors=4294967295
-        dot3StatsDeferredTransmissions=4294967295
-        dot3StatsLateCollisions=4294967295
-        dot3StatsExcessiveCollisions=4294967295
-        dot3StatsInternalMacTransmitErrors=4294967295
-        dot3StatsCarrierSenseErrors=4294967295
-        dot3StatsFrameTooLongs=4294967295
-        dot3StatsInternalMacReceiveErrors=4294967295
-        dot3StatsSymbolErrors=4294967295
-ETHCOUNTERS
-        dot3StatsAlignmentErrors=4294967295
-        dot3StatsFCSErrors=4294967295
-        dot3StatsSingleCollisionFrames=4294967295
-        dot3StatsMultipleCollisionFrames=4294967295
-        dot3StatsSQETestErrors=4294967295
-        dot3StatsDeferredTransmissions=4294967295
-        dot3StatsLateCollisions=4294967295
-        dot3StatsExcessiveCollisions=4294967295
-        dot3StatsInternalMacTransmitErrors=4294967295
-        dot3StatsCarrierSenseErrors=4294967295
-        dot3StatsFrameTooLongs=4294967295
-        dot3StatsInternalMacReceiveErrors=4294967295
-        dot3StatsSymbolErrors=4294967295
-ETHCOUNTERS
-        dot3StatsAlignmentErrors=4294967295
-        dot3StatsFCSErrors=4294967295
-        dot3StatsSingleCollisionFrames=4294967295
-        dot3StatsMultipleCollisionFrames=4294967295
-        dot3StatsSQETestErrors=4294967295
-        dot3StatsDeferredTransmissions=4294967295
-        dot3StatsLateCollisions=4294967295
-        dot3StatsExcessiveCollisions=4294967295
-        dot3StatsInternalMacTransmitErrors=4294967295
-        dot3StatsCarrierSenseErrors=4294967295
-        dot3StatsFrameTooLongs=4294967295
-        dot3StatsInternalMacReceiveErrors=4294967295
-        dot3StatsSymbolErrors=4294967295
-ETHCOUNTERS
-        dot3StatsAlignmentErrors=4294967295
-        dot3StatsFCSErrors=4294967295
-        dot3StatsSingleCollisionFrames=4294967295
-        dot3StatsMultipleCollisionFrames=4294967295
-        dot3StatsSQETestErrors=4294967295
-        dot3StatsDeferredTransmissions=4294967295
-        dot3StatsLateCollisions=4294967295
-        dot3StatsExcessiveCollisions=4294967295
-        dot3StatsInternalMacTransmitErrors=4294967295
-        dot3StatsCarrierSenseErrors=4294967295
-        dot3StatsFrameTooLongs=4294967295
-        dot3StatsInternalMacReceiveErrors=4294967295
-        dot3StatsSymbolErrors=4294967295
-IFCOUNTERS
-        dgramSeqNo=1
-        ds=127.0.0.1>0:1003
-        csSeqNo=1
-        ifindex=1003
-        type=6
-        ifspeed=100000000
-        direction=0
-        status=3
-        in_octets=202
-        in_unicasts=3
-        in_multicasts=4294967295
-        in_broadcasts=4294967295
-        in_discards=4294967295
-        in_errors=4294967295
-        in_unknownprotos=4294967295
-        out_octets=148
-        out_unicasts=2
-        out_multicasts=4294967295
-        out_broadcasts=4294967295
-        out_discards=4294967295
-        out_errors=4294967295
-        promiscuous=0
-IFCOUNTERS
-        dgramSeqNo=1
-        ds=127.0.0.1>0:1004
-        csSeqNo=1
-        ifindex=1004
-        type=6
-        ifspeed=100000000
-        direction=0
-        status=3
-        in_octets=148
-        in_unicasts=2
-        in_multicasts=4294967295
-        in_broadcasts=4294967295
-        in_discards=4294967295
-        in_errors=4294967295
-        in_unknownprotos=4294967295
-        out_octets=202
-        out_unicasts=3
-        out_multicasts=4294967295
-        out_broadcasts=4294967295
-        out_discards=4294967295
-        out_errors=4294967295
-        promiscuous=0
-IFCOUNTERS
-        dgramSeqNo=2
-        ds=127.0.0.1>0:1002
-        csSeqNo=1
-        ifindex=1002
-        type=6
-        ifspeed=100000000
-        direction=0
-        status=3
-        in_octets=0
-        in_unicasts=0
-        in_multicasts=4294967295
-        in_broadcasts=4294967295
-        in_discards=4294967295
-        in_errors=4294967295
-        in_unknownprotos=4294967295
-        out_octets=84
-        out_unicasts=2
-        out_multicasts=4294967295
-        out_broadcasts=4294967295
-        out_discards=4294967295
-        out_errors=4294967295
-        promiscuous=0
-IFCOUNTERS
-        dgramSeqNo=3
-        ds=127.0.0.1>0:1002
-        csSeqNo=2
-        ifindex=1002
-        type=6
-        ifspeed=100000000
-        direction=0
-        status=3
-        in_octets=0
-        in_unicasts=0
-        in_multicasts=4294967295
-        in_broadcasts=4294967295
-        in_discards=4294967295
-        in_errors=4294967295
-        in_unknownprotos=4294967295
-        out_octets=84
-        out_unicasts=2
-        out_multicasts=4294967295
-        out_broadcasts=4294967295
-        out_discards=4294967295
-        out_errors=4294967295
-        promiscuous=0
-IFCOUNTERS
-        dgramSeqNo=3
-        ds=127.0.0.1>0:1003
-        csSeqNo=2
-        ifindex=1003
-        type=6
-        ifspeed=100000000
-        direction=0
-        status=3
-        in_octets=202
-        in_unicasts=3
-        in_multicasts=4294967295
-        in_broadcasts=4294967295
-        in_discards=4294967295
-        in_errors=4294967295
-        in_unknownprotos=4294967295
-        out_octets=148
-        out_unicasts=2
-        out_multicasts=4294967295
-        out_broadcasts=4294967295
-        out_discards=4294967295
-        out_errors=4294967295
-        promiscuous=0
-IFCOUNTERS
-        dgramSeqNo=3
-        ds=127.0.0.1>0:1004
-        csSeqNo=2
-        ifindex=1004
-        type=6
-        ifspeed=100000000
-        direction=0
-        status=3
-        in_octets=148
-        in_unicasts=2
-        in_multicasts=4294967295
-        in_broadcasts=4294967295
-        in_discards=4294967295
-        in_errors=4294967295
-        in_unknownprotos=4294967295
-        out_octets=202
-        out_unicasts=3
-        out_multicasts=4294967295
-        out_broadcasts=4294967295
-        out_discards=4294967295
-        out_errors=4294967295
-        promiscuous=0
-OPENFLOWPORT
-        datapath_id=18364758544493064720
-        port_no=1
-OPENFLOWPORT
-        datapath_id=18364758544493064720
-        port_no=1
-OPENFLOWPORT
-        datapath_id=18364758544493064720
-        port_no=2
-OPENFLOWPORT
-        datapath_id=18364758544493064720
-        port_no=2
-OPENFLOWPORT
-        datapath_id=18364758544493064720
-        port_no=65534
-OPENFLOWPORT
-        datapath_id=18364758544493064720
-        port_no=65534
-PORTNAME
-        portName=br0
-PORTNAME
-        portName=br0
-PORTNAME
-        portName=p1
-PORTNAME
-        portName=p1
-PORTNAME
-        portName=p2
-PORTNAME
-        portName=p2
-])])
-
-AT_SETUP([ofproto-dpif - basic truncate action])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3 4 5
-
-AT_CHECK([ovs-vsctl -- set Interface p1 type=dummy options:pcap=p1.pcap])
-AT_CHECK([ovs-vsctl -- set Interface p2 type=dummy options:pstream=punix:p2.sock])
-AT_CHECK([ovs-vsctl -- set Interface p3 type=dummy   options:stream=unix:p2.sock])
-AT_CHECK([ovs-vsctl -- set Interface p4 type=dummy options:pstream=punix:p4.sock])
-AT_CHECK([ovs-vsctl -- set Interface p5 type=dummy   options:stream=unix:p4.sock])
-
-AT_DATA([flows.txt], [dnl
-in_port=3,actions=drop
-in_port=5,actions=drop
-in_port=1,actions=output(port=2,max_len=64),output:4
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-dnl Datapath actions
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-[Datapath actions: trunc(64),2,4
-])
-
-dnl An 170 byte packet
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '000c29c8a0a4005056c0000808004500009cb4a6000040019003c0a8da01c0a8da640800cb5fa762000556f431ad0009388e08090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f'])
-
-AT_CHECK([ovs-ofctl parse-pcap p1.pcap], [0], [dnl
-icmp,in_port=ANY,vlan_tci=0x0000,dl_src=00:50:56:c0:00:08,dl_dst=00:0c:29:c8:a0:a4,nw_src=192.168.218.1,nw_dst=192.168.218.100,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-dnl packet with truncated size
-AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=3" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=64
-])
-dnl packet with original size
-AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=5" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=170
-])
-
-dnl More complicated case
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_DATA([flows.txt], [dnl
-in_port=3,actions=drop
-in_port=5,actions=drop
-in_port=1,actions=output(port=2,max_len=64),output(port=2,max_len=128),output(port=4,max_len=60),output:2,output:4
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-dnl Datapath actions
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-[Datapath actions: trunc(64),2,trunc(128),2,trunc(60),4,2,4
-])
-
-dnl An 170 byte packet
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '000c29c8a0a4005056c0000808004500009cb4a6000040019003c0a8da01c0a8da640800cb5fa762000556f431ad0009388e08090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f'])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-dnl packet size: 64 + 128 + 170 = 362
-AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=3" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=362
-])
-dnl packet size: 60 + 170 = 230
-AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=5" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=230
-])
-
-dnl syntax checking
-AT_CHECK([ovs-ofctl add-flow br0 'actions=output(port=ALL,max_len=100)'], [1], [], [dnl
-ovs-ofctl: output to unsupported truncate port: ALL
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - truncate and output to patch port])
-OVS_VSWITCHD_START([add-br br1 \
--- set bridge br1 datapath-type=dummy fail-mode=secure \
--- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 ofport_request=1 \
--- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
-
-add_of_ports br0 2
-
-AT_CHECK([ovs-ofctl add-flow br0 actions='output(port=1,max_len=100),output:2'])
-AT_CHECK([ovs-ofctl add-flow br1 actions=NORMAL])
-
-AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
-[0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
-])
-dnl the output(port=1,max_len=100) fails the translation, only output:2 in datapath
-AT_CHECK([grep "output_trunc does not support patch port [[0-9]]*" stdout], [0], [stdout])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - truncate and output to gre tunnel])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
-                    options:remote_ip=1.1.1.1 options:local_ip=2.2.2.2 \
-                    options:key=5 ofport_request=1\
-                    -- add-port br0 p2 -- set Interface p2 type=dummy \
-                    ofport_request=2])
-AT_DATA([flows.txt], [dnl
-actions=output(max_len=100, port=1)
-])
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (gre: key=5, local_ip=2.2.2.2, remote_ip=1.1.1.1)
-    p2 2/2: (dummy)
-])
-
-dnl Basic
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: trunc(100),set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,ttl=64,flags(df|key))),1
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - sFlow packet sampling - IPv4 collector])
-CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1])
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - sFlow packet sampling - IPv6 collector])
-AT_SKIP_IF([test $HAVE_IPV6 = no])
-CHECK_SFLOW_SAMPLING_PACKET([[[::1]]])
-AT_CLEANUP
-
-dnl Test sFlow LAG structures
-AT_SETUP([ofproto-dpif - sFlow packet sampling - LACP structures])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-OVS_VSWITCHD_START([dnl
-                    add-bond br0 bond p1 p2 --                          \
-                    set Port bond lacp=active bond-mode=active-backup   \
-                    other_config:lacp-time="fast"                       \
-                    other_config:lacp-system-id=11:22:33:44:55:66       \
-                    other_config:lacp-system-priority=54321 --          \
-                    set Interface p1 type=dummy                         \
-                    other_config:lacp-port-id=11                        \
-                    other_config:lacp-port-priority=111                 \
-                    other_config:lacp-aggregation-key=3333 --           \
-                    set Interface p2 type=dummy                         \
-                    other_config:lacp-port-id=22                        \
-                    other_config:lacp-port-priority=222                 \
-                    other_config:lacp-aggregation-key=3333 ])
-
-on_exit 'kill `cat test-sflow.pid`'
-AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
-AT_CAPTURE_FILE([sflow.log])
-PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
-
-ovs-appctl time/stop
-
-ovs-vsctl \
-      set Interface p1 options:ifindex=1003 --                  \
-      set Bridge br0 sflow=@sf --                               \
-      --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\"   \
-      header=128 sampling=1 polling=1 agent=127.0.0.1
-
-dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
-AT_CHECK([ovs-appctl time/warp 2000 100], [0], [ignore])
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-OVS_VSWITCHD_STOP(["/failed to get flags for network device 127.0.0.1/d"])
-OVS_APP_EXIT_AND_WAIT([test-sflow])
-AT_CHECK([[sort sflow.log | $EGREP 'LACPCOUNTERS|ERROR' | head -n 1 | sed 's/ /\
-        /g']], [0], [dnl
-LACPCOUNTERS
-        sysID=11:22:33:44:55:66
-        partnerID=00:00:00:00:00:00
-        aggID=3333
-        actorAdmin=0x7
-        actorOper=0xbf
-        partnerAdmin=0x0
-        partnerOper=0x2
-        LACPDUsRx=0
-        markerPDUsRx=4294967295
-        markerRespPDUsRx=4294967295
-        unknownRx=4294967295
-        illegalRx=0
-        LACPDUsTx=1
-        markerPDUsTx=4294967295
-        markerRespPDUsTx=4294967295
-])
-
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - sFlow packet sampling - tunnel set])
-AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
-OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
-
-dnl set up sFlow logging
-AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
-AT_CAPTURE_FILE([sflow.log])
-PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
-ovs-appctl time/stop
-
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-AT_CHECK([ovs-vsctl add-port br0 gre0 -- set Interface gre0 type=gre \
-                    options:remote_ip=1.1.1.1 options:key=456 ofport_request=3])
-AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy ofport_request=4])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=3])
-
-dnl enable sflow
-ovs-vsctl \
-   set Bridge br0 sflow=@sf -- \
-   --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" agent=127.0.0.1 \
-     header=128 sampling=1 polling=0
-
-dnl introduce a packet that will be flooded to the tunnel
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(4),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'])
-
-dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
-for i in `seq 1 30`; do
-    ovs-appctl time/warp 100
-done
-
-OVS_APP_EXIT_AND_WAIT([test-sflow])
-
-AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
-        /g']], [0], [dnl
-HEADER
-        dgramSeqNo=1
-        ds=127.0.0.1>2:1000
-        fsSeqNo=1
-        tunnel4_out_length=0
-        tunnel4_out_protocol=47
-        tunnel4_out_src=0.0.0.0
-        tunnel4_out_dst=1.1.1.1
-        tunnel4_out_src_port=0
-        tunnel4_out_dst_port=0
-        tunnel4_out_tcp_flags=0
-        tunnel4_out_tos=1
-        tunnel_out_vni=456
-        in_vlan=0
-        in_priority=0
-        out_vlan=0
-        out_priority=0
-        meanSkip=1
-        samplePool=1
-        dropEvents=0
-        in_ifindex=0
-        in_format=0
-        out_ifindex=1
-        out_format=2
-        hdr_prot=1
-        pkt_len=110
-        stripped=4
-        hdr_len=106
-        hdr=50-54-00-00-00-0A-50-54-00-00-00-09-08-00-45-01-00-5C-00-00-00-00-80-01-12-8A-0A-0A-0A-02-0A-0A-0A-01-08-00-13-FC-00-00-00-00-00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F-10-11-12-13-14-15-16-17-18-19-1A-1B-1C-1D-1E-1F-20-21-22-23-24-25-26-27-28-29-2A-2B-2C-2D-2E-2F-30-31-32-33-34-35-36-37-38-39-3A-3B-3C-3D-3E-3F
-])
-
-OVS_VSWITCHD_STOP(["/failed to get flags for network device 127.0.0.1/d"])
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - sFlow packet sampling - tunnel push])
-AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
-
-OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 options:ifindex=1010])
-
-dnl set up sFlow logging
-AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
-AT_CAPTURE_FILE([sflow.log])
-PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
-ovs-appctl time/stop
-
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-AT_CHECK([ovs-vsctl add-br int-br -- set bridge int-br datapath_type=dummy], [0])
-AT_CHECK([ovs-vsctl -- add-port int-br t1 -- set Interface t1 type=gre \
-                       options:remote_ip=1.1.2.92 options:key=456 ofport_request=4\
-                    -- add-port int-br vm1 -- set Interface vm1 type=dummy \
-                       options:ifindex=2011 ofport_request=5
-                       ], [0])
-
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p0 1/1: (dummy: ifindex=1010)
-  int-br:
-    int-br 65534/2: (dummy-internal)
-    t1 4/4: (gre: key=456, remote_ip=1.1.2.92)
-    vm1 5/3: (dummy: ifindex=2011)
-])
-
-dnl set up route to 1.1.2.92 via br0 and action=normal
-AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 1.1.2.88/24], [0], [OK
-])
-AT_CHECK([ovs-appctl ovs/route/add 1.1.2.92/24 br0], [0], [OK
-])
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-
-dnl Prime ARP Cache for 1.1.2.92
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(1),eth(src=f8:bc:12:44:34:b6,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b6,tha=00:00:00:00:00:00)'])
-
-dnl configure sflow on int-br only
-ovs-vsctl \
-   set Bridge int-br sflow=@sf -- \
-   --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" agent=127.0.0.1 \
-     header=128 sampling=1 polling=0
-
-dnl set up route to 192.168.1.2 via br0
-AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 192.168.1.1/16], [0], [OK
-])
-AT_CHECK([ovs-appctl ovs/route/add 192.168.0.0/16 br0], [0], [OK
-])
-
-dnl add rule for int-br to force packet onto tunnel. There is no ifindex
-dnl for this port so the sFlow output will just report that it went to
-dnl 1 output (out_format=2, out_ifindex=1)
-AT_CHECK([ovs-ofctl add-flow int-br "actions=4"])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive vm1 'in_port(3),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=192.168.1.1,dst=192.168.2.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'])
-
-dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
-for i in `seq 1 30`; do
-    ovs-appctl time/warp 100
-done
-
-OVS_APP_EXIT_AND_WAIT([test-sflow])
-
-AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
-        /g']], [0], [dnl
-HEADER
-        dgramSeqNo=1
-        ds=127.0.0.1>2:1000
-        fsSeqNo=1
-        tunnel4_out_length=0
-        tunnel4_out_protocol=47
-        tunnel4_out_src=1.1.2.88
-        tunnel4_out_dst=1.1.2.92
-        tunnel4_out_src_port=0
-        tunnel4_out_dst_port=0
-        tunnel4_out_tcp_flags=0
-        tunnel4_out_tos=0
-        tunnel_out_vni=456
-        in_vlan=0
-        in_priority=0
-        out_vlan=0
-        out_priority=0
-        meanSkip=1
-        samplePool=1
-        dropEvents=0
-        in_ifindex=2011
-        in_format=0
-        out_ifindex=1
-        out_format=2
-        hdr_prot=1
-        pkt_len=110
-        stripped=4
-        hdr_len=106
-        hdr=50-54-00-00-00-0A-50-54-00-00-00-05-08-00-45-00-00-5C-00-00-00-00-80-01-B6-4D-C0-A8-01-01-C0-A8-02-02-08-00-13-FC-00-00-00-00-00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F-10-11-12-13-14-15-16-17-18-19-1A-1B-1C-1D-1E-1F-20-21-22-23-24-25-26-27-28-29-2A-2B-2C-2D-2E-2F-30-31-32-33-34-35-36-37-38-39-3A-3B-3C-3D-3E-3F
-])
-
-OVS_VSWITCHD_STOP(["/failed to get flags for network device 127.0.0.1/d"])
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - sFlow packet sampling - MPLS])
-AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_DATA([flows.txt], [dnl
-table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,set_mpls_label:789,set_mpls_tc:4,set_mpls_ttl:32,2
-table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-dnl set up sFlow logging
-AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
-AT_CAPTURE_FILE([sflow.log])
-PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
-ovs-appctl time/stop
-
-dnl configure sflow
-ovs-vsctl \
-   set Bridge br0 sflow=@sf -- \
-   --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" agent=127.0.0.1 \
-     header=128 sampling=1 polling=0
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800)'])
-
-dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
-for i in `seq 1 30`; do
-    ovs-appctl time/warp 100
-done
-
-OVS_APP_EXIT_AND_WAIT([test-sflow])
-
-AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
-        /g']], [0], [dnl
-HEADER
-        dgramSeqNo=1
-        ds=127.0.0.1>2:1000
-        fsSeqNo=1
-        mpls_label_0=789
-        mpls_tc_0=4
-        mpls_ttl_0=32
-        mpls_bos_0=0
-        mpls_label_1=11
-        mpls_tc_1=3
-        mpls_ttl_1=64
-        mpls_bos_1=1
-        in_vlan=0
-        in_priority=0
-        out_vlan=0
-        out_priority=0
-        meanSkip=1
-        samplePool=1
-        dropEvents=0
-        in_ifindex=0
-        in_format=0
-        out_ifindex=1
-        out_format=2
-        hdr_prot=1
-        pkt_len=22
-        stripped=4
-        hdr_len=18
-        hdr=50-54-00-00-00-0A-50-54-00-00-00-09-88-47-00-00-B7-40
-HEADER
-        dgramSeqNo=1
-        ds=127.0.0.1>2:1000
-        fsSeqNo=2
-        mpls_label_0=789
-        mpls_tc_0=4
-        mpls_ttl_0=32
-        mpls_bos_0=1
-        in_vlan=0
-        in_priority=0
-        out_vlan=0
-        out_priority=0
-        meanSkip=1
-        samplePool=2
-        dropEvents=0
-        in_ifindex=0
-        in_format=0
-        out_ifindex=1
-        out_format=2
-        hdr_prot=1
-        pkt_len=38
-        stripped=4
-        hdr_len=34
-        hdr=50-54-00-00-00-0A-50-54-00-00-00-09-08-00-45-00-00-14-00-00-00-00-00-00-BA-EB-00-00-00-00-00-00-00-00
-])
-
-OVS_VSWITCHD_STOP(["/failed to get flags for network device 127.0.0.1/d"])
-AT_CLEANUP
-
-
-# CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR)
-#
-# Test that basic NetFlow reports flow statistics correctly:
-# The initial packet of a flow are correctly accounted.
-# Later packets within a flow are correctly accounted.
-# Flow actions changing (in this case, due to MAC learning)
-# cause a record to be sent.
-m4_define([CHECK_NETFLOW_EXPIRATION],
-  [OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
-  add_of_ports br0 1 2
-
-  ovs-appctl time/stop
-  on_exit 'kill `cat test-netflow.pid`'
-  AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
-  AT_CAPTURE_FILE([netflow.log])
-  PARSE_LISTENING_PORT([test-netflow.log], [NETFLOW_PORT])
-
-  ovs-vsctl \
-     set Bridge br0 netflow=@nf -- \
-     --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
-       engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
-
-  for delay in 1000 30000; do
-      ovs-appctl netdev-dummy/receive p1 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'
-      sleep 1  # ensure the order in which these two packets are processed
-      ovs-appctl netdev-dummy/receive p2 'in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)'
-
-      ovs-appctl time/warp $delay
-  done
-
-  ovs-appctl time/warp 6000
-  ovs-appctl revalidator/wait
-  OVS_VSWITCHD_STOP
-  OVS_APP_EXIT_AND_WAIT([test-netflow])
-
-  AT_CHECK([test `grep "192.168.0.1 > 192.168.0.2, if 1 > 65535, 1 pkts, 106 bytes, ICMP 8:0" netflow.log | wc -l` -eq 1])
-
-  AT_CHECK([test `grep "192.168.0.1 > 192.168.0.2, if 1 > 2, 1 pkts, 106 bytes, ICMP 8:0" netflow.log | wc -l` -eq 1])
-
-  combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 212 bytes, ICMP 0:0" netflow.log | wc -l`
-  separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 106 bytes, ICMP 0:0" netflow.log | wc -l`
-  AT_CHECK([test $separate = 2 || test $combined = 1], [0])])
-
-AT_SETUP([ofproto-dpif - NetFlow flow expiration - IPv4 collector])
-CHECK_NETFLOW_EXPIRATION([127.0.0.1])
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - NetFlow flow expiration - IPv6 collector])
-AT_SKIP_IF([test $HAVE_IPV6 = no])
-CHECK_NETFLOW_EXPIRATION([[[::1]]])
-AT_CLEANUP
-
-# CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR)
-#
-# Test that basic NetFlow reports active expirations correctly.
-m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],
-  [OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
-  add_of_ports br0 1 2
-
-  on_exit 'kill `cat test-netflow.pid`'
-  AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
-  AT_CAPTURE_FILE([netflow.log])
-  PARSE_LISTENING_PORT([test-netflow.log], [NETFLOW_PORT])
-
-  ovs-vsctl \
-     set Bridge br0 netflow=@nf -- \
-     --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
-       engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
-
-  AT_CHECK([ovs-appctl time/stop])
-  n=1
-  while test $n -le 60; do
-      n=`expr $n + 1`
-
-      ovs-appctl netdev-dummy/receive p1 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=1234,dst=80)'
-      ovs-appctl netdev-dummy/receive p2 'in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=80,dst=1234)'
-
-      ovs-appctl time/warp 1000
-  done
-
-  ovs-appctl time/warp 10000
-
-  ovs-appctl revalidator/wait
-  OVS_VSWITCHD_STOP
-  OVS_APP_EXIT_AND_WAIT([test-netflow])
-
-  # Count the number of reported packets:
-  # - From source to destination before MAC learning kicks in (just one).
-  # - From source to destination after that.
-  # - From destination to source.
-  n_learn=0
-  n_in=0
-  n_out=0
-  n_other=0
-  n_recs=0
-  none=0
-  while read line; do
-      pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'`
-      case $pkts in
-           [[0-9]]*) ;;
-       *) continue ;;
-      esac
-
-      case $line in
-          "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
-              counter=n_learn
-          ;;
-      "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
-          counter=n_in
-          ;;
-      "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*)
-          counter=n_out
-          ;;
-      *)
-          counter=n_other
-          ;;
-      esac
-      eval $counter=\`expr \$$counter + \$pkts\`
-      n_recs=`expr $n_recs + 1`
-  done < netflow.log
-
-  # There should be exactly 1 MAC learning packet,
-  # exactly 59 other packets in that direction,
-  # and exactly 60 packets in the other direction.
-  AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
-])])
-
-AT_SETUP([ofproto-dpif - NetFlow active expiration - IPv4 collector])
-CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1])
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - NetFlow active expiration - IPv6 collector])
-AT_SKIP_IF([test $HAVE_IPV6 = no])
-CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]])
-AT_CLEANUP
-
-dnl In the absence of an IPFIX collector to verify protocol correctness, simply
-dnl configure bridge IPFIX and ensure that sample action generation works at the
-dnl datapath level.
-AT_SETUP([ofproto-dpif - Bridge IPFIX sanity check])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-
-dnl Sample every packet using bridge-based sampling.
-AT_CHECK([ovs-vsctl -- set bridge br0 ipfix=@fix -- \
-                    --id=@fix create ipfix targets=\"127.0.0.1:4739\" \
-                              sampling=1], [0], [ignore])
-
-dnl Send some packets that should be sampled.
-for i in `seq 1 3`; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800)'])
-done
-AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
-flow-dump from non-dpdk interfaces:
-packets:2, bytes:68, used:0.001s, actions:userspace(pid=0,ipfix(output_port=4294967295))
-])
-
-AT_CHECK([ovs-appctl revalidator/purge])
-dnl
-dnl Add a slowpath meter. The userspace action should be metered.
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-meter br0 'meter=slowpath pktps burst stats bands=type=drop rate=3 burst_size=1'])
-
-dnl Send some packets that should be sampled and metered.
-for i in `seq 1 3`; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800)'])
-done
-AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
-flow-dump from non-dpdk interfaces:
-packets:2, bytes:68, used:0.001s, actions:sample(sample=100.0%,actions(meter(0),userspace(pid=0,ipfix(output_port=4294967295))))
-])
-
-dnl Remove the IPFIX configuration.
-AT_CHECK([ovs-vsctl clear bridge br0 ipfix])
-AT_CHECK([ovs-appctl revalidator/purge])
-
-dnl Send some more packets, to ensure that these are not sampled.
-for i in `seq 1 3`; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800)'])
-done
-AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
-flow-dump from non-dpdk interfaces:
-packets:2, bytes:68, used:0.001s, actions:drop
-])
-
-OVS_VSWITCHD_STOP(["/sending to collector failed/d"])
-AT_CLEANUP
-
-dnl Bridge IPFIX statistics check
-AT_SETUP([ofproto-dpif - Bridge IPFIX statistics check])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-
-dnl Negative test check.
-AT_CHECK([ovs-ofctl dump-ipfix-bridge br0], [0], [dnl
-OFPT_ERROR (xid=0x2): NXST_NOT_CONFIGURED
-NXST_IPFIX_BRIDGE request (xid=0x2):
-])
-
-dnl Sample every packet using bridge-based sampling.
-AT_CHECK([ovs-vsctl -- set bridge br0 ipfix=@fix -- \
-                    --id=@fix create ipfix targets=\"127.0.0.1:4739\" \
-                              sampling=1], [0], [ignore])
-
-dnl Send some packets that should be sampled.
-for i in `seq 1 20`; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800)'])
-done
-
-dnl There are 4 extra IPFIX template packets.
-AT_CHECK([ovs-ofctl dump-ipfix-bridge br0 | sed 's/tx pkts=[[0-9]]*/tx pkts=24/' | sed 's/tx errs=[[0-9]]*/tx errs=0/'], [0], [dnl
-NXST_IPFIX_BRIDGE reply (xid=0x2):
-  bridge ipfix: flows=20, current flows=0, sampled pkts=20, ipv4 ok=0, ipv6 ok=0, tx pkts=24
-                pkts errs=20, ipv4 errs=20, ipv6 errs=0, tx errs=0
-])
-
-dnl Remove the IPFIX configuration.
-AT_CHECK([ovs-vsctl clear bridge br0 ipfix])
-AT_CHECK([ovs-appctl revalidator/purge])
-
-dnl Send some more packets, to ensure that these are not sampled.
-for i in `seq 1 2`; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800)'])
-done
-AT_CHECK([ovs-ofctl dump-ipfix-bridge br0], [0], [dnl
-OFPT_ERROR (xid=0x2): NXST_NOT_CONFIGURED
-NXST_IPFIX_BRIDGE request (xid=0x2):
-])
-
-OVS_VSWITCHD_STOP(["/sending to collector failed/d"])
-AT_CLEANUP
-
-dnl Flow IPFIX sanity check
-AT_SETUP([ofproto-dpif - Flow IPFIX sanity check])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-
-# Check for regression against a bug where an invalid target caused an
-# assertion failure and a crash.
-AT_CHECK([ovs-vsctl -- --id=@br0 get Bridge br0 \
-                    -- --id=@ipfix create IPFIX targets=\"xyzzy\" \
-                    -- --id=@cs create Flow_Sample_Collector_Set id=0 bridge=@br0 ipfix=@ipfix],
-         [0], [ignore])
-
-AT_CHECK([ovs-vsctl -- --id=@br0 get Bridge br0 \
-                    -- --id=@ipfix create IPFIX targets=\"127.0.0.1:4739\" \
-                    -- --id=@cs create Flow_Sample_Collector_Set id=1 bridge=@br0 ipfix=@ipfix],
-         [0], [ignore])
-
-AT_DATA([flows.txt], [dnl
-in_port=1, actions=sample(probability=65535,collector_set_id=1),output:2
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt], [0], [ignore])
-
-dnl Send some packets that should be sampled.
-for i in `seq 1 3`; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800)'])
-done
-AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
-flow-dump from non-dpdk interfaces:
-packets:2, bytes:68, used:0.001s, actions:userspace(pid=0,flow_sample(probability=65535,collector_set_id=1,obs_domain_id=0,obs_point_id=0,output_port=4294967295)),2
-])
-
-dnl Remove the flow which contains sample action.
-AT_CHECK([ovs-ofctl del-flows br0 in_port=1], [0], [ignore])
-AT_CHECK([ovs-appctl revalidator/purge])
-
-dnl Send some more packets, to ensure that these are not sampled.
-for i in `seq 1 3`; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800)'])
-done
-AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
-flow-dump from non-dpdk interfaces:
-packets:2, bytes:68, used:0.001s, actions:drop
-])
-
-OVS_VSWITCHD_STOP(["/sending to collector failed/d
-/xyzzy/d
-/no collectors/d"])
-AT_CLEANUP
-
-dnl Flow IPFIX sanity check for tunnel set
-AT_SETUP([ofproto-dpif - Flow IPFIX sanity check - tunnel set])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
-                    options:remote_ip=1.1.1.1 options:local_ip=2.2.2.2 \
-                    options:key=5 ofport_request=1\
-                    -- add-port br0 p2 -- set Interface p2 type=stt \
-                    options:remote_ip=1.1.1.2 options:local_ip=2.2.2.3 \
-                    options:key=6 ofport_request=2\
-                    -- add-port br0 p3 -- set Interface p3 type=dummy \
-                    ofport_request=3 \
-                    -- --id=@br0 get Bridge br0 \
-                    -- --id=@ipfix create IPFIX targets=\"127.0.0.1:4739\" \
-                    -- --id=@cs create Flow_Sample_Collector_Set id=1 bridge=@br0 ipfix=@ipfix],
-                   [<0>
-<1>
-])
-
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-
-dnl Add openflow sample action without sampling_port.
-AT_DATA([flows.txt], [dnl
-in_port=3, actions=sample(probability=65535,collector_set_id=1),output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt], [0], [ignore])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: userspace(pid=0,flow_sample(probability=65535,collector_set_id=1,obs_domain_id=0,obs_point_id=0,output_port=4294967295)),set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,tos=0x1,ttl=64,flags(df|key))),1
-])
-
-dnl Remove the flow which contains sample action.
-AT_CHECK([ovs-ofctl del-flows br0 in_port=3], [0], [ignore])
-AT_CHECK([ovs-appctl revalidator/purge])
-
-dnl Add openflow sample action with sampling_port which is
-dnl equal to output port.
-AT_DATA([flows2.txt], [dnl
-in_port=3, actions=sample(probability=65535,collector_set_id=1,sampling_port=1),output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows2.txt], [0], [ignore])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-dnl Make sure flow sample action in datapath is behind set tunnel
-dnl action at egress point of tunnel port.
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,tos=0x1,ttl=64,flags(df|key))),userspace(pid=0,flow_sample(probability=65535,collector_set_id=1,obs_domain_id=0,obs_point_id=0,output_port=1),tunnel_out_port=1),1
-])
-
-dnl Remove the flow which contains sample action.
-AT_CHECK([ovs-ofctl del-flows br0 in_port=3], [0], [ignore])
-AT_CHECK([ovs-appctl revalidator/purge])
-
-dnl Add a rule with two sample actions and each sample action
-dnl has a sampling_port
-AT_DATA([flows3.txt], [dnl
-in_port=3, actions=sample(probability=65535,collector_set_id=1,sampling_port=1),output:1,sample(probability=65535,collector_set_id=1,sampling_port=2),output:2
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows3.txt], [0], [ignore])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-dnl Make sure flow sample action in datapath is behind set tunnel
-dnl action at egress point of tunnel port.
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,tos=0x1,ttl=64,flags(df|key))),userspace(pid=0,flow_sample(probability=65535,collector_set_id=1,obs_domain_id=0,obs_point_id=0,output_port=1),tunnel_out_port=1),1,set(tunnel(tun_id=0x6,src=2.2.2.3,dst=1.1.1.2,tos=0x1,ttl=64,tp_dst=7471,flags(df|key))),userspace(pid=0,flow_sample(probability=65535,collector_set_id=1,obs_domain_id=0,obs_point_id=0,output_port=7471),tunnel_out_port=7471),7471
-])
-
-dnl Remove the flow which contains sample action.
-AT_CHECK([ovs-ofctl del-flows br0 in_port=3], [0], [ignore])
-AT_CHECK([ovs-vsctl destroy Flow_Sample_Collector_Set 1], [0], [ignore])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - clone action])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3 4
-
-dnl Reversible open flow clone actions, no datapath clone action should be generated.
-AT_DATA([flows.txt], [dnl
-in_port=1, ip, actions=clone(set_field:192.168.3.3->ip_src),clone(set_field:192.168.4.4->ip_dst,output:2),clone(mod_dl_src:80:81:81:81:81:81,set_field:192.168.5.5->ip_dst,output:3),output:4
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt], [0], [ignore])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: set(ipv4(dst=192.168.4.4)),2,set(eth(src=80:81:81:81:81:81)),set(ipv4(dst=192.168.5.5)),3,set(eth(src=50:54:00:00:00:09)),set(ipv4(dst=10.10.10.1)),4
-])
-
-dnl Test flow xlate openflow clone action without using datapath clone action.
-AT_CHECK([ovs-appctl dpif/set-dp-features br0 clone false], [0], [ignore])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: set(ipv4(dst=192.168.4.4)),2,set(eth(src=80:81:81:81:81:81)),set(ipv4(dst=192.168.5.5)),3,set(eth(src=50:54:00:00:00:09)),set(ipv4(dst=10.10.10.1)),4
-])
-
-AT_CHECK([ovs-appctl dpif/set-dp-features br0 sample_nesting 2], [0], [ignore])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: set(ipv4(dst=192.168.4.4)),2,set(eth(src=80:81:81:81:81:81)),set(ipv4(dst=192.168.5.5)),3,set(eth(src=50:54:00:00:00:09)),set(ipv4(dst=10.10.10.1)),4
-])
-
-dnl Mixing reversible and irreversible open flow clone actions. Datapath clone action
-dnl should be generated when necessary.
-
-dnl Restore the datapath support level.
-AT_CHECK([ovs-appctl dpif/set-dp-features br0 clone true], [0], [])
-AT_CHECK([ovs-appctl dpif/set-dp-features br0 sample_nesting 10], [0], [])
-
-AT_DATA([flows.txt], [dnl
-in_port=1, ip, actions=clone(set_field:192.168.3.3->ip_src),clone(set_field:192.168.4.4->ip_dst,output:2),clone(ct(commit),output:3),output:4
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt], [0], [ignore])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: set(ipv4(dst=192.168.4.4)),2,set(ipv4(dst=10.10.10.1)),clone(ct(commit),3),4
-])
-
-AT_CHECK([ovs-appctl dpif/set-dp-features br0 clone false], [0], [ignore])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: set(ipv4(dst=192.168.4.4)),2,set(ipv4(dst=10.10.10.1)),sample(sample=100.0%,actions(ct(commit),3)),4
-])
-
-AT_CHECK([ovs-appctl dpif/set-dp-features br0 sample_nesting 2], [0], [ignore])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: set(ipv4(dst=192.168.4.4)),2,set(ipv4(dst=10.10.10.1)),4
-])
-AT_CHECK([grep "Failed to compose clone action" stdout], [0], [ignore])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Flow based IPFIX statistics check
-AT_SETUP([ofproto-dpif - Flow IPFIX statistics check])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-
-dnl Negative test check.
-AT_CHECK([ovs-ofctl dump-ipfix-flow br0], [0], [dnl
-OFPT_ERROR (xid=0x2): NXST_NOT_CONFIGURED
-NXST_IPFIX_FLOW request (xid=0x2):
-])
-
-AT_CHECK([ovs-vsctl -- --id=@br0 get Bridge br0 \
-                    -- --id=@ipfix create IPFIX targets=\"127.0.0.1:4739\" \
-                    -- --id=@cs create Flow_Sample_Collector_Set id=1 bridge=@br0 ipfix=@ipfix],
-         [0], [ignore])
-
-AT_DATA([flows.txt], [dnl
-in_port=1, actions=sample(probability=65535,collector_set_id=1),output:2
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt], [0], [ignore])
-
-dnl Send some packets that should be sampled.
-for i in `seq 1 20`; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800)'])
-done
-
-dnl There are 4 extra IPFIX template packets.
-AT_CHECK([ovs-ofctl dump-ipfix-flow br0 | sed 's/tx pkts=[[0-9]]*/tx pkts=24/' | sed 's/tx errs=[[0-9]]*/tx errs=0/'], [0], [dnl
-NXST_IPFIX_FLOW reply (xid=0x2): 1 ids
-  id   1: flows=20, current flows=0, sampled pkts=20, ipv4 ok=0, ipv6 ok=0, tx pkts=24
-          pkts errs=20, ipv4 errs=20, ipv6 errs=0, tx errs=0
-])
-
-dnl Remove the flow which contains sample action.
-AT_CHECK([ovs-ofctl del-flows br0 in_port=1], [0], [ignore])
-AT_CHECK([ovs-vsctl destroy Flow_Sample_Collector_Set 1], [0], [ignore])
-AT_CHECK([ovs-appctl revalidator/purge])
-
-dnl Send some more packets, to ensure that these are not sampled.
-for i in `seq 1 3`; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800)'])
-done
-AT_CHECK([ovs-ofctl dump-ipfix-flow br0], [0], [dnl
-OFPT_ERROR (xid=0x2): NXST_NOT_CONFIGURED
-NXST_IPFIX_FLOW request (xid=0x2):
-])
-
-OVS_VSWITCHD_STOP(["/sending to collector failed/d"])
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - flow stats])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
-AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
-
-ovs-appctl time/stop
-
-for i in `seq 1 10`; do
-    ovs-appctl netdev-dummy/receive br0 'in_port(0),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no)'
-done
-
-AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
- cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
- cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=1180, idle_age=1, ip actions=NORMAL
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - flow stats reset_counts])
-OVS_VSWITCHD_START
-flow="ip,actions=NORMAL"
-
-ovs-appctl time/stop
-
-AT_CHECK([ovs-ofctl add-flow br0 $flow])
-
-warp_and_dump_NXM () {
-    AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
-    AT_CHECK([ovs-appctl revalidator/purge], [0])
-
-    AT_CHECK_UNQUOTED([ovs-ofctl dump-flows br0], [0], [stdout])
-    if [[ $5 -gt 0 ]]; then
-        expected=" cookie=0x0, duration=$1s, table=0, n_packets=$2, n_bytes=$3, idle_age=$4, hard_age=$5, ip actions=NORMAL"
-    else
-        expected=" cookie=0x0, duration=$1s, table=0, n_packets=$2, n_bytes=$3, idle_age=$4, ip actions=NORMAL"
-    fi
-    AT_CHECK_UNQUOTED([strip_xids < stdout | sed -n 's/duration=\([[0-9]]*\)\.*[[0-9]]*s/duration=\1s/p' | sort], [0], [dnl
-$expected
-])
-}
-
-warp_and_dump_OF () {
-    AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
-    AT_CHECK([ovs-appctl revalidator/purge], [0])
-
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 dump-flows br0], [0], [stdout])
-    if [[ $1 -lt 13 -o "$5X" = "X" ]]; then
-        expected=" cookie=0x0, duration=$2s, table=0, n_packets=$3, n_bytes=$4, ip actions=NORMAL"
-    else
-        expected=" cookie=0x0, duration=$2s, table=0, n_packets=$3, n_bytes=$4, $5 ip actions=NORMAL"
-    fi
-    AT_CHECK_UNQUOTED([strip_xids < stdout | sed -n 's/duration=\([[0-9]]*\)\.*[[0-9]]*s/duration=\1s/p' | sort], [0], [dnl
-$expected
-])
-}
-
-send_packet () {
-    ovs-appctl netdev-dummy/receive br0 'in_port(0),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no)'
-}
-
-# OpenFlow 1.0, implicit reset_counts
-send_packet
-warp_and_dump_NXM   1 1 118 1
-AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow10 add-flow br0 $flow])
-# add-flow resets duration and counts,
-# but idle age is inherited from the old flow
-warp_and_dump_NXM   1 0 0  2
-
-send_packet
-warp_and_dump_NXM   2 1 118 1
-AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow10 mod-flows br0 $flow])
-# mod-flows resets hard_age, but not counts
-# but duration and idle_age is inherited from the old flow
-warp_and_dump_NXM   3 1 118  2 1
-
-# OpenFlow 1.1, implicit reset_counts
-send_packet
-warp_and_dump_OF 11 4 2 236
-AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow11 add-flow br0 $flow])
-# add-flow resets duration and counts,
-# but idle age is inherited from the old flow
-warp_and_dump_NXM   1 0 0  2
-warp_and_dump_OF 11 2 0 0
-
-send_packet
-warp_and_dump_OF 11 3 1 118
-AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow11 mod-flows br0 $flow])
-# mod-flows resets hard_age, but not counts
-# but duration and idle_age is inherited from the old flow
-warp_and_dump_NXM   4 1 118  2 1
-warp_and_dump_OF 11 5 1 118
-
-# OpenFlow 1.2, explicit reset_counts
-send_packet
-warp_and_dump_OF 12 6 2 236
-AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow12 add-flow br0 $flow])
-# add-flow without flags resets duration, but not counts,
-# idle age is inherited from the old flow
-warp_and_dump_NXM   1 2 236  2
-warp_and_dump_OF 12 2 2 236
-
-send_packet
-warp_and_dump_OF 12 3 3 354
-AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow12 mod-flows br0 $flow])
-# mod-flows without flags does not reset duration nor counts,
-# idle age is inherited from the old flow
-warp_and_dump_NXM   4 3 354  2 1
-warp_and_dump_OF 12 5 3 354
-
-send_packet
-warp_and_dump_OF 12 6 4 472
-AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow12 add-flow br0 reset_counts,$flow])
-# add-flow with reset_counts resets both duration and counts,
-# idle age is inherited from the old flow
-warp_and_dump_NXM   1 0 0  2
-warp_and_dump_OF 12 2 0 0
-
-send_packet
-warp_and_dump_OF 12 3 1 118
-AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow12 mod-flows br0 reset_counts,$flow])
-# mod-flows with reset_counts resets counts, but not duration,
-# idle age is inherited from the old flow
-warp_and_dump_NXM   4 0 0  2 1
-warp_and_dump_OF 12 5 0 0
-
-# OpenFlow > 1.3, explicit reset_counts
-flow_mods_reset_counts () {
-    # Reset to a known state
-    AT_CHECK([ovs-ofctl add-flow br0 $flow])
-
-    send_packet
-    warp_and_dump_OF $1 1 1 118 reset_counts
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 add-flow br0 $flow])
-    # add-flow without flags resets duration, but not counts,
-    # idle age is inherited from the old flow
-    warp_and_dump_NXM   1 1 118  2
-    warp_and_dump_OF $1 2 1 118
-
-    send_packet
-    warp_and_dump_OF $1 3 2 236
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 mod-flows br0 $flow])
-    # mod-flows without flags does not reset duration nor counts,
-    # idle age is inherited from the old flow
-    warp_and_dump_NXM   4 2 236  2 1
-    warp_and_dump_OF $1 5 2 236
-
-    send_packet
-    warp_and_dump_OF $1 6 3 354
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 add-flow br0 reset_counts,$flow])
-    # add-flow with reset_counts resets both duration and counts,
-    # idle age is inherited from the old flow
-    warp_and_dump_NXM   1 0 0  2
-    warp_and_dump_OF $1 2 0 0 reset_counts
-
-    send_packet
-    warp_and_dump_OF $1 3 1 118 reset_counts
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 mod-flows br0 reset_counts,$flow])
-    # mod-flows with reset_counts resets counts, but not duration,
-    # idle age is inherited from the old flow
-    warp_and_dump_NXM   4 0 0  2 1
-    warp_and_dump_OF $1 5 0 0 reset_counts
-
-    # Modify flow having reset_counts flag without reset_counts
-    send_packet
-    warp_and_dump_OF $1 6 1 118 reset_counts
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 mod-flows br0 $flow])
-    warp_and_dump_NXM   7 1 118  2 1
-    warp_and_dump_OF $1 8 1 118 reset_counts
-
-    # Add flow having reset_counts flag without reset_counts
-    send_packet
-    warp_and_dump_OF $1 9 2 236 reset_counts
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 add-flow br0 $flow])
-    warp_and_dump_NXM   1 2 236  2
-    warp_and_dump_OF $1 2 2 236
-
-    # Modify flow w/o reset_counts flag with a flow_mod having reset_counts
-    send_packet
-    warp_and_dump_OF $1 3 3 354
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 mod-flows br0 reset_counts,$flow])
-    warp_and_dump_NXM   4 0 0  2 1
-    warp_and_dump_OF $1 5 0 0
-}
-
-# OpenFlow versions >= 1.3 should behave the same way
-flow_mods_reset_counts 13
-flow_mods_reset_counts 14
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - flow stats reset_counts OpenFlow1.5])
-OVS_VSWITCHD_START
-flow="ip,actions=NORMAL"
-
-ovs-appctl time/stop
-
-AT_CHECK([ovs-ofctl add-flow br0 $flow])
-
-warp_and_dump_OF () {
-    AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
-    AT_CHECK([ovs-appctl revalidator/purge], [0])
-
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 dump-flows br0 ], [0], [stdout])
-    if [[ "$6X" = "X" ]]; then
-        expected=" cookie=0x0, duration=$2s, table=0, n_packets=$3, n_bytes=$4, idle_age=$5, ip actions=NORMAL"
-    else
-        expected=" cookie=0x0, duration=$2s, table=0, n_packets=$3, n_bytes=$4, $6 idle_age=$5, ip actions=NORMAL"
-    fi
-     AT_CHECK_UNQUOTED([strip_xids < stdout | sed -n 's/duration=\([[0-9]]*\)\.*[[0-9]]*s/duration=\1s/p' | sort], [0], [dnl
-$expected
-])
-}
-
-send_packet () {
-    ovs-appctl netdev-dummy/receive br0 'in_port(0),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no)'
-}
-
-# OpenFlow 1.5, explicit reset_counts
-flow_mods_reset_counts () {
-    # Reset to a known state
-    AT_CHECK([ovs-ofctl add-flow br0 $flow])
-
-    send_packet
-    warp_and_dump_OF $1 1 1 118 1 reset_counts
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 add-flow br0 $flow])
-    # add-flow without flags resets duration, but not counts,
-    # idle age is inherited from the old flow
-    warp_and_dump_OF $1 1 1 118 2
-
-    send_packet
-    warp_and_dump_OF $1 2 2 236 1
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 mod-flows br0 $flow])
-    # mod-flows without flags does not reset duration nor counts,
-    # idle age is inherited from the old flow
-    warp_and_dump_OF $1 3 2 236 2
-
-    send_packet
-    warp_and_dump_OF $1 4 3 354 1
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 add-flow br0 reset_counts,$flow])
-    # add-flow with reset_counts resets both duration and counts,
-    # idle age is inherited from the old flow
-    warp_and_dump_OF $1 1 0 0 2 reset_counts
-
-    send_packet
-    warp_and_dump_OF $1 2 1 118 1 reset_counts
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 mod-flows br0 reset_counts,$flow])
-    # mod-flows with reset_counts resets counts, but not duration,
-    # idle age is inherited from the old flow
-    warp_and_dump_OF $1 3 0 0 2 reset_counts
-
-    # Modify flow having reset_counts flag without reset_counts
-    send_packet
-    warp_and_dump_OF $1 4 1 118 1 reset_counts
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 mod-flows br0 $flow])
-    warp_and_dump_OF $1 5 1 118 2 reset_counts
-
-    # Add flow having reset_counts flag without reset_counts
-    send_packet
-    warp_and_dump_OF $1 6 2 236 1 reset_counts
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 add-flow br0 $flow])
-    warp_and_dump_OF $1 1 2 236 2
-
-    # Modify flow w/o reset_counts flag with a flow_mod having reset_counts
-    send_packet
-    warp_and_dump_OF $1 2 3 354 1
-    AT_CHECK_UNQUOTED([ovs-ofctl -O OpenFlow$1 mod-flows br0 reset_counts,$flow])
-    warp_and_dump_OF $1 3 0 0 2
-}
-
-# OpenFlow versions >= 1.3 should behave the same way
-flow_mods_reset_counts 15
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - flow stats, set-n-threads])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
-AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
-
-ovs-appctl time/stop
-
-for i in `seq 1 10`; do
-    ovs-appctl netdev-dummy/receive br0 'in_port(0),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no)'
-done
-
-ovs-appctl time/warp 100
-AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2])
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
- cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
- cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=1180, idle_age=1, ip actions=NORMAL
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - idle_age and hard_age increase over time])
-OVS_VSWITCHD_START
-
-# get_ages DURATION HARD IDLE
-#
-# Fetch the flow duration, hard age, and idle age into the variables
-# whose names are given as arguments.  Rounds DURATION down to the
-# nearest integer.  If hard_age doesn't appear in the output, sets
-# HARD to "none".  If idle_age doesn't appear in the output, sets IDLE
-# to 0.
-get_ages () {
-    AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
-
-    duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout`
-    AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore])
-    AS_VAR_COPY([$1], [duration])
-
-    hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout`
-    if test X"$hard" = X; then
-        hard=none
-    else
-        AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore])
-    fi
-    AS_VAR_COPY([$2], [hard])
-
-    idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout`
-    if test X"$idle" = X; then
-        idle=0
-    else
-        AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore])
-    fi
-    AS_VAR_COPY([$3], [idle])
-}
-
-# Add a flow and get its initial hard and idle age.
-AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
-get_ages duration1 hard1 idle1
-
-ovs-appctl time/stop
-# Warp time forward by 10 seconds, then modify the flow's actions.
-ovs-appctl time/warp 10000
-get_ages duration2 hard2 idle2
-AT_CHECK([ovs-ofctl mod-flows br0 actions=flood])
-
-# Warp time forward by 10 seconds.
-ovs-appctl time/warp 10000
-get_ages duration3 hard3 idle3
-
-# Warp time forward 10 more seconds, then pass some packets through the flow,
-# then warp forward a few more times because idle times are only updated
-# occasionally.
-ovs-appctl time/warp 10000
-ovs-appctl netdev-dummy/receive br0 'in_port(0),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=80,dst=1234)'
-ovs-appctl time/warp 3000 1000
-sleep 1
-get_ages duration4 hard4 idle4
-
-printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
-printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4
-printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4
-
-# Duration should increase steadily over time.
-AT_CHECK([test $duration1 -lt $duration2])
-AT_CHECK([test $duration2 -lt $duration3])
-AT_CHECK([test $duration3 -lt $duration4])
-
-# Hard age should be "none" initially because it's the same as flow_duration,
-# then it should increase.
-AT_CHECK([test $hard1 = none])
-AT_CHECK([test $hard2 = none])
-AT_CHECK([test $hard3 != none])
-AT_CHECK([test $hard4 != none])
-AT_CHECK([test $hard3 -lt $hard4])
-
-# Idle age should increase from 1 to 2 to 3, then decrease.
-AT_CHECK([test $idle1 -lt $idle2])
-AT_CHECK([test $idle2 -lt $idle3])
-AT_CHECK([test $idle3 -gt $idle4])
-
-# Check some invariant relationships.
-AT_CHECK([test $duration1 = $idle1])
-AT_CHECK([test $duration2 = $idle2])
-AT_CHECK([test $duration3 = $idle3])
-AT_CHECK([test $idle3 -gt $hard3])
-AT_CHECK([test $idle4 -lt $hard4])
-AT_CHECK([test $hard4 -lt $duration4])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - fin_timeout])
-OVS_VSWITCHD_START
-ovs-appctl time/stop
-AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
-[NXST_FLOW reply:
- idle_timeout=60, actions=fin_timeout(idle_timeout=5)
-])
-
-# Check that a TCP SYN packet does not change the timeout.  (Because
-# flow stats updates are mainly what implements the fin_timeout
-# feature, we warp forward a couple of times to ensure that flow stats
-# run before re-checking the flow table.)
-AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
-AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
-warped
-])
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
-[NXST_FLOW reply:
- n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
-])
-# Check that a TCP FIN packet does change the timeout.
-AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
-AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
-warped
-])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
-[NXST_FLOW reply:
- n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5)
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps])
-OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
-add_of_ports br0 1 2
-add_of_ports br1 3
-
-AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl
-dummy at br0
-dummy at br1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
-OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy], [], [],
-                   [--dummy-numa="0,0,0,0,1,1,1,1"])
-add_pmd_of_ports br0 1 2
-add_of_ports br1 3
-
-AT_CHECK([ovs-appctl dpif/show | sed 's/\(dummy-pmd: \).*)/\1<cleared>)/'], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (dummy-pmd: <cleared>)
-    p2 2/2: (dummy-pmd: <cleared>)
-  br1:
-    br1 65534/101: (dummy-internal)
-    p3 3/3: (dummy)
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
-# bump max-idle to avoid the flows being reclaimed behind us
-OVS_VSWITCHD_START([add-br br1 -- \
-                    set bridge br1 datapath-type=dummy fail-mode=secure -- \
-                    set Open_vSwitch . other_config:max-idle=10000], [], [],
-                    [--dummy-numa="0,0,0,0,1,1,1,1"])
-add_of_ports br0 1
-add_pmd_of_ports br0 2
-add_of_ports br1 3
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-ovs-appctl revalidator/wait
-AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
-recirc_id(0),in_port(2),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
-])
-
-AT_CHECK([ovs-appctl dpif/dump-flows br1 | strip_ufid | strip_used | sort], [0], [dnl
-recirc_id(0),in_port(3),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
-])
-
-AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | strip_ufid | strip_used | sort], [0], [dnl
-skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(p1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:05/00:00:00:00:00:00,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.1/0.0.0.0,dst=192.168.0.2/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
-skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(p2),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:07/00:00:00:00:00:00,dst=50:54:00:00:00:05/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.2/0.0.0.0,dst=192.168.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=0/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
-])
-
-AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | strip_ufid | strip_used | sort], [0], [dnl
-skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(p3),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-m4_define([OFPROTO_DPIF_GET_FLOW],
-  [AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow$1])
-
-   OVS_VSWITCHD_START([add-br br1 -- \
-                       set bridge br1 datapath-type=dummy fail-mode=secure -- \
-                       set Open_vSwitch . other_config:max-idle=10000], [], [],
-                       [m4_if([$1], [], [], [--dummy-numa="0,0,0,0,1,1,1,1"])])
-
-   func=`printf '%s_' "$1" | cut -c 4-`
-   add_${func}of_ports br0 1 2
-
-   AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-   ovs-appctl revalidator/wait
-   AT_CHECK([ovs-appctl dpif/dump-flows -m br0], [0], [stdout])
-
-   UFID=`sed -n 's/\(ufid:[[-0-9a-fA-F]]*\).*/\1/p' stdout`
-   AT_CHECK([ovs-appctl dpctl/get-flow $UFID], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
-])
-
-   OVS_VSWITCHD_STOP
-   AT_CLEANUP])
-
-OFPROTO_DPIF_GET_FLOW([])
-OFPROTO_DPIF_GET_FLOW([ - pmd])
-
-AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_DATA([flows.txt], [dnl
-dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
-dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8847,controller
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-dnl Packet is sent to userspace because a MPLS push or pop action is applied to
-dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels.
-dnl
-dnl The input is a frame with two MPLS labels which tcpdump -vve shows as:
-dnl 60:66:66:66:66:00 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 74: MPLS (label 20, exp 0, ttl 32)
-dnl         (label 20, exp 0, [S], ttl 32)
-dnl         (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
-dnl     192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
-
-for dl_src in 00 01; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 "505400000007 6066666666$dl_src 8847 00014020 00014120 45 00 00 2c 00 00 00 00 40 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45"])
-done
-sleep 1  # wait for the datapath flow installed
-AT_CHECK_UNQUOTED([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=60:66:66:66:66:00),eth_type(0x8847),mpls(label=20,tc=0,ttl=32,bos=0,label=20,tc=0,ttl=32,bos=1), actions:push_mpls(label=20,tc=0,ttl=32,bos=0,eth_type=0x8847),userspace(pid=0,controller(reason=1,dont_send=0,continuation=0,recirc_id=1,rule_cookie=0,controller_id=0,max_len=65535))
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=60:66:66:66:66:01),eth_type(0x8847),mpls(label=20/0x0,tc=0/0,ttl=32/0x0,bos=0/1,label=20/0xfffff,tc=0/7,ttl=32/0xff,bos=1/1), actions:pop_mpls(eth_type=0x8847),userspace(pid=0,controller(reason=1,dont_send=0,continuation=0,recirc_id=1,rule_cookie=0,controller_id=0,max_len=65535))
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
-OVS_VSWITCHD_START([dnl
-   add-port br0 p1 -- set Interface p1 type=dummy
-])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-on_exit 'kill `cat ovs-ofctl.pid`'
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_DATA([flows.txt], [dnl
-dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
-dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8847,controller
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-dnl Packet is dropped because an MPLS PUSH action is applied to a packet with
-dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus
-dnl can't determine the resulting MPLS label after MPLS push/pop actions.
-dnl
-dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
-dnl 60:66:66:66:66:01 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 74: MPLS (label 20, exp 0, ttl 32)
-dnl         (label 20, exp 0, ttl 32)
-dnl         (label 20, exp 0, ttl 32)
-dnl         (label 20, exp 0, [S], ttl 32)
-dnl         (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
-dnl     192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
-
-for dl_src in 00 01; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 "505400000007 6066666666$dl_src 8847 00014020 00014120 45 00 00 2c 00 00 00 00 40 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45"])
-done
-sleep 1  # wait for the datapath flow installed
-AT_CHECK_UNQUOTED([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=60:66:66:66:66:00),eth_type(0x8847),mpls(label=20,tc=0,ttl=32,bos=0,label=20,tc=0,ttl=32,bos=1), actions:push_mpls(label=20,tc=0,ttl=32,bos=0,eth_type=0x8847),userspace(pid=0,controller(reason=1,dont_send=0,continuation=0,recirc_id=1,rule_cookie=0,controller_id=0,max_len=65535))
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=60:66:66:66:66:01),eth_type(0x8847),mpls(label=20/0x0,tc=0/0,ttl=32/0x0,bos=0/1,label=20/0xfffff,tc=0/7,ttl=32/0xff,bos=1/1), actions:pop_mpls(eth_type=0x8847),userspace(pid=0,controller(reason=1,dont_send=0,continuation=0,recirc_id=1,rule_cookie=0,controller_id=0,max_len=65535))
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - patch ports])
-OVS_VSWITCHD_START([add-br br1 \
--- set bridge br1 datapath-type=dummy fail-mode=secure \
--- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
--- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
-
-add_of_ports br0 2
-add_of_ports br1 3
-
-AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
-], [])
-AT_CHECK([ovs-appctl time/stop])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
-AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
-
-for i in $(seq 1 10); do
-    ovs-appctl netdev-dummy/receive br0 'in_port(100),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'
-    if [[ $i -eq 1 ]]; then
-        sleep 1
-    fi
-done
-
-for i in $(seq 1 5); do
-    ovs-appctl netdev-dummy/receive br1 'in_port(101),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'
-    if [[ $i -eq 1 ]]; then
-        sleep 1
-    fi
-done
-
-AT_CHECK([ovs-appctl time/warp 500], [0],
-[warped
-])
-sleep 1  # wait for log writer
-
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:13 missed:2
-  br0:
-    br0 65534/100: (dummy-internal)
-    p2 2/2: (dummy)
-    pbr0 1/none: (patch: peer=pbr1)
-  br1:
-    br1 65534/101: (dummy-internal)
-    p3 3/3: (dummy)
-    pbr1 1/none: (patch: peer=pbr0)
-])
-
-AT_CHECK([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
-recirc_id(0),in_port(100),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions:101,3,2
-recirc_id(0),in_port(101),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions:100,2,3
-])
-
-AT_CHECK([grep -e 'in_port(100).*packets:9' ovs-vswitchd.log | strip_ufid | filter_flow_dump], [0], [dnl
-skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(100),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:05/00:00:00:00:00:00,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.1/0.0.0.0,dst=192.168.0.2/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:9, bytes:954, used:0.0s, actions:101,3,2
-])
-AT_CHECK([grep -e 'in_port(101).*packets:4' ovs-vswitchd.log | strip_ufid | filter_flow_dump], [0], [dnl
-skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(101),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:07/00:00:00:00:00:00,dst=50:54:00:00:00:05/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.2/0.0.0.0,dst=192.168.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:4, bytes:424, used:0.0s, actions:100,2,3
-])
-
-AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
-OFPST_PORT reply (xid=0x4): 1 ports
-  port  1: rx pkts=5, bytes=530, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=10, bytes=1060, drop=?, errs=?, coll=?
-])
-
-AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
-OFPST_PORT reply (xid=0x4): 1 ports
-  port  1: rx pkts=10, bytes=1060, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=5, bytes=530, drop=?, errs=?, coll=?
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - patch ports - stack])
-OVS_VSWITCHD_START([add-br br1 \
--- set bridge br1 datapath-type=dummy fail-mode=secure \
--- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
--- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
-
-add_of_ports br0 2
-add_of_ports br1 3
-
-AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
-], [])
-AT_CHECK([ovs-appctl time/stop])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl add-flow br0 "ip actions=push:OXM_OF_IN_PORT[[0..31]],output:1,pop:OXM_OF_IPV4_SRC[[0..31]],output:2"])
-# Try to pop from empty stack, and push and leave data to stack.
-AT_CHECK([ovs-ofctl add-flow br1 "ip actions=pop:OXM_OF_IPV4_DST[[0..31]],push:NXM_NX_REG1[[0..31]],LOCAL"])
-
-ovs-appctl netdev-dummy/receive br0 'in_port(100),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'
-
-AT_CHECK([ovs-appctl time/warp 500], [0],
-[warped
-])
-
-OVS_WAIT_UNTIL([test `grep flow_add ovs-vswitchd.log | wc -l` -ge 1])
-
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:1
-  br0:
-    br0 65534/100: (dummy-internal)
-    p2 2/2: (dummy)
-    pbr0 1/none: (patch: peer=pbr1)
-  br1:
-    br1 65534/101: (dummy-internal)
-    p3 3/3: (dummy)
-    pbr1 1/none: (patch: peer=pbr0)
-])
-
-AT_CHECK([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
-recirc_id(0),in_port(100),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(src=192.168.0.1,frag=no), actions:101,set(ipv4(src=255.255.255.254)),2
-])
-
-AT_CHECK([grep -e '|ofproto_dpif_xlate|WARN|' ovs-vswitchd.log | sed "s/^.*|WARN|//"], [0], [dnl
-stack underflow on bridge br1 while processing icmp,in_port=LOCAL,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0
-])
-
-OVS_VSWITCHD_STOP(["/stack underflow/d"])
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - port duration])
-OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
-add_of_ports br0 1 2
-
-ovs-appctl time/stop
-ovs-appctl time/warp 10000
-
-AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
-AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
-[dnl
-           duration=?s
-           duration=?s
-           duration=?s
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-AT_BANNER([ofproto-dpif -- megaflows])
-
-AT_SETUP([ofproto-dpif megaflow - port classification])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 actions=output(2)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - L2 classification])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - L3 classification])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_CHECK([ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- --id=@N1 create Flow_Table name=t0 prefixes=nw_dst,nw_src], [0], [ignore], [])
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.252,frag=no), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(src=10.0.0.4,proto=1,frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_CHECK([ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- --id=@N1 create Flow_Table name=t0 prefixes=ipv6_dst,ipv6_src], [0], [ignore], [])
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:1:2:3:4:5,dst=fe80::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:5:4:3:2:1,dst=2001:db8:3c4d:1:2:3:4:1,label=0,proto=99,tclass=0x70,hlimit=64,frag=no)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:1:2:3:4:5,frag=no), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:5:4:3:2:1/ffff:ffff:ffff:fffc::,frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - L4 classification])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=1,frag=no),icmp(type=8), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-m4_define([OFPROTO_DPIF_MEGAFLOW_NORMAL],
-  [AT_SETUP([ofproto-dpif megaflow - normal$1])
-   OVS_VSWITCHD_START([], [], [], [m4_if([$1], [], [], [--dummy-numa="0,0,0,0,1,1,1,1"])])
-   AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-   func=`printf '%s_' "$1" | cut -c 4-`
-   add_${func}of_ports br0 1 2
-   AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-   AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-   AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-   sleep 1
-   AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-   OVS_VSWITCHD_STOP
-   AT_CLEANUP])
-
-OFPROTO_DPIF_MEGAFLOW_NORMAL([])
-OFPROTO_DPIF_MEGAFLOW_NORMAL([ - pmd])
-
-AT_SETUP([ofproto-dpif megaflow - mpls])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_DATA([flows.txt], [dnl
-table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
-table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0a),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout_keep_actions], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1), actions:push_mpls(label=11,tc=3,ttl=64,bos=0,eth_type=0x8847),2
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b),eth_type(0x8847),mpls(label=11/0x0,tc=3/0,ttl=64/0x0,bos=1/1), actions:pop_mpls(eth_type=0x800),2
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR)
-m4_define([CHECK_MEGAFLOW_NETFLOW],
-  [OVS_VSWITCHD_START
-  AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-  add_of_ports br0 1 2
-
-  dnl NetFlow configuration disables wildcarding relevant fields
-  on_exit 'kill `cat test-netflow.pid`'
-  AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
-  AT_CAPTURE_FILE([netflow.log])
-  PARSE_LISTENING_PORT([test-netflow.log], [NETFLOW_PORT])
-  ovs-vsctl \
-     set Bridge br0 netflow=@nf -- \
-     --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
-       engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
-
-  AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-  AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-  AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-  sleep 1
-  AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0/0xfc,frag=no),icmp(type=8,code=0), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0/0xfc,frag=no),icmp(type=8,code=0), actions: <del>
-])
-  OVS_APP_EXIT_AND_WAIT([test-netflow])
-  OVS_VSWITCHD_STOP])
-
-AT_SETUP([ofproto-dpif megaflow - netflow - IPv4 collector])
-CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4])
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - netflow - IPv6 collector])
-AT_SKIP_IF([test $HAVE_IPV6 = no])
-CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
-AT_CLEANUP
-
-m4_define([OFPROTO_DPIF_MEGAFLOW_NORMAL_ACB_BOND],
-  [AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding - $1])
-   OVS_VSWITCHD_START(
-     [add-port br0 p1 -- set Interface p1 type=$1 ofport_request=1 -- \
-      add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
-      set interface p2 type=$1 ofport_request=2 -- \
-      set interface p3 type=$1 ofport_request=3], [], [],
-      [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
-   AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
-])
-   AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-   AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-   AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-   AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-   sleep 1
-   AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-   OVS_VSWITCHD_STOP
-   AT_CLEANUP])
-
-OFPROTO_DPIF_MEGAFLOW_NORMAL_ACB_BOND([dummy])
-OFPROTO_DPIF_MEGAFLOW_NORMAL_ACB_BOND([dummy-pmd])
-
-AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
-OVS_VSWITCHD_START(
-  [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
-   add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
-   set interface p2 type=dummy ofport_request=2 -- \
-   set interface p3 type=dummy ofport_request=3])
-AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
-])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
-# Create bond0 on br0 with interfaces p0 and p1
-#    and bond1 on br1 with interfaces p2 and p3
-# with p0 patched to p2 and p1 patched to p3.
-OVS_VSWITCHD_START(
-  [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
-                            other-config:lacp-time=fast \
-                            other-config:bond-rebalance-interval=0 -- \
-   set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
-   set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-                  fail-mode=secure -- \
-   add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
-                            other-config:lacp-time=fast \
-                            other-config:bond-rebalance-interval=0 -- \
-   set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
-   set interface p3 type=patch options:peer=p1 ofport_request=4 --])
-
-AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
-])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 7
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-AT_CHECK([ovs-ofctl add-flow br1 action=normal])
-ovs-appctl time/stop
-ovs-appctl time/warp 5000
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - resubmit port action])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1,ip actions=resubmit(90)
-table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - resubmit table action])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1,ip actions=resubmit(,1)
-table=1 dl_src=50:54:00:00:00:09 actions=output(2)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=
-1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - goto_table action])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1,ip actions=goto_table(1)
-table=1 dl_src=50:54:00:00:00:09 actions=output(2)
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
-AT_KEYWORDS([mirror mirrors mirroring])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p3 get Port p3 --\
-        --id=@m create Mirror name=mymirror select_all=true output_port=@p3
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=output:2
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2 3
-ovs-vsctl \
-        set Bridge br0 mirrors=@m --\
-        --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
-        --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
-
-AT_DATA([flows.txt], [dnl
-in_port=1 actions=output:2
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8100),vlan(vid=11,pcp=7),encap(eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0))'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x8100),vlan(vid=11,pcp=7/0x0),encap(eth_type(0x0800),ipv4(frag=no)), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - move action])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
-table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
-table=0 in_port=91 reg0=0x0a000002,actions=output(2)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(src=10.0.0.2,frag=no), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(src=10.0.0.4,frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - push action])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(src=10.0.0.2,frag=no), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(src=10.0.0.4,frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - learning])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 actions=load:2->NXM_NX_REG0[[0..15]],learn(table=1,priority=65535,NXM_OF_ETH_SRC[[]],NXM_OF_VLAN_TCI[[0..11]],output:NXM_NX_REG0[[0..15]]),output:2
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-ovs-appctl time/stop
-# We send each packet twice because the first packet in each flow causes the
-# flow table to change and thus revalidations, which (depending on timing)
-# can keep a megaflow from being installed.  The revalidations are done by
-# the second iteration, allowing the flows to be installed.
-for i in 1 2; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-    ovs-appctl time/warp 100
-done
-sleep 1
-dnl The original flow is missing due to a revalidation.
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - tunnels])
-OVS_VSWITCHD_START(
-  [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
-     options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
-AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
-          ofport_request=3])
-AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \
-     options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \
-     ofport_request=4 options:key=flow])
-AT_DATA([flows.txt], [dnl
-in_port=1,actions=output(2)
-in_port=3,actions=output(4)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
-dnl will cause the packet to be dropped.
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0xfd,ttl=128,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0x1,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0xfd,ttl=128,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0x1,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(tos=0xfd/0x3,frag=no), actions: <del>
-recirc_id(0),in_port(3),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(tos=0x1,ttl=64,frag=no), actions: <del>
-recirc_id(0),in_port(3),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(tos=0xfd,ttl=128,frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - dec_ttl])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_CHECK([ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- --id=@N1 create Flow_Table name=t0 prefixes=nw_dst,nw_src], [0], [ignore], [])
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.252,frag=no), actions: <del>
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(src=10.0.0.4,proto=1,ttl=64,frag=no), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif megaflow - set dl_dst])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-add_of_ports br0 1 2
-AT_DATA([flows.txt], [dnl
-table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-sleep 1
-dnl The first packet is essentially a no-op, as the new destination MAC is the
-dnl same as the original.  The second entry actually updates the destination
-dnl MAC.
-AT_CHECK([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions:2
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no), actions:set(eth(dst=50:54:00:00:00:0a)),2
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-m4_define([OFPROTO_DPIF_MEGAFLOW_DISABLED],
-  [AT_SETUP([ofproto-dpif megaflow - disabled$1])
-   OVS_VSWITCHD_START([], [], [], [m4_if([$1], [], [], [--dummy-numa="0,0,0,0,1,1,1,1"])])
-   AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-   func=`printf '%s_' "$1" | cut -c 4-`
-   add_${func}of_ports br0 1 2
-   AT_DATA([flows.txt], [dnl
-table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
-table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
-])
-   AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
-], [])
-   AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
-], [])
-   AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
-   AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-   for i in 1 2 3 4; do
-       AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-       AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-       if [[ $i -eq 1 ]]; then
-           sleep 1
-       fi
-   done
-   sleep 1
-   AT_CHECK([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
-skb_priority(0),skb_mark(0),ct_state(-new-est-rel-rpl-inv-trk-snat-dnat),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), actions:2
-skb_priority(0),skb_mark(0),ct_state(-new-est-rel-rpl-inv-trk-snat-dnat),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), actions:drop
-])
-   AT_CHECK([strip_ufid < ovs-vswitchd.log | filter_flow_dump | grep 'packets:3'], [0], [dnl
-skb_priority(0),skb_mark(0),ct_state(0/0xff),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), packets:3, bytes:318, used:0.0s, actions:2
-skb_priority(0),skb_mark(0),ct_state(0/0xff),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), packets:3, bytes:318, used:0.0s, actions:drop
-])
-   OVS_VSWITCHD_STOP
-   AT_CLEANUP])
-
-OFPROTO_DPIF_MEGAFLOW_DISABLED([])
-OFPROTO_DPIF_MEGAFLOW_DISABLED([ - pmd])
-
-AT_SETUP([ofproto-dpif - datapath port number change])
-OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
-add_of_ports br0 1
-
-# Trace a flow that should output to p1.
-AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
-  [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
-])
-
-# Change p1's port number to 5.
-AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
-
-# Trace a flow that should output to p1 in its new location.
-AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
-  [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# Tests the bundling with various bfd and cfm configurations.
-AT_SETUP([ofproto - bundle with variable bfd/cfm config])
-OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
-                    add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \
-                    add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \
-                    set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \
-                    set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \
-                    set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \
-                    set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \
-                    set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
-                    set Interface p0 cfm_mpid=1 -- \
-                    set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
-
-ovs-appctl time/stop
-# advance the clock to stablize everything.
-ovs-appctl time/warp 5000 100
-# cfm/show should show 'recv' fault.
-AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
-  fault: recv
-])
-# bfd/show should show 'up'.
-AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
-  Local Session State: up
-  Remote Session State: up
-  Local Session State: up
-  Remote Session State: up
-])
-# bond/show should show 'may-enable: true' for all slaves.
-AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
-  may_enable: true
-  may_enable: true
-  may_enable: true
-  may_enable: true
-])
-
-# now disable the bfd on p1.
-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
-# advance the clock to stablize everything.
-ovs-appctl time/warp 5000 100
-# cfm/show should show 'recv' fault.
-AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
-  fault: recv
-])
-# bfd/show should show 'down'.
-AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
-  Local Session State: down
-  Remote Session State: down
-])
-# bond/show should show 'may-enable: false' for p0.
-AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
-  may_enable: false
-  may_enable: true
-])
-
-# now enable the bfd on p1 and disable bfd on p0.
-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
-AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
-# advance the clock to stablize everything.
-ovs-appctl time/warp 5000 100
-# cfm/show should show 'recv' fault.
-AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
-  fault: recv
-])
-# bfd/show should show 'down'.
-AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
-  Local Session State: down
-  Remote Session State: down
-])
-# bond/show should show 'may-enable: false' for p0 and p1.
-AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
-  may_enable: false
-  may_enable: true
-  may_enable: false
-  may_enable: true
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1])
-OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4])
-
-# enable bfd on p0.
-AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
-# check log.
-OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
-# disable bfd on p0.
-AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
-# check log.
-OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
-AT_CHECK([sed -e '/^.*ofproto_dpif_monitor.*$/d' < ovs-vswitchd.log > tmp && ovs-appctl vlog/close && mv tmp ovs-vswitchd.log && ovs-appctl vlog/reopen])
-
-# enable cfm on p0.
-AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10])
-# check log.
-OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
-# disable cfm on p0.
-AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10])
-# check log.
-OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
-AT_CHECK([sed -e '/^.*ofproto_dpif_monitor.*$/d' < ovs-vswitchd.log > tmp && ovs-appctl vlog/close && mv tmp ovs-vswitchd.log && ovs-appctl vlog/reopen])
-
-# enable both bfd and cfm on p0.
-AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])
-# check log.
-OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
-# disable bfd on p0.
-AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
-# check log, there should not be the log of thread terminated.
-AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl
-])
-# reenable bfd on p0.
-AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
-# check log, should still be on log of thread created.
-AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
-monitor thread created
-])
-# disable bfd and cfm together.
-AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10])
-# check log.
-OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# this test helps avoid the deadlock between the main thread and monitor thread.
-AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2])
-OVS_VSWITCHD_START
-
-for i in `seq 1 199`
-do
-    AT_CHECK([ovs-vsctl add-port br0 p$i -- set interface p$i type=gre options:remote_ip=1.2.3.4 options:key=$i bfd:enable=true])
-done
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_BANNER([ofproto-dpif - flow translation resource limits])
-
-dnl Resubmits to later tables do not count against the depth limit, so we
-dnl can do 99 of them even though the maximum depth is 64.
-AT_SETUP([ofproto-dpif - forward resubmit])
-OVS_VSWITCHD_START
-(for i in `seq 0 99`; do
-    j=`expr $i + 1`
-    echo "table=$i, actions=resubmit(,$j)"
- done
- echo "table=100, actions=local") > flows
-AT_CHECK([ovs-ofctl add-flows br0 flows])
-AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
-  [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [Datapath actions: 100
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Resubmits to the same or an earlier table count against the depth limit,
-dnl so only 64 of them are allowed.
-AT_SETUP([ofproto-dpif - backward resubmit])
-OVS_VSWITCHD_START
-(echo "table=0, actions=resubmit(,66)"
- for i in `seq 2 66`; do
-    j=`expr $i - 1`
-    echo "table=$i, actions=resubmit(,$j)"
- done
- echo "table=1, actions=local") > flows
-AT_CHECK([ovs-ofctl add-flows br0 flows])
-AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
-  [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Translation failed (Recursion too deep), packet is dropped.
-])
-AT_CHECK([grep -c 'over max translation depth 64' stdout],
-  [0], [1
-])
-OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - infinite resubmit])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3])
-AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
-  [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Translation failed (Recursion too deep), packet is dropped.
-])
-AT_CHECK([grep -c 'over max translation depth 64' stdout],
-  [0], [1
-])
-OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
-AT_CLEANUP
-
-dnl Without using ofproto/trace, make sure the
-dnl ofproto trace is still logged
-AT_SETUP([ofproto-dpif - backward resubmit without trace])
-OVS_VSWITCHD_START
-(echo "table=0, actions=resubmit(,66)"
- for i in `seq 2 66`; do
-    j=`expr $i - 1`
-    echo "table=$i, actions=resubmit(,$j)"
- done
- echo "table=1, actions=local") > flows
-AT_CHECK([ovs-ofctl add-flows br0 flows])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive br0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'], [0], [stdout])
-
-OVS_WAIT_UNTIL([grep 'packet is dropped' ovs-vswitchd.log])
-
-dnl make sure the full ofproto trace dump is present
-AT_CHECK([grep -c "^ *resubmit" ovs-vswitchd.log],
-  [0], [66
-])
-
-OVS_VSWITCHD_STOP(["/over max translation depth/d
-/ofproto_dpif_upcall/d"])
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - exponential resubmit chain])
-OVS_VSWITCHD_START
-add_of_ports br0 1
-(for i in `seq 1 64`; do
-     j=`expr $i + 1`
-     echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
- done
- echo "in_port=65, actions=local") > flows
- AT_CHECK([ovs-ofctl add-flows br0 flows])
-AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Translation failed (Too many resubmits), packet is dropped.
-])
-AT_CHECK([grep -c 'over 4096 resubmit actions' stdout], [0], [1
-])
-OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"])
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - too many output actions])
-OVS_VSWITCHD_START
-add_of_ports br0 1
-(for i in `seq 1 12`; do
-     j=`expr $i + 1`
-     echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
- done
- echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows
-AT_CHECK([ovs-ofctl add-flows br0 flows])
-AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
-AT_CHECK([grep -c -e '- Uses action(s) not supported by datapath' stdout],
-  [0], [1
-])
-AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' stdout], [0], [1
-])
-OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"])
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - stack too deep])
-OVS_VSWITCHD_START
-add_of_ports br0 1
-(for i in `seq 1 12`; do
-     j=`expr $i + 1`
-     echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
- done
- push="push:NXM_NX_REG0[[]]"
- echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows
- AT_CHECK([ovs-ofctl add-flows br0 flows])
-AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Translation failed (Stack too deep), packet is dropped.
-])
-AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' stdout], [0], [1
-])
-OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"])
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif packet-out controller])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller'])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-        AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234'])
-done
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
-dnl
-NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
-dnl
-NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
-])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
-NXST_FLOW reply:
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0], [0],
-  [OFPST_TABLE reply (OF1.3) (xid=0x2):
-  table 0:
-    active=1, lookup=0, matched=0
-
-  table 1:
-    active=0, lookup=0, matched=0
-
-  tables 2...253: ditto
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif packet-out controller (patch port)])
-OVS_VSWITCHD_START(
-  [-- \
-   add-port br0 p1 -- \
-   set interface p1 type=patch options:peer=p2 -- \
-   add-br br1 -- \
-   set bridge br1 datapath-type=dummy -- \
-   set bridge br1 fail-mode=secure -- \
-   set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \
-   add-port br1 p2 -- \
-   set interface p2 type=patch options:peer=p1 --])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-        AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234'])
-done
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0], [0], [dnl
-OFPST_TABLE reply (OF1.3) (xid=0x2):
-  table 0:
-    active=0, lookup=0, matched=0
-
-  tables 1...253: ditto
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1], [0], [dnl
-OFPST_TABLE reply (OF1.3) (xid=0x2):
-  table 0:
-    active=0, lookup=3, matched=0
-
-  table 1:
-    active=0, lookup=0, matched=0
-
-  tables 2...253: ditto
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif packet-out pipeline match field (OpenFlow 1.5)])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=0,len=8}->tun_metadata2"])
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=1,len=4}->tun_metadata3"])
-AT_DATA([flows.txt], [dnl
-table=0,in_port=1 actions=controller
-table=0,tun_id=3 actions=controller
-table=0,metadata=5 actions=controller
-table=0,reg0=1,reg4=2,reg8=3,reg12=5 actions=controller
-table=0,tun_src=1.1.1.1,tun_dst=2.2.2.2,tun_gbp_id=0x01,tun_gbp_flags=0x03 actions=controller
-table=0,tun_metadata3=0x11 actions=controller
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
-
-AT_CHECK([ovs-ofctl -O OpenFlow15 -P standard monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0609000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-AT_CHECK([ovs-ofctl -O OpenFlow15 packet-out br0 "in_port=1 packet=0001020304050010203040501111 actions=table"])
-AT_CHECK([ovs-ofctl -O OpenFlow15 packet-out br0 "in_port=2,tunnel_id=3 packet=0001020304050010203040502222 actions=table"])
-AT_CHECK([ovs-ofctl -O OpenFlow15 packet-out br0 "in_port=2,metadata=5 packet=0001020304050010203040503333 actions=table"])
-AT_CHECK([ovs-ofctl -O OpenFlow15 packet-out br0 "in_port=2,reg0=1,reg4=2,reg8=3,reg12=5 packet=0001020304050010203040503333 actions=table"])
-AT_CHECK([ovs-ofctl -O OpenFlow15 packet-out br0 "in_port=2,tun_src=1.1.1.1,tun_dst=2.2.2.2,tun_gbp_id=0x01,tun_gbp_flags=0x03 packet=0001020304050010203040503333 actions=table"])
-AT_CHECK([ovs-ofctl -O OpenFlow15 packet-out br0 "in_port=2,tun_metadata2=0x22,tun_metadata3=0x11 packet=0001020304050010203040503333 actions=table"])
-
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.5): cookie=0x0 total_len=14 in_port=1 (via packet_out) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1111
-OFPT_PACKET_IN (OF1.5): cookie=0x0 total_len=14 tun_id=0x3,in_port=2 (via packet_out) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x2222
-OFPT_PACKET_IN (OF1.5): cookie=0x0 total_len=14 metadata=0x5,in_port=2 (via packet_out) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x3333
-OFPT_PACKET_IN (OF1.5): cookie=0x0 total_len=14 reg0=0x1,reg4=0x2,reg8=0x3,reg12=0x5,in_port=2 (via packet_out) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x3333
-OFPT_PACKET_IN (OF1.5): cookie=0x0 total_len=14 tun_src=1.1.1.1,tun_dst=2.2.2.2,tun_gbp_id=1,tun_gbp_flags=0x3,in_port=2 (via packet_out) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x3333
-OFPT_PACKET_IN (OF1.5): cookie=0x0 total_len=14 tun_metadata2=0x22,tun_metadata3=0x11,in_port=2 (via packet_out) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x3333
-OFPT_BARRIER_REPLY (OF1.5):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif packet-out goto_table])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-
-AT_DATA([flows.txt], [dnl
-table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1)
-table=1 dl_dst=50:54:00:00:00:0a actions=controller
-])
-AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'
-done
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=14 in_port=1 (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=14 in_port=1 (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=14 in_port=1 (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=3, n_bytes=42, dl_dst=50:54:00:00:00:0a actions=goto_table:1
- table=1, n_packets=3, n_bytes=42, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
-OFPST_FLOW reply (OF1.3):
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0], [0], [dnl
-OFPST_TABLE reply (OF1.3) (xid=0x2):
-  table 0:
-    active=1, lookup=3, matched=3
-
-  table 1: ditto
-
-  table 2:
-    active=0, lookup=0, matched=0
-
-  tables 3...253: ditto
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto-dpif packet-out table-miss (continue)])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller'])
-AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all continue])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'
-done
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=14 in_port=1 (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=14 in_port=1 (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=14 in_port=1 (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
-])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- table=1, n_packets=3, n_bytes=42, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
-OFPST_FLOW reply (OF1.1):
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0], [0], [dnl
-OFPST_TABLE reply (OF1.3) (xid=0x2):
-  table 0:
-    active=0, lookup=3, matched=0
-
-  table 1:
-    active=1, lookup=3, matched=3
-
-  table 2:
-    active=0, lookup=0, matched=0
-
-  tables 3...253: ditto
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - ICMPv6])
-OVS_VSWITCHD_START
-add_of_ports br0 1
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered)
-icmp6,vlan_tci=0x0000,dl_src=00:00:86:05:80:da,dl_dst=00:60:97:07:69:ea,ipv6_src=fe80::200:86ff:fe05:80da,ipv6_dst=fe80::260:97ff:fe07:69ea,ipv6_label=0x00000,nw_tos=0,nw_ecn=0,nw_ttl=255,icmp_type=135,icmp_code=0,nd_target=fe80::260:97ff:fe07:69ea,nd_sll=00:00:86:05:80:da,nd_tll=00:00:00:00:00:00 icmp6_csum:68bd
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - ICMPv6 type match])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-
-AT_CHECK([ovs-ofctl add-flow br0 'icmp6,icmp_type=128,actions=2'])
-AT_CHECK([ovs-ofctl add-flow br0 'icmp6,icmp_type=129,actions=3'])
-
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'recirc_id(0),in_port(1),eth(src=f2:49:6e:52:49:0b,dst=02:b7:d7:17:ff:72),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=128)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'recirc_id(0),in_port(1),eth(src=f2:49:6e:52:49:0b,dst=02:b7:d7:17:ff:72),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=128)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'recirc_id(0),in_port(1),eth(src=f2:49:6e:52:49:0b,dst=02:b7:d7:17:ff:72),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=129)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'recirc_id(0),in_port(1),eth(src=f2:49:6e:52:49:0b,dst=02:b7:d7:17:ff:72),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=129)'])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-
-AT_CHECK([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=128), actions:2
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=129), actions:3
-])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=2, n_bytes=252, icmp6,icmp_type=128 actions=output:2
- n_packets=2, n_bytes=252, icmp6,icmp_type=129 actions=output:3
-NXST_FLOW reply:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - Neighbor Discovery set-field with checksum update])
-OVS_VSWITCHD_START
-add_of_ports br0 1
-AT_CHECK([ovs-ofctl add-flow br0 icmp6,icmpv6_type=135,action=set_field:fe80::1-\>nd_target,set_field:32:21:14:86:11:74-\>nd_sll,output:controller])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-
-AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via action) data_len=86 (unbuffered)
-icmp6,vlan_tci=0x0000,dl_src=00:00:86:05:80:da,dl_dst=00:60:97:07:69:ea,ipv6_src=fe80::200:86ff:fe05:80da,ipv6_dst=fe80::260:97ff:fe07:69ea,ipv6_label=0x00000,nw_tos=0,nw_ecn=0,nw_ttl=255,icmp_type=135,icmp_code=0,nd_target=fe80::1,nd_sll=32:21:14:86:11:74,nd_tll=00:00:00:00:00:00 icmp6_csum:19d3
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# Tests the exact match of CFI bit in installed datapath flows matching VLAN.
-AT_SETUP([ofproto-dpif - vlan matching])
-OVS_VSWITCHD_START(
-  [add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl add-flow br0 "vlan_tci=0x000a/0x0fff,action=output:local"])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8100),vlan(vid=10,pcp=0),encap(eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0))'])
-
-OVS_WAIT_UNTIL([grep flow_add: ovs-vswitchd.log])
-AT_CHECK([grep 'in_port([[1]])' ovs-vswitchd.log | filter_flow_install | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x8100),vlan(vid=10),encap(eth_type(0x0800),ipv4(frag=no)), actions: <del>
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# Tests in place modification of installed datapath flows.
-AT_SETUP([ofproto-dpif - in place modification])
-OVS_VSWITCHD_START(
-  [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=mod_vlan_vid:3,output:local])
-
-ovs-appctl vlog/set PATTERN:ANY:'%c|%p|%m'
-
-ovs-appctl time/stop
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'])
-
-# Wait for the flow setup to be done.
-OVS_WAIT_UNTIL([grep 'flow_add:' ovs-vswitchd.log])
-
-for i in 1 2; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'
-done
-
-AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x1234), packets:2, bytes:28, used:0.0s, actions:push_vlan(vid=3,pcp=0),100
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 priority=60000,in_port=1,actions=mod_vlan_vid:4,output:local])
-
-ovs-appctl time/warp 500
-ovs-appctl time/warp 500
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'
-done
-
-AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x1234), packets:5, bytes:70, used:0.0s, actions:push_vlan(vid=4,pcp=0),100
-])
-
-AT_CHECK([grep 'modify' ovs-vswitchd.log | strip_ufid ], [0], [dnl
-dpif|DBG|dummy at ovs-dummy: put[[modify]] skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x1234), actions:push_vlan(vid=4,pcp=0),100
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# Tests in place modification of installed datapath flows with vlans.
-AT_SETUP([ofproto-dpif - in place modification (vlan)])
-OVS_VSWITCHD_START(
-  [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-# Always drop misses
-AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all drop])
-AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=output:local])
-
-ovs-appctl vlog/set PATTERN:ANY:'%c|%p|%m'
-
-ovs-appctl time/stop
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'])
-
-# Check that a correct datapath flow is created.
-OVS_WAIT_UNTIL([grep 'flow_add:' ovs-vswitchd.log])
-
-for i in 1 2; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'
-done
-
-AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x1234), packets:2, bytes:28, used:0.0s, actions:100
-])
-
-# Delete the flow.  Then check that the datapath flow is modified to
-# drop the packets.  A modified flow inherits the stats, a new
-# datapath flow would start from sero.
-AT_CHECK([ovs-ofctl del-flows br0])
-
-ovs-appctl time/warp 500
-ovs-appctl time/warp 500
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'
-done
-
-AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x1234), packets:5, bytes:70, used:0.0s, actions:drop
-])
-
-# Add a flow that matches the non-presence of a vlan tag, and check
-# that the datapath flow is modified accordingly.
-AT_CHECK([ovs-ofctl add-flow br0 in_port=1,vlan_tci=0x0000/0x1fff,actions=output:local])
-
-ovs-appctl time/warp 500
-ovs-appctl time/warp 500
-
-for i in 1 2 3; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'
-done
-
-AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x1234), packets:8, bytes:112, used:0.0s, actions:100
-])
-
-# Check that VLAN packets will not hit the same datapath megaflow.
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x1234))'])
-OVS_WAIT_UNTIL([grep 'flow_add:.*vlan(vid=99' ovs-vswitchd.log])
-
-for i in 1 2; do
-    ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x1234))'
-done
-
-AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x1234), packets:8, bytes:112, used:0.0s, actions:100
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x8100),vlan(vid=99,pcp=7/0x0),encap(eth_type(0x1234)), packets:2, bytes:36, used:0.0s, actions:drop
-])
-
-# Check that the new flow matches the CFI bit, while both vid and pcp
-# are wildcarded.
-AT_CHECK([grep '\(modify\)\|\(flow_add\)' ovs-vswitchd.log | strip_ufid ], [0], [dnl
-dpif_netdev|DBG|flow_add: recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x1234), actions:100
-dpif|DBG|dummy at ovs-dummy: put[[modify]] skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x1234)
-dpif|DBG|dummy at ovs-dummy: put[[modify]] skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x1234), actions:100
-dpif_netdev|DBG|flow_add: recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x8100),vlan(vid=99,pcp=7/0x0),encap(eth_type(0x1234)), actions:drop
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - trace (unchanged)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1'], [0], [stdout])
-AT_CHECK([grep "Final flow:" stdout], [0], [Final flow: unchanged
-])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100)'], [0], [stdout])
-AT_CHECK([grep "Final flow:" stdout], [0], [Final flow: unchanged
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - controller])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-dnl Allow new UDP connections on p1 for dst port 2, drop everything else.
-AT_DATA([flows.txt], [dnl
-dnl Table 0
-dnl Store zone in reg4 and packet direction in reg3 (IN=1, OUT=2).
-dnl
-table=0,priority=100,arp,action=normal
-table=0,priority=10,in_port=1,ip,action=set_field:1->reg4,set_field:1->reg3,ct(zone=NXM_NX_REG4[[0..15]],table=1)
-table=0,priority=10,in_port=2,ip,action=set_field:1->reg4,set_field:2->reg3,ct(zone=NXM_NX_REG4[[0..15]],table=1)
-table=0,priority=1,action=drop
-dnl
-dnl Pass tracked traffic through ACL, drop everything else.
-dnl Non-REPLY/RELATED packets get the ACL lookup with the packet headers
-dnl in the actual packet direction in reg0 (IN=1, OUT=2).  REPLY packets
-dnl get the ACL lookup using the conntrack tuple and the inverted direction.
-dnl RELATED packets get ACL lookup using the conntrack tuple in the direction
-dnl of the master connection, as storted in ct_mark.
-dnl
-dnl Incoming non-related packet in the original direction (ACL IN)
-table=1 reg3=1, ip, ct_state=-rel-rpl+trk-inv action=set_field:1->reg0,resubmit(,3),goto_table:5
-dnl Incoming non-related reply packet (CT ACL OUT)
-table=1 reg3=1, ip, ct_state=-rel+rpl+trk-inv action=set_field:2->reg0,resubmit(,3,ct),goto_table:4
-dnl Outgoing non-related packet (ACL OUT)
-table=1 reg3=2, ip, ct_state=-rel-rpl+trk-inv action=set_field:2->reg0,resubmit(,3),goto_table:5
-dnl Outgoing non-related reply packet (CT ACL IN)
-table=1 reg3=2, ip, ct_state=-rel+rpl+trk-inv action=set_field:1->reg0,resubmit(,3,ct),goto_table:4
-dnl
-dnl Related packet (CT ACL in the direction of the master connection.)
-table=1 ip, ct_state=+rel+trk-inv, action=move:NXM_NX_CT_MARK[[]]->NXM_NX_REG0[[]],resubmit(,3,ct),goto_table:4
-dnl Drop everything else.
-table=1 priority=0, action=drop
-dnl
-dnl "ACL table"
-dnl
-dnl Stateful accept (1->reg2) all incoming (reg0=1) IP connections with
-dnl UDP destination port '2'.  Store rule ID (1234) in reg1, verdict
-dnl in reg2.
-table=3 priority=10, reg0=1, udp, udp_dst=2 action=set_field:1234->reg1,set_field:1->reg2
-dnl Stateless drop (0->reg2) everything else in both directions. (Rule ID: 1235)
-table=3 priority=0, action=set_field:1235->reg1,set_field:0->reg2
-dnl
-dnl Re-process stateful traffic that was not accepted by a stateful rule as
-dnl normal traffic in the current direction.  This should also delete the
-dnl now stale conntrack state, so that new state can be created in it's place.
-dnl
-dnl Stateful accepts go to next table.
-table=4 priority=100 reg2=1, action=goto_table:5
-dnl Everything else is reprocessed disregarding the CT state, using the actual
-dnl packet direction.
-table=4 priority=0 action=move:NXM_NX_REG3[[]]->NXM_NX_REG0[[]],resubmit(,3),goto_table:5
-dnl
-dnl "ACL verdict processing table."
-dnl
-dnl Handle stateful (reg2=1) / stateless (reg2=2) accepts and drops (reg2=0)
-dnl
-dnl Drop all non-accepted packets.
-table=5 reg2=0 priority=1000 action=drop
-dnl Commit new non-related IP connections.
-table=5 priority=10 reg2=1 ct_state=+new-rel, ip, action=ct(zone=NXM_NX_REG4[[0..15]],commit,exec(move:NXM_NX_REG3[[0..31]]->NXM_NX_CT_MARK[[0..31]],move:NXM_NX_REG1[[0..31]]->NXM_NX_CT_LABEL[[96..127]])),goto_table:6
-dnl Commit new related connections in either direction, which inherit the mark
-dnl (the direction of the original direction master tuple) from the master
-dnl connection.
-table=5 priority=10 reg2=1 ct_state=+new+rel, ip, action=ct(zone=NXM_NX_REG4[[0..15]],commit,exec(move:NXM_NX_REG1[[0..31]]->NXM_NX_CT_LABEL[[96..127]])),goto_table:6
-dnl Forward everything else, including stateless accepts.
-table=5 priority=0 action=goto_table:6
-dnl
-dnl "Forwarding table"
-dnl
-table=6 action=controller
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-dnl OK, now start a new connection from port 1.
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
-
-dnl Now try a reply from port 2.
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 4])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-dnl Check this output. We only see the latter two packets, not the first.
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x0 total_len=106 reg0=0x1,reg1=0x4d2,reg2=0x1,reg3=0x1,reg4=0x1,in_port=1 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=1,tp_dst=2 udp_csum:553
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x0 total_len=106 ct_state=est|rpl|trk,ct_zone=1,ct_mark=0x1,ct_label=0x4d2000000000000000000000000,ct_nw_src=10.1.1.1,ct_nw_dst=10.1.1.2,ct_nw_proto=17,ct_tp_src=1,ct_tp_dst=2,ip,reg0=0x1,reg1=0x4d2,reg2=0x1,reg3=0x2,reg4=0x1,in_port=2 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=2,tp_dst=1 udp_csum:553
-])
-
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-dnl OK, now start a second connection from port 1
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=3,dst=2)'])
-
-dnl Now try a reply from port 2.
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=3)'])
-
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 4])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-dnl Check this output. We should see both packets
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x0 total_len=106 reg0=0x1,reg1=0x4d2,reg2=0x1,reg3=0x1,reg4=0x1,in_port=1 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=3,tp_dst=2 udp_csum:551
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x0 total_len=106 ct_state=est|rpl|trk,ct_zone=1,ct_mark=0x1,ct_label=0x4d2000000000000000000000000,ct_nw_src=10.1.1.1,ct_nw_dst=10.1.1.2,ct_nw_proto=17,ct_tp_src=3,ct_tp_dst=2,ip,reg0=0x1,reg1=0x4d2,reg2=0x1,reg3=0x2,reg4=0x1,in_port=2 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=2,tp_dst=3 udp_csum:551
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - force commit])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-dnl Allow new connections on p1->p2, but not on p2->p1.
-AT_DATA([flows.txt], [dnl
-dnl Table 0
-dnl
-table=0,priority=100,arp,action=normal
-table=0,priority=10,in_port=1,udp,action=ct(commit),controller
-table=0,priority=10,in_port=2,udp,action=ct(table=1)
-table=0,priority=1,action=drop
-dnl
-dnl Table 1
-dnl
-table=1,priority=10,in_port=2,ct_state=+est,udp,action=ct(force,commit),controller
-table=1,priority=1,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-dnl OK, now start a new connection from port 1.
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
-
-dnl Now try a reply from port 2.
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 4])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-dnl Check this output. We only see the latter two packets, not the first.
-dnl Note that the first packet doesn't have the ct_state bits set. This
-dnl happens because the ct_state field is available only after recirc.
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=1,tp_dst=2 udp_csum:553
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 in_port=2 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=2,tp_dst=1 udp_csum:553
-])
-
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-dnl OK, now start a second connection from port 1
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=3,dst=4)'])
-
-dnl Now try a reply from port 2.
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=4,dst=3)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 4])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-dnl Check this output. We should see both packets
-dnl Note that the first packet doesn't have the ct_state bits set. This
-dnl happens because the ct_state field is available only after recirc.
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=3,tp_dst=4 udp_csum:54f
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 in_port=2 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=4,tp_dst=3 udp_csum:54f
-])
-
-dnl
-dnl Check that the directionality has been changed by force commit.
-dnl
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | sort], [], [dnl
-udp,orig=(src=10.1.1.2,dst=10.1.1.1,sport=2,dport=1),reply=(src=10.1.1.1,dst=10.1.1.2,sport=1,dport=2)
-udp,orig=(src=10.1.1.2,dst=10.1.1.1,sport=4,dport=3),reply=(src=10.1.1.1,dst=10.1.1.2,sport=3,dport=4)
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - ipv6])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-dnl Allow new connections on p1->p2, but not on p2->p1.
-AT_DATA([flows.txt], [dnl
-dnl Table 0
-dnl
-table=0,priority=100,arp,action=normal
-table=0,priority=10,in_port=1,udp6,action=ct(commit,zone=0),controller
-table=0,priority=10,in_port=2,udp6,action=ct(table=1,zone=0)
-table=0,priority=1,action=drop
-dnl Table 1
-dnl
-table=1,priority=10,in_port=2,ct_state=+trk+est-new,udp6,action=controller
-table=1,priority=1,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x86dd),ipv6(src=2001:db8::2,dst=2001:db8::1,label=0,proto=17,tclass=0x70,hlimit=128,frag=no),udp(src=2,dst=1)'])
-
-dnl OK, now start a new connection from port 1.
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x86dd),ipv6(src=2001:db8::1,dst=2001:db8::2,label=0,proto=17,tclass=0x70,hlimit=128,frag=no),udp(src=1,dst=2)'])
-
-dnl Now try a reply from port 2.
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x86dd),ipv6(src=2001:db8::2,dst=2001:db8::1,label=0,proto=17,tclass=0x70,hlimit=128,frag=no),udp(src=2,dst=1)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 4])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-dnl Check this output. We only see the latter two packets, not the first.
-dnl Note that the first packet doesn't have the ct_state bits set. This
-dnl happens because the ct_state field is available only after recirc.
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=126 in_port=1 (via action) data_len=126 (unbuffered)
-udp6,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,ipv6_src=2001:db8::1,ipv6_dst=2001:db8::2,ipv6_label=0x00000,nw_tos=112,nw_ecn=0,nw_ttl=128,tp_src=1,tp_dst=2 udp_csum:bfe2
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=126 ct_state=est|rpl|trk,ct_ipv6_src=2001:db8::1,ct_ipv6_dst=2001:db8::2,ct_nw_proto=17,ct_tp_src=1,ct_tp_dst=2,ipv6,in_port=2 (via action) data_len=126 (unbuffered)
-udp6,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,ipv6_src=2001:db8::2,ipv6_dst=2001:db8::1,ipv6_label=0x00000,nw_tos=112,nw_ecn=0,nw_ttl=128,tp_src=2,tp_dst=1 udp_csum:bfe2
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - output action])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-dnl Allow new connections on p1->p2. Allow only established connections p2->p1
-AT_DATA([flows.txt], [dnl
-dnl The flows are in two separate tables for two reasons:
-dnl * To make the pipeline more clear.
-dnl * To make megaflows more consistent (we check megaflows below).  The
-dnl   unwildcarding in megaflows depends on the internal ordering of the
-dnl   subtables, which are sorted using the system qsort().  qsort()
-dnl   is provided by libc and may or may not be stable, so we can't rely
-dnl   on that.  By having separate tables we have more control over which
-dnl   subtables are visited, meaning consistent megaflows.
-dnl
-dnl Table 0
-dnl
-table=0,priority=100,arp,action=normal
-table=0,priority=10,in_port=1,udp,action=ct(commit,zone=0),2
-table=0,priority=10,in_port=2,udp,action=ct(table=1,zone=0)
-table=0,priority=1,action=drop
-dnl
-dnl Table 1
-dnl
-table=1,priority=10,in_port=2,ct_state=+trk+est-new,udp,action=1
-table=1,priority=1,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-dnl OK, now start a new connection from port 1.
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
-
-dnl Now try a reply from port 2.
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-dnl OK, now start a second connection from port 1
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
-
-dnl Now try a reply from port 2.
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-
-AT_CHECK([cat ovs-vswitchd.log | strip_ufid | filter_flow_install], [0], [dnl
-ct_state(+new-est+trk),recirc_id(0x1),in_port(2),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions:drop
-ct_state(-new+est+trk),recirc_id(0x1),in_port(2),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=17,frag=no), actions:1
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=17,frag=no), actions:ct(commit),2
-recirc_id(0),in_port(2),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=17,frag=no), actions:ct,recirc(0x1)
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - expiration])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-dnl Allow new connections on p1->p2. Allow only established connections p2->p1
-AT_DATA([flows.txt], [dnl
-dnl Table 0
-dnl
-table=0,priority=100,arp,action=normal
-table=0,priority=10,in_port=1,udp,action=ct(commit,zone=0)
-table=0,priority=10,in_port=2,udp,action=ct(table=1,zone=0)
-table=0,priority=1,action=drop
-dnl
-dnl Table 1
-dnl
-table=1,priority=10,in_port=2,ct_state=+trk+est-new,udp,action=controller
-table=1,priority=1,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl time/stop])
-
-dnl Start a new connection from port 1.
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
-
-dnl Now try a reply from port 2.
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-ovs-appctl time/warp 100000
-
-dnl Now try another reply from port 2.
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 3])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-dnl Check this output. Only one reply must be there
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 ct_state=est|rpl|trk,ct_nw_src=10.1.1.1,ct_nw_dst=10.1.1.2,ct_nw_proto=17,ct_tp_src=1,ct_tp_dst=2,ip,in_port=2 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=2,tp_dst=1 udp_csum:553
-dnl
-OFPT_ECHO_REQUEST (xid=0x0): 0 bytes of payload
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - untrackable traffic])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-AT_DATA([flows.txt], [dnl
-ipv6,ct_state=-trk,action=ct(table=0,zone=0)
-ct_state=+trk,action=controller
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl time/stop])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 1])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 ct_state=inv|trk,ipv6,in_port=2 (via action) data_len=86 (unbuffered)
-icmp6,vlan_tci=0x0000,dl_src=00:00:86:05:80:da,dl_dst=00:60:97:07:69:ea,ipv6_src=fe80::200:86ff:fe05:80da,ipv6_dst=fe80::260:97ff:fe07:69ea,ipv6_label=0x00000,nw_tos=0,nw_ecn=0,nw_ttl=255,icmp_type=135,icmp_code=0,nd_target=fe80::260:97ff:fe07:69ea,nd_sll=00:00:86:05:80:da,nd_tll=00:00:00:00:00:00 icmp6_csum:68bd
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - zones])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2 3 4
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-dnl Allow new connections on p1->p2 or p3->p4.
-dnl Allow only established connections p2->p1 and p4->p3
-dnl p1,p2 and p3,p4 are on different zones
-AT_DATA([flows.txt], [dnl
-dnl Table 0
-dnl
-table=0,priority=100,arp,action=normal
-table=0,priority=10,in_port=1,udp,action=ct(commit,zone=0),controller
-table=0,priority=10,in_port=2,udp,action=ct(table=1,zone=0)
-table=0,priority=10,in_port=3,udp,action=ct(commit,zone=1),controller
-table=0,priority=10,in_port=4,udp,action=ct(table=1,zone=1)
-table=0,priority=1,action=drop
-dnl
-dnl Table 1
-dnl
-table=1,priority=10,in_port=2,ct_state=+trk+est-new,udp,action=controller
-table=1,priority=10,in_port=4,ct_state=+trk+est-new,udp,action=controller
-table=1,priority=1,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-dnl Basic "only established" test on ports 1,2
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-dnl Now use the same 5-tuples but on ports 3,4
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p4 'in_port(4),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p4 'in_port(4),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 8])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-dnl Check this output. We only see the latter two packets (for each zone), not the first.
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=1,tp_dst=2 udp_csum:553
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 ct_state=est|rpl|trk,ct_nw_src=10.1.1.1,ct_nw_dst=10.1.1.2,ct_nw_proto=17,ct_tp_src=1,ct_tp_dst=2,ip,in_port=2 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=2,tp_dst=1 udp_csum:553
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=106 in_port=3 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=1,tp_dst=2 udp_csum:553
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 ct_state=est|rpl|trk,ct_zone=1,ct_nw_src=10.1.1.1,ct_nw_dst=10.1.1.2,ct_nw_proto=17,ct_tp_src=1,ct_tp_dst=2,ip,in_port=4 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=2,tp_dst=1 udp_csum:553
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - recirc,commit])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-dnl Allow new connections on p1->p2. Allow only established connections p2->p1
-AT_DATA([flows.txt], [dnl
-dnl Table 0
-dnl
-table=0,priority=100,arp,action=normal
-table=0,priority=10,udp,action=ct(table=1,zone=0)
-table=0,priority=1,action=drop
-dnl
-dnl Table 1
-dnl
-table=1,priority=10,in_port=1,ct_state=+trk+new,udp,action=ct(commit,zone=0),controller
-table=1,priority=10,ct_state=+trk+est,udp,action=controller
-table=1,priority=1,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-dnl OK, now start a new connection from port 1.
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
-
-dnl Now try a reply from port 2.
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 4])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-dnl Check this output. We only see the latter two packets, not the first.
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=1,tp_dst=2 udp_csum:553
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 ct_state=est|rpl|trk,ct_nw_src=10.1.1.1,ct_nw_dst=10.1.1.2,ct_nw_proto=17,ct_tp_src=1,ct_tp_dst=2,ip,in_port=2 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=2,tp_dst=1 udp_csum:553
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - ICMP related])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-dnl Table 0
-dnl
-table=0,priority=100,arp,action=normal
-table=0,priority=10,ip,in_port=1,udp,action=ct(commit,table=1)
-table=0,priority=10,ip,in_port=2,action=ct(table=1)
-table=0,priority=1,action=drop
-dnl
-dnl Table 1
-dnl
-table=1,priority=10,in_port=1,ct_state=+trk,action=controller
-table=1,priority=10,in_port=2,ct_state=+trk-inv-new,action=controller
-table=1,priority=1,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-dnl 1. Send an ICMP port unreach reply for port 8738, without any previous request
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 2 ct\(table=1\) 'f64c473528c9c6f54ecb72db080045c0003d2e8700004001f351ac100004ac1000030303553f0000000045000021317040004011b138ac100003ac10000411112222000da5a06369616f0a'])
-
-dnl 2. Send and UDP packet to port 5555
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 1 ct\(commit,table=1\) 'c6f94ecb72dbe64c473528c9080045000021317040004011b138ac100001ac100002a28e15b3000d20966369616f0a'])
-
-dnl 3. Send an ICMP port unreach reply for port 5555, related to the first packet
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 2 ct\(table=1\) 'e64c473528c9c6f94ecb72db080045c0003d2e8700004001f355ac100002ac1000010303553f0000000045000021317040004011b138ac100001ac100002a28e15b3000d20966369616f0a'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 4])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-dnl Check this output. We only see the first and the last packet
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=47 ct_state=new|trk,ct_nw_src=172.16.0.1,ct_nw_dst=172.16.0.2,ct_nw_proto=17,ct_tp_src=41614,ct_tp_dst=5555,ip,in_port=1 (via action) data_len=47 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=e6:4c:47:35:28:c9,dl_dst=c6:f9:4e:cb:72:db,nw_src=172.16.0.1,nw_dst=172.16.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=41614,tp_dst=5555 udp_csum:2096
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=75 ct_state=rel|rpl|trk,ct_nw_src=172.16.0.1,ct_nw_dst=172.16.0.2,ct_nw_proto=17,ct_tp_src=41614,ct_tp_dst=5555,ip,in_port=2 (via action) data_len=75 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=c6:f9:4e:cb:72:db,dl_dst=e6:4c:47:35:28:c9,nw_src=172.16.0.2,nw_dst=172.16.0.1,nw_tos=192,nw_ecn=0,nw_ttl=64,icmp_type=3,icmp_code=3 icmp_csum:553f
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - ct_mark])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-dnl Allow new connections on p1->p2. Allow only established connections p2->p1
-AT_DATA([flows.txt], [dnl
-dnl Table 0
-dnl
-table=0,arp,action=normal
-table=0,ip,in_port=1,udp,tp_src=1,action=ct(commit,exec(set_field:1->ct_mark)),controller
-table=0,ip,in_port=1,udp,tp_src=3,action=ct(commit,exec(set_field:3->ct_mark)),controller
-table=0,ip,in_port=1,udp,tp_src=5,action=ct(commit,exec(set_field:5->ct_mark)),controller
-table=0,ip,in_port=2,actions=ct(table=1)
-table=0,priority=0,action=drop
-dnl
-dnl Table 1
-dnl
-table=1,priority=100,ct_state=+trk+rpl,ct_mark=0/4,actions=controller
-table=1,priority=1,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=3,dst=4)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=5,dst=6)'])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=4,dst=3)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=6,dst=5)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 10])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-dnl Check this output.
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=1,tp_dst=2 udp_csum:553
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=3,tp_dst=4 udp_csum:54f
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=5,tp_dst=6 udp_csum:54b
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 ct_state=est|rpl|trk,ct_mark=0x1,ct_nw_src=10.1.1.1,ct_nw_dst=10.1.1.2,ct_nw_proto=17,ct_tp_src=1,ct_tp_dst=2,ip,in_port=2 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=2,tp_dst=1 udp_csum:553
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 ct_state=est|rpl|trk,ct_mark=0x3,ct_nw_src=10.1.1.1,ct_nw_dst=10.1.1.2,ct_nw_proto=17,ct_tp_src=3,ct_tp_dst=4,ip,in_port=2 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=4,tp_dst=3 udp_csum:54f
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - ct_label])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-dnl Allow new connections on p1->p2. Allow only established connections p2->p1
-AT_DATA([flows.txt], [dnl
-dnl Table 0
-dnl
-table=0,arp,action=normal
-table=0,ip,in_port=1,udp,tp_src=1,action=ct(commit,exec(set_field:000000000000000001->ct_label))
-table=0,ip,in_port=1,udp,tp_src=3,action=ct(commit,exec(set_field:000000000000000002->ct_label))
-table=0,ip,in_port=2,actions=ct(table=1)
-dnl
-dnl Table 1
-dnl
-table=1,priority=10,ct_state=+trk+rpl,actions=controller
-table=1,priority=1,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=3,dst=4)'])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=4,dst=3)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 4])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-dnl Check this output.
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 ct_state=est|rpl|trk,ct_label=0x1,ct_nw_src=10.1.1.1,ct_nw_dst=10.1.1.2,ct_nw_proto=17,ct_tp_src=1,ct_tp_dst=2,ip,in_port=2 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=2,tp_dst=1 udp_csum:553
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 ct_state=est|rpl|trk,ct_label=0x2,ct_nw_src=10.1.1.1,ct_nw_dst=10.1.1.2,ct_nw_proto=17,ct_tp_src=3,ct_tp_dst=4,ip,in_port=2 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=4,tp_dst=3 udp_csum:54f
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - ct_label datapath flow])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-dnl Allow new connections on p1->p2. Allow only established connections p2->p1
-AT_DATA([flows.txt], [dnl
-dnl The flows are in two separate tables for two reasons:
-dnl * To make the pipeline more clear.
-dnl * To make megaflows more consistent (we check megaflows below).  The
-dnl   unwildcarding in megaflows depends on the internal ordering of the
-dnl   subtables, which are sorted using the system qsort().  qsort()
-dnl   is provided by libc and may or may not be stable, so we can't rely
-dnl   on that.  By having separate tables we have more control over which
-dnl   subtables are visited, meaning consistent megaflows.
-dnl
-dnl Table 0
-dnl
-table=0,arp,action=normal
-table=0,ip,in_port=1,udp,tp_src=1,action=ct(commit,exec(set_field:1->ct_label)),2
-table=0,ip,in_port=2,actions=ct(table=1)
-table=0,priority=0,action=drop
-dnl
-dnl Table 1
-dnl
-table=1,priority=10,ct_state=+trk+rpl,ct_label=0x1,actions=1
-table=1,priority=1,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-# Give time for logs to appear.
-ovs-appctl revalidator/wait
-
-AT_CHECK([cat ovs-vswitchd.log | strip_ufid | filter_flow_install], [0], [dnl
-ct_state(+rpl+trk),ct_label(0x1),recirc_id(0x1),in_port(2),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions:1
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=17,frag=no),udp(src=1), actions:ct(commit,label=0x1),2
-recirc_id(0),in_port(2),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions:ct,recirc(0x1)
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - no output])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-dnl Allow new connections on p1->p2. Allow only established connections p2->p1
-AT_DATA([flows.txt], [dnl
-in_port=1,udp,action=ct(commit,zone=0)
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-dnl Start a new connection from port 1.
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
-
-AT_CHECK([cat ovs-vswitchd.log | strip_ufid | filter_flow_install], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=17,frag=no), actions:ct(commit)
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - tcp port reuse])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-dnl Allow new connections on p1->p2. Allow only established connections p2->p1
-AT_DATA([flows.txt], [dnl
-dnl Table 0
-dnl
-table=0,priority=100,arp,action=normal
-table=0,priority=10,in_port=1,ip,action=ct(commit,table=1)
-table=0,priority=10,in_port=2,ip,action=ct(table=1)
-table=0,priority=1,action=drop
-dnl
-dnl Table 1
-dnl
-dnl The following two flows are separated to explicitly count the packets
-dnl that create a new connection
-table=1,priority=100,cookie=0x1,in_port=1,ip,ct_state=+trk+new-inv-rpl,action=2
-table=1,priority=100,in_port=1,ip,ct_state=+trk-new-inv-rpl,action=2
-dnl
-table=1,priority=100,in_port=2,ip,ct_state=+trk+est+rpl-new-inv,action=1
-table=1,ip,ct_state=+trk+inv,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000a50540000000908004500002ca4e5400040067fe20a0101010a0101020001000259b5d93f0000000060027210dd190000020405b4'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 '50540000000950540000000a08004500002c00004000400624c80a0101020a010101000200017c35468459b5d940601272101a4f0000020405b4'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000a505400000009080045000028a4e6400040067fe50a0101010a0101020001000259b5d9407c35468550107210320c0000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 '50540000000950540000000a0800450000303b5f40004006e9640a0101020a010101000200017c35468559b5d9405018721074c200007061796c6f61640a'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000a505400000009080045000028a4e7400040067fe40a0101010a0101020001000259b5d9407c35468d5010721032040000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 '50540000000950540000000a0800450000283b6040004006e96b0a0101020a010101000200017c35468d59b5d9405011721032030000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000a505400000009080045000028a4e8400040067fe30a0101010a0101020001000259b5d9407c35468e5010721032030000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000a505400000009080045000028a4e9400040067fe20a0101010a0101020001000259b5d9407c35468e5011721032020000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 '50540000000950540000000a0800450000283b6140004006e96a0a0101020a010101000200017c35468e59b5d9415010721032020000'])
-
-AT_CHECK([ovs-appctl revalidator/purge])
-AT_CHECK([ovs-ofctl dump-flows br0 | grep cookie=0x1 | grep -o "n_packets=[[0-9]]*"], [0], [dnl
-dnl Only one new connection
-n_packets=1
-])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000a50540000000908004500002cc0a74000400664200a0101010a010102000100025b7dbf1f0000000060027210f5710000020405b4'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 '50540000000950540000000a08004500002c00004000400624c80a0101020a010101000200017c36468f5b7dbf2060127210329b0000020405b4'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000a505400000009080045000028c0a84000400664230a0101010a010102000100025b7dbf207c364690501072104a580000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 '50540000000950540000000a080045000030392840004006eb9b0a0101020a010101000200017c3646905b7dbf20501872108d0e00007061796c6f61640a'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000a505400000009080045000028c0a94000400664220a0101010a010102000100025b7dbf207c364698501072104a500000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 '50540000000950540000000a080045000028392940004006eba20a0101020a010101000200017c3646985b7dbf20501172104a4f0000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000a505400000009080045000028c0aa4000400664210a0101010a010102000100025b7dbf207c364699501072104a4f0000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000a505400000009080045000028c0ab4000400664200a0101010a010102000100025b7dbf207c364699501172104a4e0000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 '50540000000950540000000a080045000028392a40004006eba10a0101020a010101000200017c3646995b7dbf21501072104a4e0000'])
-
-AT_CHECK([ovs-appctl revalidator/purge])
-AT_CHECK([ovs-ofctl dump-flows br0 | grep cookie=0x1 | grep -o "n_packets=[[0-9]]*"], [0], [dnl
-dnl Two new connections
-n_packets=2
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - tcp pick up])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-dnl Allow new connections on p1->p2. Allow only established connections p2->p1
-AT_DATA([flows.txt], [dnl
-dnl Table 0
-dnl
-table=0,priority=100,arp,action=normal
-table=0,priority=10,in_port=1,tcp,action=ct(commit,table=1)
-table=0,priority=10,in_port=2,tcp,action=ct(table=1)
-table=0,priority=1,action=drop
-dnl
-dnl Table 1
-dnl
-table=1,priority=10,cookie=0x1,ip,ct_state=+trk+inv,action=controller
-table=1,priority=1,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl revalidator/purge])
-AT_CHECK([ovs-ofctl dump-flows br0 | grep cookie=0x1 | grep -o "n_packets=[[0-9]]*"], [0], [dnl
-dnl No dropped packets
-n_packets=0
-])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-dnl The first two packets (SYN, SYN|ACK) are commented out.  We're making
-dnl sure that the connection tracker is able to pick up already established
-dnl connections that use window scaling.
-dnl
-dnl AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000950540000000a080045000030fc2540004006289e0a0101020a01010100020001396bb359000000007002008080cc0000020405b401030307'])
-dnl AT_CHECK([ovs-appctl netdev-dummy/receive p2 '50540000000a50540000000908004500003000004000400624c40a0101010a010102000100028cadbdb3396bb35a70120080365a0000020405b401030307'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000950540000000a080045000028fc264000400628a50a0101020a01010100020001396bb35a8cadbdb45010000a629b0000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000950540000000a080045000029fc274000400628a30a0101020a01010100020001396bb35a8cadbdb45018000a589200000a'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 '50540000000a505400000009080045000028f2c84000400632030a0101010a010102000100028cadbdb4396bb35b5010000a629a0000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000950540000000a08004500022afc284000400626a10a0101020a01010100020001396bb35b8cadbdb45018000a941f0000 dnl
-                                              666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666 dnl
-                                              666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666 dnl
-                                              666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666 dnl
-                                              666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666 dnl
-                                              666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666 dnl
-                                              666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666 dnl
-                                              666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666 dnl
-                                              666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666 dnl
-                                              666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666 dnl
-                                              6666666666666666666666666666666666666666666666666666660a'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 '50540000000a505400000009080045000028f2c94000400632020a0101010a010102000100028cadbdb4396bb55d5010000a60980000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 '50540000000a5054000000090800450001fdf2ca40004006302c0a0101010a010102000100028cadbdb4396bb55d5018000aa60c0000 dnl
-                                              656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565 dnl
-                                              656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565 dnl
-                                              656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565 dnl
-                                              656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565 dnl
-                                              656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565 dnl
-                                              656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565 dnl
-                                              656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565 dnl
-                                              656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565 dnl
-                                              6565656565656565656565656565656565656565656565656565656565656565656565650a'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000950540000000a080045000028fc294000400628a20a0101020a01010100020001396bb55d8cadbf895010000a5ec30000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000950540000000a080045000028fc2a4000400628a10a0101020a01010100020001396bb55d8cadbf895011000a5ec20000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 '50540000000a505400000009080045000028f2cb4000400632000a0101010a010102000100028cadbf89396bb55e5010000a5ec20000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 '50540000000a505400000009080045000028f2cc4000400631ff0a0101010a010102000100028cadbf89396bb55e5011000a5ec10000'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 '50540000000950540000000a080045000028258e40004006ff3d0a0101020a01010100020001396bb55e8cadbf8a5010000a5ec10000'])
-
-AT_CHECK([ovs-appctl revalidator/purge])
-
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | grep cookie=0x1 | grep -o "n_packets=[[0-9]]*"], [0], [dnl
-dnl No dropped packets
-n_packets=0
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is a truncated version of "ofproto-dpif - conntrack - controller",
-dnl with extra send-to-controller actions following ct_clear to show that
-dnl the connection tracking data has been cleared.
-AT_SETUP([ofproto-dpif - conntrack - ct_clear])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg vconn:info ofproto_dpif:info])
-
-dnl Allow new connections on p1->p2, but not on p2->p1.
-AT_DATA([flows.txt], [dnl
-dnl Table 0
-dnl
-table=0,priority=100,arp,action=normal
-table=0,priority=10,in_port=1,udp,action=ct(commit,zone=0),controller,ct_clear,controller
-table=0,priority=10,in_port=2,udp,action=ct(table=1,zone=0)
-table=0,priority=1,action=drop
-dnl
-dnl Table 1
-dnl
-table=1,priority=10,in_port=2,ct_state=+trk+est-new,udp,action=controller,ct_clear,controller
-table=1,priority=1,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-dnl OK, now start a new connection from port 1.
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
-
-dnl Now try a reply from port 2.
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:0a,dst=50:54:00:00:00:09),eth_type(0x0800),ipv4(src=10.1.1.2,dst=10.1.1.1,proto=17,tos=0,ttl=64,frag=no),udp(src=2,dst=1)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 8])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-dnl Check this output. We only see the latter two packets, not the first.
-dnl Note that the first packet doesn't have the ct_state bits set. This
-dnl happens because the ct_state field is available only after recirc.
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=1,tp_dst=2 udp_csum:553
-dnl
-NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=1,tp_dst=2 udp_csum:553
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 ct_state=est|rpl|trk,ct_nw_src=10.1.1.1,ct_nw_dst=10.1.1.2,ct_nw_proto=17,ct_tp_src=1,ct_tp_dst=2,ip,in_port=2 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=2,tp_dst=1 udp_csum:553
-dnl
-NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=106 in_port=2 (via action) data_len=106 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:0a,dl_dst=50:54:00:00:00:09,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=2,tp_dst=1 udp_csum:553
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - conntrack - ofproto/trace])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1 2 3 4
-
-AT_DATA([flows.txt], [dnl
-dnl Table 0
-dnl
-table=0,priority=100,arp,action=normal
-table=0,priority=10,udp,action=ct(table=1,zone=0)
-table=0,priority=10,tcp,action=ct(table=2,zone=1)
-table=0,priority=1,action=drop
-dnl
-dnl Table 1
-dnl
-table=1,priority=10,in_port=1,ct_zone=0,ct_state=+trk+new,udp,action=ct(commit,zone=0),2
-table=1,priority=10,in_port=1,ct_zone=0,ct_state=+trk+est,udp,action=2
-table=1,priority=10,in_port=2,ct_zone=0,ct_state=+trk+est,udp,action=1
-table=1,priority=1,action=drop
-dnl
-dnl Table 2
-dnl
-table=2,priority=10,in_port=1,tcp,ct_zone=1,ct_state=+trk+new,tcp,action=ct(commit,zone=1),ct(table=3,zone=2)
-table=2,priority=10,in_port=1,tcp,ct_zone=1,ct_state=+trk+est,tcp,action=ct(table=3,zone=2)
-table=2,priority=1,action=drop
-dnl
-dnl Table 3
-dnl
-table=3,priority=10,in_port=1,tcp,ct_zone=2,ct_state=+trk+new,tcp,action=ct(commit,zone=2),4
-table=3,priority=10,in_port=1,tcp,ct_zone=2,ct_state=+trk+est,tcp,action=3
-table=2,priority=1,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=2,udp'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: drop
-])
-
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,udp'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: ct(commit),2
-])
-
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,tcp'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: ct(commit,zone=2),4
-])
-
-AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,tcp' --ct-next 'trk,est' --ct-next 'trk,est' ], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 3
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - set mtu])
-OVS_VSWITCHD_START
-
-add_of_ports br0 1
-
-# Check that initial MTU is 1500 for 'br0' and 'p1'.
-AT_CHECK([ovs-vsctl get Interface br0 mtu], [0], [dnl
-1500
-])
-AT_CHECK([ovs-vsctl get Interface p1 mtu], [0], [dnl
-1500
-])
-
-# Request new MTU for 'p1'
-AT_CHECK([ovs-vsctl set Interface p1 mtu_request=1600])
-
-# Check that the new MTU is applied
-AT_CHECK([ovs-vsctl --timeout=10 wait-until Interface p1 mtu=1600])
-# The internal port 'br0' should have the same MTU value as p1, becase it's
-# the new bridge minimum.
-AT_CHECK([ovs-vsctl --timeout=10 wait-until Interface br0 mtu=1600])
-
-AT_CHECK([ovs-vsctl del-port br0 p1])
-
-# When 'p1' is deleted, the internal port should return to the default MTU
-AT_CHECK([ovs-vsctl --timeout=10 wait-until Interface br0 mtu=1500])
-
-# New port with 'mtu_request' in the same transaction.
-AT_CHECK([ovs-vsctl add-port br0 p2 -- set int p2 type=dummy mtu_request=1600])
-AT_CHECK([ovs-vsctl --timeout=10 wait-until Interface p2 mtu=1600])
-AT_CHECK([ovs-vsctl --timeout=10 wait-until Interface br0 mtu=1600])
-
-# Explicitly set mtu_request on the internal interface.  This should prevent
-# the MTU from being overriden.
-AT_CHECK([ovs-vsctl set int br0 mtu_request=1700])
-AT_CHECK([ovs-vsctl --timeout=10 wait-until Interface br0 mtu=1700])
-
-# The new MTU on p2 should not affect br0.
-AT_CHECK([ovs-vsctl set int p2 mtu_request=1400])
-AT_CHECK([ovs-vsctl --timeout=10 wait-until Interface p2 mtu=1400])
-AT_CHECK([ovs-vsctl --timeout=10 wait-until Interface br0 mtu=1700])
-
-# Remove explicit mtu_request from br0.  Now it should track the bridge
-# minimum again.
-AT_CHECK([ovs-vsctl set int br0 mtu_request=[[]]])
-AT_CHECK([ovs-vsctl --timeout=10 wait-until Interface br0 mtu=1400])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - fragment prerequisites])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-add_of_ports br0 1
-
-AT_DATA([flows.txt], [dnl
-priority=10,in_port=1,udp,tp_src=67,tp_dst=68,action=drop
-priority=1,in_port=1,udp,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:max-idle=10000])
-
-ovs-appctl time/stop
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'recirc_id(0),in_port(1),eth_type(0x0800),ipv4(proto=17,frag=later)'])
-ovs-appctl time/warp 5000
-
-AT_CHECK([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=17,frag=later), actions:drop
-])
-
-dnl Change the flow table.  This will trigger revalidation of all the flows.
-AT_CHECK([ovs-ofctl add-flow br0 priority=5,in_port=1,action=drop])
-AT_CHECK([ovs-appctl revalidator/wait], [0])
-
-dnl We don't want revalidators to delete any flow.  If the flow has been
-dnl deleted it means that there's some inconsistency with the revalidation.
-AT_CHECK([grep flow_del ovs-vswitchd.log], [1])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - check_pkt_larger action])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3 4
-
-AT_DATA([flows.txt], [dnl
-table=0,in_port=1 actions=check_pkt_larger(200)->NXM_NX_REG0[[0]],resubmit(,1)
-table=1,in_port=1,reg0=0x1/0x1 actions=output:2,resubmit(,2)
-table=1,in_port=1,actions=output:3,resubmit(,2)
-table=2,in_port=1,actions=mod_dl_dst:82:82:82:82:82:82,output:4
-])
-
-AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: check_pkt_len(size=200,gt(2,set(eth(dst=82:82:82:82:82:82)),4),le(3,set(eth(dst=82:82:82:82:82:82)),4))
-])
-
-dnl Test flow xlate check_pkt_large clone action without using datapath check_pkt_len action.
-AT_CHECK([ovs-appctl dpif/set-dp-features br0 check_pkt_len false], [0], [ignore])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -3 stdout], [0], [dnl
-Datapath actions: 3,set(eth(dst=82:82:82:82:82:82)),4
-This flow is handled by the userspace slow path because it:
-  - Uses action(s) not supported by datapath.
-])
-
-dnl Enable datapath check_pkt_len action
-AT_CHECK([ovs-appctl dpif/set-dp-features br0 check_pkt_len true], [0], [ignore])
-
-ovs-ofctl del-flows br0
-
-AT_DATA([flows.txt], [dnl
-table=0,in_port=1 actions=check_pkt_larger(200)->NXM_NX_REG0[[0]],resubmit(,1)
-table=1,in_port=1,priority=200,reg0=0x1/0x1 actions=output:2
-])
-
-AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: check_pkt_len(size=200,gt(2),le(drop))
-])
-
-ovs-ofctl del-flows br0
-AT_DATA([flows.txt], [dnl
-table=0,in_port=1 actions=check_pkt_larger(200)->NXM_NX_REG0[[0]]
-])
-
-AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: check_pkt_len(size=200,gt(drop),le(drop))
-])
-
-ovs-ofctl del-flows br0
-AT_DATA([flows.txt], [dnl
-table=0,in_port=1 actions=check_pkt_larger(200)->NXM_NX_REG0[[0]],resubmit(,1)
-table=1,in_port=1,priority=200,reg0=0x1/0x1,ip actions=clone(set_field:192.168.3.3->ip_src),clone(set_field:192.168.4.4->ip_dst,output:2),clone(mod_dl_src:80:81:81:81:81:81,set_field:192.168.5.5->ip_dst,output:3),output:4
-table=1,in_port=1,priority=0,ip actions=clone(set_field:192.168.3.3->ip_src),clone(set_field:192.168.4.4->ip_dst,output:2),clone(ct(commit),output:3),output:4
-])
-
-AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: check_pkt_len(size=200,gt(set(ipv4(dst=192.168.4.4)),2,set(eth(src=80:81:81:81:81:81)),set(ipv4(dst=192.168.5.5)),3,set(eth(src=50:54:00:00:00:09)),set(ipv4(dst=10.10.10.1)),4),le(set(ipv4(dst=192.168.4.4)),2,set(ipv4(dst=10.10.10.1)),clone(ct(commit),3),4))
-])
-
-AT_DATA([flows.txt], [dnl
-table=0,priority=0 actions=check_pkt_larger(200)->NXM_NX_REG0[[0]],resubmit(,1)
-table=1,in_port=1,priority=200,reg0=0x1/0x1,ip actions=clone(set_field:192.168.3.3->ip_src, resubmit(,0))
-table=1,in_port=1,priority=0,ip actions=clone(set_field:192.168.3.4->ip_src, resubmit(,0))
-])
-
-AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flows br0 flows.txt])
-ovs-ofctl dump-flows br0
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -3 stdout], [0], [dnl
-Megaflow: recirc_id=0,eth,ip,reg0=0/0x1,in_port=1,nw_src=10.10.10.2,nw_frag=no
-Datapath actions: drop
-Translation failed (Recursion too deep), packet is dropped.
-])
-
-ovs-ofctl del-flows br0
-AT_DATA([flows.txt], [dnl
-table=0,priority=0 actions=check_pkt_larger(200)->NXM_NX_REG0[[0]],resubmit(,1)
-table=1,ip,nw_src=192.168.3.3 actions=output:3
-table=1,ip,nw_src=192.168.3.4 actions=output:4
-table=1,reg0=0x1/0x1,ip actions=clone(set_field:192.168.3.3->ip_src, resubmit(,0))
-table=1,ip actions=clone(set_field:192.168.3.4->ip_src, resubmit(,0))
-])
-
-AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flows br0 flows.txt])
-ovs-ofctl dump-flows br0
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: check_pkt_len(size=200,gt(set(ipv4(src=192.168.3.3)),check_pkt_len(size=200,gt(3),le(3))),le(set(ipv4(src=192.168.3.4)),check_pkt_len(size=200,gt(4),le(4))))
-])
-
-ovs-ofctl del-flows br0
-AT_DATA([flows.txt], [dnl
-table=0,in_port=1 actions=check_pkt_larger(200)->NXM_NX_REG0[[0]],resubmit(,1)
-table=1,in_port=1,reg0=0x1/0x1 actions=mod_dl_dst:82:82:82:82:82:82,controller(),resubmit(,2)
-table=1,in_port=1 actions=resubmit(,2)
-table=2,ip,dl_dst=82:82:82:82:82:82 actions=ct(table=3)
-table=2,ip,dl_dst=50:54:00:00:00:0a actions=ct(table=3)
-table=3,ip,reg0=0x1/0x1 actions=output:2
-table=3,ip actions=output:4
-])
-
-AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([cat stdout | grep Datapath -B1], [0], [dnl
-Megaflow: recirc_id=0,eth,ip,in_port=1,dl_dst=50:54:00:00:00:0a,nw_frag=no
-Datapath actions: check_pkt_len(size=200,gt(set(eth(dst=82:82:82:82:82:82)),userspace(pid=0,controller(reason=1,dont_send=1,continuation=0,recirc_id=1,rule_cookie=0,controller_id=0,max_len=65535)),ct,recirc(0x2)),le(ct,recirc(0x3)))
---
-Megaflow: recirc_id=0x2,eth,ip,in_port=1,nw_frag=no
-Datapath actions: 2
---
-Megaflow: recirc_id=0x3,eth,ip,in_port=1,nw_frag=no
-Datapath actions: 4
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - check_pkt_larger with continuation and ct])
-OVS_VSWITCHD_START
-add_of_ports --pcap br0 `seq 1 4`
-
-AT_CAPTURE_FILE([ofctl_monitor0.log])
-AT_CHECK([ovs-ofctl monitor br0 resume --detach --no-chdir --pidfile=ovs-ofctl0.pid 2> ofctl_monitor0.log])
-
-AT_DATA([flows.txt], [dnl
-table=0,in_port=1 actions=check_pkt_larger(150)->NXM_NX_REG0[[0]],resubmit(,1)
-table=1,ip,reg0=0x1/0x1 actions=mod_dl_dst:82:82:82:82:82:82,controller(pause),resubmit(,2)
-table=1,ip,reg0=0 actions=mod_dl_dst:83:83:83:83:83:83,controller(pause),resubmit(,2)
-table=2,ip,dl_dst=82:82:82:82:82:82 actions=ct(table=3)
-table=2,ip,dl_dst=83:83:83:83:83:83 actions=ct(table=3)
-table=3,ip,reg0=0x1/0x1 actions=ct(commit),output:2
-table=3,ip actions=ct(commit),output:4
-])
-
-AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flows br0 flows.txt])
-
-flow="in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)"
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 "$flow"], [0], [stdout])
-
-OVS_WAIT_UNTIL([test 1 = `ovs-ofctl parse-pcap p4-tx.pcap \
-| grep dl_dst=83:83:83:83:83:83 | wc -l`])
-AT_CHECK([test 0 = `ovs-ofctl parse-pcap p2-tx.pcap | wc -l`])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 "$flow" --len 200], [0], [stdout])
-
-OVS_WAIT_UNTIL([test 1 = `ovs-ofctl parse-pcap p2-tx.pcap \
-| grep dl_dst=82:82:82:82:82:82 | wc -l`])
-AT_CHECK([test 1 = `ovs-ofctl parse-pcap p2-tx.pcap | wc -l`])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/ofproto.at b/tests/ofproto.at
deleted file mode 100644
index a810dd604..000000000
--- a/tests/ofproto.at
+++ /dev/null
@@ -1,6641 +0,0 @@
-AT_BANNER([ofproto])
-
-AT_SETUP([ofproto - echo request])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -vwarn probe br0])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - handling messages with bad version])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor running OpenFlow 1.0, then send the switch an OF1.1 features
-# request
-AT_CHECK([ovs-ofctl -P standard monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-ovs-appctl -t ovs-ofctl ofctl/send 0205000801234567
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//
-/ECHO/d' monitor.log], [0], [dnl
-send: OFPT_FEATURES_REQUEST (OF1.1):
-OFPT_ERROR (OF1.1): OFPBRC_BAD_VERSION
-OFPT_FEATURES_REQUEST (OF1.1):
-OFPT_BARRIER_REPLY:
-])
-
-OVS_VSWITCHD_STOP(["/received OpenFlow version 0x02 != expected 01/d"])
-AT_CLEANUP
-
-AT_SETUP([ofproto - feature request, config request])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -vwarn show br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPT_FEATURES_REPLY: dpid:fedcba9876543210
-n_tables:254, n_buffers:0
-capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
-actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
- LOCAL(br0): addr:aa:55:aa:55:00:00
-     config:     0
-     state:      0
-     speed: 0 Mbps now, 0 Mbps max
-OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - set OpenFlow port number])
-OVS_VSWITCHD_START(
-       [add-port br0 p1 -- set Interface p1 type=dummy --\
-        add-port br0 p2 -- set Interface p2 type=dummy ofport_request=99])
-AT_CHECK([ovs-ofctl -vwarn show br0], [0], [stdout])
-AT_CHECK([[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/00:0.$/00:0x/' < stdout]],
-      [0], [dnl
-OFPT_FEATURES_REPLY: dpid:fedcba9876543210
-n_tables:254, n_buffers:0
-capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
-actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
- 1(p1): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      0
-     speed: 0 Mbps now, 0 Mbps max
- 99(p2): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      0
-     speed: 0 Mbps now, 0 Mbps max
- LOCAL(br0): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      0
-     speed: 0 Mbps now, 0 Mbps max
-OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-AT_SETUP([ofproto - port stats - (OpenFlow 1.0)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -vwarn dump-ports br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_PORT reply: 1 ports
-  port LOCAL: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=0, bytes=0, drop=?, errs=?, coll=?
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - port stats - (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-ports br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_PORT reply (OF1.2): 1 ports
-  port LOCAL: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=0, bytes=0, drop=?, errs=?, coll=?
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - port stats - (OpenFlow 1.4)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow14 -vwarn dump-ports br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sed 's/duration=[[0-9.]]*s/duration=?s/'],
-  [0], [dnl
-OFPST_PORT reply (OF1.4): 1 ports
-  port LOCAL: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=0, bytes=0, drop=?, errs=?, coll=?
-           duration=?s
-           CUSTOM Statistics
-                      rx_custom_packets_1=0, rx_custom_packets_2=0,
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-AT_SETUP([ofproto - port-desc stats (OpenFlow 1.0)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -vwarn dump-ports-desc br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_PORT_DESC reply:
- LOCAL(br0): addr:aa:55:aa:55:00:00
-     config:     0
-     state:      0
-     speed: 0 Mbps now, 0 Mbps max
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-AT_SETUP([ofproto - port-desc stats (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-ports-desc br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_PORT_DESC reply (OF1.2):
- LOCAL(br0): addr:aa:55:aa:55:00:00
-     config:     0
-     state:      LIVE
-     speed: 0 Mbps now, 0 Mbps max
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - port-desc stats (OpenFlow 1.5)])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-AT_CHECK([ovs-ofctl -F OXM-OpenFlow15 -O OpenFlow15 -vwarn dump-ports-desc br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sed 's/00:0./00:0x/'], [0], [dnl
-OFPST_PORT_DESC reply (OF1.5):
- 1(p1): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      LIVE
-     speed: 0 Mbps now, 0 Mbps max
- 2(p2): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      LIVE
-     speed: 0 Mbps now, 0 Mbps max
- 3(p3): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      LIVE
-     speed: 0 Mbps now, 0 Mbps max
- LOCAL(br0): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      LIVE
-     speed: 0 Mbps now, 0 Mbps max
-])
-AT_CHECK([ovs-ofctl -F OXM-OpenFlow15 -O OpenFlow15 -vwarn dump-ports-desc br0 2], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sed 's/00:0./00:0x/'], [0], [dnl
-OFPST_PORT_DESC reply (OF1.5):
- 2(p2): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      LIVE
-     speed: 0 Mbps now, 0 Mbps max
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl CHECK_QUEUE_STATS(label, option, format)
-m4_define([CHECK_QUEUE_STATS], [
-AT_SETUP([ofproto - queue stats - (OpenFlow $1)])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-ofctl -O $2 queue-stats br0 | strip_xids], [0],
-  [OFPST_QUEUE reply$3: 1 queues
-  port LOCAL queue 0: bytes=?, pkts=?, errors=?, duration=?
-])
-
-AT_CHECK([ovs-ofctl -O $2 queue-stats br0 LOCAL | strip_xids], [0],
-  [OFPST_QUEUE reply$3: 1 queues
-  port LOCAL queue 0: bytes=?, pkts=?, errors=?, duration=?
-])
-
-AT_CHECK([ovs-ofctl -O $2 queue-stats br0 LOCAL 0 | strip_xids], [0],
-  [OFPST_QUEUE reply$3: 1 queues
-  port LOCAL queue 0: bytes=?, pkts=?, errors=?, duration=?
-])
-
-AT_CHECK([ovs-ofctl -O $2 queue-stats br0 ANY 0 | strip_xids], [0],
-  [OFPST_QUEUE reply$3: 1 queues
-  port LOCAL queue 0: bytes=?, pkts=?, errors=?, duration=?
-])
-
-AT_CHECK([ovs-ofctl -O $2 queue-stats br0 LOCAL 5 | strip_xids], [0],
-  [OFPT_ERROR$3: OFPQOFC_BAD_QUEUE
-OFPST_QUEUE request$3: port=LOCAL queue=5
-])
-
-AT_CHECK([ovs-ofctl -O $2 queue-stats br0 ANY 5 | strip_xids], [0],
-  [OFPT_ERROR$3: OFPQOFC_BAD_QUEUE
-OFPST_QUEUE request$3: port=ANY queue=5
-])
-
-AT_CHECK([ovs-ofctl -O $2 queue-stats br0 10 | strip_xids], [0],
-  [OFPT_ERROR$3: OFPQOFC_BAD_PORT
-OFPST_QUEUE request$3: port=10 queue=ALL
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-])
-CHECK_QUEUE_STATS([1.0], [OpenFlow10], [])
-CHECK_QUEUE_STATS([1.1], [OpenFlow11], [ (OF1.1)])
-CHECK_QUEUE_STATS([1.2], [OpenFlow12], [ (OF1.2)])
-CHECK_QUEUE_STATS([1.3], [OpenFlow13], [ (OF1.3)])
-CHECK_QUEUE_STATS([1.4], [OpenFlow14], [ (OF1.4)])
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-AT_SETUP([ofproto - queue configuration - (OpenFlow 1.0)])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-AT_CHECK([ovs-ofctl queue-get-config br0 1], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPT_QUEUE_GET_CONFIG_REPLY: port=1
-queue 0:
-])
-AT_CHECK([ovs-ofctl queue-get-config br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sort], [0], [dnl
-OFPT_QUEUE_GET_CONFIG_REPLY: port=1
-OFPT_QUEUE_GET_CONFIG_REPLY: port=2
-queue 0:
-queue 0:
-])
-AT_CHECK([ovs-ofctl queue-get-config br0 10], [0],
-  [OFPT_ERROR (xid=0x2): OFPQOFC_BAD_PORT
-OFPT_QUEUE_GET_CONFIG_REQUEST (xid=0x2): port=10
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - queue configuration - (OpenFlow 1.1)])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-AT_CHECK([ovs-ofctl -O OpenFlow11 queue-get-config br0 1], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPT_QUEUE_GET_CONFIG_REPLY (OF1.1): port=1
-queue 0:
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 queue-get-config br0 10 | strip_xids], [0],
-  [OFPT_ERROR (OF1.1): OFPQOFC_BAD_PORT
-OFPT_QUEUE_GET_CONFIG_REQUEST (OF1.1): port=10
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - queue configuration - (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-AT_CHECK([ovs-ofctl -O OpenFlow12 queue-get-config br0 1], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPT_QUEUE_GET_CONFIG_REPLY (OF1.2): port=1
-queue 0:
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 queue-get-config br0 ANY], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPT_QUEUE_GET_CONFIG_REPLY (OF1.2): port=ANY
-queue 0:
-queue 0:
-queue 0:
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 queue-get-config br0 10 | strip_xids], [0],
-  [OFPT_ERROR (OF1.2): OFPQOFC_BAD_PORT
-OFPT_QUEUE_GET_CONFIG_REQUEST (OF1.2): port=10
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - queue configuration - (OpenFlow 1.4)])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-
-AT_CHECK([ovs-ofctl -O OpenFlow14 queue-get-config br0 any | strip_xids], [0],
-  [OFPST_QUEUE_DESC reply (OF1.4): port=1
-queue 0:
-port=2
-queue 0:
-port=LOCAL
-queue 0:
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow14 queue-get-config br0 1 | strip_xids], [0],
-  [OFPST_QUEUE_DESC reply (OF1.4): port=1
-queue 0:
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow14 queue-get-config br0 10 | strip_xids], [0],
-  [OFPT_ERROR (OF1.4): OFPQOFC_BAD_PORT
-OFPST_QUEUE_DESC request (OF1.4): port=10
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow14 queue-get-config br0 1 2 | strip_xids], [0],
-  [OFPT_ERROR (OF1.4): OFPQOFC_BAD_QUEUE
-OFPST_QUEUE_DESC request (OF1.4): port=1 queue=2
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-dnl Actions definition listed in both supported formats (w/ actions=)
-AT_SETUP([ofproto - del group (OpenFlow 1.0 extension)])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1233,type=select,selection_method=hash,bucket=output:10,bucket=output:11
-group_id=1234,type=select,selection_method=hash,fields(eth_dst,ip_dst,tcp_dst),bucket=output:10,bucket=output:11
-group_id=1235,type=all,bucket=actions=output:12,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
-group_id=1236,type=select,selection_method=dp_hash,bucket=output:10,bucket=output:11
-])
-AT_CHECK([ovs-ofctl -O OpenFlow10 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow10 -vwarn dump-groups br0 1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-NXST_GROUP_DESC reply:
- group_id=1234,type=select,selection_method=hash,fields(eth_dst,ip_dst,tcp_dst),bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
-])
-AT_CHECK([ovs-ofctl -O OpenFlow10 -vwarn del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow10 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sort], [0], [dnl
- group_id=1233,type=select,selection_method=hash,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
- group_id=1235,type=all,bucket=bucket_id:2,actions=output:12,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
- group_id=1236,type=select,selection_method=dp_hash,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
-NXST_GROUP_DESC reply:
-])
-AT_CHECK([ovs-ofctl -O OpenFlow10 -vwarn del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow10 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sort], [0], [dnl
- group_id=1233,type=select,selection_method=hash,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
- group_id=1235,type=all,bucket=bucket_id:2,actions=output:12,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
- group_id=1236,type=select,selection_method=dp_hash,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
-NXST_GROUP_DESC reply:
-])
-AT_CHECK([ovs-ofctl -O OpenFlow10 -vwarn del-groups br0], [0])
-AT_CHECK([ovs-ofctl -O OpenFlow10 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-NXST_GROUP_DESC reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-dnl Actions definition listed in both supported formats (w/ actions=)
-AT_SETUP([ofproto - del group (OpenFlow 1.1)])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=all,bucket=output:10
-group_id=1235,type=all,bucket=actions=output:10
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-groups br0 ], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sort], [0], [dnl
- group_id=1234,type=all,bucket=actions=output:10
- group_id=1235,type=all,bucket=actions=output:10
-OFPST_GROUP_DESC reply (OF1.1):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.1):
- group_id=1235,type=all,bucket=actions=output:10
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.1):
- group_id=1235,type=all,bucket=actions=output:10
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0], [0])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.1):
-])
-
-# Negative test.
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0 group_id=0xfffffff0],
-  [1], [], [ovs-ofctl: invalid group id 4294967280
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-dnl Actions definition listed in both supported formats (w/ actions=)
-AT_SETUP([ofproto - add indirect group])
-OVS_VSWITCHD_START
-dnl indirect group must have exactly one bucket
-AT_DATA([stderr], [dnl
-OFPT_ERROR (OF1.1) (xid=0x2): OFPGMFC_INVALID_GROUP
-OFPT_GROUP_MOD (OF1.1) (xid=0x2): ***decode error: OFPGMFC_INVALID_GROUP***
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-group br0 'group_id=1234,type=indirect'], [1], , [stderr])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-group br0 'group_id=1235,type=indirect,bucket=output:10'])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-group br0 'group_id=1236,type=indirect,bucket=output:10,bucket=output:11'], [1], , [stderr])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - group mod with mod and add_or_mod command])
-OVS_VSWITCHD_START
-dnl Check that mod-group for non-existing group fails without --may-create
-AT_DATA([stderr], [dnl
-OFPT_ERROR (OF1.3) (xid=0x2): OFPGMFC_UNKNOWN_GROUP
-OFPT_GROUP_MOD (OF1.3) (xid=0x2):
- MOD group_id=1234,type=indirect,bucket=actions=output:2
-])
-AT_CHECK([ovs-ofctl -O OpenFlow13 -vwarn mod-group br0 'group_id=1234,type=indirect,bucket=actions=2'], [1], , [stderr])
-dnl Check that mod-group for non-existing group succeeds with --may-create
-AT_CHECK([ovs-ofctl -O OpenFlow13 -vwarn --may-create mod-group br0 'group_id=1234,type=indirect,bucket=actions=2'])
-AT_CHECK([ovs-ofctl -O OpenFlow13 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.3):
- group_id=1234,type=indirect,bucket=actions=output:2
-])
-dnl Check that mod-group for existing group succeeds with --may-create
-AT_CHECK([ovs-ofctl -O OpenFlow13 -vwarn --may-create mod-group br0 'group_id=1234,type=indirect,bucket=actions=3'])
-AT_CHECK([ovs-ofctl -O OpenFlow13 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.3):
- group_id=1234,type=indirect,bucket=actions=output:3
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-dnl Actions definition listed in both supported formats (w/ actions=)
-AT_SETUP([ofproto - del group (OpenFlow 1.5)])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1233,type=select,selection_method=hash,bucket=output:10,bucket=output:11
-group_id=1234,type=select,selection_method=hash,fields(eth_dst,ip_dst,tcp_dst),bucket=output:10,bucket=output:11
-group_id=1235,type=all,bucket=actions=output:12,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
-group_id=1236,type=select,selection_method=dp_hash,bucket=output:10,bucket=output:11
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -F OXM-OpenFlow15 -O OpenFlow15 -vwarn dump-groups br0 1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=select,selection_method=hash,fields(eth_dst,ip_dst,tcp_dst),bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sort], [0], [dnl
- group_id=1233,type=select,selection_method=hash,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
- group_id=1235,type=all,bucket=bucket_id:2,actions=output:12,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
- group_id=1236,type=select,selection_method=dp_hash,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
-OFPST_GROUP_DESC reply (OF1.5):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sort], [0], [dnl
- group_id=1233,type=select,selection_method=hash,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
- group_id=1235,type=all,bucket=bucket_id:2,actions=output:12,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
- group_id=1236,type=select,selection_method=dp_hash,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
-OFPST_GROUP_DESC reply (OF1.5):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn del-groups br0], [0])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-AT_SETUP([ofproto - del group deletes flows])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=all,bucket=output:10
-group_id=1235,type=all,bucket=output:10
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-groups br0 groups.txt])
-AT_DATA([flows.txt], [dnl
-tcp actions=group:1234
-table=2 udp actions=group:1235
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-flows br0 | ofctl_strip | sort],
-[0], [dnl
- table=2, udp actions=group:1235
- tcp actions=group:1234
-OFPST_FLOW reply (OF1.1):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-flows br0 | ofctl_strip | sort],
-[0], [dnl
- table=2, udp actions=group:1235
-OFPST_FLOW reply (OF1.1):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-flows br0 | ofctl_strip | sort],
-[0], [dnl
- table=2, udp actions=group:1235
-OFPST_FLOW reply (OF1.1):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-flows br0 | ofctl_strip | sort],
-[0], [dnl
-OFPST_FLOW reply (OF1.1):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-dnl Actions definition listed in both supported formats (w/ actions=)
-AT_SETUP([ofproto - insert group buckets])
-OVS_VSWITCHD_START
-# Add group with no buckets.
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=all
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -F OXM-OpenFlow15 -O OpenFlow15 -vwarn dump-groups br0 1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all
-])
-
-# Add two buckets, using "last".
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=last,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11])
-AT_CHECK([ovs-ofctl -F OXM-OpenFlow15 -O OpenFlow15 -vwarn dump-groups br0 1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11
-])
-
-# Start over again, then add two buckets using "first".
-AT_CHECK([ovs-ofctl -O OpenFlow15 --strict del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn add-group br0 group_id=1234,type=all])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=first,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11])
-AT_CHECK([ovs-ofctl -F OXM-OpenFlow15 -O OpenFlow15 -vwarn dump-groups br0 1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11
-])
-
-# Add two more buckets before the existing ones.
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=first,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11
-])
-
-# Add another bucket at the end.
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=last,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15
-])
-
-# Verify that duplicate bucket IDs are rejected.
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=last,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/truncated/,$d'], [0], [dnl
-OFPT_ERROR (OF1.5): OFPGMFC_BUCKET_EXISTS
-OFPT_GROUP_MOD (OF1.5):
- INSERT_BUCKET command_bucket_id:last,group_id=1234,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15
-])
-
-
-# Add another bucket just before bucket 15.
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=15])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15
-])
-
-# Add two more buckets just before bucket 11,
-# getting the command from a file.
-AT_DATA([buckets.txt], [dnl
-group_id=1234,command_bucket_id=11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:13,actions=output:13
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn insert-buckets br0 - < buckets.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:13,actions=output:13,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15
-])
-
-# Add yet two more buckets.
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=15,bucket=bucket_id:20,actions=output:20,bucket=bucket_id:21,actions=output:21])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:13,actions=output:13,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15,bucket=bucket_id:20,actions=output:20,bucket=bucket_id:21,actions=output:21
-])
-
-# Delete groups.
-AT_CHECK([ovs-ofctl -O OpenFlow15 del-groups br0])
-
-# Add "fast_failover" group, then insert a bucket into it and make
-# sure that the type of the group doesn't change.  (There was a bug
-# that caused this to happen.)
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn add-group br0 group_id=1234,type=ff])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=ff
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=first,bucket=bucket_id:20,actions=output:20,bucket=bucket_id:21,actions=output:21])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=ff,bucket=bucket_id:20,actions=output:20,bucket=bucket_id:21,actions=output:21
-])
-
-# Negative tests.
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=123,type=indirect,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1], [1], [],
-  [ovs-ofctl: type is not needed
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=123,selection_method=dp_hash,type=indirect,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1], [1], [],
-  [ovs-ofctl: selection method is not needed
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=0xffffff01,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1], [1], [],
-  [ovs-ofctl: invalid command bucket id 4294967041
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=first,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1], [1], [],
-  [ovs-ofctl: insert-bucket needs OpenFlow 1.5 or later ('-O OpenFlow15')
-])
-
-# Verify insert-buckets command to insert bucket with weight value for select group.
-AT_CHECK([ovs-ofctl -O OpenFlow15 --strict del-groups br0 group_id=1234])
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=select,selection_method=hash,bucket=bucket_id=1,weight:100,output:11
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow15 insert-buckets br0 group_id=1234,command_bucket_id=last,bucket=bucket_id=2,weight=100,actions=output:11])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=select,selection_method=hash,bucket=bucket_id:1,weight:100,actions=output:11,bucket=bucket_id:2,weight:100,actions=output:11
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-dnl Actions definition listed in both supported formats (w/ actions=)
-AT_SETUP([ofproto - remove group buckets])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=all,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:13,actions=output:13,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15,bucket=bucket_id:16,actions=output:16
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -F OXM-OpenFlow15 -O OpenFlow15 -vwarn dump-groups br0 1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:13,actions=output:13,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15,bucket=bucket_id:16,actions=output:16
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=first])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:13,actions=output:13,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15,bucket=bucket_id:16,actions=output:16
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=last])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:13,actions=output:13,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=13])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15
-])
-AT_DATA([buckets.txt], [dnl
-group_id=1234
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn remove-buckets br0 - < buckets.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=first])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=last])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=all])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=1], [1], [], [stderr])
-AT_CHECK([ofctl_strip < stderr], [0], [dnl
-OFPT_ERROR (OF1.5): OFPGMFC_UNKNOWN_BUCKET
-OFPT_GROUP_MOD (OF1.5):
- REMOVE_BUCKET command_bucket_id:1,group_id=1234
-])
-# Negative test.
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=last], [1], [],
-  [ovs-ofctl: none of the usable flow formats (OpenFlow10,NXM,OXM-OpenFlow15) is among the allowed flow formats (OpenFlow11)
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle del group (OpenFlow 1.3)])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=all,bucket=output:10
-group_id=1235,type=all,bucket=actions=output:10
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow13 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow13 -vwarn dump-groups br0 ], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sort], [0], [dnl
- group_id=1234,type=all,bucket=actions=output:10
- group_id=1235,type=all,bucket=actions=output:10
-OFPST_GROUP_DESC reply (OF1.3):
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow13 -vwarn del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow13 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.3):
- group_id=1235,type=all,bucket=actions=output:10
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow13 -vwarn del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow13 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.3):
- group_id=1235,type=all,bucket=actions=output:10
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow13 -vwarn del-groups br0], [0])
-AT_CHECK([ovs-ofctl -O OpenFlow13 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.3):
-])
-
-# Negative test.
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow13 -vwarn del-groups br0 group_id=0xfffffff0],
-  [1], [], [ovs-ofctl: invalid group id 4294967280
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle add indirect group])
-OVS_VSWITCHD_START
-dnl indirect group must have exactly one bucket
-AT_DATA([stderr], [dnl
-OFPT_ERROR (OF1.4) (xid=0x2): OFPGMFC_INVALID_GROUP
-OFPT_BUNDLE_ADD_MESSAGE (OF1.4) (xid=0x2):
- bundle_id=0 flags=atomic ordered
-OFPT_GROUP_MOD (OF1.4) (xid=0x2): ***decode error: OFPGMFC_INVALID_GROUP***
-])
-AT_CHECK([ovs-ofctl --bundle -vwarn add-group br0 'group_id=1234,type=indirect'], [1], , [stderr])
-AT_CHECK([ovs-ofctl --bundle -vwarn add-group br0 'group_id=1235,type=indirect,bucket=output:10'])
-AT_CHECK([ovs-ofctl --bundle -vwarn add-group br0 'group_id=1236,type=indirect,bucket=output:10,bucket=output:11'], [1], , [stderr])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle group mod with mod and add_or_mod command])
-OVS_VSWITCHD_START
-dnl Check that mod-group for non-existing group fails without --may-create
-AT_DATA([stderr], [dnl
-OFPT_ERROR (OF1.4) (xid=0x2): OFPGMFC_UNKNOWN_GROUP
-OFPT_GROUP_MOD (OF1.4) (xid=0x2):
- MOD group_id=1234,type=indirect,bucket=actions=output:2
-])
-AT_CHECK([ovs-ofctl --bundle -vwarn mod-group br0 'group_id=1234,type=indirect,bucket=actions=2'], [1], , [stderr])
-dnl Check that mod-group for non-existing group succeeds with --may-create
-AT_CHECK([ovs-ofctl --bundle -vwarn --may-create mod-group br0 'group_id=1234,type=indirect,bucket=actions=2'])
-AT_CHECK([ovs-ofctl -O OpenFlow14 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.4):
- group_id=1234,type=indirect,bucket=actions=output:2
-])
-dnl Check that mod-group for existing group succeeds with --may-create
-AT_CHECK([ovs-ofctl --bundle -vwarn --may-create mod-group br0 'group_id=1234,type=indirect,bucket=actions=3'])
-AT_CHECK([ovs-ofctl -O OpenFlow14 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.4):
- group_id=1234,type=indirect,bucket=actions=output:3
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle del group (OpenFlow 1.5)])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1233,type=select,selection_method=hash,bucket=output:10,bucket=output:11
-group_id=1234,type=select,selection_method=hash,fields(eth_dst,ip_dst,tcp_dst),bucket=output:10,bucket=output:11
-group_id=1235,type=all,bucket=actions=output:12,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -F OXM-OpenFlow15 -O OpenFlow15 -vwarn dump-groups br0 1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=select,selection_method=hash,fields(eth_dst,ip_dst,tcp_dst),bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sort], [0], [dnl
- group_id=1233,type=select,selection_method=hash,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
- group_id=1235,type=all,bucket=bucket_id:2,actions=output:12,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
-OFPST_GROUP_DESC reply (OF1.5):
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sort], [0], [dnl
- group_id=1233,type=select,selection_method=hash,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
- group_id=1235,type=all,bucket=bucket_id:2,actions=output:12,bucket=bucket_id:0,actions=output:10,bucket=bucket_id:1,actions=output:11
-OFPST_GROUP_DESC reply (OF1.5):
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn del-groups br0], [0])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle del group deletes flows])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=all,bucket=output:10
-group_id=1235,type=all,bucket=output:10
-])
-AT_CHECK([ovs-ofctl --bundle -vwarn add-groups br0 groups.txt])
-AT_DATA([flows.txt], [dnl
-tcp actions=group:1234
-table=2 udp actions=group:1235
-])
-AT_CHECK([ovs-ofctl --bundle -vwarn add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow14 -vwarn dump-flows br0 | ofctl_strip | sort],
-[0], [dnl
- table=2, udp actions=group:1235
- tcp actions=group:1234
-OFPST_FLOW reply (OF1.4):
-])
-AT_CHECK([ovs-ofctl --bundle -vwarn del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow14 -vwarn dump-flows br0 | ofctl_strip | sort],
-[0], [dnl
- table=2, udp actions=group:1235
-OFPST_FLOW reply (OF1.4):
-])
-AT_CHECK([ovs-ofctl --bundle -vwarn del-groups br0 group_id=1234])
-AT_CHECK([ovs-ofctl -O OpenFlow14 -vwarn dump-flows br0 | ofctl_strip | sort],
-[0], [dnl
- table=2, udp actions=group:1235
-OFPST_FLOW reply (OF1.4):
-])
-AT_CHECK([ovs-ofctl --bundle -vwarn del-groups br0])
-AT_CHECK([ovs-ofctl -O OpenFlow14 -vwarn dump-flows br0 | ofctl_strip | sort],
-[0], [dnl
-OFPST_FLOW reply (OF1.4):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-dnl Actions definition listed in both supported formats (w/ actions=)
-AT_SETUP([ofproto - bundle insert group buckets])
-OVS_VSWITCHD_START
-# Add group with no buckets.
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=all
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -F OXM-OpenFlow15 -O OpenFlow15 -vwarn dump-groups br0 1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all
-])
-
-# Add two buckets, using "last".
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=last,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11])
-AT_CHECK([ovs-ofctl -F OXM-OpenFlow15 -O OpenFlow15 -vwarn dump-groups br0 1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11
-])
-
-# Start over again, then add two buckets using "first".
-AT_DATA([groups.txt], [dnl
-delete group_id=1234
-add group_id=1234,type=all
-insert_bucket group_id=1234,command_bucket_id=first,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -F OXM-OpenFlow15 -O OpenFlow15 -vwarn dump-groups br0 1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11
-])
-
-# Add two more buckets before the existing ones.
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=first,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11
-])
-
-# Add another bucket at the end.
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=last,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15
-])
-
-# Verify that duplicate bucket IDs are rejected.
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=last,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/talking to/,$d'], [0], [dnl
-Error OFPGMFC_BUCKET_EXISTS for: OFPT_GROUP_MOD (OF1.5):
- INSERT_BUCKET command_bucket_id:last,group_id=1234,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15
-Error OFPBFC_MSG_FAILED for: OFPT_BUNDLE_CONTROL (OF1.5):
- bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
-])
-
-# Add another bucket just before bucket 15.
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=15])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15
-])
-
-# Add two more buckets just before bucket 11,
-# getting the command from a file.
-AT_DATA([buckets.txt], [dnl
-group_id=1234,command_bucket_id=11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:13,actions=output:13
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn insert-buckets br0 - < buckets.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:13,actions=output:13,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15
-])
-
-# Add yet two more buckets.
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=15,bucket=bucket_id:20,actions=output:20,bucket=bucket_id:21,actions=output:21])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:13,actions=output:13,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15,bucket=bucket_id:20,actions=output:20,bucket=bucket_id:21,actions=output:21
-])
-
-# Negative tests.
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn insert-buckets br0 group_id=1234,command_bucket_id=0xffffff01,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1], [1], [],
-  [ovs-ofctl: invalid command bucket id 4294967041
-])
-AT_CHECK([ovs-ofctl --bundle -vwarn insert-buckets br0 group_id=1234,command_bucket_id=first,bucket=bucket_id:0,actions=output:0,bucket=bucket_id:1,actions=output:1], [1], [],
-  [ovs-ofctl: insert-bucket needs OpenFlow 1.5 or later ('-O OpenFlow15')
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle remove group buckets])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=all,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:13,actions=output:13,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15,bucket=bucket_id:16,actions=output:16
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -F OXM-OpenFlow15 -O OpenFlow15 -vwarn dump-groups br0 1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:10,actions=output:10,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:13,actions=output:13,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15,bucket=bucket_id:16,actions=output:16
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=first])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:13,actions=output:13,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15,bucket=bucket_id:16,actions=output:16
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=last])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:13,actions=output:13,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=13])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all,bucket=bucket_id:11,actions=output:11,bucket=bucket_id:12,actions=output:12,bucket=bucket_id:14,actions=output:14,bucket=bucket_id:15,actions=output:15
-])
-AT_DATA([buckets.txt], [dnl
-group_id=1234
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn remove-buckets br0 - < buckets.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.5):
- group_id=1234,type=all
-])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=first])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=last])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=all])
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow15 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=1], [1], [], [stderr])
-AT_CHECK([ofctl_strip < stderr | sed '/talking to/,$d'], [0], [dnl
-Error OFPGMFC_UNKNOWN_BUCKET for: OFPT_GROUP_MOD (OF1.5):
- REMOVE_BUCKET command_bucket_id:1,group_id=1234
-Error OFPBFC_MSG_FAILED for: OFPT_BUNDLE_CONTROL (OF1.5):
- bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
-])
-# Negative test.
-AT_CHECK([ovs-ofctl --bundle -O OpenFlow11 -vwarn remove-buckets br0 group_id=1234,command_bucket_id=last], [1], [],
-  [ovs-ofctl: none of the usable flow formats (OXM-OpenFlow15) is among the allowed flow formats (OXM-OpenFlow14)
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-AT_SETUP([ofproto - flow mod checks group availability])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-group br0 group_id=1234,type=all,bucket=output:10])
-AT_DATA([flows.txt], [dnl
-tcp actions=group:1234
-udp actions=group:1235
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-flow br0 'tcp actions=group:1234'])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-flow br0 'tcp actions=group:1235'], [1], [], [stderr])
-
-AT_CHECK([strip_xids < stderr], [0],
-  [OFPT_ERROR (OF1.1): OFPBAC_BAD_OUT_GROUP
-OFPT_FLOW_MOD (OF1.1): ADD tcp actions=group:1235
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle flow mod checks group availability])
-OVS_VSWITCHD_START
-AT_DATA([bundle.txt], [dnl
-group add group_id=1234,type=all,bucket=output:10
-flow add tcp actions=group:1234
-flow add udp actions=group:1235
-])
-AT_CHECK([ovs-ofctl -vwarn bundle br0 bundle.txt], [1], [], [stderr])
-
-AT_CHECK([ofctl_strip < stderr | sed '/talking to/,$d'], [0],
-  [dnl
-Error OFPBAC_BAD_OUT_GROUP for: OFPT_FLOW_MOD (OF1.4): ADD udp actions=group:1235
-Error OFPBFC_MSG_FAILED for: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-AT_SETUP([ofproto - group description])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-group br0 group_id=1234,type=all,bucket=output:10], [0], [stdout])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-groups br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.1):
- group_id=1234,type=all,bucket=actions=output:10
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-AT_SETUP([ofproto - group features (OpenFlow 1.0 extension)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow10 -vwarn dump-group-features br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-NXST_GROUP_FEATURES reply:
- Group table:
-    Types:  0xf
-    Capabilities:  0x7
-    all group:
-       max_groups=0xffffff00
-       actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
-    select group:
-       max_groups=0xffffff00
-       actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
-    indirect group:
-       max_groups=0xffffff00
-       actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
-    fast failover group:
-       max_groups=0xffffff00
-       actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-AT_SETUP([ofproto - group features (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-features br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout], [0], [dnl
-OFPST_GROUP_FEATURES reply (OF1.2):
- Group table:
-    Types:  0xf
-    Capabilities:  0x7
-    all group:
-       max_groups=0xffffff00
-       actions: output group set_field strip_vlan push_vlan mod_nw_ttl dec_ttl set_mpls_ttl dec_mpls_ttl push_mpls pop_mpls set_queue
-    select group:
-       max_groups=0xffffff00
-       actions: output group set_field strip_vlan push_vlan mod_nw_ttl dec_ttl set_mpls_ttl dec_mpls_ttl push_mpls pop_mpls set_queue
-    indirect group:
-       max_groups=0xffffff00
-       actions: output group set_field strip_vlan push_vlan mod_nw_ttl dec_ttl set_mpls_ttl dec_mpls_ttl push_mpls pop_mpls set_queue
-    fast failover group:
-       max_groups=0xffffff00
-       actions: output group set_field strip_vlan push_vlan mod_nw_ttl dec_ttl set_mpls_ttl dec_mpls_ttl push_mpls pop_mpls set_queue
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-AT_SETUP([ofproto - group stats (OpenFlow 1.0 extension)])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=all,bucket=output:10
-group_id=1235,type=all,bucket=output:10
-])
-AT_CHECK([ovs-ofctl -O OpenFlow10 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow10 -vwarn add-flow br0 'tcp actions=group:1234'])
-AT_CHECK([ovs-ofctl -O OpenFlow10 -vwarn dump-group-stats br0 group_id=1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sed 's/duration=[[0-9.]]*s/duration=?s/' | sort], [0], [dnl
- group_id=1234,duration=?s,ref_count=1,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0
-NXST_GROUP reply:
-])
-AT_CHECK([ovs-ofctl -O OpenFlow10 -vwarn dump-group-stats br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sed 's/duration=[[0-9.]]*s/duration=?s/' | sort], [0], [dnl
- group_id=1234,duration=?s,ref_count=1,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0
- group_id=1235,duration=?s,ref_count=0,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0
-NXST_GROUP reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-AT_SETUP([ofproto - group stats (OpenFlow 1.1)])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=all,bucket=output:10
-group_id=1235,type=all,bucket=output:10
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn add-flow br0 'tcp actions=group:1234'])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-group-stats br0 group_id=1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sort], [0], [dnl
- group_id=1234,ref_count=1,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0
-OFPST_GROUP reply (OF1.1):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn dump-group-stats br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sort], [0], [dnl
- group_id=1234,ref_count=1,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0
- group_id=1235,ref_count=0,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0
-OFPST_GROUP reply (OF1.1):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-AT_SETUP([ofproto - group stats (OpenFlow 1.3)])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=all,bucket=output:10
-group_id=1235,type=all,bucket=output:10
-])
-AT_CHECK([ovs-ofctl -O OpenFlow13 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow13 -vwarn add-flow br0 'tcp actions=group:1234'])
-AT_CHECK([ovs-ofctl -O OpenFlow13 -vwarn dump-group-stats br0 group_id=1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sed 's/duration=[[0-9.]]*s/duration=?s/' | sort], [0], [dnl
- group_id=1234,duration=?s,ref_count=1,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0
-OFPST_GROUP reply (OF1.3):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow13 -vwarn dump-group-stats br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sed 's/duration=[[0-9.]]*s/duration=?s/' | sort], [0], [dnl
- group_id=1234,duration=?s,ref_count=1,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0
- group_id=1235,duration=?s,ref_count=0,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0
-OFPST_GROUP reply (OF1.3):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is really bare-bones.
-dnl It at least checks request and reply serialization and deserialization.
-AT_SETUP([ofproto - group stats (OpenFlow 1.5)])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=all,bucket=output:10
-group_id=1235,type=all,bucket=output:10
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn add-flow br0 'tcp actions=group:1234'])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-group-stats br0 group_id=1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sed 's/duration=[[0-9.]]*s/duration=?s/' | sort], [0], [dnl
- group_id=1234,duration=?s,ref_count=1,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0
-OFPST_GROUP reply (OF1.5):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-group-stats br0], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sed 's/duration=[[0-9.]]*s/duration=?s/' | sort], [0], [dnl
- group_id=1234,duration=?s,ref_count=1,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0
- group_id=1235,duration=?s,ref_count=0,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0
-OFPST_GROUP reply (OF1.5):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This is used to find that the bucket counter is not updated.
-AT_SETUP([ofproto - group stats after insert a new bucket (OpenFlow 1.5)])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=select,selection_method=hash bucket=bucket_id=1,weight:100,actions=output:10
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn insert-buckets br0 'group_id=1234, command_bucket_id=last, bucket=bucket_id=2,weight:100,actions=output:10'])
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn dump-group-stats br0 group_id=1234], [0], [stdout])
-AT_CHECK([strip_xids < stdout | sed 's/duration=[[0-9.]]*s/duration=?s/' | sort], [0], [dnl
- group_id=1234,duration=?s,ref_count=0,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0,bucket1:packet_count=0,byte_count=0
-OFPST_GROUP reply (OF1.5):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This found a use-after-free error in bridge destruction in the
-dnl presence of groups.
-AT_SETUP([ofproto - group add then bridge delete (OpenFlow 1.3)])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1234,type=all,bucket=output:10
-group_id=1235,type=all,bucket=output:10
-
-dnl This checks for regression against a parser bug such that
-dnl "actions=resbmit(,1)" etc. was rejected as a syntax error.
-group_id=2345,type=select,bucket=weight:10,actions=resubmit(,1),bucket=weight:10,actions=resubmit(,2),bucket=weight:1,actions=resubmit(,3)
-])
-AT_CHECK([ovs-ofctl -O OpenFlow13 -vwarn add-groups br0 groups.txt])
-AT_CHECK([ovs-vsctl del-br br0])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - mod-port (OpenFlow 1.0)])
-OVS_VSWITCHD_START
-for command_config_state in \
-    'up 0 0' \
-    'noflood NO_FLOOD 0' \
-    'flood 0 0' \
-    'no-receive NO_RECV 0' \
-    'no-forward NO_RECV,NO_FWD 0' \
-    'no-packet-in NO_RECV,NO_FWD,NO_PACKET_IN 0' \
-    'forward NO_RECV,NO_PACKET_IN 0' \
-    'packet-in NO_RECV 0' \
-    'up NO_RECV 0' \
-    'receive 0 0' \
-    'down PORT_DOWN LINK_DOWN'
-do
-    printf '\n--- %s --- \n\n' "$command_config_state"
-    set $command_config_state
-    command=$[1] config=`echo $[2] | sed 's/,/ /g'` state=$[3]
-    AT_CHECK([ovs-ofctl -vwarn mod-port br0 br0 $command])
-    AT_CHECK([ovs-ofctl -vwarn show br0], [0], [stdout])
-    AT_CHECK_UNQUOTED([strip_xids < stdout], [0], [dnl
-OFPT_FEATURES_REPLY: dpid:fedcba9876543210
-n_tables:254, n_buffers:0
-capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
-actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
- LOCAL(br0): addr:aa:55:aa:55:00:00
-     config:     $config
-     state:      $state
-     speed: 0 Mbps now, 0 Mbps max
-OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
-])
-done
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - mod-port (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-for command_config_state in \
-    'up 0 LIVE' \
-    'no-receive NO_RECV LIVE' \
-    'no-forward NO_RECV,NO_FWD LIVE' \
-    'no-packet-in NO_RECV,NO_FWD,NO_PACKET_IN LIVE' \
-    'forward NO_RECV,NO_PACKET_IN LIVE' \
-    'packet-in NO_RECV LIVE' \
-    'up NO_RECV LIVE' \
-    'receive 0 LIVE' \
-    'down PORT_DOWN LINK_DOWN'
-do
-    printf '\n--- %s --- \n\n' "$command_config_state"
-    set $command_config_state
-    command=$[1] config=`echo $[2] | sed 's/,/ /g'` state=$[3]
-    AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn mod-port br0 br0 $command])
-    AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn show br0], [0], [stdout])
-    AT_CHECK_UNQUOTED([strip_xids < stdout], [0], [dnl
-OFPT_FEATURES_REPLY (OF1.2): dpid:fedcba9876543210
-n_tables:254, n_buffers:0
-capabilities: FLOW_STATS TABLE_STATS PORT_STATS GROUP_STATS QUEUE_STATS
- LOCAL(br0): addr:aa:55:aa:55:00:00
-     config:     $config
-     state:      $state
-     speed: 0 Mbps now, 0 Mbps max
-OFPT_GET_CONFIG_REPLY (OF1.2): frags=normal miss_send_len=0
-])
-done
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - mod-port (OpenFlow 1.4)])
-OVS_VSWITCHD_START
-for command_config_state in \
-    'up 0 LIVE' \
-    'no-receive NO_RECV LIVE' \
-    'no-forward NO_RECV,NO_FWD LIVE' \
-    'no-packet-in NO_RECV,NO_FWD,NO_PACKET_IN LIVE' \
-    'forward NO_RECV,NO_PACKET_IN LIVE' \
-    'packet-in NO_RECV LIVE' \
-    'up NO_RECV LIVE' \
-    'receive 0 LIVE' \
-    'down PORT_DOWN LINK_DOWN'
-do
-    printf '\n--- %s --- \n\n' "$command_config_state"
-    set $command_config_state
-    command=$[1] config=`echo $[2] | sed 's/,/ /g'` state=$[3]
-    AT_CHECK([ovs-ofctl -O OpenFlow14 -vwarn mod-port br0 br0 $command])
-    AT_CHECK([ovs-ofctl -O OpenFlow14 -vwarn show br0], [0], [stdout])
-    AT_CHECK_UNQUOTED([strip_xids < stdout], [0], [dnl
-OFPT_FEATURES_REPLY (OF1.4): dpid:fedcba9876543210
-n_tables:254, n_buffers:0
-capabilities: FLOW_STATS TABLE_STATS PORT_STATS GROUP_STATS QUEUE_STATS BUNDLES
-OFPST_PORT_DESC reply (OF1.4):
- LOCAL(br0): addr:aa:55:aa:55:00:00
-     config:     $config
-     state:      $state
-     speed: 0 Mbps now, 0 Mbps max
-OFPT_GET_CONFIG_REPLY (OF1.4): frags=normal miss_send_len=0
-])
-done
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - basic flow_mod commands (NXM)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [NXST_FLOW reply:
-])
-AT_CHECK([echo 'in_port=2,actions=1' | ovs-ofctl add-flows br0 -])
-AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=2])
-AT_CHECK([ovs-ofctl -F nxm add-flow br0 table=1,in_port=4,actions=3])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=1 actions=output:2
- in_port=2 actions=output:1
- table=1, in_port=4 actions=output:3
-NXST_FLOW reply:
-])
-AT_CHECK([ovs-ofctl dump-aggregate br0 table=0 | strip_xids], [0], [dnl
-NXST_AGGREGATE reply: packet_count=0 byte_count=0 flow_count=2
-])
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - basic flow_mod commands (OpenFlow 1.0)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip], [0], [OFPST_FLOW reply:
-])
-AT_CHECK([echo 'in_port=2,actions=1' | ovs-ofctl -F openflow10 add-flows br0 -])
-AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 in_port=1,actions=2])
-AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 table=1,in_port=4,actions=3])
-AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=1 actions=output:2
- in_port=2 actions=output:1
- table=1, in_port=4 actions=output:3
-OFPST_FLOW reply:
-])
-AT_CHECK([ovs-ofctl -F openflow10 dump-aggregate br0 table=0 | strip_xids], [0], [dnl
-OFPST_AGGREGATE reply: packet_count=0 byte_count=0 flow_count=2
-])
-AT_CHECK([ovs-ofctl -F openflow10 del-flows br0])
-AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip], [0], [OFPST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-# It's really dumb that check_overlap and reset_counts are considered
-# part of flow state, but OpenFlow implies that it is, and OFTest and
-# some users insist on it.
-AT_SETUP([ofproto - add-flow and flags])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 check_overlap,in_port=1,actions=drop])
-# Prior to OF1.3, flow dumps didn't include a "flags" field.
-AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip], [0], [dnl
-OFPST_FLOW reply:
- in_port=1 actions=drop
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip], [0], [dnl
-OFPST_FLOW reply (OF1.1):
- in_port=1 actions=drop
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip], [0], [dnl
-OFPST_FLOW reply (OF1.2):
- in_port=1 actions=drop
-])
-# OF1.3 makes the flags visible.
-AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip], [0], [dnl
-OFPST_FLOW reply (OF1.3):
- check_overlap reset_counts in_port=1 actions=drop
-])
-AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip], [0], [dnl
-OFPST_FLOW reply (OF1.4):
- check_overlap reset_counts in_port=1 actions=drop
-])
-# OF1.5 makes the flags invisible.
-AT_CHECK([ovs-ofctl -O OpenFlow15 dump-flows br0 | ofctl_strip], [0], [dnl
-OFPST_FLOW reply (OF1.5):
- check_overlap reset_counts in_port=1 actions=drop
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - basic flow_mod commands (OpenFlow 1.1)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip], [0], [OFPST_FLOW reply (OF1.1):
-])
-AT_CHECK([echo 'in_port=2,actions=1' | ovs-ofctl -O OpenFlow11 add-flows br0 -])
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 in_port=1,actions=2])
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 table=1,in_port=4,actions=3])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=1 actions=output:2
- in_port=2 actions=output:1
- table=1, in_port=4 actions=output:3
-OFPST_FLOW reply (OF1.1):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-aggregate br0 table=0 | strip_xids], [0], [dnl
-OFPST_AGGREGATE reply (OF1.1): packet_count=0 byte_count=0 flow_count=2
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 del-flows br0])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip], [0], [OFPST_FLOW reply (OF1.1):
- table=1, in_port=4 actions=output:3
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - flow_mod negative test (OpenFlow 1.1)])
-OVS_VSWITCHD_START(
-  [set bridge br0 protocols=OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13])
-AT_CHECK([ovs-ofctl add-flow -O OpenFlow11 br0 table=1,action=goto_table:2])
-
-# The error message here actually comes from ovs-ofctl, not from ovs-vswitchd,
-# but at least it's the same code in ofpacts_check() that issues the error.
-AT_CHECK([ovs-ofctl add-flow -O OpenFlow11 br0 table=1,action=goto_table:1],
-  [1], [],
-  [ovs-ofctl: actions are invalid with specified match (OFPBIC_BAD_TABLE_ID)
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - set-field flow_mod commands (NXM)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 ipv6,table=1,in_port=3,actions=drop])
-AT_CHECK([ovs-ofctl add-flow br0 ipv6,table=1,in_port=3,actions=set_field:fe80:0123:4567:890a:a6ba:dbff:fefe:59fa-\>ipv6_src])
-AT_CHECK([ovs-ofctl add-flow br0 icmp6,icmp_type=136,table=1,in_port=3,actions=set_field:fe80:8675:3097:890a:a6ba:dbff:f00d:59fa-\>nd_target,set_field:cc:dd:ee:ff:00:11-\>nd_tll])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- table=1, icmp6,in_port=3,icmp_type=136 actions=load:0xa6badbfff00d59fa->NXM_NX_ND_TARGET[[0..63]],load:0xfe8086753097890a->NXM_NX_ND_TARGET[[64..127]],load:0xccddeeff0011->NXM_NX_ND_TLL[[]]
- table=1, ipv6,in_port=3 actions=load:0xa6badbfffefe59fa->NXM_NX_IPV6_SRC[[0..63]],load:0xfe8001234567890a->NXM_NX_IPV6_SRC[[64..127]]
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - basic flow_mod commands (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip], [0], [OFPST_FLOW reply (OF1.2):
-])
-AT_CHECK([echo 'in_port=2,actions=1' | ovs-ofctl -O OpenFlow12 add-flows br0 -])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 in_port=1,actions=2])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 table=1,in_port=4,actions=3])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=1 actions=output:2
- in_port=2 actions=output:1
- table=1, in_port=4 actions=output:3
-OFPST_FLOW reply (OF1.2):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 del-flows br0])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip], [0], [OFPST_FLOW reply (OF1.2):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - set-field flow_mod commands (OF1.2)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 ipv6,table=1,in_port=3,actions=drop])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 ipv6,table=1,in_port=3,actions=set_field:fe80:0123:4567:890a:a6ba:dbff:fefe:59fa-\>ipv6_src])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 icmp6,icmp_type=136,table=1,in_port=3,actions=set_field:fe80:8675:3097:890a:a6ba:dbff:f00d:59fa-\>nd_target,set_field:cc:dd:ee:ff:00:11-\>nd_tll])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- table=1, icmp6,in_port=3,icmp_type=136 actions=set_field:fe80:8675:3097:890a:a6ba:dbff:f00d:59fa->nd_target,set_field:cc:dd:ee:ff:00:11->nd_tll
- table=1, ipv6,in_port=3 actions=set_field:fe80:123:4567:890a:a6ba:dbff:fefe:59fa->ipv6_src
-OFPST_FLOW reply (OF1.2):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - dump flows with cookie])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=1])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=1])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x2, in_port=2 actions=output:1
- cookie=0x3, in_port=3 actions=output:1
-NXST_FLOW reply:
-])
-AT_CHECK([ovs-ofctl dump-aggregate br0 table=0 | strip_xids], [0], [dnl
-NXST_AGGREGATE reply: packet_count=0 byte_count=0 flow_count=3
-])
-AT_CHECK([ovs-ofctl dump-flows br0 cookie=0x3/-1 | ofctl_strip | sort], [0], [dnl
- cookie=0x3, in_port=3 actions=output:1
-NXST_FLOW reply:
-])
-AT_CHECK([ovs-ofctl dump-aggregate br0 cookie=0x3/-1 | strip_xids], [0], [dnl
-NXST_AGGREGATE reply: packet_count=0 byte_count=0 flow_count=1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - mod flow with cookie change (OpenFlow 1.0)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
-OFPST_FLOW reply:
-])
-
-AT_CHECK([ovs-ofctl -F openflow10 mod-flows br0 cookie=0x2,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x2, in_port=1 actions=output:1
-OFPST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - mod flow with cookie change (NXM)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -F nxm add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -F nxm dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
-NXST_FLOW reply:
-])
-
-AT_CHECK([ovs-ofctl -F nxm mod-flows br0 cookie=0x2,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -F nxm dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x2, in_port=1 actions=output:1
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - no mod flow with cookie change (OpenFlow 1.1)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
-OFPST_FLOW reply (OF1.1):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 mod-flows br0 cookie=0x2,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
-OFPST_FLOW reply (OF1.1):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl The OpenFlow 1.2 spec states that the cookie may not be modified
-AT_SETUP([ofproto - no mod flow with cookie change (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
-OFPST_FLOW reply (OF1.2):
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow12 mod-flows br0 cookie=0x2,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
-OFPST_FLOW reply (OF1.2):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - mod flows based on cookie mask (OpenFlow 1.0)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=2,actions=1])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=3,actions=1])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x1, in_port=2 actions=output:1
- cookie=0x2, in_port=3 actions=output:1
-NXST_FLOW reply:
-])
-
-AT_CHECK([ovs-ofctl -F nxm mod-flows br0 cookie=0x1/0xff,actions=4])
-AT_CHECK([ovs-ofctl -F nxm dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:4
- cookie=0x1, in_port=2 actions=output:4
- cookie=0x2, in_port=3 actions=output:1
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - mod flows based on cookie mask (OpenFlow 1.1)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 cookie=0x1,in_port=2,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 cookie=0x2,in_port=3,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x1, in_port=2 actions=output:1
- cookie=0x2, in_port=3 actions=output:1
-OFPST_FLOW reply (OF1.1):
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow11 mod-flows br0 cookie=0x1/0xff,actions=4])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:4
- cookie=0x1, in_port=2 actions=output:4
- cookie=0x2, in_port=3 actions=output:1
-OFPST_FLOW reply (OF1.1):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - mod flows based on cookie mask (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 cookie=0x1,in_port=2,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 cookie=0x2,in_port=3,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x1, in_port=2 actions=output:1
- cookie=0x2, in_port=3 actions=output:1
-OFPST_FLOW reply (OF1.2):
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow12 mod-flows br0 cookie=0x1/0xff,actions=4])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:4
- cookie=0x1, in_port=2 actions=output:4
- cookie=0x2, in_port=3 actions=output:1
-OFPST_FLOW reply (OF1.2):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl The OpenFlow 1.2 spec states that the cookie may not be modified
-AT_SETUP([ofproto - mod flows based on cookie mask with cookie change])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=2,actions=1])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=3,actions=1])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x1, in_port=2 actions=output:1
- cookie=0x2, in_port=3 actions=output:1
-NXST_FLOW reply:
-])
-
-AT_CHECK([ovs-ofctl -F nxm mod-flows br0 cookie=1/-1,cookie=4,actions=4])
-AT_CHECK([ovs-ofctl -F nxm dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x2, in_port=3 actions=output:1
- cookie=0x4, in_port=1 actions=output:4
- cookie=0x4, in_port=2 actions=output:4
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - mod flow with cookie miss (mask==0) - NXM])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -F nxm mod-flows br0 in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -F nxm dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=1 actions=output:1
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - mod flow with cookie miss (mask==0) - OF1.1])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O openflow11 mod-flows br0 in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -O openflow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=1 actions=output:1
-OFPST_FLOW reply (OF1.1):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - mod flow with cookie miss (mask==0) - OF1.2])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O openflow12 mod-flows br0 in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -O openflow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
-OFPST_FLOW reply (OF1.2):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - mod flow with cookie miss (mask!=0) - NXM])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -F nxm mod-flows br0 cookie=1/1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -F nxm dump-flows br0 | ofctl_strip | sort], [0], [dnl
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - mod flow with cookie miss (mask!=0) - OF1.1])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O openflow11 mod-flows br0 cookie=1/1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -O openflow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
-OFPST_FLOW reply (OF1.1):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - mod flow with cookie miss (mask!=0) - OF1.2])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O openflow12 mod-flows br0 cookie=1/1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -O openflow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
-OFPST_FLOW reply (OF1.2):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - del flows with cookies])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=1])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=1])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x2, in_port=2 actions=output:1
- cookie=0x3, in_port=3 actions=output:1
-NXST_FLOW reply:
-])
-
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - del flows based on cookie])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=1])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=1])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x2, in_port=2 actions=output:1
- cookie=0x3, in_port=3 actions=output:1
-NXST_FLOW reply:
-])
-
-AT_CHECK([ovs-ofctl del-flows br0 cookie=0x3/-1])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x2, in_port=2 actions=output:1
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - del flows based on cookie mask])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=1])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=1])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x2, in_port=2 actions=output:1
- cookie=0x3, in_port=3 actions=output:1
-NXST_FLOW reply:
-])
-AT_CHECK([ovs-ofctl del-flows br0 cookie=0x3/0x1])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x2, in_port=2 actions=output:1
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - del flows based on table id (NXM)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,table=1,actions=1])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x2, table=1, in_port=2 actions=output:1
-NXST_FLOW reply:
-])
-AT_CHECK([ovs-ofctl del-flows br0 table=0])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x2, table=1, in_port=2 actions=output:1
-NXST_FLOW reply:
-])
-AT_CHECK([ovs-ofctl del-flows br0 table=1])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
-NXST_FLOW reply:
-])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,table=1,actions=1])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x2, table=1, in_port=2 actions=output:1
-NXST_FLOW reply:
-])
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - del flows based on table id (OpenFlow 1.1)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 cookie=0x2,in_port=2,table=1,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x2, table=1, in_port=2 actions=output:1
-OFPST_FLOW reply (OF1.1):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 del-flows br0 table=0])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x2, table=1, in_port=2 actions=output:1
-OFPST_FLOW reply (OF1.1):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 del-flows br0 table=1])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
-OFPST_FLOW reply (OF1.1):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 cookie=0x2,in_port=2,table=1,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x2, table=1, in_port=2 actions=output:1
-OFPST_FLOW reply (OF1.1):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 del-flows br0])
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip], [0], [dnl
-OFPST_FLOW reply (OF1.1):
- cookie=0x2, table=1, in_port=2 actions=output:1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - del flows based on table id (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 cookie=0x2,in_port=2,table=1,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x2, table=1, in_port=2 actions=output:1
-OFPST_FLOW reply (OF1.2):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 del-flows br0 table=0])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x2, table=1, in_port=2 actions=output:1
-OFPST_FLOW reply (OF1.2):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 del-flows br0 table=1])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
-OFPST_FLOW reply (OF1.2):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 cookie=0x1,in_port=1,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 cookie=0x2,in_port=2,table=1,actions=1])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- cookie=0x1, in_port=1 actions=output:1
- cookie=0x2, table=1, in_port=2 actions=output:1
-OFPST_FLOW reply (OF1.2):
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 del-flows br0])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
-OFPST_FLOW reply (OF1.2):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - flow_mod with out_port matching (OpenFlow 1.0)])
-OVS_VSWITCHD_START
-AT_DATA([flows.txt], [dnl
- in_port=1 actions=output:2
- in_port=2 actions=output:1,output:2,output:3
- in_port=3 actions=output:3,output:1,output:2
- in_port=4 actions=drop
- in_port=5 actions=output:3
- in_port=6 actions=output:1
-])
-AT_CHECK([ovs-ofctl -F openflow10 add-flows br0 flows.txt])
-(cat flows.txt; echo 'OFPST_FLOW reply:') > expout
-AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-(grep 'output:2' flows.txt; echo 'OFPST_FLOW reply:') > expout
-AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 out_port=2 | ofctl_strip | sort], [0], [expout])
-
-AT_CHECK([ovs-ofctl -F openflow10 del-flows br0 out_port=2])
-(grep -v 'output:2' flows.txt; echo 'OFPST_FLOW reply:') > expout
-AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-AT_CHECK([ovs-ofctl -F openflow10 del-flows br0 out_port=3])
-(grep -v 'output:[[23]]' flows.txt; echo 'OFPST_FLOW reply:') > expout
-AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-AT_CHECK([ovs-ofctl -F openflow10 del-flows br0 out_port=1])
-(grep -v 'output:[[123]]' flows.txt; echo 'OFPST_FLOW reply:') > expout
-AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - flow_mod with out_port matching (OpenFlow 1.1)])
-OVS_VSWITCHD_START
-AT_DATA([flows.txt], [dnl
- in_port=1 actions=output:2
- in_port=2 actions=output:1,write_actions(output:2,output:3)
- in_port=3 actions=output:3,output:1,write_actions(output:2)
- in_port=4 actions=drop
- in_port=5 actions=write_actions(output:3)
- in_port=6 actions=output:1
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flows br0 flows.txt])
-(cat flows.txt; echo 'OFPST_FLOW reply (OF1.1):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-(grep 'output:2' flows.txt; echo 'OFPST_FLOW reply (OF1.1):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 out_port=2 | ofctl_strip | sort], [0], [expout])
-
-AT_CHECK([ovs-ofctl -O OpenFlow11 del-flows br0 out_port=2])
-(grep -v 'output:2' flows.txt; echo 'OFPST_FLOW reply (OF1.1):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-AT_CHECK([ovs-ofctl -O OpenFlow11 del-flows br0 out_port=3])
-(grep -v 'output:[[23]]' flows.txt; echo 'OFPST_FLOW reply (OF1.1):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-AT_CHECK([ovs-ofctl -O OpenFlow11 del-flows br0 out_port=1])
-(grep -v 'output:[[123]]' flows.txt; echo 'OFPST_FLOW reply (OF1.1):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - flow_mod with out_group matching (OpenFlow 1.1)])
-OVS_VSWITCHD_START
-AT_DATA([groups.txt], [dnl
-group_id=1,type=all,bucket=output:10
-group_id=2,type=all,bucket=output:10
-group_id=3,type=all,bucket=output:10
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-groups br0 groups.txt])
-AT_DATA([flows.txt], [dnl
- in_port=1 actions=group:2,output:5
- in_port=2 actions=group:1,write_actions(group:2,group:3,output:6)
- in_port=3 actions=group:3,group:1,write_actions(group:2,output:3)
- in_port=4 actions=output:4
- in_port=5 actions=write_actions(output:4,group:3)
- in_port=6 actions=group:1
-])
-AT_CHECK([ovs-ofctl -O OpenFlow11 add-flows br0 flows.txt])
-(cat flows.txt; echo 'OFPST_FLOW reply (OF1.1):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-(grep 'output:3' flows.txt | grep 'group:2'; echo 'OFPST_FLOW reply (OF1.1):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 out_port=3,out_group=2 | ofctl_strip | sort], [0], [expout])
-
-AT_CHECK([ovs-ofctl -O OpenFlow11 del-flows br0 out_group=2])
-(grep -v 'group:2' flows.txt; echo 'OFPST_FLOW reply (OF1.1):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-AT_CHECK([ovs-ofctl -O OpenFlow11 del-flows br0 out_group=3])
-(grep -v 'group:[[23]]' flows.txt; echo 'OFPST_FLOW reply (OF1.1):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-AT_CHECK([ovs-ofctl -O OpenFlow11 del-flows br0 out_group=1])
-(grep -v 'group:[[123]]' flows.txt; echo 'OFPST_FLOW reply (OF1.1):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle flow_mod with out group matching (OpenFlow 1.4)])
-OVS_VSWITCHD_START
-AT_DATA([bundle.txt], [dnl
-group group_id=1,type=all,bucket=output:10
-group group_id=2,type=all,bucket=output:10
-group group_id=3,type=all,bucket=output:10
-flow in_port=1 actions=group:2,output:5
-flow in_port=2 actions=group:1,write_actions(group:2,group:3,output:6)
-flow in_port=3 actions=group:3,group:1,write_actions(group:2,output:3)
-flow in_port=4 actions=output:4
-flow in_port=5 actions=write_actions(output:4,group:3)
-flow in_port=6 actions=group:1
-])
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt])
-
-# for checking
-AT_DATA([flows.txt], [dnl
- in_port=1 actions=group:2,output:5
- in_port=2 actions=group:1,write_actions(group:2,group:3,output:6)
- in_port=3 actions=group:3,group:1,write_actions(group:2,output:3)
- in_port=4 actions=output:4
- in_port=5 actions=write_actions(output:4,group:3)
- in_port=6 actions=group:1
-])
-
-(cat flows.txt; echo 'OFPST_FLOW reply (OF1.4):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-(grep 'output:3' flows.txt | grep 'group:2'; echo 'OFPST_FLOW reply (OF1.4):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 out_port=3,out_group=2 | ofctl_strip | sort], [0], [expout])
-
-AT_CHECK([ovs-ofctl -O OpenFlow14 del-flows br0 out_group=2])
-(grep -v 'group:2' flows.txt; echo 'OFPST_FLOW reply (OF1.4):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-AT_CHECK([ovs-ofctl -O OpenFlow14 del-flows br0 out_group=3])
-(grep -v 'group:[[23]]' flows.txt; echo 'OFPST_FLOW reply (OF1.4):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-AT_CHECK([ovs-ofctl -O OpenFlow14 del-flows br0 out_group=1])
-(grep -v 'group:[[123]]' flows.txt; echo 'OFPST_FLOW reply (OF1.4):') > expout
-AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0],
-  [expout])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle packet-out (OpenFlow 1.4)])
-OVS_VSWITCHD_START
-
-ovs-ofctl del-flows br0
-ovs-ofctl add-flow br0 priority=0,actions=drop
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -P standard monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0109000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# This bundle adds a group, a flow using that group and then a
-# packet-out that needs them both.  Finally the bundle deletes all
-# groups, which also deletes the flow, leaving only the drop flow in
-# the table.  If this works properly, the packet-out should get
-# translated and processed before the flow disappears.  Also, if the
-# bundle were to fail, the packet-in should not get executed.
-AT_DATA([bundle.txt], [dnl
-group group_id=1,type=all,bucket=output:controller
-flow in_port=6 actions=group:1
-packet-out in_port=6, packet=0001020304050010203040501234 actions=table
-group delete
-])
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt])
-
-# Verify that only the drop flow remains.
-AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0],
-  [ reset_counts priority=0 actions=drop
-OFPST_FLOW reply (OF1.4):
-])
-
-# Verify that the packet-in was received via controller action.
-AT_CHECK([sed 's/ (xid=0x[[1-9a-fA-F]][[0-9a-fA-F]]*)//' monitor.log], [0],
-  [OFPT_PACKET_IN (xid=0x0): total_len=14 in_port=6 (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle packet-out, failing bundle commit (OpenFlow 1.4)])
-OVS_VSWITCHD_START
-
-ovs-ofctl del-flows br0
-ovs-ofctl add-flow br0 priority=0,actions=drop
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -P standard monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0109000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# This bundle adds a flow using that group and then a packet-out that
-# needs them both.  Finally the bundle adds another flow that referes
-# to a non-existing group, causing the bundle to fail, and the
-# packet-in should not get executed.
-AT_DATA([bundle.txt], [dnl
-group group_id=1,type=all,bucket=output:controller
-flow in_port=6 actions=group:1
-packet-out in_port=6, packet=0001020304050010203040501234 actions=table
-flow in_port=7 actions=group:2
-])
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt 2>&1 | sed '/talking to/,$d' | strip_xids], [], [dnl
-Error OFPBAC_BAD_OUT_GROUP for: OFPT_FLOW_MOD (OF1.4): ADD in_port=7 actions=group:2
-Error OFPBFC_MSG_FAILED for: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
-])
-
-# Verify that only the drop flow remains.
-AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0],
-  [ reset_counts priority=0 actions=drop
-OFPST_FLOW reply (OF1.4):
-])
-
-# Verify that the packet-in was NOT received via controller action.
-AT_CHECK([strip_xids < monitor.log], [0], [])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle packet-out makes bundle commit to fail(OpenFlow 1.4)])
-OVS_VSWITCHD_START
-
-ovs-ofctl del-flows br0
-ovs-ofctl add-flow br0 priority=0,actions=drop
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -P standard monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0109000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# This bundle adds a flow using that group and then a packet-out that
-# needs them both.  Finally the bundle adds another flow that referes
-# to a non-existing group, causing the bundle to fail, and the
-# packet-in should not get executed.
-AT_DATA([bundle.txt], [dnl
-group group_id=1,type=all,bucket=output:controller
-flow in_port=6 actions=group:1
-packet-out in_port=6, packet=0001020304050010203040501234 actions=table
-packet-out in_port=6, packet=0001020304050010203040501234 actions=group:2
-])
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt 2>&1 | sed '/talking to/,$d' | strip_xids], [], [dnl
-Error OFPBAC_BAD_OUT_GROUP for: OFPT_PACKET_OUT (OF1.4): in_port=6 actions=group:2 data_len=14
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
-Error OFPBFC_MSG_FAILED for: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
-])
-
-# Verify that only the drop flow remains.
-AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0],
-  [ reset_counts priority=0 actions=drop
-OFPST_FLOW reply (OF1.4):
-])
-
-# Verify that the packet-in was NOT received via controller action.
-AT_CHECK([strip_xids < monitor.log], [0], [])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - flow table configuration (OpenFlow 1.0)])
-OVS_VSWITCHD_START
-# Check the default configuration.
-head_table() {
-    printf 'OFPST_TABLE reply (xid=0x2):
-  table 0%s:
-    active=0, lookup=0, matched=0
-    max_entries=1000000
-    matching:
-      in_port: exact match or wildcard
-      eth_src: exact match or wildcard
-      eth_dst: exact match or wildcard
-      eth_type: exact match or wildcard
-      vlan_vid: exact match or wildcard
-      vlan_pcp: exact match or wildcard
-      ip_src: exact match or wildcard
-      ip_dst: exact match or wildcard
-      nw_proto: exact match or wildcard
-      nw_tos: exact match or wildcard
-      tcp_src: exact match or wildcard
-      tcp_dst: exact match or wildcard
-
-' "$1"
-}
-(head_table; echo '  tables 1...253: ditto') > expout
-AT_CHECK([ovs-ofctl dump-tables br0], [0], [expout])
-# Change the configuration.
-AT_CHECK(
-  [ovs-vsctl \
-     -- --id=@t0 create Flow_Table name=main \
-     -- --id=@t1 create Flow_Table flow-limit=1024 \
-     -- set bridge br0 'flow_tables={1=@t1,0=@t0}' \
-   | uuidfilt],
-  [0], [<0>
-<1>
-])
-# Check that the configuration was updated.
-(head_table ' ("main")'; echo '  table 1:
-    active=0, lookup=0, matched=0
-    max_entries=1024
-    (same matching)
-
-  table 2:
-    active=0, lookup=0, matched=0
-    max_entries=1000000
-    (same matching)
-'; echo '  tables 3...253: ditto') > expout
-AT_CHECK([ovs-ofctl dump-tables br0], [0], [expout])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl In-band and fail-open add "hidden rules" to table 0.  These rules shouldn't
-dnl be visible to OpenFlow.  This test checks that "dump-flows" and
-dnl "dump-tables" don't make them visible.
-AT_SETUP([ofproto - hidden rules not in table stats])
-# Use an IP address for a controller that won't actually exist: we
-# want to create in-band rules but we do not want to actually connect
-# to a controller (because that could mess about with our test).  The
-# Class E range 240.0.0.0 - 255.255.255.255 seems like a good choice.
-OVS_VSWITCHD_START([set-controller br0 tcp:240.0.0.1:6653])
-for i in 1 2 3 4 5; do ovs-appctl time/warp 1000; done
-
-# Check that no hidden flows are visible in OpenFlow.
-AT_CHECK([ovs-ofctl dump-flows br0 | strip_xids], [0], [NXST_FLOW reply:
-])
-
-# Check that some hidden flows related to 240.0.0.1 are actually in table 0.
-#
-# We discard flows that mention table_id because we only want table 0 flows,
-# which in OVS is implied by the absence of a table_id.
-AT_CHECK([ovs-appctl bridge/dump-flows br0], [0], [stdout])
-AT_CHECK([test `grep '240\.0\.0\.1' stdout | grep -v table_id= | wc -l` -gt 0])
-
-# Check that dump-tables doesn't count the hidden flows.
-head_table() {
-    printf 'OFPST_TABLE reply:
-  table 0:
-    active=0, lookup=0, matched=0
-    max_entries=1000000
-    matching:
-      in_port: exact match or wildcard
-      eth_src: exact match or wildcard
-      eth_dst: exact match or wildcard
-      eth_type: exact match or wildcard
-      vlan_vid: exact match or wildcard
-      vlan_pcp: exact match or wildcard
-      ip_src: exact match or wildcard
-      ip_dst: exact match or wildcard
-      nw_proto: exact match or wildcard
-      nw_tos: exact match or wildcard
-      tcp_src: exact match or wildcard
-      tcp_dst: exact match or wildcard
-
-'
-}
-(head_table; echo '  tables 1...253: ditto') > expout
-AT_CHECK([ovs-ofctl dump-tables br0 | strip_xids], [0], [expout])
-OVS_VSWITCHD_STOP(["/240\.0\.0\.1/d"])
-AT_CLEANUP
-
-AT_SETUP([ofproto - flow table configuration (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-# Check the default configuration.
-head_table() {
-    printf 'OFPST_TABLE reply (OF1.2) (xid=0x2):
-  table 0%s:
-    active=0, lookup=0, matched=0
-    metadata: match=0xffffffffffffffff write=0xffffffffffffffff
-    config=controller
-    max_entries=1000000
-    instructions (table miss and others):
-      instructions: apply_actions,clear_actions,write_actions,write_metadata,goto_table
-      Write-Actions and Apply-Actions features:
-        actions: output group set_field strip_vlan push_vlan mod_nw_ttl dec_ttl set_mpls_ttl dec_mpls_ttl push_mpls pop_mpls set_queue
-        supported on Set-Field: metadata in_port_oxm eth_src eth_dst vlan_vid vlan_pcp mpls_label mpls_tc ip_src ip_dst ipv6_src ipv6_dst ipv6_label ip_dscp nw_ecn arp_op arp_spa arp_tpa arp_sha arp_tha tcp_src tcp_dst udp_src udp_dst sctp_src sctp_dst icmp_type icmp_code icmpv6_type icmpv6_code nd_target nd_sll nd_tll
-    matching:
-      metadata: exact match or wildcard
-      in_port_oxm: exact match or wildcard
-      eth_src: exact match or wildcard
-      eth_dst: exact match or wildcard
-      eth_type: exact match or wildcard
-      vlan_vid: exact match or wildcard
-      vlan_pcp: exact match or wildcard
-      mpls_label: exact match or wildcard
-      mpls_tc: exact match or wildcard
-      ip_src: exact match or wildcard
-      ip_dst: exact match or wildcard
-      ipv6_src: exact match or wildcard
-      ipv6_dst: exact match or wildcard
-      ipv6_label: exact match or wildcard
-      nw_proto: exact match or wildcard
-      ip_dscp: exact match or wildcard
-      nw_ecn: exact match or wildcard
-      arp_op: exact match or wildcard
-      arp_spa: exact match or wildcard
-      arp_tpa: exact match or wildcard
-      arp_sha: exact match or wildcard
-      arp_tha: exact match or wildcard
-      tcp_src: exact match or wildcard
-      tcp_dst: exact match or wildcard
-      udp_src: exact match or wildcard
-      udp_dst: exact match or wildcard
-      sctp_src: exact match or wildcard
-      sctp_dst: exact match or wildcard
-      icmp_type: exact match or wildcard
-      icmp_code: exact match or wildcard
-      icmpv6_type: exact match or wildcard
-      icmpv6_code: exact match or wildcard
-      nd_target: exact match or wildcard
-      nd_sll: exact match or wildcard
-      nd_tll: exact match or wildcard
-
-' "$1"
-}
-tail_table() {
-    printf '  table 253:
-    active=0, lookup=0, matched=0
-    metadata: match=0xffffffffffffffff write=0xffffffffffffffff
-    config=controller
-    max_entries=1000000
-    instructions (table miss and others):
-      instructions: apply_actions,clear_actions,write_actions,write_metadata
-      (same actions)
-    (same matching)
-'
-}
-(head_table; printf '  tables 1...252: ditto\n\n'; tail_table) > expout
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-tables br0], [0], [expout])
-# Change the configuration.
-AT_CHECK(
-  [ovs-vsctl \
-     -- --id=@t0 create Flow_Table name=main \
-     -- --id=@t1 create Flow_Table flow-limit=1024 \
-     -- set bridge br0 'flow_tables={1=@t1,0=@t0}' \
-   | uuidfilt],
-  [0], [<0>
-<1>
-])
-# Check that the configuration was updated.
-(head_table ' ("main")'; echo '  table 1:
-    active=0, lookup=0, matched=0
-    metadata: match=0xffffffffffffffff write=0xffffffffffffffff
-    config=controller
-    max_entries=1024
-    (same instructions)
-    (same matching)
-
-  table 2:
-    active=0, lookup=0, matched=0
-    metadata: match=0xffffffffffffffff write=0xffffffffffffffff
-    config=controller
-    max_entries=1000000
-    (same instructions)
-    (same matching)
-'; printf '  tables 3...252: ditto\n\n'; tail_table) > expout
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-tables br0], [0], [expout])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - table features (OpenFlow 1.3)])
-OVS_VSWITCHD_START
-head_table () {
-    printf '  table 0%s:
-    metadata: match=0xffffffffffffffff write=0xffffffffffffffff
-    max_entries=1000000
-    instructions (table miss and others):
-      next tables: 1-253
-      instructions: meter,apply_actions,clear_actions,write_actions,write_metadata,goto_table
-      Write-Actions and Apply-Actions features:
-        actions: output group set_field strip_vlan push_vlan mod_nw_ttl dec_ttl set_mpls_ttl dec_mpls_ttl push_mpls pop_mpls set_queue
-        supported on Set-Field: tun_id tun_src tun_dst tun_ipv6_src tun_ipv6_dst tun_flags tun_gbp_id tun_gbp_flags tun_erspan_idx tun_erspan_ver tun_erspan_dir tun_erspan_hwid tun_metadata0 dnl
-tun_metadata1 tun_metadata2 tun_metadata3 tun_metadata4 tun_metadata5 tun_metadata6 tun_metadata7 tun_metadata8 tun_metadata9 tun_metadata10 tun_metadata11 tun_metadata12 tun_metadata13 tun_metadata14 tun_metadata15 tun_metadata16 tun_metadata17 tun_metadata18 tun_metadata19 tun_metadata20 tun_metadata21 tun_metadata22 tun_metadata23 tun_metadata24 tun_metadata25 tun_metadata26 tun_metadata27 tun_metadata28 tun_metadata29 tun_metadata30 tun_metadata31 tun_metadata32 tun_metadata33 tun_metadata34 tun_metadata35 tun_metadata36 tun_metadata37 tun_metadata38 tun_metadata39 tun_metadata40 tun_metadata41 tun_metadata42 tun_metadata43 tun_metadata44 tun_metadata45 tun_metadata46 tun_metadata47 tun_metadata48 tun_metadata49 tun_metadata50 tun_metadata51 tun_metadata52 tun_metadata53 tun_metadata54 tun_metadata55 tun_metadata56 tun_metadata57 tun_metadata58 tun_metadata59 tun_metadata60 tun_metadata61 tun_metadata62 tun_metadata63 dnl
-metadata in_port in_port_oxm pkt_mark ct_mark ct_label reg0 reg1 reg2 reg3 reg4 reg5 reg6 reg7 reg8 reg9 reg10 reg11 reg12 reg13 reg14 reg15 xreg0 xreg1 xreg2 xreg3 xreg4 xreg5 xreg6 xreg7 xxreg0 xxreg1 xxreg2 xxreg3 eth_src eth_dst vlan_tci vlan_vid vlan_pcp mpls_label mpls_tc mpls_ttl ip_src ip_dst ipv6_src ipv6_dst ipv6_label nw_tos ip_dscp nw_ecn nw_ttl arp_op arp_spa arp_tpa arp_sha arp_tha tcp_src tcp_dst udp_src udp_dst sctp_src sctp_dst icmp_type icmp_code icmpv6_type icmpv6_code nd_target nd_sll nd_tll nd_reserved nd_options_type nsh_flags nsh_spi nsh_si nsh_c1 nsh_c2 nsh_c3 nsh_c4 nsh_ttl
-    matching:
-      dp_hash: arbitrary mask
-      recirc_id: exact match or wildcard
-      packet_type: exact match or wildcard
-      conj_id: exact match or wildcard
-      tun_id: arbitrary mask
-      tun_src: arbitrary mask
-      tun_dst: arbitrary mask
-      tun_ipv6_src: arbitrary mask
-      tun_ipv6_dst: arbitrary mask
-      tun_flags: arbitrary mask
-      tun_gbp_id: arbitrary mask
-      tun_gbp_flags: arbitrary mask
-      tun_erspan_idx: arbitrary mask
-      tun_erspan_ver: arbitrary mask
-      tun_erspan_dir: arbitrary mask
-      tun_erspan_hwid: arbitrary mask
-      tun_metadata0: arbitrary mask
-      tun_metadata1: arbitrary mask
-      tun_metadata2: arbitrary mask
-      tun_metadata3: arbitrary mask
-      tun_metadata4: arbitrary mask
-      tun_metadata5: arbitrary mask
-      tun_metadata6: arbitrary mask
-      tun_metadata7: arbitrary mask
-      tun_metadata8: arbitrary mask
-      tun_metadata9: arbitrary mask
-      tun_metadata10: arbitrary mask
-      tun_metadata11: arbitrary mask
-      tun_metadata12: arbitrary mask
-      tun_metadata13: arbitrary mask
-      tun_metadata14: arbitrary mask
-      tun_metadata15: arbitrary mask
-      tun_metadata16: arbitrary mask
-      tun_metadata17: arbitrary mask
-      tun_metadata18: arbitrary mask
-      tun_metadata19: arbitrary mask
-      tun_metadata20: arbitrary mask
-      tun_metadata21: arbitrary mask
-      tun_metadata22: arbitrary mask
-      tun_metadata23: arbitrary mask
-      tun_metadata24: arbitrary mask
-      tun_metadata25: arbitrary mask
-      tun_metadata26: arbitrary mask
-      tun_metadata27: arbitrary mask
-      tun_metadata28: arbitrary mask
-      tun_metadata29: arbitrary mask
-      tun_metadata30: arbitrary mask
-      tun_metadata31: arbitrary mask
-      tun_metadata32: arbitrary mask
-      tun_metadata33: arbitrary mask
-      tun_metadata34: arbitrary mask
-      tun_metadata35: arbitrary mask
-      tun_metadata36: arbitrary mask
-      tun_metadata37: arbitrary mask
-      tun_metadata38: arbitrary mask
-      tun_metadata39: arbitrary mask
-      tun_metadata40: arbitrary mask
-      tun_metadata41: arbitrary mask
-      tun_metadata42: arbitrary mask
-      tun_metadata43: arbitrary mask
-      tun_metadata44: arbitrary mask
-      tun_metadata45: arbitrary mask
-      tun_metadata46: arbitrary mask
-      tun_metadata47: arbitrary mask
-      tun_metadata48: arbitrary mask
-      tun_metadata49: arbitrary mask
-      tun_metadata50: arbitrary mask
-      tun_metadata51: arbitrary mask
-      tun_metadata52: arbitrary mask
-      tun_metadata53: arbitrary mask
-      tun_metadata54: arbitrary mask
-      tun_metadata55: arbitrary mask
-      tun_metadata56: arbitrary mask
-      tun_metadata57: arbitrary mask
-      tun_metadata58: arbitrary mask
-      tun_metadata59: arbitrary mask
-      tun_metadata60: arbitrary mask
-      tun_metadata61: arbitrary mask
-      tun_metadata62: arbitrary mask
-      tun_metadata63: arbitrary mask
-      metadata: arbitrary mask
-      in_port: exact match or wildcard
-      in_port_oxm: exact match or wildcard
-      actset_output: exact match or wildcard
-      pkt_mark: arbitrary mask
-      ct_state: arbitrary mask
-      ct_zone: exact match or wildcard
-      ct_mark: arbitrary mask
-      ct_label: arbitrary mask
-      ct_nw_proto: exact match or wildcard
-      ct_nw_src: arbitrary mask
-      ct_nw_dst: arbitrary mask
-      ct_ipv6_src: arbitrary mask
-      ct_ipv6_dst: arbitrary mask
-      ct_tp_src: arbitrary mask
-      ct_tp_dst: arbitrary mask
-      reg0: arbitrary mask
-      reg1: arbitrary mask
-      reg2: arbitrary mask
-      reg3: arbitrary mask
-      reg4: arbitrary mask
-      reg5: arbitrary mask
-      reg6: arbitrary mask
-      reg7: arbitrary mask
-      reg8: arbitrary mask
-      reg9: arbitrary mask
-      reg10: arbitrary mask
-      reg11: arbitrary mask
-      reg12: arbitrary mask
-      reg13: arbitrary mask
-      reg14: arbitrary mask
-      reg15: arbitrary mask
-      xreg0: arbitrary mask
-      xreg1: arbitrary mask
-      xreg2: arbitrary mask
-      xreg3: arbitrary mask
-      xreg4: arbitrary mask
-      xreg5: arbitrary mask
-      xreg6: arbitrary mask
-      xreg7: arbitrary mask
-      xxreg0: arbitrary mask
-      xxreg1: arbitrary mask
-      xxreg2: arbitrary mask
-      xxreg3: arbitrary mask
-      eth_src: arbitrary mask
-      eth_dst: arbitrary mask
-      eth_type: exact match or wildcard
-      vlan_tci: arbitrary mask
-      vlan_vid: arbitrary mask
-      vlan_pcp: exact match or wildcard
-      mpls_label: exact match or wildcard
-      mpls_tc: exact match or wildcard
-      mpls_bos: exact match or wildcard
-      mpls_ttl: exact match or wildcard
-      ip_src: arbitrary mask
-      ip_dst: arbitrary mask
-      ipv6_src: arbitrary mask
-      ipv6_dst: arbitrary mask
-      ipv6_label: arbitrary mask
-      nw_proto: exact match or wildcard
-      nw_tos: exact match or wildcard
-      ip_dscp: exact match or wildcard
-      nw_ecn: exact match or wildcard
-      nw_ttl: exact match or wildcard
-      ip_frag: arbitrary mask
-      arp_op: exact match or wildcard
-      arp_spa: arbitrary mask
-      arp_tpa: arbitrary mask
-      arp_sha: arbitrary mask
-      arp_tha: arbitrary mask
-      tcp_src: arbitrary mask
-      tcp_dst: arbitrary mask
-      tcp_flags: arbitrary mask
-      udp_src: arbitrary mask
-      udp_dst: arbitrary mask
-      sctp_src: arbitrary mask
-      sctp_dst: arbitrary mask
-      icmp_type: exact match or wildcard
-      icmp_code: exact match or wildcard
-      icmpv6_type: exact match or wildcard
-      icmpv6_code: exact match or wildcard
-      nd_target: arbitrary mask
-      nd_sll: arbitrary mask
-      nd_tll: arbitrary mask
-      nd_reserved: exact match or wildcard
-      nd_options_type: exact match or wildcard
-      nsh_flags: arbitrary mask
-      nsh_mdtype: exact match or wildcard
-      nsh_np: exact match or wildcard
-      nsh_spi: exact match or wildcard
-      nsh_si: exact match or wildcard
-      nsh_c1: arbitrary mask
-      nsh_c2: arbitrary mask
-      nsh_c3: arbitrary mask
-      nsh_c4: arbitrary mask
-      nsh_ttl: exact match or wildcard
-
-' "$1"
-}
-tail_tables() {
-echo '  table 253:
-    metadata: match=0xffffffffffffffff write=0xffffffffffffffff
-    max_entries=1000000
-    instructions (table miss and others):
-      instructions: meter,apply_actions,clear_actions,write_actions,write_metadata
-      (same actions)
-    (same matching)
-'
-}
-(head_table
- printf '  tables 1...252: ditto\n\n'
- tail_tables) > expout
-AT_CHECK([ovs-ofctl -O OpenFlow13 dump-table-features br0], [0], [expout])
-# Change the configuration.
-AT_CHECK(
-  [ovs-vsctl \
-     -- --id=@t0 create Flow_Table name=main \
-     -- --id=@t1 create Flow_Table flow-limit=1024 \
-     -- set bridge br0 'flow_tables={1=@t1,0=@t0}' \
-   | uuidfilt],
-  [0], [<0>
-<1>
-])
-# Check that the configuration was updated.
-(head_table ' ("main")'
- echo '  table 1:
-    metadata: match=0xffffffffffffffff write=0xffffffffffffffff
-    max_entries=1024
-    (same instructions)
-    (same matching)
-
-  table 2:
-    metadata: match=0xffffffffffffffff write=0xffffffffffffffff
-    max_entries=1000000
-    (same instructions)
-    (same matching)
-
-  tables 3...252: ditto
-'
- tail_tables) > expout
-AT_CHECK([ovs-ofctl -O OpenFlow13 dump-table-features br0], [0], [expout])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - flow table names])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2
-
-# Set a table name via OpenFlow 1.3 and one via OpenFlow 1.5.
-AT_CHECK([ovs-ofctl -O OpenFlow13 mod-table br0 0 name:xyzzy])
-AT_CHECK([ovs-ofctl -O OpenFlow15 mod-table br0 1 name:quux])
-AT_CHECK([ovs-ofctl -O OpenFlow15 dump-table-features br0 |grep '^  table'],
-  [0], [dnl
-  table 0 ("xyzzy"):
-  table 1 ("quux"): ditto
-  tables 2...252: ditto
-  table 253:
-])
-
-# Set some table names via OVSDB.
-AT_CHECK(
-  [ovs-vsctl \
-     -- --id=@t0 create Flow_Table name=zero \
-     -- --id=@t1 create Flow_Table name=one \
-     -- --id=@t2 create Flow_Table name=two \
-     -- set bridge br0 'flow_tables={0=@t0,1=@t1,2=@t2}' \
-   | uuidfilt],
-  [0], [<0>
-<1>
-<2>
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 dump-table-features br0 |grep '^  table'],
-  [0], [dnl
-  table 0 ("zero"):
-  table 1 ("one"): ditto
-  table 2 ("two"): ditto
-  tables 3...252: ditto
-  table 253:
-])
-
-# Check that flow table parsing and dumping uses the names.
-AT_DATA([flows.txt], [dnl
-table=zero in_port=p2 actions=p1,resubmit(,one)
-table=one,in_port=p1,ip,actions=ct(table=two)
-table=one,in_port=p1,arp,actions=goto_table(two)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl --names --no-stats dump-flows br0], [0], [dnl
- table=zero, in_port=p2 actions=output:p1,resubmit(,one)
- table=one, ip,in_port=p1 actions=ct(table=two)
- table=one, arp,in_port=p1 actions=resubmit(,two)
-])
-AT_CHECK([ovs-ofctl --no-names --no-stats dump-flows br0], [0], [dnl
- in_port=2 actions=output:1,resubmit(,1)
- table=1, ip,in_port=1 actions=ct(table=2)
- table=1, arp,in_port=1 actions=resubmit(,2)
-])
-
-# Setting the same table names via OpenFlow 1.3 or OpenFlow 1.5 is a no-op.
-AT_CHECK([ovs-ofctl -O OpenFlow13 mod-table br0 0 name:zero])
-AT_CHECK([ovs-ofctl -O OpenFlow15 mod-table br0 1 name:one])
-AT_CHECK([ovs-ofctl -O OpenFlow15 dump-table-features br0 |grep '^  table'],
-  [0], [dnl
-  table 0 ("zero"):
-  table 1 ("one"): ditto
-  table 2 ("two"): ditto
-  tables 3...252: ditto
-  table 253:
-])
-
-# Setting different tables names via OpenFlow 1.3 or OpenFlow 1.5 yield errors.
-AT_CHECK([ovs-ofctl -O OpenFlow13 mod-table br0 0 name:xyzzy], 1, [], [stderr])
-AT_CHECK([head -1 stderr], [0], [OFPT_ERROR (OF1.3) (xid=0x5): OFPTFFC_EPERM
-])
-AT_CHECK([ovs-ofctl -O OpenFlow15 mod-table br0 1 name:quux], 1, [], [stderr])
-AT_CHECK([head -1 stderr], [0], [OFPT_ERROR (OF1.5) (xid=0x5): OFPTFFC_EPERM
-])
-
-# But we can still set table names for those not set via OVSDB.
-AT_CHECK([ovs-ofctl -O OpenFlow13 mod-table br0 3 name:three])
-AT_CHECK([ovs-ofctl -O OpenFlow15 dump-table-features br0 |grep '^  table'],
-  [0], [dnl
-  table 0 ("zero"):
-  table 1 ("one"): ditto
-  table 2 ("two"): ditto
-  table 3 ("three"): ditto
-  tables 4...252: ditto
-  table 253:
-])
-
-# Unsetting names via OVSDB then setting them via OpenFlow works too.
-AT_CHECK([ovs-vsctl remove bridge br0 Flow_Table 2])
-AT_CHECK([ovs-ofctl -O OpenFlow15 dump-table-features br0 |grep '^  table'],
-  [0], [dnl
-  table 0 ("zero"):
-  table 1 ("one"): ditto
-  table 2: ditto
-  table 3 ("three"): ditto
-  tables 4...252: ditto
-  table 253:
-])
-AT_CHECK([ovs-ofctl -O OpenFlow13 mod-table br0 2 name:foobar])
-AT_CHECK([ovs-ofctl -O OpenFlow15 dump-table-features br0 |grep '^  table'],
-  [0], [dnl
-  table 0 ("zero"):
-  table 1 ("one"): ditto
-  table 2 ("foobar"): ditto
-  table 3 ("three"): ditto
-  tables 4...252: ditto
-  table 253:
-])
-
-# We can clear names via OpenFlow, at least if they were set that way.
-AT_CHECK([ovs-ofctl -O OpenFlow13 mod-table br0 2 name:])
-AT_CHECK([ovs-ofctl -O OpenFlow15 dump-table-features br0 |grep '^  table'],
-  [0], [dnl
-  table 0 ("zero"):
-  table 1 ("one"): ditto
-  table 2: ditto
-  table 3 ("three"): ditto
-  tables 4...252: ditto
-  table 253:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - table description (OpenFlow 1.4)])
-OVS_VSWITCHD_START
-(x=0
- while test $x -lt 254; do
-   y=`expr $x + 1`
-   echo "  table $x:
-   eviction=off eviction_flags=OTHER|IMPORTANCE|LIFETIME
-   vacancy=off"
-   x=$y
- done) > expout
-AT_CHECK([ovs-ofctl -O OpenFlow14 dump-table-desc br0 | sed '/^$/d
-/^OFPST_TABLE_DESC/d'], [0], [expout])
-
-# Change the configuration.
-AT_CHECK([ovs-ofctl -O Openflow14 mod-table br0 0 evict])
-# Check that the configuration was updated.
-mv expout orig-expout
-sed -e '2s/eviction=off/eviction=on/' <orig-expout > expout
-AT_CHECK([ovs-ofctl -O OpenFlow14 dump-table-desc br0 | sed '/^$/d
-/^OFPST_TABLE_DESC/d'], [0], [expout])
-
-AT_CHECK([ovs-ofctl -O Openflow14 mod-table br0 0 vacancy:20,80])
-# Check that the configuration was updated.
-mv expout orig-expout
-sed -e '3s/vacancy=off/vacancy=on vacancy_down=20% vacancy_up=80% vacancy=100%/' <orig-expout > expout
-AT_CHECK([ovs-ofctl -O OpenFlow14 dump-table-desc br0 | sed '/^$/d
-/^OFPST_TABLE_DESC/d'], [0], [expout])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - hard limits on flow table size (OpenFlow 1.0)])
-OVS_VSWITCHD_START
-# Configure a maximum of 4 flows.
-AT_CHECK(
-  [ovs-vsctl \
-     -- --id=@t0 create Flow_Table flow-limit=4 \
-     -- set bridge br0 flow_tables:0=@t0 \
-   | uuidfilt],
-  [0], [<0>
-])
-# Add 4 flows.
-for in_port in 1 2 3 4; do
-    ovs-ofctl add-flow br0 in_port=$in_port,actions=drop
-done
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=1 actions=drop
- in_port=2 actions=drop
- in_port=3 actions=drop
- in_port=4 actions=drop
-NXST_FLOW reply:
-])
-# Adding another flow will be refused.
-AT_CHECK([ovs-ofctl add-flow br0 in_port=5,actions=drop], [1], [], [stderr])
-AT_CHECK([ofctl_strip < stderr], [0],
-  [OFPT_ERROR: OFPFMFC_TABLE_FULL
-OFPT_FLOW_MOD: ADD in_port=5 actions=drop
-])
-# Also a mod-flow that would add a flow will be refused.
-AT_CHECK([ovs-ofctl mod-flows br0 in_port=5,actions=drop], [1], [], [stderr])
-AT_CHECK([ofctl_strip < stderr], [0],
-  [OFPT_ERROR: OFPFMFC_TABLE_FULL
-OFPT_FLOW_MOD: MOD in_port=5 actions=drop
-])
-# Replacing or modifying an existing flow is allowed.
-AT_CHECK([ovs-ofctl add-flow br0 in_port=4,actions=normal])
-AT_CHECK([ovs-ofctl mod-flows br0 in_port=3,actions=output:1])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=1 actions=drop
- in_port=2 actions=drop
- in_port=3 actions=output:1
- in_port=4 actions=NORMAL
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - hard limits on flow table size (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-# Configure a maximum of 4 flows.
-AT_CHECK(
-  [ovs-vsctl \
-     -- --id=@t0 create Flow_Table flow-limit=4 \
-     -- set bridge br0 flow_tables:0=@t0 \
-   | uuidfilt],
-  [0], [<0>
-])
-# Add 4 flows.
-for in_port in 1 2 3 4; do
-    ovs-ofctl -O OpenFlow12 add-flow br0 in_port=$in_port,actions=drop
-done
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=1 actions=drop
- in_port=2 actions=drop
- in_port=3 actions=drop
- in_port=4 actions=drop
-OFPST_FLOW reply (OF1.2):
-])
-# Adding another flow will be refused.
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 in_port=5,actions=drop], [1], [], [stderr])
-AT_CHECK([ofctl_strip < stderr], [0],
-  [OFPT_ERROR (OF1.2): OFPFMFC_TABLE_FULL
-OFPT_FLOW_MOD (OF1.2): ADD in_port=5 actions=drop
-])
-# Replacing or modifying an existing flow is allowed.
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 in_port=4,actions=normal])
-AT_CHECK([ovs-ofctl -O OpenFlow12 mod-flows br0 in_port=3,actions=output:1])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=1 actions=drop
- in_port=2 actions=drop
- in_port=3 actions=output:1
- in_port=4 actions=NORMAL
-OFPST_FLOW reply (OF1.2):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - eviction upon table overflow (OpenFlow 1.0)])
-OVS_VSWITCHD_START
-# Configure a maximum of 4 flows.
-AT_CHECK(
-  [ovs-vsctl \
-     -- --id=@t0 create Flow_Table flow-limit=4 overflow-policy=evict \
-     -- set bridge br0 flow_tables:0=@t0 \
-   | uuidfilt],
-  [0], [<0>
-])
-# Add 4 flows.
-for in_port in 4 3 2 1; do
-    ovs-ofctl add-flow br0 idle_timeout=${in_port}0,in_port=$in_port,actions=drop
-done
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=10, in_port=1 actions=drop
- idle_timeout=20, in_port=2 actions=drop
- idle_timeout=30, in_port=3 actions=drop
- idle_timeout=40, in_port=4 actions=drop
-NXST_FLOW reply:
-])
-# Adding another flow will cause the one that expires soonest to be evicted.
-AT_CHECK([ovs-ofctl add-flow br0 in_port=5,actions=drop])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=20, in_port=2 actions=drop
- idle_timeout=30, in_port=3 actions=drop
- idle_timeout=40, in_port=4 actions=drop
- in_port=5 actions=drop
-NXST_FLOW reply:
-])
-# A mod-flow that adds a flow also causes eviction, but replacing or
-# modifying an existing flow doesn't.
-AT_CHECK([ovs-ofctl mod-flows br0 in_port=6,actions=drop])
-AT_CHECK([ovs-ofctl add-flow br0 in_port=4,actions=normal])
-AT_CHECK([ovs-ofctl mod-flows br0 in_port=3,actions=output:1])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=30, in_port=3 actions=output:1
- in_port=4 actions=NORMAL
- in_port=5 actions=drop
- in_port=6 actions=drop
-NXST_FLOW reply:
-])
-# Flows with no timeouts at all cannot be evicted.
-AT_CHECK([ovs-ofctl add-flow br0 in_port=7,actions=normal])
-AT_CHECK([ovs-ofctl add-flow br0 in_port=8,actions=drop], [1], [], [stderr])
-AT_CHECK([ofctl_strip < stderr], [0],
-  [OFPT_ERROR: OFPFMFC_TABLE_FULL
-OFPT_FLOW_MOD: ADD in_port=8 actions=drop
-])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=4 actions=NORMAL
- in_port=5 actions=drop
- in_port=6 actions=drop
- in_port=7 actions=NORMAL
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - eviction upon table overflow (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-# Configure a maximum of 4 flows.
-AT_CHECK(
-  [ovs-vsctl \
-     -- --id=@t0 create Flow_Table flow-limit=4 overflow-policy=evict \
-     -- set bridge br0 flow_tables:0=@t0 \
-   | uuidfilt],
-  [0], [<0>
-])
-# Add 4 flows.
-for in_port in 4 3 2 1; do
-    ovs-ofctl -O OpenFlow12 add-flow br0 idle_timeout=${in_port}0,in_port=$in_port,actions=drop
-done
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=10, in_port=1 actions=drop
- idle_timeout=20, in_port=2 actions=drop
- idle_timeout=30, in_port=3 actions=drop
- idle_timeout=40, in_port=4 actions=drop
-OFPST_FLOW reply (OF1.2):
-])
-# Adding another flow will cause the one that expires soonest to be evicted.
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 in_port=5,actions=drop])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=20, in_port=2 actions=drop
- idle_timeout=30, in_port=3 actions=drop
- idle_timeout=40, in_port=4 actions=drop
- in_port=5 actions=drop
-OFPST_FLOW reply (OF1.2):
-])
-# In OpenFlow 1.2 a mod-flow does not ever add a flow and thus
-# has no effect on eviction
-AT_CHECK([ovs-ofctl -O OpenFlow12 mod-flows br0 in_port=6,actions=drop])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 in_port=4,actions=normal])
-AT_CHECK([ovs-ofctl -O OpenFlow12 mod-flows br0 in_port=3,actions=output:1])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=20, in_port=2 actions=drop
- idle_timeout=30, in_port=3 actions=output:1
- in_port=4 actions=NORMAL
- in_port=5 actions=drop
-OFPST_FLOW reply (OF1.2):
-])
-# Flows with no timeouts at all cannot be evicted.
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 in_port=6,actions=drop])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 in_port=7,actions=normal])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 in_port=8,actions=drop], [1], [], [stderr])
-AT_CHECK([ofctl_strip < stderr], [0],
-  [OFPT_ERROR (OF1.2): OFPFMFC_TABLE_FULL
-OFPT_FLOW_MOD (OF1.2): ADD in_port=8 actions=drop
-])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=4 actions=NORMAL
- in_port=5 actions=drop
- in_port=6 actions=drop
- in_port=7 actions=NORMAL
-OFPST_FLOW reply (OF1.2):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - eviction using importance upon table overflow (OpenFlow 1.4)])
-OVS_VSWITCHD_START
-# Configure a maximum of 4 flows.
-AT_CHECK(
-  [ovs-vsctl \
-     -- --id=@t0 create Flow_Table name=evict flow-limit=4 \
-     -- set bridge br0 flow_tables:0=@t0 \
-   | uuidfilt],
-  [0], [<0>
-])
-# Use mod-table to turn on eviction just to demonstrate that it works.
-AT_CHECK([ovs-ofctl -O OpenFlow14 mod-table br0 0 evict])
-# Add 4 flows.
-for in_port in 4 3 2 1; do
-    ovs-ofctl -O Openflow14 add-flow br0 importance=$((in_port + 30)),priority=$((in_port + 5)),hard_timeout=$((in_port + 500)),actions=drop
-done
-AT_CHECK([ovs-ofctl -O Openflow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- hard_timeout=501, importance=31, priority=6 actions=drop
- hard_timeout=502, importance=32, priority=7 actions=drop
- hard_timeout=503, importance=33, priority=8 actions=drop
- hard_timeout=504, importance=34, priority=9 actions=drop
-OFPST_FLOW reply (OF1.4):
-])
-# Adding another flow will cause the one with lowest importance to be evicted.
-AT_CHECK([ovs-ofctl -O Openflow14 add-flow br0 hard_timeout=505,importance=35,priority=10,in_port=2,actions=drop])
-AT_CHECK([ovs-ofctl -O Openflow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- hard_timeout=502, importance=32, priority=7 actions=drop
- hard_timeout=503, importance=33, priority=8 actions=drop
- hard_timeout=504, importance=34, priority=9 actions=drop
- hard_timeout=505, importance=35, priority=10,in_port=2 actions=drop
-OFPST_FLOW reply (OF1.4):
-])
-# Disable the Eviction configuration.
-AT_CHECK([ovs-ofctl -O OpenFlow14 mod-table br0 0 noevict])
-# Adding another flow will cause the system to give error for FULL TABLE.
-AT_CHECK([ovs-ofctl -O Openflow14 add-flow br0 hard_timeout=506,importance=36,priority=11,actions=drop],[1], [], [stderr])
-AT_CHECK([ofctl_strip < stderr], [0],
- [OFPT_ERROR (OF1.4): OFPFMFC_TABLE_FULL
-OFPT_FLOW_MOD (OF1.4): ADD priority=11 hard:506 importance:36 actions=drop
-])
-#Dump flows. It should show only the old values
-AT_CHECK([ovs-ofctl -O Openflow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- hard_timeout=502, importance=32, priority=7 actions=drop
- hard_timeout=503, importance=33, priority=8 actions=drop
- hard_timeout=504, importance=34, priority=9 actions=drop
- hard_timeout=505, importance=35, priority=10,in_port=2 actions=drop
-OFPST_FLOW reply (OF1.4):
-])
-# mod-flow that would modify a flow will be done successfully.
-AT_CHECK([ovs-ofctl -O Openflow14 mod-flows br0 in_port=2,actions=NORMAL])
-AT_CHECK([ovs-ofctl -O Openflow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- hard_timeout=502, importance=32, priority=7 actions=drop
- hard_timeout=503, importance=33, priority=8 actions=drop
- hard_timeout=504, importance=34, priority=9 actions=drop
- hard_timeout=505, importance=35, priority=10,in_port=2 actions=NORMAL
-OFPST_FLOW reply (OF1.4):
-])
-# Also a mod-flow that would add a flow will be refused.
-AT_CHECK([ovs-ofctl mod-flows br0 in_port=5,actions=drop], [1], [], [stderr])
-AT_CHECK([ofctl_strip < stderr], [0],
-  [OFPT_ERROR: OFPFMFC_TABLE_FULL
-OFPT_FLOW_MOD: MOD in_port=5 actions=drop
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - eviction upon table overflow, with fairness (OpenFlow 1.0)])
-OVS_VSWITCHD_START
-# Configure a maximum of 4 flows.
-AT_CHECK(
-  [ovs-vsctl \
-     -- --id=@t0 create Flow_Table name=evict flow-limit=4 \
-                                   overflow-policy=evict \
-                                   groups='"NXM_OF_IN_PORT[[]]"' \
-     -- set bridge br0 flow_tables:0=@t0 \
-   | uuidfilt],
-  [0], [<0>
-])
-# Add 4 flows.
-ovs-ofctl add-flows br0 - <<EOF
-idle_timeout=10 in_port=2 dl_src=00:44:55:66:77:88 actions=drop
-idle_timeout=20 in_port=1 dl_src=00:11:22:33:44:55 actions=drop
-idle_timeout=30 in_port=1 dl_src=00:22:33:44:55:66 actions=drop
-idle_timeout=40 in_port=1 dl_src=00:33:44:55:66:77 actions=drop
-EOF
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=10, in_port=2,dl_src=00:44:55:66:77:88 actions=drop
- idle_timeout=20, in_port=1,dl_src=00:11:22:33:44:55 actions=drop
- idle_timeout=30, in_port=1,dl_src=00:22:33:44:55:66 actions=drop
- idle_timeout=40, in_port=1,dl_src=00:33:44:55:66:77 actions=drop
-NXST_FLOW reply:
-])
-# Adding another flow will cause the one that expires soonest within
-# the largest group (those with in_port=1) to be evicted.  In this
-# case this is not the same as the one that expires soonest overall
-# (which is what makes the test interesting):
-AT_CHECK([ovs-ofctl add-flow br0 in_port=2,dl_src=00:55:66:77:88:99,actions=drop])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=10, in_port=2,dl_src=00:44:55:66:77:88 actions=drop
- idle_timeout=30, in_port=1,dl_src=00:22:33:44:55:66 actions=drop
- idle_timeout=40, in_port=1,dl_src=00:33:44:55:66:77 actions=drop
- in_port=2,dl_src=00:55:66:77:88:99 actions=drop
-NXST_FLOW reply:
-])
-# Enlarge the flow limit, change the eviction policy back to strictly
-# based on expiration, and and add some flows.
-AT_CHECK([ovs-vsctl set Flow_Table evict groups='[[]]' flow-limit=7])
-ovs-ofctl add-flows br0 - <<EOF
-idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=drop
-idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=drop
-idle_timeout=70 in_port=2 dl_src=00:88:99:aa:bb:cc actions=drop
-EOF
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=10, in_port=2,dl_src=00:44:55:66:77:88 actions=drop
- idle_timeout=30, in_port=1,dl_src=00:22:33:44:55:66 actions=drop
- idle_timeout=40, in_port=1,dl_src=00:33:44:55:66:77 actions=drop
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=drop
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=drop
- idle_timeout=70, in_port=2,dl_src=00:88:99:aa:bb:cc actions=drop
- in_port=2,dl_src=00:55:66:77:88:99 actions=drop
-NXST_FLOW reply:
-])
-# Adding another flow will cause the one that expires soonest overall
-# to be evicted.
-AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=80 in_port=2 dl_src=00:99:aa:bb:cc:dd actions=drop'])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=30, in_port=1,dl_src=00:22:33:44:55:66 actions=drop
- idle_timeout=40, in_port=1,dl_src=00:33:44:55:66:77 actions=drop
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=drop
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=drop
- idle_timeout=70, in_port=2,dl_src=00:88:99:aa:bb:cc actions=drop
- idle_timeout=80, in_port=2,dl_src=00:99:aa:bb:cc:dd actions=drop
- in_port=2,dl_src=00:55:66:77:88:99 actions=drop
-NXST_FLOW reply:
-])
-# Reducing the flow limit also causes the flows that expire soonest
-# overall to be evicted.
-AT_CHECK([ovs-vsctl set Flow_Table evict flow-limit=4])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=drop
- idle_timeout=70, in_port=2,dl_src=00:88:99:aa:bb:cc actions=drop
- idle_timeout=80, in_port=2,dl_src=00:99:aa:bb:cc:dd actions=drop
- in_port=2,dl_src=00:55:66:77:88:99 actions=drop
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - eviction upon table overflow, with fairness (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-# Configure a maximum of 4 flows.
-AT_CHECK(
-  [ovs-vsctl \
-     -- --id=@t0 create Flow_Table name=evict flow-limit=4 \
-                                   overflow-policy=evict \
-                                   groups='"NXM_OF_IN_PORT[[]]"' \
-     -- set bridge br0 flow_tables:0=@t0 \
-   | uuidfilt],
-  [0], [<0>
-])
-# Add 4 flows.
-ovs-ofctl -O OpenFlow12 add-flows br0 - <<EOF
-idle_timeout=10 in_port=2 dl_src=00:44:55:66:77:88 actions=drop
-idle_timeout=20 in_port=1 dl_src=00:11:22:33:44:55 actions=drop
-idle_timeout=30 in_port=1 dl_src=00:22:33:44:55:66 actions=drop
-idle_timeout=40 in_port=1 dl_src=00:33:44:55:66:77 actions=drop
-EOF
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=10, in_port=2,dl_src=00:44:55:66:77:88 actions=drop
- idle_timeout=20, in_port=1,dl_src=00:11:22:33:44:55 actions=drop
- idle_timeout=30, in_port=1,dl_src=00:22:33:44:55:66 actions=drop
- idle_timeout=40, in_port=1,dl_src=00:33:44:55:66:77 actions=drop
-OFPST_FLOW reply (OF1.2):
-])
-# Adding another flow will cause the one that expires soonest within
-# the largest group (those with in_port=1) to be evicted.  In this
-# case this is not the same as the one that expires soonest overall
-# (which is what makes the test interesting):
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 in_port=2,dl_src=00:55:66:77:88:99,actions=drop])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=10, in_port=2,dl_src=00:44:55:66:77:88 actions=drop
- idle_timeout=30, in_port=1,dl_src=00:22:33:44:55:66 actions=drop
- idle_timeout=40, in_port=1,dl_src=00:33:44:55:66:77 actions=drop
- in_port=2,dl_src=00:55:66:77:88:99 actions=drop
-OFPST_FLOW reply (OF1.2):
-])
-# Enlarge the flow limit, change the eviction policy back to strictly
-# based on expiration, and and add some flows.
-AT_CHECK([ovs-vsctl set Flow_Table evict groups='[[]]' flow-limit=7])
-ovs-ofctl -O OpenFlow12 add-flows br0 - <<EOF
-idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=drop
-idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=drop
-idle_timeout=70 in_port=2 dl_src=00:88:99:aa:bb:cc actions=drop
-EOF
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=10, in_port=2,dl_src=00:44:55:66:77:88 actions=drop
- idle_timeout=30, in_port=1,dl_src=00:22:33:44:55:66 actions=drop
- idle_timeout=40, in_port=1,dl_src=00:33:44:55:66:77 actions=drop
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=drop
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=drop
- idle_timeout=70, in_port=2,dl_src=00:88:99:aa:bb:cc actions=drop
- in_port=2,dl_src=00:55:66:77:88:99 actions=drop
-OFPST_FLOW reply (OF1.2):
-])
-# Adding another flow will cause the one that expires soonest overall
-# to be evicted.
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'idle_timeout=80 in_port=2 dl_src=00:99:aa:bb:cc:dd actions=drop'])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=30, in_port=1,dl_src=00:22:33:44:55:66 actions=drop
- idle_timeout=40, in_port=1,dl_src=00:33:44:55:66:77 actions=drop
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=drop
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=drop
- idle_timeout=70, in_port=2,dl_src=00:88:99:aa:bb:cc actions=drop
- idle_timeout=80, in_port=2,dl_src=00:99:aa:bb:cc:dd actions=drop
- in_port=2,dl_src=00:55:66:77:88:99 actions=drop
-OFPST_FLOW reply (OF1.2):
-])
-# Reducing the flow limit also causes the flows that expire soonest
-# overall to be evicted.
-AT_CHECK([ovs-vsctl set Flow_Table evict flow-limit=4])
-AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=drop
- idle_timeout=70, in_port=2,dl_src=00:88:99:aa:bb:cc actions=drop
- idle_timeout=80, in_port=2,dl_src=00:99:aa:bb:cc:dd actions=drop
- in_port=2,dl_src=00:55:66:77:88:99 actions=drop
-OFPST_FLOW reply (OF1.2):
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - eviction upon table overflow, with modified hard timeout])
-OVS_VSWITCHD_START
-# Configure a maximum of 4 flows.
-AT_CHECK(
-  [ovs-vsctl \
-     -- --id=@t0 create Flow_Table flow-limit=4 overflow-policy=evict \
-     -- set bridge br0 flow_tables:0=@t0 \
-   | uuidfilt],
-  [0], [<0>
-])
-ovs-appctl time/stop
-# Add 4 flows.
-for in_port in 4 3 2 1; do
-    ovs-ofctl add-flow br0 hard_timeout=$((10 + in_port * 3)),in_port=$in_port,actions=drop
-done
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- hard_timeout=13, in_port=1 actions=drop
- hard_timeout=16, in_port=2 actions=drop
- hard_timeout=19, in_port=3 actions=drop
- hard_timeout=22, in_port=4 actions=drop
-NXST_FLOW reply:
-])
-# Sleep and modify the one that expires soonest
-ovs-appctl time/warp 5000
-AT_CHECK([ovs-ofctl mod-flows br0 in_port=1,actions=drop])
-# At this point the table would looks like:
-#  in_port   seconds to expire
-#     1            13
-#     2            11
-#     3            14
-#     4            17
-ovs-appctl time/warp 2000
-# Adding another flow will cause the one that expires soonest to be evicted.
-AT_CHECK([ovs-ofctl add-flow br0 in_port=5,actions=drop])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- hard_timeout=13, in_port=1 actions=drop
- hard_timeout=19, in_port=3 actions=drop
- hard_timeout=22, in_port=4 actions=drop
- in_port=5 actions=drop
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - eviction upon table overflow, with modified idle timeout])
-OVS_VSWITCHD_START([add-port br0 p1 -- set interface p1 type=dummy ofport_request=1])
-# Configure a maximum of 4 flows.
-AT_CHECK(
-  [ovs-vsctl \
-     -- --id=@t0 create Flow_Table flow-limit=4 overflow-policy=evict \
-     -- set bridge br0 flow_tables:0=@t0 \
-   | uuidfilt],
-  [0], [<0>
-])
-# Add 4 flows.
-for in_port in 4 3 2 1; do
-    ovs-ofctl add-flow br0 idle_timeout=$((10 + in_port * 3)),in_port=$in_port,actions=drop
-done
-ovs-appctl time/stop
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=13, in_port=1 actions=drop
- idle_timeout=16, in_port=2 actions=drop
- idle_timeout=19, in_port=3 actions=drop
- idle_timeout=22, in_port=4 actions=drop
-NXST_FLOW reply:
-])
-# Sleep and receive on the flow that expires soonest
-ovs-appctl time/warp 5000
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1)'])
-# At this point the table would looks like:
-#  in_port   seconds to expire
-#     1            13
-#     2            11
-#     3            14
-#     4            17
-ovs-appctl time/warp 2000
-# Adding another flow will cause the one that expires soonest to be evicted.
-AT_CHECK([ovs-ofctl add-flow br0 in_port=5,actions=drop])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=19, in_port=3 actions=drop
- idle_timeout=22, in_port=4 actions=drop
- in_port=5 actions=drop
- n_packets=1, n_bytes=14, idle_timeout=13, in_port=1 actions=drop
-NXST_FLOW reply:
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - asynchronous message control (OpenFlow 1.0)])
-OVS_VSWITCHD_START([set bridge br0 other_config:hwaddr=00:01:02:03:04:05])
-AT_CHECK([ovs-ofctl -P standard monitor br0 --detach --no-chdir --pidfile])
-check_async () {
-    printf '\n\n--- check_async %d ---\n\n\n' $1
-    shift
-
-    ovs-appctl -t ovs-ofctl ofctl/barrier
-    ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-    : > expout
-
-    # OFPT_PACKET_IN, OFPR_ACTION (controller_id=0)
-    ovs-ofctl -v packet-out br0 controller controller '0001020304050010203040501234'
-    if test X"$1" = X"OFPR_ACTION"; then shift;
-        echo >>expout "OFPT_PACKET_IN: total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234"
-    fi
-
-    # OFPT_PACKET_IN, OFPR_NO_MATCH (controller_id=123)
-    ovs-ofctl -v packet-out br0 controller 'controller(reason=no_match,id=123)' '0001020304050010203040501234'
-    if test X"$1" = X"OFPR_NO_MATCH"; then shift;
-        echo >>expout "OFPT_PACKET_IN: total_len=14 in_port=CONTROLLER (via no_match) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234"
-    fi
-
-    # OFPT_PACKET_IN, OFPR_INVALID_TTL (controller_id=0)
-    ovs-ofctl packet-out br0 "in_port=controller packet=002583dfb4000026b98cb0f908004500003eb7e200000011339bac11370dac100002d7730035002b8f6d86fb0100000100000000000006626c702d7873066e696369726103636f6d00000f00 actions=dec_ttl"
-    if test X"$1" = X"OFPR_INVALID_TTL"; then shift;
-        echo >>expout "OFPT_PACKET_IN: total_len=76 in_port=CONTROLLER (via invalid_ttl) data_len=76 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=00:26:b9:8c:b0:f9,dl_dst=00:25:83:df:b4:00,nw_src=172.17.55.13,nw_dst=172.16.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=55155,tp_dst=53 udp_csum:8f6d"
-    fi
-
-    # OFPT_PORT_STATUS, OFPPR_ADD
-    ovs-vsctl add-port br0 test -- set Interface test type=dummy ofport_request=1
-    if test X"$1" = X"OFPPR_ADD"; then shift;
-        echo >>expout "OFPT_PORT_STATUS: ADD: 1(test): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      0
-     speed: 0 Mbps now, 0 Mbps max"
-    fi
-
-    # OFPT_PORT_STATUS, OFPPR_DELETE
-    ovs-vsctl del-port br0 test
-    if test X"$1" = X"OFPPR_DELETE"; then shift;
-        echo >>expout "OFPT_PORT_STATUS: DEL: 1(test): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      0
-     speed: 0 Mbps now, 0 Mbps max"
-    fi
-
-    # OFPT_FLOW_REMOVED, OFPRR_DELETE
-    ovs-ofctl add-flow br0 send_flow_rem,actions=drop
-    ovs-ofctl --strict del-flows br0 ''
-    if test X"$1" = X"OFPRR_DELETE"; then shift;
-        echo >>expout "OFPT_FLOW_REMOVED:  reason=delete"
-    fi
-    AT_FAIL_IF([test X"$1" != X])
-
-    OVS_WAIT_UNTIL([test `wc -l < "monitor.log"` -ge `wc -l < "expout"`])
-
-    AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/ *duration.*//
-s/00:0.$/00:0x/' < monitor.log]],
-      [0], [expout])
-}
-
-# It's a service connection so initially there should be no async messages.
-check_async 1
-
-# Set miss_send_len to 128, turning on packet-ins for our service connection.
-ovs-appctl -t ovs-ofctl ofctl/send 0109000c0123456700000080
-check_async 2 OFPR_ACTION OFPPR_ADD OFPPR_DELETE OFPRR_DELETE
-
-# Set miss_send_len to 128 and enable invalid_ttl.
-ovs-appctl -t ovs-ofctl ofctl/send 0109000c0123456700040080
-check_async 3 OFPR_ACTION OFPR_INVALID_TTL OFPPR_ADD OFPPR_DELETE OFPRR_DELETE
-
-# Become slave, which should disable everything except port status.
-ovs-appctl -t ovs-ofctl ofctl/send 0104001400000002000023200000000a00000002
-check_async 4 OFPPR_ADD OFPPR_DELETE
-
-# Use NXT_SET_ASYNC_CONFIG to enable a patchwork of asynchronous messages.
-ovs-appctl -t ovs-ofctl ofctl/send 01040028000000020000232000000013000000020000000500000005000000020000000200000005
-check_async 5 OFPR_INVALID_TTL OFPPR_DELETE OFPRR_DELETE
-
-# Set controller ID 123.
-ovs-appctl -t ovs-ofctl ofctl/send 01040018000000030000232000000014000000000000007b
-check_async 6 OFPR_NO_MATCH OFPPR_DELETE OFPRR_DELETE
-
-# Restore controller ID 0.
-ovs-appctl -t ovs-ofctl ofctl/send 010400180000000300002320000000140000000000000000
-
-# Become master.
-ovs-appctl -t ovs-ofctl ofctl/send 0104001400000002000023200000000a00000001
-check_async 7 OFPR_ACTION OFPPR_ADD
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - asynchronous message control (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow12 -P standard monitor br0 --detach --no-chdir --pidfile])
-check_async () {
-    printf '\n\n--- check_async %d ---\n\n\n' $1
-    INDEX=$1
-    shift
-
-    ovs-appctl -t ovs-ofctl ofctl/barrier
-    ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-    : > expout
-
-    # OFPT_PACKET_IN, OFPR_ACTION (controller_id=0)
-    ovs-ofctl -O OpenFlow12 -v packet-out br0 none controller '0001020304050010203040501234'
-    if test X"$1" = X"OFPR_ACTION"; then shift;
-        echo >>expout "OFPT_PACKET_IN (OF1.2): total_len=14 in_port=ANY (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234"
-    fi
-
-    # OFPT_PACKET_IN, OFPR_NO_MATCH (controller_id=123)
-    ovs-ofctl -O OpenFlow12 -v packet-out br0 none 'controller(reason=no_match,id=123)' '0001020304050010203040501234'
-    if test X"$1" = X"OFPR_NO_MATCH"; then shift;
-        echo >>expout "OFPT_PACKET_IN (OF1.2): total_len=14 in_port=ANY (via no_match) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234"
-    fi
-
-    # OFPT_PACKET_IN, OFPR_INVALID_TTL (controller_id=0)
-    ovs-ofctl -O OpenFlow12 packet-out br0 none dec_ttl '002583dfb4000026b98cb0f908004500003eb7e200000011339bac11370dac100002d7730035002b8f6d86fb0100000100000000000006626c702d7873066e696369726103636f6d00000f00'
-    if test X"$1" = X"OFPR_INVALID_TTL"; then shift;
-        echo >>expout "OFPT_PACKET_IN (OF1.2): total_len=76 in_port=ANY (via invalid_ttl) data_len=76 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=00:26:b9:8c:b0:f9,dl_dst=00:25:83:df:b4:00,nw_src=172.17.55.13,nw_dst=172.16.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=55155,tp_dst=53 udp_csum:8f6d"
-    fi
-
-    # OFPT_PORT_STATUS, OFPPR_ADD
-    ovs-vsctl add-port br0 test -- set Interface test type=dummy
-    if test X"$1" = X"OFPPR_ADD"; then shift;
-        echo >>expout "OFPT_PORT_STATUS (OF1.2): ADD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      0
-     speed: 0 Mbps now, 0 Mbps max
-OFPT_PORT_STATUS (OF1.2): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      LIVE
-     speed: 0 Mbps now, 0 Mbps max"
-    fi
-
-    # OFPT_PORT_STATUS, OFPPR_DELETE
-    ovs-vsctl del-port br0 test
-    if test X"$1" = X"OFPPR_DELETE"; then shift;
-        echo >>expout "OFPT_PORT_STATUS (OF1.2): DEL: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      LIVE
-     speed: 0 Mbps now, 0 Mbps max"
-    fi
-
-    # OFPT_FLOW_REMOVED, OFPRR_DELETE
-    ovs-ofctl -O OpenFlow12 add-flow br0 send_flow_rem,actions=drop
-    ovs-ofctl -O OpenFlow12 --strict del-flows br0 ''
-    if test X"$1" = X"OFPRR_DELETE"; then shift;
-        echo >>expout "OFPT_FLOW_REMOVED (OF1.2):  reason=delete table_id=0"
-    fi
-    AT_FAIL_IF([test X"$1" != X])
-
-    OVS_WAIT_UNTIL([test `wc -l < "monitor.log"` -ge `wc -l < "expout"`])
-
-    AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/ *duration.*//
-s/00:0.$/00:0x/' < monitor.log]],
-      [0], [expout])
-}
-
-# It's a service connection so initially there should be no async messages.
-check_async 1
-
-# Set miss_send_len to 128, turning on packet-ins for our service connection.
-ovs-appctl -t ovs-ofctl ofctl/send 0309000c0123456700000080
-check_async 2 OFPR_ACTION OFPPR_ADD OFPPR_DELETE OFPRR_DELETE
-
-# Set miss_send_len to 128 and enable invalid_ttl.
-ovs-appctl -t ovs-ofctl ofctl/send 0309000c0123456700040080
-check_async 3 OFPR_ACTION OFPR_INVALID_TTL OFPPR_ADD OFPPR_DELETE OFPRR_DELETE
-
-# Become slave (OF 1.2), which should disable everything except port status.
-ovs-appctl -t ovs-ofctl ofctl/send 031800180000000200000003000000000000000000000001
-check_async 4 OFPPR_ADD OFPPR_DELETE
-
-# Use NXT_SET_ASYNC_CONFIG to enable a patchwork of asynchronous messages.
-ovs-appctl -t ovs-ofctl ofctl/send 03040028000000020000232000000013000000020000000500000005000000020000000200000005
-check_async 5 OFPR_INVALID_TTL OFPPR_DELETE OFPRR_DELETE
-
-# Set controller ID 123.
-ovs-appctl -t ovs-ofctl ofctl/send 03040018000000030000232000000014000000000000007b
-check_async 6 OFPR_NO_MATCH OFPPR_DELETE OFPRR_DELETE
-
-# Restore controller ID 0.
-ovs-appctl -t ovs-ofctl ofctl/send 030400180000000300002320000000140000000000000000
-
-# Become master (OF 1.2).
-ovs-appctl -t ovs-ofctl ofctl/send 031800180000000400000002000000000000000000000002
-check_async 7 OFPR_ACTION OFPPR_ADD
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - asynchronous message control (OpenFlow 1.3)])
-OVS_VSWITCHD_START([dnl
-    add-port br0 p1 -- set Interface p1 type=dummy ofport_request=10
-])
-AT_CHECK([ovs-ofctl -O OpenFlow13 -P standard monitor br0 --detach --no-chdir --pidfile])
-check_async () {
-    printf '\n\n--- check_async %d ---\n\n\n' $1
-    INDEX=$1
-    shift
-
-    ovs-appctl -t ovs-ofctl ofctl/barrier
-    ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-    : > expout
-
-    # OFPT_PACKET_IN, OFPR_ACTION (controller_id=0)
-    # OFPR_ACTION_SET is treated as OFPR_ACTION in OpenFlow 1.3
-    ovs-ofctl -O OpenFlow13 -v packet-out br0 none controller '0001020304050010203040501234'
-    ovs-ofctl -O OpenFlow13 add-flow br0 'in_port=10 actions=write_actions(output(CONTROLLER))'
-    ovs-appctl netdev-dummy/receive p1 'in_port(10),eth(src=00:10:20:30:40:50,dst=00:01:02:03:04:05),eth_type(0x1234)'
-    if test X"$1" = X"OFPR_ACTION"; then shift;
-        echo >>expout "OFPT_PACKET_IN (OF1.3): total_len=14 in_port=ANY (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234"
-        echo >>expout "OFPT_PACKET_IN (OF1.3): cookie=0x0 total_len=14 in_port=10 (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234"
-    fi
-
-    # OFPT_PACKET_IN, OFPR_NO_MATCH (controller_id=123)
-    ovs-ofctl -O OpenFlow13 -v packet-out br0 none 'controller(reason=no_match,id=123)' '0001020304050010203040501234'
-    if test X"$1" = X"OFPR_NO_MATCH"; then shift;
-        echo >>expout "OFPT_PACKET_IN (OF1.3): total_len=14 in_port=ANY (via no_match) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234"
-    fi
-
-    # OFPT_PACKET_IN, OFPR_INVALID_TTL (controller_id=0)
-    ovs-ofctl -O OpenFlow13 packet-out br0 none dec_ttl '002583dfb4000026b98cb0f908004500003eb7e200000011339bac11370dac100002d7730035002b8f6d86fb0100000100000000000006626c702d7873066e696369726103636f6d00000f00'
-    if test X"$1" = X"OFPR_INVALID_TTL"; then shift;
-        echo >>expout "OFPT_PACKET_IN (OF1.3): total_len=76 in_port=ANY (via invalid_ttl) data_len=76 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=00:26:b9:8c:b0:f9,dl_dst=00:25:83:df:b4:00,nw_src=172.17.55.13,nw_dst=172.16.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=55155,tp_dst=53 udp_csum:8f6d"
-    fi
-
-    # OFPT_PORT_STATUS, OFPPR_ADD
-    ovs-vsctl add-port br0 test -- set Interface test type=dummy
-    if test X"$1" = X"OFPPR_ADD"; then shift;
-        echo >>expout "OFPT_PORT_STATUS (OF1.3): ADD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      0
-     speed: 0 Mbps now, 0 Mbps max
-OFPT_PORT_STATUS (OF1.3): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      LIVE
-     speed: 0 Mbps now, 0 Mbps max"
-    fi
-
-    # OFPT_PORT_STATUS, OFPPR_DELETE
-    ovs-vsctl del-port br0 test
-    if test X"$1" = X"OFPPR_DELETE"; then shift;
-        echo >>expout "OFPT_PORT_STATUS (OF1.3): DEL: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      LIVE
-     speed: 0 Mbps now, 0 Mbps max"
-    fi
-
-    # OFPT_FLOW_REMOVED, OFPRR_DELETE
-    ovs-ofctl -O OpenFlow13 add-flow br0 send_flow_rem,actions=drop
-    ovs-ofctl -O OpenFlow13 --strict del-flows br0 ''
-    if test X"$1" = X"OFPRR_DELETE"; then shift;
-        echo >>expout "OFPT_FLOW_REMOVED (OF1.3):  reason=delete table_id=0"
-    fi
-
-    # OFPT_FLOW_REMOVED, OFPRR_GROUP_DELETE
-    ovs-ofctl -O OpenFlow13 add-group br0 group_id=1234,type=all,bucket=output:10
-    ovs-ofctl -O OpenFlow13 add-flow br0 send_flow_rem,actions=group:1234
-    ovs-ofctl -O OpenFlow13 --strict del-groups br0 group_id=1234
-    if test X"$1" = X"OFPRR_GROUP_DELETE"; then shift;
-        echo >>expout "OFPT_FLOW_REMOVED (OF1.3):  reason=group_delete table_id=0"
-    fi
-
-    AT_FAIL_IF([test X"$1" != X])
-
-    OVS_WAIT_UNTIL([test `wc -l < "monitor.log"` -ge `wc -l < "expout"`])
-
-    AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/ *duration.*//
-s/00:0.$/00:0x/' < monitor.log]],
-      [0], [expout])
-}
-
-# It's a service connection so initially there should be no async messages.
-check_async 1
-
-# Set miss_send_len to 128, turning on packet-ins for our service connection.
-ovs-appctl -t ovs-ofctl ofctl/send 0409000c0123456700000080
-check_async 2 OFPR_ACTION OFPPR_ADD OFPPR_DELETE OFPRR_DELETE OFPRR_GROUP_DELETE
-
-# Become slave (OF 1.3), which should disable everything except port status.
-ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001
-check_async 3 OFPPR_ADD OFPPR_DELETE
-
-# Use OF 1.3 OFPT_SET_ASYNC to enable a patchwork of asynchronous messages.
-ovs-appctl -t ovs-ofctl ofctl/send 041c00200000000200000002000000050000000500000002000000020000000d
-check_async 4 OFPR_INVALID_TTL OFPPR_DELETE OFPRR_DELETE OFPRR_GROUP_DELETE
-
-# Set controller ID 123.
-ovs-appctl -t ovs-ofctl ofctl/send 04040018000000030000232000000014000000000000007b
-check_async 5 OFPR_NO_MATCH OFPPR_DELETE OFPRR_DELETE OFPRR_GROUP_DELETE
-
-# Restore controller ID 0.
-ovs-appctl -t ovs-ofctl ofctl/send 040400180000000300002320000000140000000000000000
-
-# Become master (OF 1.3).
-ovs-appctl -t ovs-ofctl ofctl/send 041800180000000400000002000000000000000000000002
-check_async 6 OFPR_ACTION OFPPR_ADD
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - asynchronous message control (OpenFlow 1.4)])
-OVS_VSWITCHD_START([dnl
-    add-port br0 p1 -- set Interface p1 type=dummy ofport_request=10
-])
-AT_CHECK([ovs-ofctl -O OpenFlow14 -P standard monitor br0 --detach --no-chdir --pidfile])
-check_async () {
-    printf '\n\n--- check_async %d ---\n\n\n' $1
-    INDEX=$1
-    shift
-
-    ovs-appctl -t ovs-ofctl ofctl/barrier
-    ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-    : > expout
-
-    # OFPT_PACKET_IN, OFPR_PACKET_OUT (controller_id=0)
-    ovs-ofctl -O OpenFlow14 -v packet-out br0 none controller '0001020304050010203040501234'
-    if test X"$1" = X"OFPR_PACKET_OUT"; then shift;
-        echo >>expout "OFPT_PACKET_IN (OF1.4): total_len=14 in_port=ANY (via packet_out) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234"
-    fi
-
-    # OFPT_PACKET_IN, OFPR_ACTION_SET (controller_id=0)
-    ovs-ofctl -O OpenFlow14 add-flow br0 'in_port=10 actions=write_actions(output(CONTROLLER))'
-    ovs-appctl netdev-dummy/receive p1 'in_port(10),eth(src=00:10:20:30:40:50,dst=00:01:02:03:04:05),eth_type(0x1234)'
-    if test X"$1" = X"OFPR_ACTION_SET"; then shift;
-        echo >>expout "OFPT_PACKET_IN (OF1.4): cookie=0x0 total_len=14 in_port=10 (via action_set) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234"
-    fi
-
-    # OFPT_PACKET_IN, OFPR_NO_MATCH (controller_id=123)
-    ovs-ofctl -O OpenFlow14 -v packet-out br0 none 'controller(reason=no_match,id=123)' '0001020304050010203040501234'
-    if test X"$1" = X"OFPR_NO_MATCH"; then shift;
-        echo >>expout "OFPT_PACKET_IN (OF1.4): total_len=14 in_port=ANY (via no_match) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234"
-    fi
-
-    # OFPT_PACKET_IN, OFPR_INVALID_TTL (controller_id=0)
-    ovs-ofctl -O OpenFlow14 packet-out br0 none dec_ttl '002583dfb4000026b98cb0f908004500003eb7e200000011339bac11370dac100002d7730035002b8f6d86fb0100000100000000000006626c702d7873066e696369726103636f6d00000f00'
-    if test X"$1" = X"OFPR_INVALID_TTL"; then shift;
-        echo >>expout "OFPT_PACKET_IN (OF1.4): total_len=76 in_port=ANY (via invalid_ttl) data_len=76 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=00:26:b9:8c:b0:f9,dl_dst=00:25:83:df:b4:00,nw_src=172.17.55.13,nw_dst=172.16.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=55155,tp_dst=53 udp_csum:8f6d"
-    fi
-
-# OFPT_PORT_STATUS, OFPPR_ADD
-    ovs-vsctl add-port br0 test -- set Interface test type=dummy
-    if test X"$1" = X"OFPPR_ADD"; then shift;
-        echo >>expout "OFPT_PORT_STATUS (OF1.4): ADD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      0
-     speed: 0 Mbps now, 0 Mbps max
-OFPT_PORT_STATUS (OF1.4): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      LIVE
-     speed: 0 Mbps now, 0 Mbps max"
-    fi
-
-    # OFPT_PORT_STATUS, OFPPR_MODIFY
-    ovs-ofctl -O OpenFlow14 -vwarn mod-port br0 test down
-    if test X"$1" = X"OFPPR_MODIFY"; then shift;
-        echo >>expout "OFPT_PORT_STATUS (OF1.4): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     PORT_DOWN
-     state:      0
-     speed: 0 Mbps now, 0 Mbps max
-OFPT_PORT_STATUS (OF1.4): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     PORT_DOWN
-     state:      LINK_DOWN
-     speed: 0 Mbps now, 0 Mbps max"
-    fi
-
-    # OFPT_PORT_STATUS, OFPPR_DELETE
-    ovs-vsctl del-port br0 test
-    if test X"$1" = X"OFPPR_DELETE"; then shift;
-        echo >>expout "OFPT_PORT_STATUS (OF1.4): DEL: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     PORT_DOWN
-     state:      LINK_DOWN
-     speed: 0 Mbps now, 0 Mbps max"
-    fi
-
-    # OFPT_FLOW_REMOVED, OFPRR_DELETE
-    ovs-ofctl -O OpenFlow14 add-flow br0 send_flow_rem,actions=drop
-    ovs-ofctl -O OpenFlow14 --strict del-flows br0 ''
-    if test X"$1" = X"OFPRR_DELETE"; then shift;
-        echo >>expout "OFPT_FLOW_REMOVED (OF1.4):  reason=delete table_id=0"
-    fi
-
-    # OFPT_FLOW_REMOVED, OFPRR_GROUP_DELETE
-    ovs-ofctl -O OpenFlow14 add-group br0 group_id=1234,type=all,bucket=output:10
-    ovs-ofctl -O OpenFlow14 add-flow br0 send_flow_rem,actions=group:1234
-    ovs-ofctl -O OpenFlow14 --strict del-groups br0 group_id=1234
-    if test X"$1" = X"OFPRR_GROUP_DELETE"; then shift;
-        echo >>expout "OFPT_FLOW_REMOVED (OF1.4):  reason=group_delete table_id=0"
-    fi
-
-    # OFPT_TABLE_STATUS, OFPTR_VACANCY_UP
-    if test X"$1" = X"OFPTR_VACANCY_UP"; then shift;
-        ovs-vsctl -- --id=@t1 create Flow_Table flow-limit=10 -- set bridge br0 flow_tables:1=@t1
-
-        # Turn on vacancy events, then add flows until we're full.
-        # With initial vacancy of 100% and vacancy_up of 80%, so that
-        # vacancy >= vacancy_up, this enables VACANY_DOWN events, so
-        # we get a single such message when vacancy dips below 20%.
-        ovs-ofctl -O OpenFlow14 mod-table br0 1 vacancy:20,80
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=1,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=2,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=3,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=4,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=5,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=6,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=7,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=8,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=9,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=10,actions=2
-        echo >>expout "OFPT_TABLE_STATUS (OF1.4): reason=VACANCY_DOWN
-table_desc:-
-  table 1:
-   eviction=off eviction_flags=OTHER|IMPORTANCE|LIFETIME
-   vacancy=on vacancy_down=20% vacancy_up=80% vacancy=10%"
-        # Then delete flows until we're empty.  Sending the
-        # VACANCY_DOWN message enabled VACANCY_UP events, so we get a
-        # single such message when vacancy rises above 80%.
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=1
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=2
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=3
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=4
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=5
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=6
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=7
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=8
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=9
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=10
-        echo >>expout "OFPT_TABLE_STATUS (OF1.4): reason=VACANCY_UP
-table_desc:-
-  table 1:
-   eviction=off eviction_flags=OTHER|IMPORTANCE|LIFETIME
-   vacancy=on vacancy_down=20% vacancy_up=80% vacancy=90%"
-
-        # Now approach vacancy from the other direction.  First
-        # disable vacancy events.  With initial vacancy of 70%, so
-        # that vacancy < vacancy_up, this enables VACANCY_UP events.
-        # That means that filling up the table generates no message,
-        # but deleting all the flows generates VACANCY_UP at the point
-        # vacancy rises above 80%.
-        ovs-ofctl -O OpenFlow14 mod-table br0 1 novacancy
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=1,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=2,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=3,actions=2
-        ovs-ofctl -O OpenFlow14 mod-table br0 1 vacancy:20,80
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=4,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=5,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=6,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=7,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=8,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=9,actions=2
-        ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=10,actions=2
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=1
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=2
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=3
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=4
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=5
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=6
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=7
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=8
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=9
-        ovs-ofctl -O OpenFlow14 del-flows br0 table=1,in_port=10
-        echo >>expout "OFPT_TABLE_STATUS (OF1.4): reason=VACANCY_UP
-table_desc:-
-  table 1:
-   eviction=off eviction_flags=OTHER|IMPORTANCE|LIFETIME
-   vacancy=on vacancy_down=20% vacancy_up=80% vacancy=90%"
-    fi
-
-    AT_FAIL_IF([test X"$1" != X])
-
-    OVS_WAIT_UNTIL([test `wc -l < "monitor.log"` -ge `wc -l < "expout"`])
-
-    AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/ *duration.*//
-s/00:0.$/00:0x/' < monitor.log]],
-      [0], [expout])
-}
-
-# It's a service connection so initially there should be no async messages.
-check_async 1
-
-# Set miss_send_len to 128, turning on packet-ins for our service connection.
-ovs-appctl -t ovs-ofctl ofctl/send 0509000c0123456700000080
-check_async 2 OFPR_PACKET_OUT OFPR_ACTION_SET OFPPR_ADD OFPPR_MODIFY OFPPR_DELETE OFPRR_DELETE OFPRR_GROUP_DELETE
-
-# Become slave (OF 1.4), which should disable everything except port status.
-ovs-appctl -t ovs-ofctl ofctl/send 051800180000000200000003000000000000000000000001
-check_async 3 OFPPR_ADD OFPPR_MODIFY OFPPR_DELETE
-
-# Use OF 1.4 OFPT_SET_ASYNC to enable a patchwork of asynchronous messages.
-ovs-appctl -t ovs-ofctl ofctl/send 051c0040000000020000000800000005000100080000002000020008000000020003000800000005000400080000001c00050008000000050008000800000018
-check_async 4 OFPR_INVALID_TTL OFPPR_DELETE OFPRR_DELETE OFPRR_GROUP_DELETE OFPTR_VACANCY_UP
-
-# Set controller ID 123.
-ovs-appctl -t ovs-ofctl ofctl/send 05040018000000030000232000000014000000000000007b
-check_async 5 OFPR_NO_MATCH OFPPR_DELETE OFPRR_DELETE OFPRR_GROUP_DELETE
-
-# Restore controller ID 0.
-ovs-appctl -t ovs-ofctl ofctl/send 050400180000000300002320000000140000000000000000
-
-# Become master (OF 1.4).
-ovs-appctl -t ovs-ofctl ofctl/send 051800180000000400000002000000000000000000000002
-check_async 6 OFPR_PACKET_OUT OFPPR_ADD OFPPR_MODIFY OFPRR_DELETE
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - asynchronous message control (OpenFlow 1.5)])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -O OpenFlow15 -P standard monitor br0 --detach --no-chdir --pidfile])
-check_async () {
-    printf '\n\n--- check_async %d ---\n\n\n' $1
-    INDEX=$1
-    shift
-
-    ovs-appctl -t ovs-ofctl ofctl/barrier
-    ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-    : > expout
-
-    # Other tests are not working with OF 1.5, and message
-    # format may change, so leave them out.
-
-    # OFPT_PORT_STATUS, OFPPR_ADD
-    ovs-vsctl add-port br0 test -- set Interface test type=dummy
-    if test X"$1" = X"OFPPR_ADD"; then shift;
-        echo >>expout "OFPT_PORT_STATUS (OF1.5): ADD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      0
-     speed: 0 Mbps now, 0 Mbps max
-OFPT_PORT_STATUS (OF1.5): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     0
-     state:      LIVE
-     speed: 0 Mbps now, 0 Mbps max"
-    fi
-
-    # OFPT_PORT_STATUS, OFPPR_MODIFY
-    ovs-ofctl -O OpenFlow15 -vwarn mod-port br0 test down
-    if test X"$1" = X"OFPPR_MODIFY"; then shift;
-        echo >>expout "OFPT_PORT_STATUS (OF1.5): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     PORT_DOWN
-     state:      0
-     speed: 0 Mbps now, 0 Mbps max
-OFPT_PORT_STATUS (OF1.5): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     PORT_DOWN
-     state:      LINK_DOWN
-     speed: 0 Mbps now, 0 Mbps max"
-    fi
-
-    # OFPT_PORT_STATUS, OFPPR_DELETE
-    ovs-vsctl del-port br0 test
-    if test X"$1" = X"OFPPR_DELETE"; then shift;
-        echo >>expout "OFPT_PORT_STATUS (OF1.5): DEL: ${INDEX}(test): addr:aa:55:aa:55:00:0x
-     config:     PORT_DOWN
-     state:      LINK_DOWN
-     speed: 0 Mbps now, 0 Mbps max"
-    fi
-
-    AT_FAIL_IF([test X"$1" != X])
-
-    OVS_WAIT_UNTIL([test `wc -l < "monitor.log"` -ge `wc -l < "expout"`])
-
-    AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//
-s/ *duration.*//
-s/00:0.$/00:0x/' < monitor.log]],
-      [0], [expout])
-}
-
-# It's a service connection so initially there should be no async messages.
-check_async 1
-
-# If we don't set this, async messages are not received.
-# Set miss_send_len to 128, turning on packet-ins for our service connection.
-ovs-appctl -t ovs-ofctl ofctl/send 0609000c0123456700000080
-check_async 2 OFPPR_ADD OFPPR_MODIFY OFPPR_DELETE
-
-# Set-async has changed in OF 1.4 and is not yet implemented.
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks that the role request/response messaging works
-dnl and that generation_id is handled properly.
-AT_SETUP([ofproto - controller role (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-on_exit 'kill `cat c1.pid c2.pid`'
-
-# Start two ovs-ofctl controller processes.
-AT_CAPTURE_FILE([monitor1.log])
-AT_CAPTURE_FILE([expout1])
-AT_CAPTURE_FILE([experr1])
-AT_CAPTURE_FILE([monitor2.log])
-AT_CAPTURE_FILE([expout2])
-AT_CAPTURE_FILE([experr2])
-for i in 1 2; do
-     AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 --detach --no-chdir --pidfile=c$i.pid --unixctl=c$i])
-    ovs-appctl -t `pwd`/c$i ofctl/barrier
-    ovs-appctl -t `pwd`/c$i ofctl/set-output-file monitor$i.log
-    : > expout$i
-    : > experr$i
-
-    # find out current role
-    ovs-appctl -t `pwd`/c$i ofctl/send 031800180000000200000000000000000000000000000000
-    echo >>experr$i "send: OFPT_ROLE_REQUEST (OF1.2): role=nochange"
-    echo >>expout$i "OFPT_ROLE_REPLY (OF1.2): role=equal"
-done
-
-# controller 1: Become slave (generation_id is initially undefined, so
-# 2^63+2 should not be stale)
-ovs-appctl -t `pwd`/c1 ofctl/send 031800180000000300000003000000008000000000000002
-echo >>experr1 "send: OFPT_ROLE_REQUEST (OF1.2): role=slave generation_id=9223372036854775810"
-echo >>expout1 "OFPT_ROLE_REPLY (OF1.2): role=slave generation_id=9223372036854775810"
-
-# controller 2: Become master.
-ovs-appctl -t `pwd`/c2 ofctl/send 031800180000000300000002000000008000000000000003
-echo >>experr2 "send: OFPT_ROLE_REQUEST (OF1.2): role=master generation_id=9223372036854775811"
-echo >>expout2 "OFPT_ROLE_REPLY (OF1.2): role=master generation_id=9223372036854775811"
-
-# controller 1: Try to become the master using a stale generation ID
-ovs-appctl -t `pwd`/c1 ofctl/send 031800180000000400000002000000000000000000000003
-echo >>experr1 "send: OFPT_ROLE_REQUEST (OF1.2): role=master generation_id=3"
-echo >>expout1 "OFPT_ERROR (OF1.2): OFPRRFC_STALE"
-echo >>expout1 "OFPT_ROLE_REQUEST (OF1.2): role=master generation_id=3"
-
-# controller 1: Become master using a valid generation ID
-ovs-appctl -t `pwd`/c1 ofctl/send 031800180000000500000002000000000000000000000001
-echo >>experr1 "send: OFPT_ROLE_REQUEST (OF1.2): role=master generation_id=1"
-echo >>expout1 "OFPT_ROLE_REPLY (OF1.2): role=master generation_id=1"
-
-for i in 1 2; do
-    ovs-appctl -t `pwd`/c$i ofctl/barrier
-    echo >>expout$i "OFPT_BARRIER_REPLY (OF1.2):"
-done
-
-# Check output.
-for i in 1 2; do
-    cp expout$i expout
-    AT_CHECK([grep -v '^send:' monitor$i.log | strip_xids], [0], [expout])
-    cp experr$i expout
-    AT_CHECK([grep '^send:' monitor$i.log | strip_xids], [0], [expout])
-done
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks that the role request/response messaging works,
-dnl that generation_id is handled properly, and that role status update
-dnl messages are sent when a controller's role gets changed from master
-dnl to slave.
-AT_SETUP([ofproto - controller role (OpenFlow 1.4)])
-OVS_VSWITCHD_START
-on_exit 'kill `cat c1.pid c2.pid`'
-
-# Start two ovs-ofctl controller processes.
-AT_CAPTURE_FILE([monitor1.log])
-AT_CAPTURE_FILE([expout1])
-AT_CAPTURE_FILE([experr1])
-AT_CAPTURE_FILE([monitor2.log])
-AT_CAPTURE_FILE([expout2])
-AT_CAPTURE_FILE([experr2])
-for i in 1 2; do
-     AT_CHECK([ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile=c$i.pid --unixctl=c$i])
-    ovs-appctl -t `pwd`/c$i ofctl/barrier
-    ovs-appctl -t `pwd`/c$i ofctl/set-output-file monitor$i.log
-    : > expout$i
-    : > experr$i
-
-    # find out current role
-    ovs-appctl -t `pwd`/c$i ofctl/send 051800180000000200000000000000000000000000000000
-    echo >>experr$i "send: OFPT_ROLE_REQUEST (OF1.4): role=nochange"
-    echo >>expout$i "OFPT_ROLE_REPLY (OF1.4): role=equal"
-done
-
-# controller 1: Become slave (generation_id is initially undefined, so
-# 2^63+2 should not be stale)
-ovs-appctl -t `pwd`/c1 ofctl/send 051800180000000300000003000000008000000000000002
-echo >>experr1 "send: OFPT_ROLE_REQUEST (OF1.4): role=slave generation_id=9223372036854775810"
-echo >>expout1 "OFPT_ROLE_REPLY (OF1.4): role=slave generation_id=9223372036854775810"
-
-# controller 2: Become master.
-ovs-appctl -t `pwd`/c2 ofctl/send 051800180000000300000002000000008000000000000003
-echo >>experr2 "send: OFPT_ROLE_REQUEST (OF1.4): role=master generation_id=9223372036854775811"
-echo >>expout2 "OFPT_ROLE_REPLY (OF1.4): role=master generation_id=9223372036854775811"
-
-# controller 1: Try to become the master using a stale generation ID
-ovs-appctl -t `pwd`/c1 ofctl/send 051800180000000400000002000000000000000000000003
-echo >>experr1 "send: OFPT_ROLE_REQUEST (OF1.4): role=master generation_id=3"
-echo >>expout1 "OFPT_ERROR (OF1.4): OFPRRFC_STALE"
-echo >>expout1 "OFPT_ROLE_REQUEST (OF1.4): role=master generation_id=3"
-
-# controller 1: Become master using a valid generation ID
-ovs-appctl -t `pwd`/c1 ofctl/send 051800180000000500000002000000000000000000000001
-echo >>experr1 "send: OFPT_ROLE_REQUEST (OF1.4): role=master generation_id=1"
-echo >>expout1 "OFPT_ROLE_REPLY (OF1.4): role=master generation_id=1"
-echo >>expout2 "OFPT_ROLE_STATUS (OF1.4): role=slave generation_id=1 reason=master_request"
-
-for i in 1 2; do
-    ovs-appctl -t `pwd`/c$i ofctl/barrier
-    echo >>expout$i "OFPT_BARRIER_REPLY (OF1.4):"
-done
-
-# Check output.
-for i in 1 2; do
-    cp expout$i expout
-    AT_CHECK([grep -v '^send:' monitor$i.log | strip_xids], [0], [expout])
-    cp experr$i expout
-    AT_CHECK([grep '^send:' monitor$i.log | strip_xids], [0], [expout])
-done
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks that the role request/response messaging works,
-dnl that generation_id is handled properly, and that role status update
-dnl messages are sent when a controller's role gets changed from master
-dnl to slave.
-AT_SETUP([ofproto - controller role (OpenFlow 1.3)])
-OVS_VSWITCHD_START
-on_exit 'kill `cat c1.pid c2.pid`'
-
-# Start two ovs-ofctl controller processes.
-AT_CAPTURE_FILE([monitor1.log])
-AT_CAPTURE_FILE([expout1])
-AT_CAPTURE_FILE([experr1])
-AT_CAPTURE_FILE([monitor2.log])
-AT_CAPTURE_FILE([expout2])
-AT_CAPTURE_FILE([experr2])
-for i in 1 2; do
-     AT_CHECK([ovs-ofctl -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile=c$i.pid --unixctl=c$i])
-    ovs-appctl -t `pwd`/c$i ofctl/barrier
-    ovs-appctl -t `pwd`/c$i ofctl/set-output-file monitor$i.log
-    : > expout$i
-    : > experr$i
-
-    # find out current role
-    ovs-appctl -t `pwd`/c$i ofctl/send 041800180000000200000000000000000000000000000000
-    echo >>experr$i "send: OFPT_ROLE_REQUEST (OF1.3): role=nochange"
-    echo >>expout$i "OFPT_ROLE_REPLY (OF1.3): role=equal"
-done
-
-# controller 1: Become slave (generation_id is initially undefined, so
-# 2^63+2 should not be stale)
-ovs-appctl -t `pwd`/c1 ofctl/send 041800180000000300000003000000008000000000000002
-echo >>experr1 "send: OFPT_ROLE_REQUEST (OF1.3): role=slave generation_id=9223372036854775810"
-echo >>expout1 "OFPT_ROLE_REPLY (OF1.3): role=slave generation_id=9223372036854775810"
-
-# controller 2: Become master.
-ovs-appctl -t `pwd`/c2 ofctl/send 041800180000000300000002000000008000000000000003
-echo >>experr2 "send: OFPT_ROLE_REQUEST (OF1.3): role=master generation_id=9223372036854775811"
-echo >>expout2 "OFPT_ROLE_REPLY (OF1.3): role=master generation_id=9223372036854775811"
-
-# controller 1: Try to become the master using a stale generation ID
-ovs-appctl -t `pwd`/c1 ofctl/send 041800180000000400000002000000000000000000000003
-echo >>experr1 "send: OFPT_ROLE_REQUEST (OF1.3): role=master generation_id=3"
-echo >>expout1 "OFPT_ERROR (OF1.3): OFPRRFC_STALE"
-echo >>expout1 "OFPT_ROLE_REQUEST (OF1.3): role=master generation_id=3"
-
-# controller 1: Become master using a valid generation ID
-ovs-appctl -t `pwd`/c1 ofctl/send 041800180000000500000002000000000000000000000001
-echo >>experr1 "send: OFPT_ROLE_REQUEST (OF1.3): role=master generation_id=1"
-echo >>expout1 "OFPT_ROLE_REPLY (OF1.3): role=master generation_id=1"
-echo >>expout2 "ONFT_ROLE_STATUS (OF1.3): role=slave generation_id=1 reason=master_request"
-
-for i in 1 2; do
-    ovs-appctl -t `pwd`/c$i ofctl/barrier
-    echo >>expout$i "OFPT_BARRIER_REPLY (OF1.3):"
-done
-
-# Check output.
-for i in 1 2; do
-    cp expout$i expout
-    AT_CHECK([grep -v '^send:' monitor$i.log | strip_xids], [0], [expout])
-    cp experr$i expout
-    AT_CHECK([grep '^send:' monitor$i.log | strip_xids], [0], [expout])
-done
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks the Group and meter notifications when a group mod
-dnl command is sent from one controller and the reply is received by
-dnl other controllers.
-AT_SETUP([ofproto - requestforward (OpenFlow 1.4)])
-OVS_VSWITCHD_START
-on_exit 'kill `cat c1.pid c2.pid c3.pid`'
-
-# Start two ovs-ofctl controller processes.
-AT_CAPTURE_FILE([monitor1.log])
-AT_CAPTURE_FILE([expout1])
-AT_CAPTURE_FILE([monitor2.log])
-AT_CAPTURE_FILE([expout2])
-AT_CAPTURE_FILE([monitor3.log])
-AT_CAPTURE_FILE([expout3])
-
-ovs-ofctl -O OpenFlow15 monitor br0 --detach --no-chdir --pidfile=c1.pid --unixctl=c1
-ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile=c2.pid --unixctl=c2
-ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile=c3.pid --unixctl=c3
-
-check_async () {
-    for i in 1 3; do
-        ovs-appctl -t `pwd`/c$i ofctl/barrier
-        ovs-appctl -t `pwd`/c$i ofctl/set-output-file monitor$i.log
-        : > expout$i
-    done
-
-    printf '\n\n--- check_async %d ---\n\n\n' $1
-    INDEX=$1
-    shift
-
-    # OFPGC_ADD
-    ovs-appctl -t `pwd`/c2 ofctl/send "050f0020000000020000000000000001 00100000 ffffffffffffffff 00000000"
-    if test X"$1" = X"OFPGC_ADD"; then shift;
-        echo >>expout2 "send: OFPT_GROUP_MOD (OF1.4):
- ADD group_id=1,type=all,bucket=actions=drop"
-        echo >>expout1 "OFPT_REQUESTFORWARD (OF1.5): reason=group_mod
- ADD group_id=1,type=all,bucket=bucket_id:0,actions=drop"
-        echo >>expout3 "OFPT_REQUESTFORWARD (OF1.4): reason=group_mod
- ADD group_id=1,type=all,bucket=actions=drop"
-    fi
-
-    # OFPGC_MODIFY
-    ovs-appctl -t `pwd`/c2 ofctl/send "050f0020000000020001010000000001 00100000 ffffffffffffffff 00000000"
-    if test X"$1" = X"OFPGC_MODIFY"; then shift;
-        echo >>expout2 "send: OFPT_GROUP_MOD (OF1.4):
- MOD group_id=1,type=select,bucket=weight:0,actions=drop"
-        echo >>expout1 "OFPT_REQUESTFORWARD (OF1.5): reason=group_mod
- MOD group_id=1,type=select,bucket=bucket_id:0,weight:0,actions=drop"
-        echo >>expout3 "OFPT_REQUESTFORWARD (OF1.4): reason=group_mod
- MOD group_id=1,type=select,bucket=weight:0,actions=drop"
-    fi
-
-    ovs-appctl -t `pwd`/c1 ofctl/barrier
-    echo >>expout1 "OFPT_BARRIER_REPLY (OF1.5):"
-    ovs-appctl -t `pwd`/c2 ofctl/barrier
-    echo >>expout2 "OFPT_BARRIER_REPLY (OF1.4):"
-    ovs-appctl -t `pwd`/c3 ofctl/barrier
-    echo >>expout3 "OFPT_BARRIER_REPLY (OF1.4):"
-
-    # Check output.
-    for i in 1 3; do
-        cp expout$i expout
-        AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//'< monitor$i.log]],
-      [0], [expout])
-    done
-}
-
-# controller 1: Become slave
-ovs-appctl -t `pwd`/c1 ofctl/send 061800180000000300000003000000008000000000000002
-
-# controller 2: Become master
-ovs-appctl -t `pwd`/c2 ofctl/send 051800180000000300000002000000008000000000000003
-
-# controller 1: Become slave
-ovs-appctl -t `pwd`/c3 ofctl/send 051800180000000300000003000000008000000000000004
-
-# controller 1: Enabled requestforward using set Asynchronous message
-ovs-appctl -t `pwd`/c1 ofctl/send 061c00280000000200000008000000050002000800000002000400080000001a000a000800000003
-
-# controller 2: Enabled requestforward using set Asynchronous message
-ovs-appctl -t `pwd`/c2 ofctl/send 051c002800000002000100080000000200030008000000050005000800000005000b000800000003
-
-# controller 1: Enabled requestforward using set Asynchronous message
-ovs-appctl -t `pwd`/c3 ofctl/send 051c00280000000200000008000000050002000800000002000400080000001a000a000800000003
-check_async 1 OFPGC_ADD OFPGC_MODIFY
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks the backwards compatibility of the NXT_REQUESTFORWARD
-dnl message type to OpenFlow 1.0, also relying on the Nicira Extensions:
-dnl NXT_GROUP_MOD, NXT_ROLE_REQUEST, and OFPRAW_NXT_SET_ASYNC_CONFIG2,
-dnl while also testing the functionality of the previous test.
-AT_SETUP([ofproto - NXT requestforward (OpenFlow 1.0)])
-OVS_VSWITCHD_START
-on_exit 'kill `cat c1.pid c2.pid c3.pid`'
-
-# Start two ovs-ofctl controller processes.
-AT_CAPTURE_FILE([monitor1.log])
-AT_CAPTURE_FILE([expout1])
-AT_CAPTURE_FILE([monitor2.log])
-AT_CAPTURE_FILE([expout2])
-AT_CAPTURE_FILE([monitor3.log])
-AT_CAPTURE_FILE([expout3])
-
-ovs-ofctl -O OpenFlow10 monitor br0 --detach --no-chdir --pidfile=c1.pid --unixctl=c1
-ovs-ofctl -O OpenFlow10 monitor br0 --detach --no-chdir --pidfile=c2.pid --unixctl=c2
-ovs-ofctl -O OpenFlow10 monitor br0 --detach --no-chdir --pidfile=c3.pid --unixctl=c3
-
-check_async () {
-    for i in 1 3; do
-        ovs-appctl -t `pwd`/c$i ofctl/barrier
-        ovs-appctl -t `pwd`/c$i ofctl/set-output-file monitor$i.log
-        : > expout$i
-    done
-
-    printf '\n\n--- check_async %d ---\n\n\n' $1
-    INDEX=$1
-    shift
-
-    # OFPGC_ADD
-    # NXT_GROUP_MOD (xid=0x2):
-    # ADD group_id=2271560481,type=select,selection_method=hash,selection_method_param=7,bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3
-    ovs-appctl -t `pwd`/c2 ofctl/send "01 04 00 a8 00 00 00 02 00 00 23 20 00 00 00 1f 00 00 01 00 87 65 43 21 00 60 00 00 ff ff ff ff 00 20 00 08 00 00 00 00 00 00 00 08 00 01 00 00 00 00 00 08 00 64 00 00 00 01 00 08 00 00 00 01 00 20 00 08 00 00 00 01 00 00 00 08 00 02 00 00 00 00 00 08 00 c8 00 00 00 01 00 08 00 00 00 02 00 20 00 08 00 00 00 02 00 00 00 08 00 03 00 00 00 00 00 08 00 c8 00 00 00 01 00 08 00 00 00 03 ff ff 00 28 00 00 15 40 00 00 00 01 00 00 00 00 68 61 73 68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07"
-    if test X"$1" = X"OFPGC_ADD"; then shift;
-        echo >>expout2 "send: NXT_GROUP_MOD:
- ADD group_id=2271560481,type=select,selection_method=hash,selection_method_param=7,bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3"
-        echo >>expout1 "NXT_REQUESTFORWARD: reason=group_mod
- ADD group_id=2271560481,type=select,selection_method=hash,selection_method_param=7,bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3"
-        echo >>expout3 "NXT_REQUESTFORWARD: reason=group_mod
- ADD group_id=2271560481,type=select,selection_method=hash,selection_method_param=7,bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3"
-    fi
-
-    # OFPGC_MODIFY
-    # NXT_GROUP_MOD (xid=0x2):
-    # MOD group_id=2271560481,type=select,selection_method=hash,selection_method_param=7,bucket=bucket_id:0,weight:150,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:150,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:150,watch_port:3,actions=output:3
-    ovs-appctl -t `pwd`/c2 ofctl/send "01 04 00 a8 00 00 00 02 00 00 23 20 00 00 00 1f 00 01 01 00 87 65 43 21 00 60 00 00 ff ff ff ff 00 20 00 08 00 00 00 00 00 00 00 08 00 01 00 00 00 00 00 08 00 96 00 00 00 01 00 08 00 00 00 01 00 20 00 08 00 00 00 01 00 00 00 08 00 02 00 00 00 00 00 08 00 96 00 00 00 01 00 08 00 00 00 02 00 20 00 08 00 00 00 02 00 00 00 08 00 03 00 00 00 00 00 08 00 96 00 00 00 01 00 08 00 00 00 03 ff ff 00 28 00 00 15 40 00 00 00 01 00 00 00 00 68 61 73 68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07"
-    if test X"$1" = X"OFPGC_MODIFY"; then shift;
-        echo >>expout2 "send: NXT_GROUP_MOD:
- MOD group_id=2271560481,type=select,selection_method=hash,selection_method_param=7,bucket=bucket_id:0,weight:150,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:150,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:150,watch_port:3,actions=output:3"
-        echo >>expout1 "NXT_REQUESTFORWARD: reason=group_mod
- MOD group_id=2271560481,type=select,selection_method=hash,selection_method_param=7,bucket=bucket_id:0,weight:150,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:150,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:150,watch_port:3,actions=output:3"
-        echo >>expout3 "NXT_REQUESTFORWARD: reason=group_mod
- MOD group_id=2271560481,type=select,selection_method=hash,selection_method_param=7,bucket=bucket_id:0,weight:150,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:150,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:150,watch_port:3,actions=output:3"
-    fi
-
-    ovs-appctl -t `pwd`/c1 ofctl/barrier
-    echo >>expout1 "OFPT_BARRIER_REPLY:"
-    ovs-appctl -t `pwd`/c2 ofctl/barrier
-    echo >>expout2 "OFPT_BARRIER_REPLY:"
-    ovs-appctl -t `pwd`/c3 ofctl/barrier
-    echo >>expout3 "OFPT_BARRIER_REPLY:"
-
-    # Check output.
-    for i in 1 3; do
-        cp expout$i expout
-        AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//'< monitor$i.log]],
-      [0], [expout])
-    done
-}
-
-# controller 1: Become slave
-# NXT_ROLE_REQUEST (xid=0x3): role=slave
-ovs-appctl -t `pwd`/c1 ofctl/send 0104001400000003000023200000000a00000002
-
-# controller 2: Become master
-# NXT_ROLE_REQUEST (xid=0x3): role=master
-ovs-appctl -t `pwd`/c2 ofctl/send 0104001400000003000023200000000a00000001
-
-# controller 1: Become slave
-# NXT_ROLE_REQUEST (xid=0x3): role=slave
-ovs-appctl -t `pwd`/c3 ofctl/send 0104001400000003000023200000000a00000002
-
-# controller 1: Enabled requestforward using OFPRAW_NXT_SET_ASYNC_CONFIG2
-ovs-appctl -t `pwd`/c1 ofctl/send 0104003000000002000023200000001b00000008000000050002000800000002000400080000001a000a000800000003
-
-# controller 2: Enabled requestforward using OFPRAW_NXT_SET_ASYNC_CONFIG2
-ovs-appctl -t `pwd`/c2 ofctl/send 0104003000000002000023200000001b000100080000000200030008000000050005000800000005000b000800000003
-
-# controller 1: Enabled requestforward using OFPRAW_NXT_SET_ASYNC_CONFIG2
-ovs-appctl -t `pwd`/c3 ofctl/send 0104003000000002000023200000001b00000008000000050002000800000002000400080000001a000a000800000003
-check_async 1 OFPGC_ADD OFPGC_MODIFY
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks the Group and meter notifications when a group mod
-dnl command is sent from one controller and the reply is received by
-dnl other controllers, using the ONF Extension for OF 1.3.
-AT_SETUP([ofproto - ONF requestforward (OpenFlow 1.3)])
-OVS_VSWITCHD_START
-on_exit 'kill `cat c1.pid c2.pid c3.pid`'
-
-# Start two ovs-ofctl controller processes.
-AT_CAPTURE_FILE([monitor1.log])
-AT_CAPTURE_FILE([expout1])
-AT_CAPTURE_FILE([monitor2.log])
-AT_CAPTURE_FILE([expout2])
-AT_CAPTURE_FILE([monitor3.log])
-AT_CAPTURE_FILE([expout3])
-
-ovs-ofctl -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile=c1.pid --unixctl=c1
-ovs-ofctl -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile=c2.pid --unixctl=c2
-ovs-ofctl -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile=c3.pid --unixctl=c3
-
-check_async () {
-    for i in 1 3; do
-        ovs-appctl -t `pwd`/c$i ofctl/barrier
-        ovs-appctl -t `pwd`/c$i ofctl/set-output-file monitor$i.log
-        : > expout$i
-    done
-
-    printf '\n\n--- check_async %d ---\n\n\n' $1
-    INDEX=$1
-    shift
-
-    # OFPGC_ADD
-    # OFPT_GROUP_MOD (OF1.3) (xid=0x2):
-    # ADD group_id=1,type=all,bucket=actions=drop
-    ovs-appctl -t `pwd`/c2 ofctl/send "040f0020000000020000000000000001 00100000 ffffffffffffffff 00000000"
-    if test X"$1" = X"OFPGC_ADD"; then shift;
-        echo >>expout2 "send: OFPT_GROUP_MOD (OF1.3):
- ADD group_id=1,type=all,bucket=actions=drop"
-        echo >>expout1 "ONFT_REQUESTFORWARD (OF1.3): reason=group_mod
- ADD group_id=1,type=all,bucket=actions=drop"
-        echo >>expout3 "ONFT_REQUESTFORWARD (OF1.3): reason=group_mod
- ADD group_id=1,type=all,bucket=actions=drop"
-    fi
-
-    # OFPGC_MODIFY
-    # OFPT_GROUP_MOD (OF1.3) (xid=0x2):
-    # MOD group_id=1,type=select,bucket=weight:0,actions=drop
-    ovs-appctl -t `pwd`/c2 ofctl/send "040f0020000000020001010000000001 00100000 ffffffffffffffff 00000000"
-    if test X"$1" = X"OFPGC_MODIFY"; then shift;
-        echo >>expout2 "send: OFPT_GROUP_MOD (OF1.3):
- MOD group_id=1,type=select,bucket=weight:0,actions=drop"
-        echo >>expout1 "ONFT_REQUESTFORWARD (OF1.3): reason=group_mod
- MOD group_id=1,type=select,bucket=weight:0,actions=drop"
-        echo >>expout3 "ONFT_REQUESTFORWARD (OF1.3): reason=group_mod
- MOD group_id=1,type=select,bucket=weight:0,actions=drop"
-    fi
-
-    ovs-appctl -t `pwd`/c1 ofctl/barrier
-    echo >>expout1 "OFPT_BARRIER_REPLY (OF1.3):"
-    ovs-appctl -t `pwd`/c2 ofctl/barrier
-    echo >>expout2 "OFPT_BARRIER_REPLY (OF1.3):"
-    ovs-appctl -t `pwd`/c3 ofctl/barrier
-    echo >>expout3 "OFPT_BARRIER_REPLY (OF1.3):"
-
-    # Check output.
-    for i in 1 3; do
-        cp expout$i expout
-        AT_CHECK(
-      [[sed '
-s/ (xid=0x[0-9a-fA-F]*)//'< monitor$i.log]],
-      [0], [expout])
-    done
-}
-
-# controller 1: Become slave
-# OFPT_ROLE_REQUEST (OF1.3) (xid=0x3): role=slave
-ovs-appctl -t `pwd`/c1 ofctl/send 041800180000000300000003000000008000000000000002
-
-# controller 2: Become master
-# OFPT_ROLE_REQUEST (OF1.3) (xid=0x3): role=master
-ovs-appctl -t `pwd`/c2 ofctl/send 041800180000000300000002000000008000000000000003
-
-# controller 1: Become slave
-# OFPT_ROLE_REQUEST (OF1.3) (xid=0x3): role=slave
-ovs-appctl -t `pwd`/c3 ofctl/send 041800180000000300000003000000008000000000000004
-
-# controller 1: Enabled requestforward using OFPRAW_NXT_SET_ASYNC_CONFIG2 (necessary for OF1.3)
-ovs-appctl -t `pwd`/c1 ofctl/send 0404003000000002000023200000001b00000008000000050002000800000002000400080000001a000a000800000003
-
-# controller 2: Enabled requestforward using OFPRAW_NXT_SET_ASYNC_CONFIG2 (necessary for OF1.3)
-ovs-appctl -t `pwd`/c2 ofctl/send 0404003000000002000023200000001b000100080000000200030008000000050005000800000005000b000800000003
-
-# controller 1: Enabled requestforward using OFPRAW_NXT_SET_ASYNC_CONFIG2 (necessary for OF1.3)
-ovs-appctl -t `pwd`/c3 ofctl/send 0404003000000002000023200000001b00000008000000050002000800000002000400080000001a000a000800000003
-check_async 1 OFPGC_ADD OFPGC_MODIFY
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-
-dnl This test checks that OFPT_PACKET_OUT accepts both OFPP_NONE (as
-dnl specified by OpenFlow 1.0) and OFPP_CONTROLLER (used by some
-dnl controllers despite the spec) as meaning a packet that was generated
-dnl by the controller.
-AT_SETUP([ofproto - packet-out from controller (OpenFlow 1.0)])
-OVS_VSWITCHD_START
-add_of_ports br0 1
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -P standard monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0109000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# Send some packet-outs with OFPP_NONE and OFPP_CONTROLLER (65533) as in_port.
-AT_CHECK([ovs-ofctl packet-out br0 "in_port=none packet=0001020304050010203040501234 actions=controller,1"])
-AT_CHECK([ovs-ofctl packet-out br0 "in_port=controller packet=0001020304050010203040505678 actions=controller,1"])
-
-# Stop the monitor and check its output.
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-ovs-ofctl dump-ports br0
-
-AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
-OFPT_PACKET_IN: total_len=14 in_port=ANY (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
-OFPT_PACKET_IN: total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x5678
-OFPT_BARRIER_REPLY:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks that OFPT_PACKET_OUT accepts both OFPP_NONE (as
-dnl specified by OpenFlow 1.2) and OFPP_CONTROLLER (used by some
-dnl controllers despite the spec) as meaning a packet that was generated
-dnl by the controller.
-AT_SETUP([ofproto - packet-out from controller (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -O OpenFlow12 -P standard monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0309000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# Send some packet-outs with OFPP_NONE and OFPP_CONTROLLER (65533) as in_port.
-AT_CHECK([ovs-ofctl -O OpenFlow12 packet-out br0 none controller '0001020304050010203040501234'])
-AT_CHECK([ovs-ofctl -O OpenFlow12 packet-out br0 4294967293 controller '0001020304050010203040505678'])
-
-# Stop the monitor and check its output.
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=14 in_port=ANY (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
-OFPT_PACKET_IN (OF1.2): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x5678
-OFPT_BARRIER_REPLY (OF1.2):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks that OFPT_PACKET_OUT accepts both OFPP_NONE (as
-dnl specified by OpenFlow 1.1) and OFPP_CONTROLLER (used by some
-dnl controllers despite the spec) as meaning a packet that was generated
-dnl by the controller.
-AT_SETUP([ofproto - packet-out from controller (OpenFlow 1.1)])
-OVS_VSWITCHD_START
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -O OpenFlow11 -P standard monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0209000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# Send some packet-outs with OFPP_NONE and OFPP_CONTROLLER as in_port.
-AT_CHECK([ovs-appctl -t ovs-ofctl ofctl/packet-out "in_port=none, packet=0001020304050010203040501234 actions=controller"])
-AT_CHECK([ovs-appctl -t ovs-ofctl ofctl/packet-out "in_port=controller packet=0001020304050010203040505678 actions=controller"])
-
-# Stop the monitor and check its output.
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//
-/PACKET_OUT/d' monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.1): total_len=14 in_port=ANY (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
-OFPT_PACKET_IN (OF1.1): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x5678
-OFPT_BARRIER_REPLY (OF1.1):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - packet-out from controller (OpenFlow 1.5)])
-OVS_VSWITCHD_START
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -O OpenFlow15 -P standard monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0609000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# Send some packet-outs with OFPP_NONE and OFPP_CONTROLLER (65533) as in_port.
-AT_CHECK([ovs-ofctl -O OpenFlow15 packet-out br0 "in_port=none tun_id=0x11 metadata=0x22 packet=0001020304050010203040501234 actions=controller"])
-AT_CHECK([ovs-ofctl -O OpenFlow15 packet-out br0 "in_port=controller tun_id=0x11 metadata=0x33 packet=0001020304050010203040505678 actions=controller"])
-
-# Stop the monitor and check its output.
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.5): total_len=14 tun_id=0x11,metadata=0x22,in_port=ANY (via packet_out) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
-OFPT_PACKET_IN (OF1.5): total_len=14 tun_id=0x11,metadata=0x33,in_port=CONTROLLER (via packet_out) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x5678
-OFPT_BARRIER_REPLY (OF1.5):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks that metadata and userdata are encoded in NXT_PACKET_IN2.
-AT_SETUP([ofproto - packet-out with metadata and userdata (NXT_PACKET_IN2)])
-OVS_VSWITCHD_START
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -P nxt_packet_in2 monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0109000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# Send a packet-out with a load action to set some metadata, and forward to controller
-AT_CHECK([ovs-ofctl packet-out br0 "in_port=controller packet=0001020304050010203040501234 actions=load(0xfafafafa5a5a5a5a->OXM_OF_METADATA[[0..63]]),load(0xaa->NXM_NX_PKT_MARK[[]]),controller(userdata=01.02.03.04.05)"])
-
-# Stop the monitor and check its output.
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
-NXT_PACKET_IN2: total_len=14 pkt_mark=0xaa,metadata=0xfafafafa5a5a5a5a,in_port=CONTROLLER (via action) data_len=14 (unbuffered)
- userdata=01.02.03.04.05
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
-OFPT_BARRIER_REPLY:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks that 1.5 packet_out is properly encoded/decoded.
-AT_SETUP([ofproto - packet-out with set_field metadata (OpenFlow 1.5)])
-OVS_VSWITCHD_START
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -P standard -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0409000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# Send a packet-out with a couple of set-field action to set some metadata, and forward to controller
-AT_CHECK([ovs-ofctl -O OpenFlow15 packet-out br0 CONTROLLER 'set_field:0xfafafafa5a5a5a5a->metadata, controller' '0001020304050010203040501234'])
-
-# Stop the monitor and check its output.
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl exit
-
-AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.3): total_len=14 metadata=0xfafafafa5a5a5a5a,in_port=CONTROLLER (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
-OFPT_BARRIER_REPLY (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks that packet_type PT_ETH is properly encoded/decoded in 1.5 packet_out.
-AT_SETUP([ofproto - packet-out with set_field metadata with packet_type PT_ETH (OpenFlow 1.5)])
-OVS_VSWITCHD_START
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -P standard -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0409000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# Send a packet-out with a couple of set-field action to set some metadata, and forward to controller
-AT_CHECK([ovs-ofctl -O OpenFlow15 packet-out br0 "in_port=controller packet=0001020304050010203040501234 packet_type(0,0x0) actions=set_field:0xfafafafa5a5a5a5a->metadata,controller"])
-
-# Stop the monitor and check its output.
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl exit
-
-AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.3): total_len=14 metadata=0xfafafafa5a5a5a5a,in_port=CONTROLLER (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
-OFPT_BARRIER_REPLY (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks that packet_type PT_IPV4 is properly encoded/decoded in 1.5 packet_out.
-AT_SETUP([ofproto - packet-out with set_field metadata with packet_type PT_IPV4 on PTAP bridge (OpenFlow 1.5)])
-OVS_VSWITCHD_START
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -P standard -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0409000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# Send a packet-out with a couple of set-field action to set some metadata, and forward to controller
-AT_CHECK([ovs-ofctl -O OpenFlow15 packet-out br0 "in_port=controller packet=4500002012344000ff1155670a0000140a00001e006400c8000cea78ffffffff packet_type(1,0x800) actions=set_field:0xfafafafa5a5a5a5a->metadata,controller"])
-
-# Stop the monitor and check its output.
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl exit
-
-AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.3): total_len=32 packet_type=(1,0x800),metadata=0xfafafafa5a5a5a5a,in_port=CONTROLLER (via action) data_len=32 (unbuffered)
-packet_type=(1,0x800),nw_src=10.0.0.20,nw_dst=10.0.0.30,nw_proto=17,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=100,tp_dst=200 udp_csum:ea78
-OFPT_BARRIER_REPLY (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks that metadata is encoded in packet_in structures,
-dnl supported by NXAST.
-AT_SETUP([ofproto - packet-out with metadata (NXM)])
-OVS_VSWITCHD_START
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -P nxt_packet_in monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0109000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# Send a packet-out with a load action to set some metadata, and forward to controller
-AT_CHECK([ovs-ofctl packet-out br0 "in_port=controller packet=0001020304050010203040501234 actions=load(0xfafafafa5a5a5a5a->OXM_OF_METADATA[[0..63]]),load(0xaa->NXM_NX_PKT_MARK[[]]),controller"])
-
-# Stop the monitor and check its output.
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
-NXT_PACKET_IN: total_len=14 pkt_mark=0xaa,metadata=0xfafafafa5a5a5a5a,in_port=CONTROLLER (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
-OFPT_BARRIER_REPLY:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks that metadata is encoded in packet_in structures,
-dnl supported by NXAST.
-AT_SETUP([ofproto - packet-out with metadata (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -O OpenFlow12 -P standard monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0309000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# Send a packet-out with a set-field action to set some metadata, and forward to controller
-AT_CHECK([ovs-ofctl -O OpenFlow12 packet-out br0 none 'set_field:0xfafafafa5a5a5a5a->metadata, controller' '0001020304050010203040501234'])
-
-# Stop the monitor and check its output.
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=14 metadata=0xfafafafa5a5a5a5a,in_port=ANY (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
-OFPT_BARRIER_REPLY (OF1.2):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks that metadata is encoded in packet_in structures,
-dnl supported by NXAST.
-AT_SETUP([ofproto - packet-out with metadata and dual set_field (OpenFlow 1.3)])
-OVS_VSWITCHD_START
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -O OpenFlow13 -P standard monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0409000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# Send a packet-out with a couple of set-field action to set some metadata, and forward to controller
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 none 'set_field:0xfafafafa5a5a5a5a->metadata, set_field:0x6b->metadata, controller' '0001020304050010203040501234'])
-
-# Stop the monitor and check its output.
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.3): total_len=14 metadata=0x6b,in_port=ANY (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
-OFPT_BARRIER_REPLY (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl This test checks that tunnel metadata is encoded in packet_in structures.
-AT_SETUP([ofproto - packet-out with tunnel metadata (OpenFlow 1.2)])
-OVS_VSWITCHD_START
-
-# Start a monitor listening for packet-ins.
-AT_CHECK([ovs-ofctl -O OpenFlow12 -P standard monitor br0 --detach --no-chdir --pidfile])
-ovs-appctl -t ovs-ofctl ofctl/send 0309000c0123456700000080
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-AT_CAPTURE_FILE([monitor.log])
-
-# Send a packet-out with set field actions to set some tunnel metadata, and forward to controller
-AT_CHECK([ovs-ofctl -O OpenFlow12 packet-out br0 none 'set_field:127.0.0.1->tun_src,set_field:0x01020304->tun_id,set_field:192.168.0.1->tun_dst, controller' '0001020304050010203040501234'])
-
-# Stop the monitor and check its output.
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
-OFPT_PACKET_IN (OF1.2): total_len=14 tun_id=0x1020304,tun_src=127.0.0.1,tun_dst=192.168.0.1,in_port=ANY (via action) data_len=14 (unbuffered)
-vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
-OFPT_BARRIER_REPLY (OF1.2):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-m4_divert_push([PREPARE_TESTS])
-# Sorts groups of lines that start with a space, without moving them
-# past the nearest line that does not start with a space.
-[
-multiline_sort () {
-    $PYTHON -c '
-import sys
-
-buffer = []
-while True:
-    line = sys.stdin.readline()
-    if not line:
-        break
-    if line.startswith(" "):
-        buffer.append(line)
-    else:
-        sys.stdout.write("".join(sorted(buffer)))
-        sys.stdout.write(line)
-        buffer = []
-sys.stdout.write("".join(sorted(buffer)))
-'
-}
-]
-m4_divert_pop([PREPARE_TESTS])
-
-AT_SETUP([ofproto - flow monitoring])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=123,actions=output:1
-
-# Start a monitor watching the flow table and check the initial reply.
-ovs-ofctl monitor br0 watch: --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-ovs-appctl -t ovs-ofctl ofctl/barrier
-AT_CHECK([sed 's/ (xid=0x[[1-9a-fA-F]][[0-9a-fA-F]]*)//' monitor.log], [0],
-  [NXST_FLOW_MONITOR reply:
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=123 actions=output:1
-OFPT_BARRIER_REPLY:
-])
-
-# Add, delete, and modify some flows and check the updates.
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=124,actions=output:2
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=123,actions=output:5
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=123,dl_vlan_pcp=0,actions=output:6
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=123,dl_vlan_pcp=1,actions=output:7
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=123,actions=output:8
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=65535,dl_vlan_pcp=0,actions=output:9
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=65535,dl_vlan_pcp=1,actions=output:10
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=65535,actions=output:11
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=8191,dl_vlan_pcp=0,actions=output:12
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=8191,dl_vlan_pcp=1,actions=output:13
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=8191,actions=output:14
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=0,dl_vlan_pcp=0,actions=output:15
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=0,dl_vlan_pcp=1,actions=output:16
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=0,actions=output:17
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=0,dl_vlan_pcp=0,actions=output:18
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=0,dl_vlan_pcp=1,actions=output:19
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=0,actions=output:20
-ovs-ofctl add-flow br0 in_port=0,dl_vlan_pcp=0,actions=output:21
-ovs-ofctl add-flow br0 in_port=0,dl_vlan_pcp=1,actions=output:22
-ovs-ofctl add-flow br0 in_port=0,actions=output:23
-ovs-ofctl mod-flows br0 dl_vlan=123,actions=output:3
-ovs-ofctl mod-flows br0 cookie=5,dl_vlan=123,actions=output:3
-ovs-ofctl del-flows br0 dl_vlan=123
-ovs-ofctl del-flows br0
-ovs-appctl -t ovs-ofctl ofctl/barrier
-AT_CHECK([sed 's/ (xid=0x[[1-9a-fA-F]][[0-9a-fA-F]]*)//' monitor.log | multiline_sort], [0],
-[NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=124 actions=output:2
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=123 actions=output:5
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=123,dl_vlan_pcp=0 actions=output:6
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=123,dl_vlan_pcp=1 actions=output:7
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=123 actions=output:8
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=0,dl_vlan_pcp=0 actions=output:9
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=0,dl_vlan_pcp=1 actions=output:10
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,vlan_tci=0x0000 actions=output:11
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=4095,dl_vlan_pcp=0 actions=output:12
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=4095,dl_vlan_pcp=1 actions=output:13
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=4095 actions=output:14
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=0,dl_vlan_pcp=0 actions=output:15
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=0,dl_vlan_pcp=1 actions=output:16
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=0 actions=output:17
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=0,dl_vlan_pcp=0 actions=output:18
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=0,dl_vlan_pcp=1 actions=output:19
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=0 actions=output:20
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan_pcp=0 actions=output:21
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan_pcp=1 actions=output:22
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=0 actions=output:23
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=MODIFIED table=0 cookie=0 in_port=0,dl_vlan=123 actions=output:3
- event=MODIFIED table=0 cookie=0 in_port=0,dl_vlan=123,dl_vlan_pcp=0 actions=output:3
- event=MODIFIED table=0 cookie=0 in_port=0,dl_vlan=123,dl_vlan_pcp=1 actions=output:3
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=MODIFIED table=0 cookie=0x5 in_port=0,dl_vlan=123 actions=output:3
- event=MODIFIED table=0 cookie=0x5 in_port=0,dl_vlan=123,dl_vlan_pcp=0 actions=output:3
- event=MODIFIED table=0 cookie=0x5 in_port=0,dl_vlan=123,dl_vlan_pcp=1 actions=output:3
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=DELETED reason=delete table=0 cookie=0x5 in_port=0,dl_vlan=123 actions=output:3
- event=DELETED reason=delete table=0 cookie=0x5 in_port=0,dl_vlan=123,dl_vlan_pcp=0 actions=output:3
- event=DELETED reason=delete table=0 cookie=0x5 in_port=0,dl_vlan=123,dl_vlan_pcp=1 actions=output:3
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=DELETED reason=delete table=0 cookie=0 in_port=0 actions=output:23
- event=DELETED reason=delete table=0 cookie=0 in_port=0,dl_vlan=0 actions=output:20
- event=DELETED reason=delete table=0 cookie=0 in_port=0,dl_vlan=0,dl_vlan_pcp=0 actions=output:18
- event=DELETED reason=delete table=0 cookie=0 in_port=0,dl_vlan=0,dl_vlan_pcp=1 actions=output:19
- event=DELETED reason=delete table=0 cookie=0 in_port=0,dl_vlan=124 actions=output:2
- event=DELETED reason=delete table=0 cookie=0 in_port=0,dl_vlan=4095 actions=output:14
- event=DELETED reason=delete table=0 cookie=0 in_port=0,dl_vlan=4095,dl_vlan_pcp=0 actions=output:12
- event=DELETED reason=delete table=0 cookie=0 in_port=0,dl_vlan=4095,dl_vlan_pcp=1 actions=output:13
- event=DELETED reason=delete table=0 cookie=0 in_port=0,dl_vlan_pcp=0 actions=output:21
- event=DELETED reason=delete table=0 cookie=0 in_port=0,dl_vlan_pcp=1 actions=output:22
- event=DELETED reason=delete table=0 cookie=0 in_port=0,vlan_tci=0x0000 actions=output:11
-OFPT_BARRIER_REPLY:
-])
-
-# Check that our own changes are reported as full updates.
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-ovs-ofctl add-flow br0 in_port=1,actions=output:2
-ovs-ofctl add-flow br0 in_port=2,actions=output:1
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/send 010e004812345678003fffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000ffffffffffff0000
-ovs-appctl -t ovs-ofctl ofctl/barrier
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [NXST_FLOW reply:
-])
-AT_CHECK([sed 's/ (xid=0x[[1-9a-fA-F]][[0-9a-fA-F]]*)//' monitor.log | multiline_sort], [0],
-[NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=1 actions=output:2
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=2 actions=output:1
-OFPT_BARRIER_REPLY:
-send: OFPT_FLOW_MOD: DEL priority=0 actions=drop
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=DELETED reason=delete table=0 cookie=0 in_port=1 actions=output:2
- event=DELETED reason=delete table=0 cookie=0 in_port=2 actions=output:1
-OFPT_BARRIER_REPLY:
-])
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - flow monitoring with !own])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=123,actions=output:1
-
-# Start a monitor watching the flow table and check the initial reply.
-ovs-ofctl monitor br0 watch:\!own --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-ovs-appctl -t ovs-ofctl ofctl/barrier
-AT_CHECK([sed 's/ (xid=0x[[1-9a-fA-F]][[0-9a-fA-F]]*)//' monitor.log], [0],
-  [NXST_FLOW_MONITOR reply:
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=123 actions=output:1
-OFPT_BARRIER_REPLY:
-])
-
-# Check that our own changes are reported as abbreviations.
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-ovs-ofctl add-flow br0 in_port=1,actions=output:2
-ovs-ofctl add-flow br0 in_port=2,actions=output:1
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/send 010e004812345678003fffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000ffffffffffff0000
-ovs-appctl -t ovs-ofctl ofctl/barrier
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [NXST_FLOW reply:
-])
-AT_CHECK([sed 's/ (xid=0x[[1-9a-fA-F]][[0-9a-fA-F]]*)//' monitor.log], [0],
-[NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=1 actions=output:2
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ADDED table=0 cookie=0 in_port=2 actions=output:1
-OFPT_BARRIER_REPLY:
-send: OFPT_FLOW_MOD: DEL priority=0 actions=drop
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=ABBREV xid=0x12345678
-OFPT_BARRIER_REPLY:
-])
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - flow monitoring with out_port])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=121,actions=output:1
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=122,actions=output:1
-ovs-ofctl add-flow br0 in_port=0,dl_vlan=123,actions=output:2
-
-# Start a monitor watching the flow table and check the initial reply.
-ovs-ofctl monitor br0 watch:out_port=2 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-ovs-appctl -t ovs-ofctl ofctl/barrier
-AT_CHECK([sed 's/ (xid=0x[[1-9a-fA-F]][[0-9a-fA-F]]*)//' monitor.log], [0],
-  [NXST_FLOW_MONITOR reply:
- event=ADDED table=0 cookie=0 in_port=0,dl_vlan=123 actions=output:2
-OFPT_BARRIER_REPLY:
-])
-
-ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
-
-# Add, modify flows and check the updates.
-ovs-ofctl mod-flows br0 dl_vlan=121,actions=drop
-ovs-ofctl mod-flows br0 dl_vlan=122,actions=output:1,output:2
-ovs-appctl -t ovs-ofctl ofctl/barrier
-
-ovs-ofctl mod-flows br0 dl_vlan=123,actions=output:1,output:2
-ovs-appctl -t ovs-ofctl ofctl/barrier
-
-ovs-ofctl mod-flows br0 dl_vlan=122,actions=output:1
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-ofctl mod-flows br0 dl_vlan=123,actions=output:2
-ovs-appctl -t ovs-ofctl ofctl/barrier
-
-AT_CHECK([sed 's/ (xid=0x[[1-9a-fA-F]][[0-9a-fA-F]]*)//' monitor.log], [0],
-[NXST_FLOW_MONITOR reply (xid=0x0):
- event=MODIFIED table=0 cookie=0 in_port=0,dl_vlan=122 actions=output:1,output:2
-OFPT_BARRIER_REPLY:
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=MODIFIED table=0 cookie=0 in_port=0,dl_vlan=123 actions=output:1,output:2
-OFPT_BARRIER_REPLY:
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=MODIFIED table=0 cookie=0 in_port=0,dl_vlan=122 actions=output:1
-OFPT_BARRIER_REPLY:
-NXST_FLOW_MONITOR reply (xid=0x0):
- event=MODIFIED table=0 cookie=0 in_port=0,dl_vlan=123 actions=output:2
-OFPT_BARRIER_REPLY:
-])
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - flow monitoring pause and resume])
-AT_KEYWORDS([monitor])
-
-# The maximum socket receive buffer size is important for this test, which
-# tests behavior when the receive buffer overflows.
-if test -e /proc/sys/net/core/rmem_max; then
-    # Linux
-    rmem_max=`cat /proc/sys/net/core/rmem_max`
-elif rmem_max=`sysctl -n net.inet.tcp.recvbuf_max 2>/dev/null`; then
-    : # FreeBSD, NetBSD
-else
-    # Don't know how to get maximum socket receive buffer on this OS
-    AT_SKIP_IF([:])
-fi
-# Calculate the total amount of queuing: rmem_max in the kernel, 128 kB
-# in ofproto sending userspace (see ofmonitor_flush() in connmgr.c).
-queue_size=`expr $rmem_max + 128 \* 1024`
-echo rmem_max=$rmem_max queue_size=$queue_size
-
-# If there's too much queuing skip the test to avoid timing out.
-AT_SKIP_IF([test $rmem_max -gt 1048576])
-
-# Each flow update message takes up at least 48 bytes of space in queues
-# and in practice more than that.
-n_msgs=`expr $queue_size / 48`
-echo n_msgs=$n_msgs
-
-OVS_VSWITCHD_START
-
-# Start a monitor watching the flow table, then make it block.
-on_exit 'kill `cat ovs-ofctl.pid`'
-ovs-ofctl monitor br0 watch: --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-ovs-appctl -t ovs-ofctl ofctl/block
-
-# Add $n_msgs flows.
-(echo "in_port=2,actions=output:2"
-$PYTHON -c '
-for i in range('$n_msgs'):
-    print("cookie=1,reg1=%d,actions=drop" % i)
-') > flows.txt
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-# Check that multipart flow dumps work properly:
-AT_CHECK([ovs-ofctl diff-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl add-flow br0 in_port=1,cookie=3,actions=drop])
-AT_CHECK([ovs-ofctl mod-flows br0 in_port=2,cookie=2,actions=output:2])
-AT_CHECK([ovs-ofctl del-flows br0 cookie=1/-1])
-
-ovs-appctl -t ovs-ofctl ofctl/unblock
-
-# Wait for the connection resumed.
-# A barrier doesn't work for this purpose.
-#    https://www.mail-archive.com/dev@openvswitch.org/msg27013.html
-#    https://www.mail-archive.com/dev@openvswitch.org/msg27675.html
-OVS_WAIT_UNTIL([grep NXT_FLOW_MONITOR_RESUMED monitor.log])
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-# Check that the flow monitor reported the same number of flows
-# added and deleted, but fewer than we actually added and deleted.
-adds=`grep -c 'ADDED.*reg1=' monitor.log`
-deletes=`grep -c 'DELETED.*reg1=' monitor.log`
-echo adds=$adds deletes=$deletes
-AT_CHECK([test $adds -gt 100 && test $adds -lt $n_msgs])
-AT_CHECK([test $adds = $deletes])
-
-# Check that the flow monitor reported everything in the expected order:
-#
-#     event=ADDED table=0 cookie=0x1 reg1=0x22
-# ...
-#    NXT_FLOW_MONITOR_PAUSED:
-# ...
-#     event=DELETED reason=delete table=0 cookie=0x1 reg1=0x22
-# ...
-#     event=ADDED table=0 cookie=0x3 in_port=1
-#     event=MODIFIED table=0 cookie=0x2 in_port=2 actions=output:2
-#    NXT_FLOW_MONITOR_RESUMED:
-#
-# except that, between the PAUSED and RESUMED, the order of the ADDED
-# and MODIFIED lines lines depends on hash order, that is, it varies
-# as we change the hash function or change architecture.  Therefore,
-# we use a couple of tests below to accept both orders.
-AT_CHECK([ofctl_strip < monitor.log | sed -n -e '
-/reg1=0x22$/p
-/cookie=0x[[23]]/p
-/NXT_FLOW_MONITOR_PAUSED:/p
-/NXT_FLOW_MONITOR_RESUMED:/p
-' > monitor.log.subset])
-AT_CHECK([grep -v MODIFIED monitor.log.subset], [0], [dnl
- event=ADDED table=0 cookie=0x1 reg1=0x22
-NXT_FLOW_MONITOR_PAUSED:
- event=DELETED reason=delete table=0 cookie=0x1 reg1=0x22
- event=ADDED table=0 cookie=0x3 in_port=1
-NXT_FLOW_MONITOR_RESUMED:
-])
-AT_CHECK([grep -v ADDED monitor.log.subset], [0], [dnl
-NXT_FLOW_MONITOR_PAUSED:
- event=DELETED reason=delete table=0 cookie=0x1 reg1=0x22
- event=MODIFIED table=0 cookie=0x2 in_port=2 actions=output:2
-NXT_FLOW_MONITOR_RESUMED:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - event filtering (OpenFlow 1.3)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Send an OpenFlow13 message (04), OFPT_GET_ASYNC_REQUEST (1a), length (8), xid (0a)
-ovs-appctl -t ovs-ofctl ofctl/send 041a00080000000a
-ovs-appctl -t ovs-ofctl ofctl/barrier
-
-# Check default setting
-read -r -d '' expected <<'EOF'
-EOF
-
-AT_CHECK([ofctl_strip < monitor.log], [], [dnl
-send: OFPT_GET_ASYNC_REQUEST (OF1.3):
-OFPT_GET_ASYNC_REPLY (OF1.3):
- master:
-       PACKET_IN: no_match action
-     PORT_STATUS: add delete modify
-    FLOW_REMOVED: idle hard delete group_delete
-     ROLE_STATUS: (off)
-    TABLE_STATUS: (off)
-  REQUESTFORWARD: (off)
-
- slave:
-       PACKET_IN: (off)
-     PORT_STATUS: add delete modify
-    FLOW_REMOVED: (off)
-     ROLE_STATUS: (off)
-    TABLE_STATUS: (off)
-  REQUESTFORWARD: (off)
-OFPT_BARRIER_REPLY (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - ofport_request])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-
-set_and_check_specific_ofports () {
-    ovs-vsctl set Interface p1 ofport_request="$1" -- \
-              set Interface p2 ofport_request="$2" -- \
-              set Interface p3 ofport_request="$3"
-    ofports=`ovs-vsctl get Interface p1 ofport -- \
-                       get Interface p2 ofport -- \
-                       get Interface p3 ofport`
-    AT_CHECK_UNQUOTED([echo $ofports], [0], [$1 $2 $3
-])
-}
-for pre in      '1 2 3' '1 3 2' '2 1 3' '2 3 1' '3 1 2' '3 2 1'; do
-    for post in '1 2 3' '1 3 2' '2 1 3' '2 3 1' '3 1 2' '3 2 1'; do
-        echo -----------------------------------------------------------
-        echo "Check changing port numbers from $pre to $post"
-        set_and_check_specific_ofports $pre
-        set_and_check_specific_ofports $post
-    done
-done
-
-ovs-vsctl del-port p3
-
-set_and_check_poorly_specified_ofports () {
-    ovs-vsctl set Interface p1 ofport_request="$1" -- \
-              set Interface p2 ofport_request="$2"
-    p1=`ovs-vsctl get Interface p1 ofport`
-    p2=`ovs-vsctl get Interface p2 ofport`
-    echo $p1 $p2
-
-    AT_CHECK([test "$p1" != "$p2"])
-    if test "$1" = "$2" && test "$1" != '[[]]'; then
-        # One port number must be the requested one.
-        AT_CHECK([test "$p1" = "$1" || test "$p2" = "$1"])
-        # The other port number must be different (already tested above).
-    else
-        AT_CHECK([test "$1" = '[[]]' || test "$p1" = "$1"])
-        AT_CHECK([test "$2" = '[[]]' || test "$p2" = "$2"])
-    fi
-}
-for pre in      '1 2' '[[]] 2' '1 [[]]' '[[]] [[]]' '2 1' '[[]] 1' '2 [[]]' \
-                '1 1' '2 2'; do
-    for post in '1 2' '[[]] 2' '1 [[]]' '[[]] [[]]' '2 1' '[[]] 1' '2 [[]]' \
-                '1 1' '2 2'; do
-        echo -----------------------------------------------------------
-        echo "Check changing port numbers from $pre to $post"
-        set_and_check_poorly_specified_ofports $pre
-        set_and_check_poorly_specified_ofports $post
-    done
-done
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto - bundle open (OpenFlow 1.4)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Send an OpenFlow14 message (05), OFPT_BUNDLE_CONTROL (21), length (10), xid (0a)
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 00 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [], [dnl
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REPLY flags=0
-OFPT_BARRIER_REPLY (OF1.4):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle double open (OpenFlow 1.4)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Send twice an OpenFlow14 message (05), OFPT_BUNDLE_CONTROL (21), length (10), xid (0a)
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 00 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 00 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [0], [dnl
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REPLY flags=0
-OFPT_BARRIER_REPLY (OF1.4):
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-OFPT_ERROR (OF1.4): OFPBFC_BAD_ID
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-OFPT_BARRIER_REPLY (OF1.4):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle close without open (OpenFlow 1.4)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 02 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [0], [dnl
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=CLOSE_REQUEST flags=ordered
-OFPT_ERROR (OF1.4): OFPBFC_BAD_ID
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=CLOSE_REQUEST flags=ordered
-OFPT_BARRIER_REPLY (OF1.4):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle double close (OpenFlow 1.4)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Open, Close, Close
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 00 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 02 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 02 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [0], [dnl
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REPLY flags=0
-OFPT_BARRIER_REPLY (OF1.4):
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=CLOSE_REQUEST flags=ordered
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=CLOSE_REPLY flags=0
-OFPT_BARRIER_REPLY (OF1.4):
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=CLOSE_REQUEST flags=ordered
-OFPT_ERROR (OF1.4): OFPBFC_BUNDLE_CLOSED
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=CLOSE_REQUEST flags=ordered
-OFPT_BARRIER_REPLY (OF1.4):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle close, different flags (OpenFlow 1.4)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Open, Close
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 00 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 02 00 01"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [0], [dnl
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REPLY flags=0
-OFPT_BARRIER_REPLY (OF1.4):
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=CLOSE_REQUEST flags=atomic
-OFPT_ERROR (OF1.4): OFPBFC_BAD_FLAGS
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=CLOSE_REQUEST flags=atomic
-OFPT_BARRIER_REPLY (OF1.4):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle commit without open (OpenFlow 1.4)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Commit
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 04 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [0], [dnl
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=COMMIT_REQUEST flags=ordered
-OFPT_ERROR (OF1.4): OFPBFC_BAD_ID
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=COMMIT_REQUEST flags=ordered
-OFPT_BARRIER_REPLY (OF1.4):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle commit, different flags (OpenFlow 1.4)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Open, Commit
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 00 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 04 00 01"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [0], [dnl
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REPLY flags=0
-OFPT_BARRIER_REPLY (OF1.4):
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=COMMIT_REQUEST flags=atomic
-OFPT_ERROR (OF1.4): OFPBFC_BAD_FLAGS
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=COMMIT_REQUEST flags=atomic
-OFPT_BARRIER_REPLY (OF1.4):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle discard without open (OpenFlow 1.4)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Discard
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 06 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [0], [dnl
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=DISCARD_REQUEST flags=ordered
-OFPT_ERROR (OF1.4): OFPBFC_BAD_ID
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=DISCARD_REQUEST flags=ordered
-OFPT_BARRIER_REPLY (OF1.4):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto - bundle with multiple flow mods (OpenFlow 1.4)])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-appctl vlog/set vconn:dbg])
-
-AT_CHECK([ovs-ofctl --no-names del-flows br0])
-
-AT_DATA([flows.txt], [dnl
-add idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=1
-add idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=2
-add idle_timeout=70 in_port=2 dl_src=00:88:99:aa:bb:cc actions=3
-add idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=4
-delete
-add idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=5
-add idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=6
-add idle_timeout=70 in_port=2 dl_src=00:88:99:aa:bb:cc actions=7
-delete in_port=2 dl_src=00:88:99:aa:bb:cc
-])
-
-AT_CHECK([ovs-ofctl --no-names --bundle add-flows br0 flows.txt])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=output:5
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:6
-NXST_FLOW reply:
-])
-
-AT_DATA([flows.txt], [dnl
-modify actions=drop
-modify_strict in_port=2 dl_src=00:77:88:99:aa:bb actions=7
-])
-
-AT_CHECK([ovs-ofctl --no-names --bundle add-flows br0 flows.txt])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=drop
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:7
-NXST_FLOW reply:
-])
-
-# Adding an existing flow acts as a modify, and delete_strict also works.
-AT_DATA([flows.txt], [dnl
-add idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=8
-delete_strict in_port=2 dl_src=00:66:77:88:99:aa
-add in_port=2 dl_src=00:66:77:88:99:aa actions=drop
-])
-
-AT_CHECK([ovs-ofctl --no-names --bundle add-flows br0 flows.txt])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:8
- in_port=2,dl_src=00:66:77:88:99:aa actions=drop
-NXST_FLOW reply:
-])
-
-dnl Check logs for OpenFlow trace
-# Prevent race.
-OVS_WAIT_UNTIL([vconn_sub < ovs-vswitchd.log | test `grep -- "|vconn|DBG|unix: sent (Success): NXST_FLOW reply" | wc -l` -ge 3])
-AT_CHECK([print_vconn_debug | vconn_sub | ofctl_strip], [0], [dnl
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO:
- version bitmap: 0x01
-vconn|DBG|unix: negotiated OpenFlow version 0x01 (we support version 0x06 and earlier, peer supports version 0x01)
-vconn|DBG|unix: received: OFPT_FLOW_MOD: DEL actions=drop
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST:
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY:
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO (OF1.4):
- version bitmap: 0x05
-vconn|DBG|unix: negotiated OpenFlow version 0x05 (we support version 0x06 and earlier, peer supports version 0x05)
-vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=OPEN_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=OPEN_REPLY flags=0
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD in_port=2,dl_src=00:66:77:88:99:aa idle:50 actions=output:1
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD in_port=2,dl_src=00:77:88:99:aa:bb idle:60 actions=output:2
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD in_port=2,dl_src=00:88:99:aa:bb:cc idle:70 actions=output:3
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD in_port=2,dl_src=00:66:77:88:99:aa idle:50 actions=output:4
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): DEL table:255 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD in_port=2,dl_src=00:66:77:88:99:aa idle:50 actions=output:5
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD in_port=2,dl_src=00:77:88:99:aa:bb idle:60 actions=output:6
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD in_port=2,dl_src=00:88:99:aa:bb:cc idle:70 actions=output:7
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): DEL table:255 in_port=2,dl_src=00:88:99:aa:bb:cc actions=drop
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST (OF1.4):
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY (OF1.4):
-vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=COMMIT_REPLY flags=0
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO:
- version bitmap: 0x01
-vconn|DBG|unix: negotiated OpenFlow version 0x01 (we support version 0x06 and earlier, peer supports version 0x01)
-vconn|DBG|unix: received: NXT_SET_FLOW_FORMAT: format=nxm
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST:
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY:
-vconn|DBG|unix: received: NXST_FLOW request:
-vconn|DBG|unix: sent (Success): NXST_FLOW reply:
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=output:5
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:6
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO (OF1.4):
- version bitmap: 0x05
-vconn|DBG|unix: negotiated OpenFlow version 0x05 (we support version 0x06 and earlier, peer supports version 0x05)
-vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=OPEN_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=OPEN_REPLY flags=0
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): MOD actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): MOD_STRICT in_port=2,dl_src=00:77:88:99:aa:bb actions=output:7
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST (OF1.4):
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY (OF1.4):
-vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=COMMIT_REPLY flags=0
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO:
- version bitmap: 0x01
-vconn|DBG|unix: negotiated OpenFlow version 0x01 (we support version 0x06 and earlier, peer supports version 0x01)
-vconn|DBG|unix: received: NXT_SET_FLOW_FORMAT: format=nxm
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST:
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY:
-vconn|DBG|unix: received: NXST_FLOW request:
-vconn|DBG|unix: sent (Success): NXST_FLOW reply:
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=drop
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:7
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO (OF1.4):
- version bitmap: 0x05
-vconn|DBG|unix: negotiated OpenFlow version 0x05 (we support version 0x06 and earlier, peer supports version 0x05)
-vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=OPEN_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=OPEN_REPLY flags=0
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD in_port=2,dl_src=00:77:88:99:aa:bb idle:60 actions=output:8
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): DEL_STRICT table:255 in_port=2,dl_src=00:66:77:88:99:aa actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD in_port=2,dl_src=00:66:77:88:99:aa actions=drop
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST (OF1.4):
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY (OF1.4):
-vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=COMMIT_REPLY flags=0
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO:
- version bitmap: 0x01
-vconn|DBG|unix: negotiated OpenFlow version 0x01 (we support version 0x06 and earlier, peer supports version 0x01)
-vconn|DBG|unix: received: NXT_SET_FLOW_FORMAT: format=nxm
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST:
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY:
-vconn|DBG|unix: received: NXST_FLOW request: 
-vconn|DBG|unix: sent (Success): NXST_FLOW reply:
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:8
- in_port=2,dl_src=00:66:77:88:99:aa actions=drop
-])
-
-AT_CHECK([grep " flow_mods in the last " ovs-vswitchd.log | sed -e 's/^.*connmgr|INFO|//' | vconn_sub], [0], [dnl
-br0<->unix: 1 flow_mods in the last 0 s (1 deletes)
-br0<->unix: 9 flow_mods in the last 0 s (7 adds, 2 deletes)
-br0<->unix: 2 flow_mods in the last 0 s (2 modifications)
-br0<->unix: 3 flow_mods in the last 0 s (2 adds, 1 deletes)
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto - failing bundle commit (OpenFlow 1.4)])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-ofctl del-flows br0])
-
-ovs-ofctl add-flows br0 - <<EOF
-idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=11
-idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=22
-idle_timeout=70 in_port=2 dl_src=00:88:99:aa:bb:cc actions=33
-EOF
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=output:11
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:22
- idle_timeout=70, in_port=2,dl_src=00:88:99:aa:bb:cc actions=output:33
-NXST_FLOW reply:
-])
-
-# last line uses illegal table number (OVS internal table)
-AT_DATA([flows.txt], [dnl
-add idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=1
-add idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=2
-add idle_timeout=70 in_port=2 dl_src=00:88:99:aa:bb:cc actions=3
-modify idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=4
-delete
-add idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=5
-add idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=6
-add idle_timeout=70 in_port=2 dl_src=00:88:99:aa:bb:cc actions=7
-delete in_port=2 dl_src=00:88:99:aa:bb:cc
-add table=254 actions=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt 2>&1 | sed '/talking to/,$d' | strip_xids],
-[0], [dnl
-Error OFPBRC_EPERM for: OFPT_FLOW_MOD (OF1.4): ADD table:254 actions=drop
-])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=output:11
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:22
- idle_timeout=70, in_port=2,dl_src=00:88:99:aa:bb:cc actions=output:33
-NXST_FLOW reply:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto - bundle timeout (OpenFlow 1.4)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-ovs-appctl time/stop
-
-# Send an OpenFlow14 message (05), OFPT_BUNDLE_CONTROL (21), length (10), xid (01)
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 01 00 00 00 01 00 00 00 03"
-ovs-appctl time/warp 8000
-# Send a bundle flow mod, it should keep the bundle alive.
-ovs-appctl -t ovs-ofctl ofctl/send "05 22 00 a0 00 00 00 02 00 00 00 01 00 00 00 03 \
-05 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
-ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
-50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
-80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
-00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
-00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
-00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
-"
-ovs-appctl time/warp 8000
-# Send a bundle close, it should keep the bundle alive.
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 03 00 00 00 01 00 02 00 03"
-ovs-appctl time/warp 11000
-# Make sure that timeouts are processed after the expiry
-ovs-appctl time/warp 1000
-# Send a Commit, but too late.
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 04 00 00 00 01 00 04 00 03"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [], [dnl
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REQUEST flags=atomic ordered
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REPLY flags=0
-send: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0x1 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:1 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 actions=output:3
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=CLOSE_REQUEST flags=atomic ordered
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=CLOSE_REPLY flags=0
-OFPT_ERROR (OF1.4): OFPBFC_TIMEOUT
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REQUEST flags=atomic ordered
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=COMMIT_REQUEST flags=atomic ordered
-OFPT_ERROR (OF1.4): OFPBFC_BAD_ID
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=COMMIT_REQUEST flags=atomic ordered
-OFPT_BARRIER_REPLY (OF1.4):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle custom timeout (OpenFlow 1.4)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:bundle-idle-timeout=4])
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-ovs-appctl time/stop
-
-# Send an OpenFlow14 message (05), OFPT_BUNDLE_CONTROL (21), length (10), xid (01)
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 01 00 00 00 01 00 00 00 03"
-ovs-appctl time/warp 2000
-# Send a bundle flow mod, it should keep the bundle alive.
-ovs-appctl -t ovs-ofctl ofctl/send "05 22 00 a0 00 00 00 02 00 00 00 01 00 00 00 03 \
-05 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
-ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
-50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
-80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
-00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
-00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
-00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
-"
-ovs-appctl time/warp 2000
-# Send a bundle close, it should keep the bundle alive.
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 03 00 00 00 01 00 02 00 03"
-ovs-appctl time/warp 4000
-# Make sure that timeouts are processed after the expiry, but still before the
-# current timeout of 4s.
-ovs-appctl time/warp 1000
-# Send a Commit, but too late.
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 04 00 00 00 01 00 04 00 03"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [], [dnl
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REQUEST flags=atomic ordered
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REPLY flags=0
-send: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0x1 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:1 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 actions=output:3
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=CLOSE_REQUEST flags=atomic ordered
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=CLOSE_REPLY flags=0
-OFPT_ERROR (OF1.4): OFPBFC_TIMEOUT
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REQUEST flags=atomic ordered
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=COMMIT_REQUEST flags=atomic ordered
-OFPT_ERROR (OF1.4): OFPBFC_BAD_ID
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=COMMIT_REQUEST flags=atomic ordered
-OFPT_BARRIER_REPLY (OF1.4):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle reset timeout to default (OpenFlow 1.4)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:bundle-idle-timeout=15])
-AT_CHECK([ovs-vsctl remove Open_vSwitch . other_config bundle-idle-timeout])
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-ovs-appctl time/stop
-
-# Send an OpenFlow14 message (05), OFPT_BUNDLE_CONTROL (21), length (10), xid (01)
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 01 00 00 00 01 00 00 00 03"
-ovs-appctl time/warp 8000
-# Send a bundle flow mod, it should keep the bundle alive.
-ovs-appctl -t ovs-ofctl ofctl/send "05 22 00 a0 00 00 00 02 00 00 00 01 00 00 00 03 \
-05 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
-00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
-ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
-00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
-50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
-80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
-00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
-00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
-00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
-"
-ovs-appctl time/warp 8000
-# Send a bundle close, it should keep the bundle alive.
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 03 00 00 00 01 00 02 00 03"
-ovs-appctl time/warp 11000
-# Make sure that timeouts are processed after the expiry
-ovs-appctl time/warp 1000
-# Send a Commit, but too late.
-ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 04 00 00 00 01 00 04 00 03"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [], [dnl
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REQUEST flags=atomic ordered
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REPLY flags=0
-send: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0x1 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:1 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 actions=output:3
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=CLOSE_REQUEST flags=atomic ordered
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=CLOSE_REPLY flags=0
-OFPT_ERROR (OF1.4): OFPBFC_TIMEOUT
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=OPEN_REQUEST flags=atomic ordered
-send: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=COMMIT_REQUEST flags=atomic ordered
-OFPT_ERROR (OF1.4): OFPBFC_BAD_ID
-OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0x1 type=COMMIT_REQUEST flags=atomic ordered
-OFPT_BARRIER_REPLY (OF1.4):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle open (OpenFlow 1.3)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Send an OpenFlow13 message (04), OFPT_EXPERIMENTER (04), length (0018),
-# xid (0000000a), ONF_EXPERIMENTER_ID (4F4E4600),
-# ONFT_BUNDLE_CONTROL (2300 = 0x08FC), bundle id (00000001),
-# message type (0000), and flags (0002)
-ovs-appctl -t ovs-ofctl ofctl/send "04 04 00 18 00 00 00 0a 4F 4E 46 00 00 00 08 FC 00 00 00 01 00 00 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [], [dnl
-send: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=OPEN_REPLY flags=0
-OFPT_BARRIER_REPLY (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle double open (OpenFlow 1.3)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Send twice an OpenFlow13 message (04), OFPT_EXPERIMENTER (04), length (0018),
-# xid (0000000a), ONF_EXPERIMENTER_ID (4F4E4600),
-# ONFT_BUNDLE_CONTROL (2300 = 0x08FC), bundle id (00000001),
-# message type (0000), and flags (0002)
-ovs-appctl -t ovs-ofctl ofctl/send "04 04 00 18 00 00 00 0a 4F 4E 46 00 00 00 08 FC 00 00 00 01 00 00 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/send "04 04 00 18 00 00 00 0a 4F 4E 46 00 00 00 08 FC 00 00 00 01 00 00 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [0], [dnl
-send: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=OPEN_REPLY flags=0
-OFPT_BARRIER_REPLY (OF1.3):
-send: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-OFPT_ERROR (OF1.3): OFPBFC_BAD_ID
-ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-OFPT_BARRIER_REPLY (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle close without open (OpenFlow 1.3)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-ovs-appctl -t ovs-ofctl ofctl/send "04 04 00 18 00 00 00 0a 4F 4E 46 00 00 00 08 FC 00 00 00 01 00 02 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [0], [dnl
-send: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=CLOSE_REQUEST flags=ordered
-OFPT_ERROR (OF1.3): OFPBFC_BAD_ID
-ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=CLOSE_REQUEST flags=ordered
-OFPT_BARRIER_REPLY (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle double close (OpenFlow 1.3)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Open, Close, Close
-ovs-appctl -t ovs-ofctl ofctl/send "04 04 00 18 00 00 00 0a 4F 4E 46 00 00 00 08 FC 00 00 00 01 00 00 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/send "04 04 00 18 00 00 00 0a 4F 4E 46 00 00 00 08 FC 00 00 00 01 00 02 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/send "04 04 00 18 00 00 00 0a 4F 4E 46 00 00 00 08 FC 00 00 00 01 00 02 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [0], [dnl
-send: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=OPEN_REPLY flags=0
-OFPT_BARRIER_REPLY (OF1.3):
-send: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=CLOSE_REQUEST flags=ordered
-ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=CLOSE_REPLY flags=0
-OFPT_BARRIER_REPLY (OF1.3):
-send: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=CLOSE_REQUEST flags=ordered
-OFPT_ERROR (OF1.3): OFPBFC_BUNDLE_CLOSED
-ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=CLOSE_REQUEST flags=ordered
-OFPT_BARRIER_REPLY (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle close, different flags (OpenFlow 1.3)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Open, Close
-ovs-appctl -t ovs-ofctl ofctl/send "04 04 00 18 00 00 00 0a 4F 4E 46 00 00 00 08 FC 00 00 00 01 00 00 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/send "04 04 00 18 00 00 00 0a 4F 4E 46 00 00 00 08 FC 00 00 00 01 00 02 00 01"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [0], [dnl
-send: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=OPEN_REPLY flags=0
-OFPT_BARRIER_REPLY (OF1.3):
-send: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=CLOSE_REQUEST flags=atomic
-OFPT_ERROR (OF1.3): OFPBFC_BAD_FLAGS
-ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=CLOSE_REQUEST flags=atomic
-OFPT_BARRIER_REPLY (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle commit without open (OpenFlow 1.3)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Commit
-ovs-appctl -t ovs-ofctl ofctl/send "04 04 00 18 00 00 00 0a 4F 4E 46 00 00 00 08 FC 00 00 00 01 00 04 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [0], [dnl
-send: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=COMMIT_REQUEST flags=ordered
-OFPT_ERROR (OF1.3): OFPBFC_BAD_ID
-ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=COMMIT_REQUEST flags=ordered
-OFPT_BARRIER_REPLY (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle commit, different flags (OpenFlow 1.3)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Open, Commit
-ovs-appctl -t ovs-ofctl ofctl/send "04 04 00 18 00 00 00 0a 4F 4E 46 00 00 00 08 FC 00 00 00 01 00 00 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-ovs-appctl -t ovs-ofctl ofctl/send "04 04 00 18 00 00 00 0a 4F 4E 46 00 00 00 08 FC 00 00 00 01 00 04 00 01"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [0], [dnl
-send: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=OPEN_REQUEST flags=ordered
-ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=OPEN_REPLY flags=0
-OFPT_BARRIER_REPLY (OF1.3):
-send: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=COMMIT_REQUEST flags=atomic
-OFPT_ERROR (OF1.3): OFPBFC_BAD_FLAGS
-ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=COMMIT_REQUEST flags=atomic
-OFPT_BARRIER_REPLY (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - bundle discard without open (OpenFlow 1.3)])
-AT_KEYWORDS([monitor])
-OVS_VSWITCHD_START
-
-# Start a monitor, use the required protocol version
-ovs-ofctl -O OpenFlow13 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
-AT_CAPTURE_FILE([monitor.log])
-
-# Discard
-ovs-appctl -t ovs-ofctl ofctl/send "04 04 00 18 00 00 00 0a 4F 4E 46 00 00 00 08 FC 00 00 00 01 00 06 00 02"
-ovs-appctl -t ovs-ofctl ofctl/barrier
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([ofctl_strip < monitor.log], [0], [dnl
-send: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=DISCARD_REQUEST flags=ordered
-OFPT_ERROR (OF1.3): OFPBFC_BAD_ID
-ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0x1 type=DISCARD_REQUEST flags=ordered
-OFPT_BARRIER_REPLY (OF1.3):
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto - bundle with multiple flow mods (OpenFlow 1.3)])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-appctl vlog/set vconn:dbg])
-
-AT_CHECK([ovs-ofctl --no-names del-flows br0])
-
-AT_DATA([flows.txt], [dnl
-add idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=1
-add idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=2
-add idle_timeout=70 in_port=2 dl_src=00:88:99:aa:bb:cc actions=3
-add idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=4
-delete
-add idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=5
-add idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=6
-add idle_timeout=70 in_port=2 dl_src=00:88:99:aa:bb:cc actions=7
-delete in_port=2 dl_src=00:88:99:aa:bb:cc
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 --no-names --bundle add-flows br0 flows.txt])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=output:5
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:6
-NXST_FLOW reply:
-])
-
-AT_DATA([flows.txt], [dnl
-modify actions=drop
-modify_strict in_port=2 dl_src=00:77:88:99:aa:bb actions=7
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 --no-names --bundle add-flows br0 flows.txt])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=drop
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:7
-NXST_FLOW reply:
-])
-
-# Adding an existing flow acts as a modify, and delete_strict also works.
-AT_DATA([flows.txt], [dnl
-add idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=8
-delete_strict in_port=2 dl_src=00:66:77:88:99:aa
-add in_port=2 dl_src=00:66:77:88:99:aa actions=drop
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 --bundle --no-names add-flows br0 flows.txt])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:8
- in_port=2,dl_src=00:66:77:88:99:aa actions=drop
-NXST_FLOW reply:
-])
-
-dnl Check logs for OpenFlow trace
-# Prevent race.
-OVS_WAIT_UNTIL([vconn_sub < ovs-vswitchd.log | test `grep -- "|vconn|DBG|unix: sent (Success): NXST_FLOW reply" | wc -l` -ge 3])
-AT_CHECK([print_vconn_debug | vconn_sub | ofctl_strip], [0], [dnl
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO:
- version bitmap: 0x01
-vconn|DBG|unix: negotiated OpenFlow version 0x01 (we support version 0x06 and earlier, peer supports version 0x01)
-vconn|DBG|unix: received: OFPT_FLOW_MOD: DEL actions=drop
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST:
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY:
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO (OF1.3):
- version bitmap: 0x04
-vconn|DBG|unix: negotiated OpenFlow version 0x04 (we support version 0x06 and earlier, peer supports version 0x04)
-vconn|DBG|unix: received: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0 type=OPEN_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0 type=OPEN_REPLY flags=0
-vconn|DBG|unix: received: ONFT_BUNDLE_ADD_MESSAGE (OF1.3):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.3): ADD in_port=2,dl_src=00:66:77:88:99:aa idle:50 actions=output:1
-vconn|DBG|unix: received: ONFT_BUNDLE_ADD_MESSAGE (OF1.3):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.3): ADD in_port=2,dl_src=00:77:88:99:aa:bb idle:60 actions=output:2
-vconn|DBG|unix: received: ONFT_BUNDLE_ADD_MESSAGE (OF1.3):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.3): ADD in_port=2,dl_src=00:88:99:aa:bb:cc idle:70 actions=output:3
-vconn|DBG|unix: received: ONFT_BUNDLE_ADD_MESSAGE (OF1.3):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.3): ADD in_port=2,dl_src=00:66:77:88:99:aa idle:50 actions=output:4
-vconn|DBG|unix: received: ONFT_BUNDLE_ADD_MESSAGE (OF1.3):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.3): DEL table:255 actions=drop
-vconn|DBG|unix: received: ONFT_BUNDLE_ADD_MESSAGE (OF1.3):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.3): ADD in_port=2,dl_src=00:66:77:88:99:aa idle:50 actions=output:5
-vconn|DBG|unix: received: ONFT_BUNDLE_ADD_MESSAGE (OF1.3):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.3): ADD in_port=2,dl_src=00:77:88:99:aa:bb idle:60 actions=output:6
-vconn|DBG|unix: received: ONFT_BUNDLE_ADD_MESSAGE (OF1.3):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.3): ADD in_port=2,dl_src=00:88:99:aa:bb:cc idle:70 actions=output:7
-vconn|DBG|unix: received: ONFT_BUNDLE_ADD_MESSAGE (OF1.3):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.3): DEL table:255 in_port=2,dl_src=00:88:99:aa:bb:cc actions=drop
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST (OF1.3):
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY (OF1.3):
-vconn|DBG|unix: received: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0 type=COMMIT_REPLY flags=0
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO:
- version bitmap: 0x01
-vconn|DBG|unix: negotiated OpenFlow version 0x01 (we support version 0x06 and earlier, peer supports version 0x01)
-vconn|DBG|unix: received: NXT_SET_FLOW_FORMAT: format=nxm
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST:
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY:
-vconn|DBG|unix: received: NXST_FLOW request:
-vconn|DBG|unix: sent (Success): NXST_FLOW reply:
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=output:5
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:6
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO (OF1.3):
- version bitmap: 0x04
-vconn|DBG|unix: negotiated OpenFlow version 0x04 (we support version 0x06 and earlier, peer supports version 0x04)
-vconn|DBG|unix: received: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0 type=OPEN_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0 type=OPEN_REPLY flags=0
-vconn|DBG|unix: received: ONFT_BUNDLE_ADD_MESSAGE (OF1.3):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.3): MOD actions=drop
-vconn|DBG|unix: received: ONFT_BUNDLE_ADD_MESSAGE (OF1.3):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.3): MOD_STRICT in_port=2,dl_src=00:77:88:99:aa:bb actions=output:7
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST (OF1.3):
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY (OF1.3):
-vconn|DBG|unix: received: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0 type=COMMIT_REPLY flags=0
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO:
- version bitmap: 0x01
-vconn|DBG|unix: negotiated OpenFlow version 0x01 (we support version 0x06 and earlier, peer supports version 0x01)
-vconn|DBG|unix: received: NXT_SET_FLOW_FORMAT: format=nxm
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST:
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY:
-vconn|DBG|unix: received: NXST_FLOW request:
-vconn|DBG|unix: sent (Success): NXST_FLOW reply:
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=drop
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:7
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO (OF1.3):
- version bitmap: 0x04
-vconn|DBG|unix: negotiated OpenFlow version 0x04 (we support version 0x06 and earlier, peer supports version 0x04)
-vconn|DBG|unix: received: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0 type=OPEN_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0 type=OPEN_REPLY flags=0
-vconn|DBG|unix: received: ONFT_BUNDLE_ADD_MESSAGE (OF1.3):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.3): ADD in_port=2,dl_src=00:77:88:99:aa:bb idle:60 actions=output:8
-vconn|DBG|unix: received: ONFT_BUNDLE_ADD_MESSAGE (OF1.3):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.3): DEL_STRICT table:255 in_port=2,dl_src=00:66:77:88:99:aa actions=drop
-vconn|DBG|unix: received: ONFT_BUNDLE_ADD_MESSAGE (OF1.3):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.3): ADD in_port=2,dl_src=00:66:77:88:99:aa actions=drop
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST (OF1.3):
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY (OF1.3):
-vconn|DBG|unix: received: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0 type=COMMIT_REPLY flags=0
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO:
- version bitmap: 0x01
-vconn|DBG|unix: negotiated OpenFlow version 0x01 (we support version 0x06 and earlier, peer supports version 0x01)
-vconn|DBG|unix: received: NXT_SET_FLOW_FORMAT: format=nxm
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST:
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY:
-vconn|DBG|unix: received: NXST_FLOW request: 
-vconn|DBG|unix: sent (Success): NXST_FLOW reply:
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:8
- in_port=2,dl_src=00:66:77:88:99:aa actions=drop
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto - failing bundle add message (OpenFlow 1.3)])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-ofctl del-flows br0])
-
-ovs-ofctl add-flows br0 - <<EOF
-idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=11
-idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=22
-idle_timeout=70 in_port=2 dl_src=00:88:99:aa:bb:cc actions=33
-EOF
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=output:11
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:22
- idle_timeout=70, in_port=2,dl_src=00:88:99:aa:bb:cc actions=output:33
-NXST_FLOW reply:
-])
-
-# last line uses illegal table number (OVS internal table)
-AT_DATA([flows.txt], [dnl
-add idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=1
-add idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=2
-add idle_timeout=70 in_port=2 dl_src=00:88:99:aa:bb:cc actions=3
-modify idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=4
-delete
-add idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=5
-add idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=6
-add idle_timeout=70 in_port=2 dl_src=00:88:99:aa:bb:cc actions=7
-delete in_port=2 dl_src=00:88:99:aa:bb:cc
-add table=254 actions=drop
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 --bundle add-flows br0 flows.txt 2>&1 | sed '/talking to/,$d' | strip_xids],
-[0], [dnl
-Error OFPBRC_EPERM for: OFPT_FLOW_MOD (OF1.3): ADD table:254 actions=drop
-])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- idle_timeout=50, in_port=2,dl_src=00:66:77:88:99:aa actions=output:11
- idle_timeout=60, in_port=2,dl_src=00:77:88:99:aa:bb actions=output:22
- idle_timeout=70, in_port=2,dl_src=00:88:99:aa:bb:cc actions=output:33
-NXST_FLOW reply:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ofproto - failing bundle commit (OpenFlow 1.3)])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-ofctl del-flows br0])
-
-# Invalid group numbers are detected at commit time
-AT_DATA([flows.txt], [dnl
-add idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=group:1
-add idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=group:2
-add idle_timeout=70 in_port=2 dl_src=00:88:99:aa:bb:cc actions=group:3
-])
-
-AT_CHECK([ovs-ofctl -O OpenFlow13 --bundle add-flows br0 flows.txt 2>&1 | sed '/talking to/,$d' | strip_xids],
-[0], [dnl
-Error OFPBAC_BAD_OUT_GROUP for: OFPT_FLOW_MOD (OF1.3): ADD in_port=2,dl_src=00:66:77:88:99:aa idle:50 actions=group:1
-Error OFPBFC_MSG_FAILED for: ONFT_BUNDLE_CONTROL (OF1.3):
- bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
-])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
-NXST_FLOW reply:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - monitor flows with tun_md])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=0,len=4}->tun_metadata0"])
-AT_CHECK([ovs-ofctl add-flow br0 tun_metadata0=0x1,actions=drop])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [dnl
-NXST_FLOW reply:
- tun_metadata0=0x1 actions=drop
-])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-dnl Usually ovs-ofctl monitor outputs on stderr, but the first message here
-dnl is put on stdout, because it is handled by ofctl in dump_transaction()
-dnl and not in monitor_vconn().
-AT_CHECK([ovs-ofctl monitor br0 65534 watch: --detach --no-chdir --pidfile >ofctl_monitor.log 2>&1])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-
-AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
-NXST_FLOW_MONITOR reply:
- event=ADDED table=0 cookie=0 tun_metadata0=0x1
-])
-
-AT_CHECK([ovs-ofctl del-flows br0])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 4])
-
-AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
-NXST_FLOW_MONITOR reply:
- event=ADDED table=0 cookie=0 tun_metadata0=0x1
-NXST_FLOW_MONITOR reply:
- event=DELETED reason=delete table=0 cookie=0 tun_metadata0=0x1
-])
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-dnl Check that vswitchd hasn't crashed
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [dnl
-NXST_FLOW reply:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto - flow mod with tunnel metadata])
-AT_KEYWORDS([ofp-actions])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=0,len=4}->tun_metadata0"])
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=1 actions=move:tun_metadata0[[0..31]]->NXM_NX_REG0[[]]"])
-
-dnl Check the length of tun_metadata0 in the replied OXM header.
-dnl Ignore the first 0x50 bytes of hex dump from the reply msg since the NXM
-dnl header that describes the tunnel metadata starts at offset 0x50.
-AT_CHECK([ovs-ofctl dump-flows br0 -mmmm], [0], [stdout])
-AT_CHECK([sed -e 's/duration=[[0-9.]]*s/duration=?s/' -e 's/idle_age=[[0-9]]*/idle_age=?/' -e '/^000000[[0-4]]0 / d' stdout | strip_xids], [0], [dnl
-NXST_FLOW reply:
- cookie=0x0, duration=?s, table=0, n_packets=0, n_bytes=0, idle_age=?, in_port=1 actions=move:NXM_NX_TUN_METADATA0[[0..31]]->NXM_NX_REG0[[]]
-00000050  ff ff 00 18 00 00 23 20-00 06 00 20 00 00 00 00 |......# ... ....|
-00000060  00 01 50 04 00 01 00 04-                        |..P.....        |
-])
-
-dnl Check actions that may use tun_metadata
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=move:tun_metadata1[[0..31]]->NXM_NX_REG0[[]]"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: NXFMFC_INVALID_TLV_FIELD
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=move:tun_metadata0[[32..63]]->NXM_NX_REG0[[]]"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: OFPBAC_BAD_SET_LEN
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=push:tun_metadata1[[0..31]]"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: NXFMFC_INVALID_TLV_FIELD
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=pop:tun_metadata0[[32..63]]"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: OFPBAC_BAD_SET_LEN
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=3, actions=load:0x11223344->tun_metadata1"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: NXFMFC_INVALID_TLV_FIELD
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=output:tun_metadata1[[0..31]]"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: NXFMFC_INVALID_TLV_FIELD
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=output:tun_metadata0[[32..63]]"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: OFPBAC_BAD_SET_LEN
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=multipath(eth_src,50,modulo_n,1,0,tun_metadata1[[0..31]])"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: NXFMFC_INVALID_TLV_FIELD
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=multipath(eth_src,50,modulo_n,1,0,tun_metadata0[[32..63]])"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: OFPBAC_BAD_SET_LEN
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=bundle_load(eth_src,50,hrw,ofport,tun_metadata1[[0..31]], slaves:4,8)"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: NXFMFC_INVALID_TLV_FIELD
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=bundle_load(eth_src,50,hrw,ofport,tun_metadata0[[32..63]], slaves:4,8)"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: OFPBAC_BAD_SET_LEN
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=learn(tun_metadata1[[0..31]]=reg0[[0..31]])"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: NXFMFC_INVALID_TLV_FIELD
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=learn(tun_metadata0[[32..63]]=reg0[[0..31]])"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: OFPBAC_BAD_SET_LEN
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=clone(move:tun_metadata1[[0..31]]->reg0[[0..31]])"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: NXFMFC_INVALID_TLV_FIELD
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=clone(move:tun_metadata0[[32..63]]->reg0[[0..31]])"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: OFPBAC_BAD_SET_LEN
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "ip actions=ct(commit,zone=tun_metadata1[[0..15]],exec(set_field:0x01->ct_mark))"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: NXFMFC_INVALID_TLV_FIELD
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "ip actions=ct(commit,zone=tun_metadata0[[32..47]],exec(set_field:0x01->ct_mark))"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: OFPBAC_BAD_SET_LEN
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "ip actions=ct(commit,zone=1,exec(move:tun_metadata1[[0..31]]->ct_mark))"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: NXFMFC_INVALID_TLV_FIELD
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "ip actions=ct(commit,zone=1,exec(move:tun_metadata0[[32..63]]->ct_mark))"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: OFPBAC_BAD_SET_LEN
-])
-
-dnl Check match field with tun_metadata
-AT_CHECK([ovs-ofctl add-flow br0 "tun_metadata0=0x11223344 actions=output:2"], [0], [], [stderr])
-AT_CHECK([ovs-ofctl add-flow br0 "tun_metadata1=0x11223344 actions=output:2"], [1], [], [stderr])
-AT_CHECK([strip_xids < stderr | sed '/FLOW_MOD/,$d'], [0], [dnl
-OFPT_ERROR: NXFMFC_INVALID_TLV_FIELD
-])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [dnl)
-NXST_FLOW reply:
- in_port=1 actions=move:NXM_NX_TUN_METADATA0[[0..31]]->NXM_NX_REG0[[]]
- tun_metadata0=0x11223344 actions=output:2
-])
-
-OVS_VSWITCHD_STOP(["/NXFMFC_INVALID_TLV_FIELD/d
-/tun_metadata0/d
-/OFPBAC_BAD_SET_LEN/d"])
-AT_CLEANUP
-
-AT_SETUP([ofproto - flush flows, groups, and meters for controller change])
-AT_KEYWORDS([flow flows group group meter])
-OVS_VSWITCHD_START
-
-add_flow_group_and_meter () {
-    AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=2])
-    AT_CHECK([ovs-ofctl -O OpenFlow11 add-group br0 group_id=1234,type=all,bucket=output:10
-    AT_CHECK([ovs-ofctl -O OpenFlow13 add-meter br0 'meter=1 pktps burst stats bands=type=drop rate=1 burst_size=1'])
-])
-}
-
-verify_added () {
-    AT_CHECK([ovs-ofctl --no-stats dump-flows br0], [0], [dnl
- in_port=1 actions=output:2
-])
-    AT_CHECK([ovs-ofctl -O OpenFlow11 dump-groups br0], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.1) (xid=0x2):
- group_id=1234,type=all,bucket=actions=output:10
-])
-    AT_CHECK([ovs-ofctl -O OpenFlow13 dump-meters br0], [0], [dnl
-OFPST_METER_CONFIG reply (OF1.3) (xid=0x2):
-meter=1 pktps burst stats bands=
-type=drop rate=1 burst_size=1
-])
-}
-
-verify_deleted () {
-    AT_CHECK([ovs-ofctl --no-stats dump-flows br0])
-    AT_CHECK([ovs-ofctl -O OpenFlow11 dump-groups br0], [0], [dnl
-OFPST_GROUP_DESC reply (OF1.1) (xid=0x2):
-])
-    AT_CHECK([ovs-ofctl -O OpenFlow13 dump-meters br0], [0], [dnl
-OFPST_METER_CONFIG reply (OF1.3) (xid=0x2):
-])
-}
-
-# Add flow, group, meter and check that they're there, without a controller.
-add_flow_group_and_meter
-verify_added
-
-# Set up a controller and verify that the flow and group were deleted,
-# then add them back.
-AT_CHECK([ovs-vsctl set-controller br0 'tcp:<invalid>:6653'])
-verify_deleted
-add_flow_group_and_meter
-verify_added
-
-# Change the controller and verify that the flow and group are still there.
-AT_CHECK([ovs-vsctl set-controller br0 'tcp:<invalid2>:6653'])
-verify_added
-
-# Clear the controller and verify that the flow and group were deleted.
-AT_CHECK([ovs-vsctl del-controller br0])
-verify_deleted
-
-OVS_VSWITCHD_STOP(["/<invalid/d"])
-AT_CLEANUP
diff --git a/tests/ovs-ofctl.at b/tests/ovs-ofctl.at
deleted file mode 100644
index c8062c8ac..000000000
--- a/tests/ovs-ofctl.at
+++ /dev/null
@@ -1,3225 +0,0 @@
-AT_BANNER([ovs-ofctl])
-
-AT_SETUP([ovs-ofctl parse-flows choice of protocol])
-# This doesn't cover some potential vlan_tci test cases.
-for test_case in \
-    'tun_id=0                                    NXM,OXM' \
-    'tun_id=0/0x1                                NXM,OXM' \
-    'tun_src=1.2.3.4                             NXM,OXM' \
-    'tun_src=1.2.3.4/0.0.0.1                     NXM,OXM' \
-    'tun_dst=1.2.3.4                             NXM,OXM' \
-    'tun_dst=1.2.3.4/0.0.0.1                     NXM,OXM' \
-    'tun_flags=1                                 NXM,OXM' \
-    'tun_flags=+oam                              NXM,OXM' \
-    'tun_tos=0                                   none' \
-    'tun_ttl=0                                   none' \
-    'tun_gbp_id=0                                NXM,OXM' \
-    'tun_gbp_id=0/0x1                            NXM,OXM' \
-    'tun_gbp_flags=0                             NXM,OXM' \
-    'tun_gbp_flags=0/0x1                         NXM,OXM' \
-    'tun_metadata0=0                             NXM,OXM' \
-    'tun_metadata0=0/0x1                         NXM,OXM' \
-    'tun_metadata0                               NXM,OXM' \
-    'metadata=0                                  NXM,OXM,OpenFlow11' \
-    'metadata=1/1                                NXM,OXM,OpenFlow11' \
-    'in_port=1                                   any' \
-    'skb_priority=0                              none' \
-    'pkt_mark=1                                  NXM,OXM' \
-    'pkt_mark=1/1                                NXM,OXM' \
-    'reg0=0                                      NXM,OXM' \
-    'reg0=0/1                                    NXM,OXM' \
-    'reg1=1                                      NXM,OXM' \
-    'reg1=1/1                                    NXM,OXM' \
-    'reg2=2                                      NXM,OXM' \
-    'reg2=2/1                                    NXM,OXM' \
-    'reg3=3                                      NXM,OXM' \
-    'reg3=3/1                                    NXM,OXM' \
-    'reg4=4                                      NXM,OXM' \
-    'reg4=4/1                                    NXM,OXM' \
-    'reg5=5                                      NXM,OXM' \
-    'reg5=5/1                                    NXM,OXM' \
-    'reg6=6                                      NXM,OXM' \
-    'reg6=6/1                                    NXM,OXM' \
-    'reg7=7                                      NXM,OXM' \
-    'reg8=8/1                                    NXM,OXM' \
-    'reg8=8                                      NXM,OXM' \
-    'reg9=9/1                                    NXM,OXM' \
-    'reg9=9                                      NXM,OXM' \
-    'reg10=10                                    NXM,OXM' \
-    'reg10=10/1                                  NXM,OXM' \
-    'reg11=11                                    NXM,OXM' \
-    'reg11=11/1                                  NXM,OXM' \
-    'reg12=12                                    NXM,OXM' \
-    'reg12=12/1                                  NXM,OXM' \
-    'reg13=13                                    NXM,OXM' \
-    'reg13=13/1                                  NXM,OXM' \
-    'reg14=14                                    NXM,OXM' \
-    'reg14=14/1                                  NXM,OXM' \
-    'xreg0=0                                     NXM,OXM' \
-    'xreg0=0/1                                   NXM,OXM' \
-    'xreg1=1                                     NXM,OXM' \
-    'xreg1=1/1                                   NXM,OXM' \
-    'xreg2=2                                     NXM,OXM' \
-    'xreg2=2/3                                   NXM,OXM' \
-    'xreg3=3                                     NXM,OXM' \
-    'xreg3=3/5                                   NXM,OXM' \
-    'xreg4=4                                     NXM,OXM' \
-    'xreg4=4/1                                   NXM,OXM' \
-    'xreg5=5                                     NXM,OXM' \
-    'xreg5=5/1                                   NXM,OXM' \
-    'xreg6=6                                     NXM,OXM' \
-    'xreg6=6/1                                   NXM,OXM' \
-    'xreg7=7                                     NXM,OXM' \
-    'xreg7=7/1                                   NXM,OXM' \
-    'xxreg0=0                                    NXM,OXM' \
-    'xxreg0=0/1                                  NXM,OXM' \
-    'xxreg1=1                                    NXM,OXM' \
-    'xxreg1=1/1                                  NXM,OXM' \
-    'xxreg2=2                                    NXM,OXM' \
-    'xxreg2=2/1                                  NXM,OXM' \
-    'xxreg3=3                                    NXM,OXM' \
-    'xxreg3=3/1                                  NXM,OXM' \
-    'xxreg3[[0..0]]=1                            NXM,OXM' \
-    'xxreg3[[126..127]]=3                        NXM,OXM' \
-    'reg3[[]]=3                                  NXM,OXM' \
-    'dl_src=00:11:22:33:44:55                    any' \
-    'dl_src=00:11:22:33:44:55/00:ff:ff:ff:ff:ff  NXM,OXM,OpenFlow11' \
-    'dl_dst=00:11:22:33:44:55                    any' \
-    'dl_dst=00:11:22:33:44:55/00:ff:ff:ff:ff:ff  NXM,OXM,OpenFlow11' \
-    'dl_type=0x1234                              any' \
-    'dl_type=0x0800                              any' \
-    'dl_type=0x0806                              any' \
-    'dl_type=0x86dd                              any' \
-    'vlan_tci=0                                  any' \
-    'vlan_tci=0x1009                             any' \
-    'vlan_tci=0x1009/0x1                         NXM,OXM' \
-    'dl_vlan=9                                   any' \
-    'vlan_vid=11                                 any' \
-    'vlan_vid=11/0x1                             NXM,OXM' \
-    'dl_vlan_pcp=6                               any' \
-    'vlan_pcp=5                                  any' \
-    'mpls,mpls_label=5                           NXM,OXM,OpenFlow11' \
-    'mpls,mpls_tc=1                              NXM,OXM,OpenFlow11' \
-    'mpls,mpls_bos=0                             NXM,OXM' \
-    'ip,ip_src=1.2.3.4                           any' \
-    'ip,ip_src=192.168.0.0/24                    any' \
-    'ip,ip_src=192.0.168.0/255.0.255.0           NXM,OXM,OpenFlow11' \
-    'ip,ip_dst=1.2.3.4                           any' \
-    'ip,ip_dst=192.168.0.0/24                    any' \
-    'ip,ip_dst=192.0.168.0/255.0.255.0           NXM,OXM,OpenFlow11' \
-    'ipv6,ipv6_src=::1                           NXM,OXM' \
-    'ipv6,ipv6_src=0:0:0:0:0:0:0:1/::1           NXM,OXM' \
-    'ipv6,ipv6_dst=::1                           NXM,OXM' \
-    'ipv6,ipv6_dst=0:0:0:0:0:0:0:1/::1           NXM,OXM' \
-    'ipv6,ipv6_label=5                           NXM,OXM' \
-    'ipv6,ipv6_label=5/1                         NXM,OXM' \
-    'ip,nw_proto=1                               any' \
-    'ipv6,nw_proto=1                             NXM,OXM' \
-    'ip,nw_tos=0xf0                              any' \
-    'ipv6,nw_tos=0xf0                            NXM,OXM' \
-    'ip,ip_dscp=0x3c                             any' \
-    'ipv6,ip_dscp=0x3c                           NXM,OXM' \
-    'ip,nw_ecn=1                                 NXM,OXM,OpenFlow11' \
-    'ipv6,nw_ecn=1                               NXM,OXM' \
-    'ip,nw_ttl=5                                 NXM,OXM' \
-    'ipv6,nw_ttl=5                               NXM,OXM' \
-    'ip,ip_frag=no                               NXM,OXM' \
-    'ipv6,ip_frag=no                             NXM,OXM' \
-    'arp,arp_op=0                                any' \
-    'arp,arp_spa=1.2.3.4                         any' \
-    'arp,arp_spa=1.2.3.4/0.0.0.1                 NXM,OXM,OpenFlow11' \
-    'arp,arp_tpa=1.2.3.4                         any' \
-    'arp,arp_tpa=1.2.3.4/0.0.0.1                 NXM,OXM,OpenFlow11' \
-    'arp,arp_sha=00:11:22:33:44:55               NXM,OXM' \
-    'arp,arp_sha=00:11:22:33:44:55/00:ff:ff:ff:ff:ff NXM,OXM' \
-    'arp,arp_tha=00:11:22:33:44:55               NXM,OXM' \
-    'arp,arp_tha=00:11:22:33:44:55/00:ff:ff:ff:ff:ff NXM,OXM' \
-    'tcp,tcp_src=80                              any' \
-    'tcp,tcp_src=0x1000/0x1000                   NXM,OXM' \
-    'tcp6,tcp_src=80                             NXM,OXM' \
-    'tcp6,tcp_src=0x1000/0x1000                  NXM,OXM' \
-    'tcp,tcp_dst=80                              any' \
-    'tcp,tcp_dst=0x1000/0x1000                   NXM,OXM' \
-    'tcp6,tcp_dst=80                             NXM,OXM' \
-    'tcp6,tcp_dst=0x1000/0x1000                  NXM,OXM' \
-    'udp,udp_src=80                              any' \
-    'udp,udp_src=0x1000/0x1000                   NXM,OXM' \
-    'udp6,udp_src=80                             NXM,OXM' \
-    'udp6,udp_src=0x1000/0x1000                  NXM,OXM' \
-    'udp,udp_dst=80                              any' \
-    'udp,udp_dst=0x1000/0x1000                   NXM,OXM' \
-    'udp6,udp_dst=80                             NXM,OXM' \
-    'udp6,udp_dst=0x1000/0x1000                  NXM,OXM' \
-    'udp6,udp_dst[[12]]=1                        NXM,OXM' \
-    'icmp,icmp_type=1                            any' \
-    'icmp,icmp_code=2                            any' \
-    'icmp6,icmpv6_type=1                         NXM,OXM' \
-    'icmp6,icmpv6_code=2                         NXM,OXM' \
-    'ct_state=+trk                               NXM,OXM' \
-    'ct_zone=0                                   NXM,OXM' \
-    'ct_mark=0                                   NXM,OXM' \
-    'ct_label=0                                  NXM,OXM' \
-    'ct_label=0x1234567890ABCDEF12345678         NXM,OXM'
-do
-    set $test_case
-    echo
-    echo "### test case: '$1' should have usable protocols '$2'"
-    if test "$2" = none; then
-      AT_CHECK([ovs-ofctl parse-flow "$1,actions=drop"], [1],
-               [dnl
-],
-               [ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
-])
-    else
-      AT_CHECK_UNQUOTED([ovs-ofctl parse-flow "$1,actions=drop" | sed 1q], [0],
-                        [usable protocols: $2
-])
-    fi
-done
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl parse-flows (OpenFlow 1.0)])
-AT_DATA([flows.txt], [[
-# comment
-tcp,tp_src=123,actions=flood
-in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
-udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
-tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
-udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
-cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
-actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
-ip,actions=set_field:10.4.3.77->ip_src,mod_nw_ecn:2
-sctp actions=drop
-sctp actions=drop
-in_port=0 actions=resubmit:0
-actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
-actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,ingress)
-actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789)
-actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789,egress)
-ip,actions=ct(nat)
-ip,actions=ct(commit,nat(dst))
-ip,actions=ct(commit,nat(src))
-ip,actions=ct(commit,nat(src=10.0.0.240,random))
-ip,actions=ct(commit,nat(src=10.0.0.240:32768-65535,random))
-ip,actions=ct(commit,nat(dst=10.0.0.128-10.0.0.254,hash))
-ip,actions=ct(commit,nat(src=10.0.0.240-10.0.0.254:32768-65535,persistent))
-ipv6,actions=ct(commit,nat(src=fe80::20c:29ff:fe88:a18b,random))
-ipv6,actions=ct(commit,nat(src=fe80::20c:29ff:fe88:1-fe80::20c:29ff:fe88:a18b,random))
-ipv6,actions=ct(commit,nat(src=[fe80::20c:29ff:fe88:1]-[fe80::20c:29ff:fe88:a18b]:255-4096,random))
-tcp,actions=ct(commit,nat(src=10.1.1.240-10.1.1.255),alg=ftp)
-actions=in_port,output:in_port
-]])
-
-AT_CHECK([ovs-ofctl parse-flows flows.txt
-], [0], [stdout])
-AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
-[[usable protocols: any
-chosen protocol: OpenFlow10-table_id
-OFPT_FLOW_MOD: ADD tcp,tp_src=123 actions=FLOOD
-OFPT_FLOW_MOD: ADD in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
-OFPT_FLOW_MOD: ADD udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
-OFPT_FLOW_MOD: ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
-OFPT_FLOW_MOD: ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
-OFPT_FLOW_MOD: ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
-OFPT_FLOW_MOD: ADD actions=note:41.42.43.00.00.00,note:00.01.02.03.04.05.06.07.00.00.00.00.00.00,note:00.00.00.00.00.00
-OFPT_FLOW_MOD: ADD ip actions=mod_nw_src:10.4.3.77,load:0x2->NXM_NX_IP_ECN[]
-OFPT_FLOW_MOD: ADD sctp actions=drop
-OFPT_FLOW_MOD: ADD sctp actions=drop
-OFPT_FLOW_MOD: ADD in_port=0 actions=resubmit:0
-OFPT_FLOW_MOD: ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
-OFPT_FLOW_MOD: ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,ingress)
-OFPT_FLOW_MOD: ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789)
-OFPT_FLOW_MOD: ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789,egress)
-OFPT_FLOW_MOD: ADD ip actions=ct(nat)
-OFPT_FLOW_MOD: ADD ip actions=ct(commit,nat(dst))
-OFPT_FLOW_MOD: ADD ip actions=ct(commit,nat(src))
-OFPT_FLOW_MOD: ADD ip actions=ct(commit,nat(src=10.0.0.240,random))
-OFPT_FLOW_MOD: ADD ip actions=ct(commit,nat(src=10.0.0.240:32768-65535,random))
-OFPT_FLOW_MOD: ADD ip actions=ct(commit,nat(dst=10.0.0.128-10.0.0.254,hash))
-OFPT_FLOW_MOD: ADD ip actions=ct(commit,nat(src=10.0.0.240-10.0.0.254:32768-65535,persistent))
-OFPT_FLOW_MOD: ADD ipv6 actions=ct(commit,nat(src=fe80::20c:29ff:fe88:a18b,random))
-OFPT_FLOW_MOD: ADD ipv6 actions=ct(commit,nat(src=fe80::20c:29ff:fe88:1-fe80::20c:29ff:fe88:a18b,random))
-OFPT_FLOW_MOD: ADD ipv6 actions=ct(commit,nat(src=[fe80::20c:29ff:fe88:1]-[fe80::20c:29ff:fe88:a18b]:255-4096,random))
-OFPT_FLOW_MOD: ADD tcp actions=ct(commit,nat(src=10.1.1.240-10.1.1.255),alg=ftp)
-OFPT_FLOW_MOD: ADD actions=IN_PORT,IN_PORT
-]])
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl parse-flows (OpenFlow 1.1)])
-AT_DATA([flows.txt], [[
-# comment
-tcp,tp_src=123,actions=flood
-in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
-udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
-tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
-udp,nw_src=192.168.0.3,tp_dst=53 actions=mod_nw_ecn:2,output:1
-cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
-actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
-ip,actions=mod_nw_ttl:1,set_field:10.4.3.77->ip_src
-sctp actions=drop
-sctp actions=drop
-in_port=0 actions=resubmit:0
-actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
-actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789)
-]])
-
-AT_CHECK([ovs-ofctl --protocols OpenFlow11 parse-flows flows.txt
-], [0], [stdout])
-AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
-[[usable protocols: any
-chosen protocol: OpenFlow11
-OFPT_FLOW_MOD (OF1.1): ADD tcp,tp_src=123 actions=FLOOD
-OFPT_FLOW_MOD (OF1.1): ADD in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
-OFPT_FLOW_MOD (OF1.1): ADD udp,dl_vlan_pcp=7 idle:5 actions=pop_vlan,output:0
-OFPT_FLOW_MOD (OF1.1): ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
-OFPT_FLOW_MOD (OF1.1): ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=mod_nw_ecn:2,output:1
-OFPT_FLOW_MOD (OF1.1): ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
-OFPT_FLOW_MOD (OF1.1): ADD actions=note:41.42.43.00.00.00,note:00.01.02.03.04.05.06.07.00.00.00.00.00.00,note:00.00.00.00.00.00
-OFPT_FLOW_MOD (OF1.1): ADD ip actions=mod_nw_ttl:1,mod_nw_src:10.4.3.77
-OFPT_FLOW_MOD (OF1.1): ADD sctp actions=drop
-OFPT_FLOW_MOD (OF1.1): ADD sctp actions=drop
-OFPT_FLOW_MOD (OF1.1): ADD in_port=0 actions=resubmit:0
-OFPT_FLOW_MOD (OF1.1): ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
-OFPT_FLOW_MOD (OF1.1): ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789)
-]])
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl parse-flows (OpenFlow 1.2)])
-AT_DATA([flows.txt], [[
-# comment
-tcp,tp_src[5]=1,actions=flood
-tcp,tp_src[6..10]=19,actions=flood
-tcp,tp_src=123,actions=flood
-in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=mod_vlan_vid:7,mod_vlan_pcp:2
-udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
-tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
-udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
-cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
-actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
-ipv6,actions=set_field:fe80:0123:4567:890a:a6ba:dbff:fefe:59fa->ipv6_src
-sctp actions=set_field:3334->sctp_src
-sctp actions=set_field:4445->sctp_dst
-tcp actions=mod_tp_dst:1234
-udp actions=mod_tp_src:1111
-ip actions=mod_nw_src:10.1.1.2,mod_nw_dst:192.168.10.1,mod_nw_ttl:1,mod_nw_tos:16,mod_nw_ecn:2
-in_port=0 actions=mod_dl_src:11:22:33:44:55:66,mod_dl_dst:10:20:30:40:50:60
-in_port=0 actions=resubmit:0
-actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
-actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789)
-]])
-
-AT_CHECK([ovs-ofctl --protocols OpenFlow12 parse-flows flows.txt
-], [0], [stdout])
-AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
-[[usable protocols: NXM,OXM
-chosen protocol: OXM-OpenFlow12
-OFPT_FLOW_MOD (OF1.2): ADD tcp,tp_src=0x20/0x20 actions=FLOOD
-OFPT_FLOW_MOD (OF1.2): ADD tcp,tp_src=0x4c0/0x7c0 actions=FLOOD
-OFPT_FLOW_MOD (OF1.2): ADD tcp,tp_src=123 actions=FLOOD
-OFPT_FLOW_MOD (OF1.2): ADD in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=set_field:4103->vlan_vid,set_field:2->vlan_pcp
-OFPT_FLOW_MOD (OF1.2): ADD udp,dl_vlan_pcp=7 idle:5 actions=pop_vlan,output:0
-OFPT_FLOW_MOD (OF1.2): ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
-OFPT_FLOW_MOD (OF1.2): ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
-OFPT_FLOW_MOD (OF1.2): ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
-OFPT_FLOW_MOD (OF1.2): ADD actions=note:41.42.43.00.00.00,note:00.01.02.03.04.05.06.07.00.00.00.00.00.00,note:00.00.00.00.00.00
-OFPT_FLOW_MOD (OF1.2): ADD ipv6 actions=set_field:fe80:123:4567:890a:a6ba:dbff:fefe:59fa->ipv6_src
-OFPT_FLOW_MOD (OF1.2): ADD sctp actions=set_field:3334->sctp_src
-OFPT_FLOW_MOD (OF1.2): ADD sctp actions=set_field:4445->sctp_dst
-OFPT_FLOW_MOD (OF1.2): ADD tcp actions=set_field:1234->tcp_dst
-OFPT_FLOW_MOD (OF1.2): ADD udp actions=set_field:1111->udp_src
-OFPT_FLOW_MOD (OF1.2): ADD ip actions=set_field:10.1.1.2->ip_src,set_field:192.168.10.1->ip_dst,mod_nw_ttl:1,set_field:4->ip_dscp,set_field:2->nw_ecn
-OFPT_FLOW_MOD (OF1.2): ADD in_port=0 actions=set_field:11:22:33:44:55:66->eth_src,set_field:10:20:30:40:50:60->eth_dst
-OFPT_FLOW_MOD (OF1.2): ADD in_port=0 actions=resubmit:0
-OFPT_FLOW_MOD (OF1.2): ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
-OFPT_FLOW_MOD (OF1.2): ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789)
-]])
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl parse-flow with invalid mask])
-for test_case in \
-    'tun_tos 1/1' \
-    'tun_ttl 1/1' \
-    'skb_priority 1/1' \
-    'eth_type 0x1234/0x1' \
-    'dl_vlan 9/0x1' \
-    'dl_vlan_pcp 6/0x1' \
-    'vlan_pcp 5/0x1' \
-    'mpls mpls_label 5/0x1' \
-    'mpls mpls_tc 1/0x1' \
-    'mpls mpls_bos 1/0x1' \
-    'ip nw_proto 1/1' \
-    'ipv6 nw_proto 1/1' \
-    'ip nw_tos 0xf0/0xf0' \
-    'ipv6 nw_tos 0xf0/0xf0' \
-    'ip ip_dscp 0x3c/0xf0' \
-    'ipv6 ip_dscp 0x3c/0xf0' \
-    'ip nw_ecn 1/1' \
-    'ipv6 nw_ecn 1/1' \
-    'ip nw_ttl 5/1' \
-    'ipv6 nw_ttl 5/1' \
-    'arp arp_op 0/1' \
-    'icmp icmp_type 1/1' \
-    'icmp icmp_code 2/1' \
-    'icmp6 icmpv6_code 2/1'
-do
-    set $test_case
-    if test $# = 3; then
-        prereq=$1, field=$2 value=$3
-    else
-        prereq= field=$1 value=$2
-    fi
-    AT_CHECK_UNQUOTED([ovs-ofctl parse-flow "$prereq$field=$value,actions=drop"], [1], [],
-[ovs-ofctl: $value: invalid mask for field $field
-])
-done
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl action inconsistency (OpenFlow 1.1)])
-OVS_VSWITCHD_START
-add_of_ports br0 1 2 3
-AT_CHECK([ovs-ofctl --protocols OpenFlow11 add-flow br0 'ip actions=mod_tp_dst:1234'
-], [1], [stdout], [ovs-ofctl: none of the usable flow formats (OpenFlow10,NXM) is among the allowed flow formats (OpenFlow11)
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl parse-flows (skb_priority)])
-AT_DATA([flows.txt], [[
-skb_priority=0x12341234,tcp,tp_src=123,actions=flood
-]])
-
-AT_CHECK([ovs-ofctl parse-flows flows.txt
-], [1], [dnl
-], [stderr])
-
-AT_CLEANUP
-
-
-AT_SETUP([ovs-ofctl parse-flows (NXM)])
-AT_DATA([flows.txt], [[
-# comment
-tcp,tp_src=123,actions=flood
-in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
-pkt_mark=0xbb,actions=set_field:0xaa->pkt_mark
-udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
-tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
-udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
-cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
-actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
-tcp,tp_src=0x1230/0xfff0,tun_id=0x1234,cookie=0x5678,actions=flood
-actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel:0x123456789
-actions=multipath(eth_src, 50, hrw, 12, 0, NXM_NX_REG0[0..3]),multipath(symmetric_l4, 1024, iter_hash, 5000, 5050, reg0[0..12])
-actions=multipath(eth_src, 50, hrw, 12, 0, NXM_NX_REG0[0..3]),multipath(symmetric_l3, 1024, iter_hash, 5000, 5050, reg0[0..12])
-table=1,actions=drop
-tun_id=0x1234000056780000/0xffff0000ffff0000,actions=drop
-metadata=0x1234ffff5678ffff/0xffff0000ffff0000,actions=drop
-actions=bundle(eth_src,50,active_backup,ofport,slaves:1)
-actions=bundle(symmetric_l4,60,hrw,ofport,slaves:2,3)
-actions=bundle(symmetric_l4,60,hrw,ofport,slaves:)
-actions=bundle(symmetric_l3,60,hrw,ofport,slaves:2,3)
-actions=bundle(symmetric_l3,60,hrw,ofport,slaves:)
-actions=output:1,bundle(eth_src,0,hrw,ofport,slaves:1),output:2
-actions=bundle_load(eth_src,50,active_backup,ofport,reg0,slaves:1)
-actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
-actions=bundle_load(symmetric_l4,60,hrw,ofport,reg0[0..15],slaves:[2,3])
-actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
-actions=bundle_load(symmetric_l3,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
-actions=bundle_load(symmetric_l3,60,hrw,ofport,reg0[0..15],slaves:[2,3])
-actions=bundle_load(symmetric_l3,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
-actions=output:1,bundle_load(eth_src,0,hrw,ofport,NXM_NX_REG0[16..31],slaves:1),output:2
-actions=resubmit:1,resubmit(2),resubmit(,3),resubmit(2,3)
-send_flow_rem,actions=output:1,output:NXM_NX_REG0,output:2,output:reg1[16..31],output:3
-check_overlap,actions=output:1,exit,output:2
-tcp,actions=fin_timeout(idle_timeout=5,hard_timeout=15)
-actions=controller(max_len=123,reason=invalid_ttl,id=555)
-actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
-actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789)
-ip,actions=ct(commit,zone=5)
-ip,actions=ct(commit,exec(load(1->NXM_NX_CT_MARK[])))
-ip,actions=ct(commit,exec(load(0x1->NXM_NX_CT_LABEL[])))
-ip,actions=ct(commit,exec(load(0x1234567890ABCDEF->NXM_NX_CT_LABEL[32..95])))
-ip,actions=ct(commit,exec(load(1->ct_mark)))
-ip,actions=ct(commit,exec(load(0x1->ct_label[])))
-ip,actions=ct(commit,exec(load(0x1234567890ABCDEF->ct_label[32..95])))
-ip,actions=ct(commit,exec(set_field(0x1->ct_label)))
-ip,ct_state=+trk,ct_label=0x1234567890abcdef12345678,actions=ct(commit)
-actions=output(max_len=100,port=123)
-actions=output(port=100,max_len=123)
-actions=output(port=LOCAL,max_len=123)
-actions=output(port=IN_PORT,max_len=123)
-]])
-
-AT_CHECK([ovs-ofctl parse-flows flows.txt
-], [0], [stdout])
-AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
-[[usable protocols: OXM,NXM+table_id
-chosen protocol: NXM+table_id
-NXT_FLOW_MOD: ADD table:255 tcp,tp_src=123 actions=FLOOD
-NXT_FLOW_MOD: ADD table:255 in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
-NXT_FLOW_MOD: ADD table:255 pkt_mark=0xbb actions=load:0xaa->NXM_NX_PKT_MARK[]
-NXT_FLOW_MOD: ADD table:255 udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
-NXT_FLOW_MOD: ADD table:255 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
-NXT_FLOW_MOD: ADD table:255 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
-NXT_FLOW_MOD: ADD table:255 priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
-NXT_FLOW_MOD: ADD table:255 actions=note:41.42.43.00.00.00,note:00.01.02.03.04.05.06.07.00.00.00.00.00.00,note:00.00.00.00.00.00
-NXT_FLOW_MOD: ADD table:255 tcp,tun_id=0x1234,tp_src=0x1230/0xfff0 cookie:0x5678 actions=FLOOD
-NXT_FLOW_MOD: ADD table:255 actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel64:0x123456789
-NXT_FLOW_MOD: ADD table:255 actions=multipath(eth_src,50,hrw,12,0,NXM_NX_REG0[0..3]),multipath(symmetric_l4,1024,iter_hash,5000,5050,NXM_NX_REG0[0..12])
-NXT_FLOW_MOD: ADD table:255 actions=multipath(eth_src,50,hrw,12,0,NXM_NX_REG0[0..3]),multipath(symmetric_l3,1024,iter_hash,5000,5050,NXM_NX_REG0[0..12])
-NXT_FLOW_MOD: ADD table:1 actions=drop
-NXT_FLOW_MOD: ADD table:255 tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop
-NXT_FLOW_MOD: ADD table:255 metadata=0x1234000056780000/0xffff0000ffff0000 actions=drop
-NXT_FLOW_MOD: ADD table:255 actions=bundle(eth_src,50,active_backup,ofport,slaves:1)
-NXT_FLOW_MOD: ADD table:255 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:2,3)
-NXT_FLOW_MOD: ADD table:255 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:)
-NXT_FLOW_MOD: ADD table:255 actions=bundle(symmetric_l3,60,hrw,ofport,slaves:2,3)
-NXT_FLOW_MOD: ADD table:255 actions=bundle(symmetric_l3,60,hrw,ofport,slaves:)
-NXT_FLOW_MOD: ADD table:255 actions=output:1,bundle(eth_src,0,hrw,ofport,slaves:1),output:2
-NXT_FLOW_MOD: ADD table:255 actions=bundle_load(eth_src,50,active_backup,ofport,NXM_NX_REG0[],slaves:1)
-NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
-NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
-NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
-NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l3,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
-NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l3,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
-NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l3,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
-NXT_FLOW_MOD: ADD table:255 actions=output:1,bundle_load(eth_src,0,hrw,ofport,NXM_NX_REG0[16..31],slaves:1),output:2
-NXT_FLOW_MOD: ADD table:255 actions=resubmit:1,resubmit:2,resubmit(,3),resubmit(2,3)
-NXT_FLOW_MOD: ADD table:255 send_flow_rem actions=output:1,output:NXM_NX_REG0[],output:2,output:NXM_NX_REG1[16..31],output:3
-NXT_FLOW_MOD: ADD table:255 check_overlap actions=output:1,exit,output:2
-NXT_FLOW_MOD: ADD table:255 tcp actions=fin_timeout(idle_timeout=5,hard_timeout=15)
-NXT_FLOW_MOD: ADD table:255 actions=controller(reason=invalid_ttl,max_len=123,id=555)
-NXT_FLOW_MOD: ADD table:255 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
-NXT_FLOW_MOD: ADD table:255 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789)
-NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,zone=5)
-NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_MARK[]))
-NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_LABEL[0..63],load:0->NXM_NX_CT_LABEL[64..127]))
-NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1234567890abcdef->NXM_NX_CT_LABEL[32..95]))
-NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_MARK[]))
-NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_LABEL[0..63],load:0->NXM_NX_CT_LABEL[64..127]))
-NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1234567890abcdef->NXM_NX_CT_LABEL[32..95]))
-NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_LABEL[0..63],load:0->NXM_NX_CT_LABEL[64..127]))
-NXT_FLOW_MOD: ADD table:255 ct_state=+trk,ct_label=0x1234567890abcdef12345678,ip actions=ct(commit)
-NXT_FLOW_MOD: ADD table:255 actions=output(port=123,max_len=100)
-NXT_FLOW_MOD: ADD table:255 actions=output(port=100,max_len=123)
-NXT_FLOW_MOD: ADD table:255 actions=output(port=LOCAL,max_len=123)
-NXT_FLOW_MOD: ADD table:255 actions=output(port=IN_PORT,max_len=123)
-]])
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl -F nxm parse-flows])
-AT_DATA([flows.txt], [
-# comment
-tcp,tp_src=123,actions=flood
-in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
-arp,dl_src=00:0A:E4:25:6B:B0,arp_sha=00:0A:E4:25:6B:B0 actions=drop
-ipv6,ipv6_label=0x12345 actions=2
-ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=3
-ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5/64 actions=4
-ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:5/127 actions=5
-tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop 
-udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop 
-in_port=3 icmp6,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
-udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
-tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
-udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
-icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571 actions=drop
-icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4F:0571/112 actions=drop
-icmp6,icmp_type=135,nd_sll=00:0A:E4:25:6B:B0 actions=drop
-icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571,nd_tll=00:0A:E4:25:6B:B1 actions=drop
-icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE00:0000/96,nd_tll=00:0A:E4:25:6B:B1 actions=drop
-cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
-actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
-tun_id=0x1234,cookie=0x5678,actions=flood
-actions=drop
-tun_id=0x1234000056780000/0xffff0000ffff0000,actions=drop
-dl_dst=01:00:00:00:00:00/01:00:00:00:00:00,actions=drop
-dl_dst=00:00:00:00:00:00/01:00:00:00:00:00,actions=drop
-dl_dst=aa:bb:cc:dd:ee:ff/fe:ff:ff:ff:ff:ff,actions=drop
-dl_dst=aa:bb:cc:dd:ee:ff/00:00:00:00:00:00,actions=drop
-actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
-actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789)
-ip,actions=ct(commit,zone=5)
-ip,actions=ct(commit,exec(load(1->NXM_NX_CT_MARK[[]])))
-ip,actions=ct(commit,exec(load(0x1->NXM_NX_CT_LABEL[[]])))
-])
-AT_CHECK([ovs-ofctl -F nxm parse-flows flows.txt], [0], [stdout])
-
-# The substitution for fec0:0: is because some libcs (e.g. MUSL)
-# abbreviate a single zero and others (e.g. glibc) don't.
-AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//
-s/fec0:0:/fec0::/g' stdout]], [0], [dnl
-usable protocols: NXM,OXM
-chosen protocol: NXM-table_id
-NXT_FLOW_MOD: ADD tcp,tp_src=123 actions=FLOOD
-NXT_FLOW_MOD: ADD in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
-NXT_FLOW_MOD: ADD arp,dl_src=00:0a:e4:25:6b:b0,arp_sha=00:0a:e4:25:6b:b0 actions=drop
-NXT_FLOW_MOD: ADD ipv6,ipv6_label=0x12345 actions=output:2
-NXT_FLOW_MOD: ADD ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output:3
-NXT_FLOW_MOD: ADD ipv6,ipv6_src=2001:db8:3c4d:1::/64 actions=output:4
-NXT_FLOW_MOD: ADD ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:4/127 actions=output:5
-NXT_FLOW_MOD: ADD tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
-NXT_FLOW_MOD: ADD udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
-NXT_FLOW_MOD: ADD icmp6,in_port=3,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
-NXT_FLOW_MOD: ADD udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
-NXT_FLOW_MOD: ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
-NXT_FLOW_MOD: ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
-NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_target=fec0::1234:f045:8fff:1111:fe4e:571 actions=drop
-NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_target=fec0::1234:f045:8fff:1111:fe4f:0/112 actions=drop
-NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_sll=00:0a:e4:25:6b:b0 actions=drop
-NXT_FLOW_MOD: ADD icmp6,icmp_type=136,nd_target=fec0::1234:f045:8fff:1111:fe4e:571,nd_tll=00:0a:e4:25:6b:b1 actions=drop
-NXT_FLOW_MOD: ADD icmp6,icmp_type=136,nd_target=fec0::1234:f045:8fff:1111::/96,nd_tll=00:0a:e4:25:6b:b1 actions=drop
-NXT_FLOW_MOD: ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
-NXT_FLOW_MOD: ADD actions=note:41.42.43.00.00.00,note:00.01.02.03.04.05.06.07.00.00.00.00.00.00,note:00.00.00.00.00.00
-NXT_FLOW_MOD: ADD tun_id=0x1234 cookie:0x5678 actions=FLOOD
-NXT_FLOW_MOD: ADD actions=drop
-NXT_FLOW_MOD: ADD tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop
-NXT_FLOW_MOD: ADD dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=drop
-NXT_FLOW_MOD: ADD dl_dst=00:00:00:00:00:00/01:00:00:00:00:00 actions=drop
-NXT_FLOW_MOD: ADD dl_dst=aa:bb:cc:dd:ee:ff/fe:ff:ff:ff:ff:ff actions=drop
-NXT_FLOW_MOD: ADD actions=drop
-NXT_FLOW_MOD: ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
-NXT_FLOW_MOD: ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789)
-NXT_FLOW_MOD: ADD ip actions=ct(commit,zone=5)
-NXT_FLOW_MOD: ADD ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_MARK[[]]))
-NXT_FLOW_MOD: ADD ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_LABEL[[0..63]],load:0->NXM_NX_CT_LABEL[[64..127]]))
-])
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl -F nxm -mmm parse-flows])
-AT_DATA([flows.txt], [[
-# comment
-tcp,tp_src=123,actions=flood
-in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
-arp,dl_src=00:0A:E4:25:6B:B0,arp_sha=00:0A:E4:25:6B:B0 actions=drop
-ipv6,ipv6_label=0x12345 actions=2
-ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=3
-ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5/64 actions=4
-ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:5/127 actions=5
-tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
-udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
-sctp6,ipv6_src=2001:db8:3c4d:1::5,tp_dst=309 actions=drop
-in_port=3 icmp6,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
-udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
-tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
-udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
-sctp,nw_src=192.168.0.3,tp_dst=309 actions=pop_queue,output:1
-icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571 actions=drop
-icmp6,icmp_type=135,nd_sll=00:0A:E4:25:6B:B0 actions=drop
-icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571,nd_tll=00:0A:E4:25:6B:B1 actions=drop
-cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
-actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
-tun_id=0x1234,cookie=0x5678,actions=flood
-actions=drop
-reg0=123,actions=move:reg0[0..5]->reg1[26..31],load:55->reg2,move:reg0->tun_id[0..31],move:reg0[0..15]->vlan_tci
-actions=move:OXM_OF_ETH_DST[]->OXM_OF_ETH_SRC[]
-actions=push:reg0[0..31],pop:NXM_NX_REG0[]
-reg0=123,actions=move:reg0[0..5]->reg1[26..31],load:55->reg2,move:reg0->tun_id[0..31],move:reg0[0..15]->vlan_tci
-actions=move:eth_dst->eth_src[]
-actions=push:reg0[0..31],pop:reg0
-vlan_tci=0x1123/0x1fff,actions=drop
-actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
-actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789)
-ip,actions=ct(commit,zone=5)
-ip,actions=ct(commit,exec(load(1->NXM_NX_CT_MARK[])))
-ip,actions=ct(commit,exec(load(1->NXM_NX_CT_LABEL[])))
-ip,actions=ct(commit,exec(set_field(1->ct_label)))
-]])
-AT_CHECK([ovs-ofctl -F nxm -mmm parse-flows flows.txt], [0], [stdout], [stderr])
-AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
-[[usable protocols: NXM,OXM
-chosen protocol: NXM-table_id
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(007b) actions=FLOOD
-NXT_FLOW_MOD: ADD NXM_OF_IN_PORT(fffe), NXM_OF_ETH_SRC(000ae4256bb0), NXM_OF_VLAN_TCI_W(1009/1fff) actions=drop
-NXT_FLOW_MOD: ADD NXM_OF_ETH_SRC(000ae4256bb0), NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_SHA(000ae4256bb0) actions=drop
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_LABEL(00012345) actions=output:2
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005) actions=output:3
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000) actions=output:4
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST_W(20010db83c4d00010002000300040004/fffffffffffffffffffffffffffffffe) actions=output:5
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010000000000000001), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(0050) actions=drop
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010000000000000003), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(0035) actions=drop
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010000000000000005), NXM_OF_IP_PROTO(84), OXM_OF_SCTP_DST(0135) actions=drop
-NXT_FLOW_MOD: ADD NXM_OF_IN_PORT(0003), NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010000000000000001), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(86) actions=drop
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_VLAN_TCI_W(f000/f000), NXM_OF_IP_PROTO(11) idle:5 actions=strip_vlan,output:0
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(c0a80003), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(0050) actions=set_queue:37,output:1
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(c0a80003), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(0035) actions=pop_queue,output:1
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(c0a80003), NXM_OF_IP_PROTO(84), OXM_OF_SCTP_DST(0135) actions=pop_queue,output:1
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET(fec000001234f0458fff1111fe4e0571) actions=drop
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_SLL(000ae4256bb0) actions=drop
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(88), NXM_NX_ND_TARGET(fec000001234f0458fff1111fe4e0571), NXM_NX_ND_TLL(000ae4256bb1) actions=drop
-NXT_FLOW_MOD: ADD <any> cookie:0x123456789abcdef hard:10 pri:60000 actions=CONTROLLER:65535
-NXT_FLOW_MOD: ADD <any> actions=note:41.42.43.00.00.00,note:00.01.02.03.04.05.06.07.00.00.00.00.00.00,note:00.00.00.00.00.00
-NXT_FLOW_MOD: ADD NXM_NX_TUN_ID(0000000000001234) cookie:0x5678 actions=FLOOD
-NXT_FLOW_MOD: ADD <any> actions=drop
-NXT_FLOW_MOD: ADD NXM_NX_REG0(0000007b) actions=move:NXM_NX_REG0[0..5]->NXM_NX_REG1[26..31],load:0x37->NXM_NX_REG2[],move:NXM_NX_REG0[]->NXM_NX_TUN_ID[0..31],move:NXM_NX_REG0[0..15]->NXM_OF_VLAN_TCI[]
-NXT_FLOW_MOD: ADD <any> actions=move:NXM_OF_ETH_DST[]->NXM_OF_ETH_SRC[]
-NXT_FLOW_MOD: ADD <any> actions=push:NXM_NX_REG0[],pop:NXM_NX_REG0[]
-NXT_FLOW_MOD: ADD NXM_NX_REG0(0000007b) actions=move:NXM_NX_REG0[0..5]->NXM_NX_REG1[26..31],load:0x37->NXM_NX_REG2[],move:NXM_NX_REG0[]->NXM_NX_TUN_ID[0..31],move:NXM_NX_REG0[0..15]->NXM_OF_VLAN_TCI[]
-NXT_FLOW_MOD: ADD <any> actions=move:NXM_OF_ETH_DST[]->NXM_OF_ETH_SRC[]
-NXT_FLOW_MOD: ADD <any> actions=push:NXM_NX_REG0[],pop:NXM_NX_REG0[]
-NXT_FLOW_MOD: ADD NXM_OF_VLAN_TCI_W(1123/1fff) actions=drop
-NXT_FLOW_MOD: ADD <any> actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
-NXT_FLOW_MOD: ADD <any> actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678,sampling_port=56789)
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800) actions=ct(commit,zone=5)
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800) actions=ct(commit,exec(load:0x1->NXM_NX_CT_MARK[]))
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800) actions=ct(commit,exec(load:0x1->NXM_NX_CT_LABEL[0..63],load:0->NXM_NX_CT_LABEL[64..127]))
-NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800) actions=ct(commit,exec(load:0x1->NXM_NX_CT_LABEL[0..63],load:0->NXM_NX_CT_LABEL[64..127]))
-]])
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl parse-nx-match])
-AT_KEYWORDS([nx-match])
-AT_DATA([nx-match.txt], [dnl
-<any>
-
-# in port
-NXM_OF_IN_PORT(0000)
-NXM_OF_IN_PORT(fffe)
-
-# eth dst
-NXM_OF_ETH_DST(0002e30f80a4)
-NXM_OF_ETH_DST_W(010000000000/010000000000)
-NXM_OF_ETH_DST_W(000000000000/010000000000)
-NXM_OF_ETH_DST_W(ffffffffffff/010000000000)
-NXM_OF_ETH_DST_W(0002e30f80a4/ffffffffffff)
-NXM_OF_ETH_DST_W(60175619848f/000000000000)
-NXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
-NXM_OF_ETH_DST_W(60175619848f/5a5a5a5a5a5a)
-
-# eth src
-NXM_OF_ETH_SRC(020898456ddb)
-NXM_OF_ETH_SRC_W(012345abcdef/ffffff555555)
-NXM_OF_ETH_SRC_W(020898456ddb/ffffffffffff)
-NXM_OF_ETH_SRC_W(020898456ddb/000000000000)
-
-# eth type
-NXM_OF_ETH_TYPE(0800)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IN_PORT(0012)
-
-# vlan tci
-NXM_OF_VLAN_TCI(f009)
-NXM_OF_VLAN_TCI(f009) NXM_OF_VLAN_TCI(f009)
-NXM_OF_VLAN_TCI(0000)           # Packets without 802.1Q header.
-NXM_OF_VLAN_TCI(3123)           # Packets with VID=123, PCP=1.
-NXM_OF_VLAN_TCI(0123)           # Does not make sense (but supported anyway)
-NXM_OF_VLAN_TCI_W(1123/1fff)    # Packets with VID=123, any PCP.
-NXM_OF_VLAN_TCI_W(1123/ffff)    # Packets with VID=123, PCP=0
-NXM_OF_VLAN_TCI_W(1123/0000)    # Packets with or without 802.1Q header
-NXM_OF_VLAN_TCI_W(f000/f000)    # Packets with any VID, PCP=7.
-NXM_OF_VLAN_TCI_W(0000/e000)    # No 802.1Q or with VID=0
-
-# IP TOS
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_TOS(f0)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_TOS(41)
-NXM_OF_IP_TOS(f0)
-
-# IP ECN
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_ECN(03)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_ECN(06)
-NXM_NX_IP_ECN(03)
-
-# IP protocol
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(05)
-NXM_OF_IP_PROTO(05)
-
-# IP TTL
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_TTL(80)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_TTL(ff)
-NXM_NX_IP_TTL(80)
-
-# IP source
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC(ac100014)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC_W(C0a80000/FFFF0000)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC_W(C0a80000/5a5a5a5a)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC_W(C0a80000/ffffffff)
-NXM_OF_ETH_TYPE(0806) NXM_OF_IP_SRC(ac100014)
-NXM_OF_IP_SRC_W(C0D80000/FFFF0000)
-
-# IP destination
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST(ac100014)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST_W(C0a88012/FFFF0000)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST_W(C0a80000/5a5a5a5a)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST_W(C0a80000/ffffffff)
-NXM_OF_IP_DST(ac100014)
-NXM_OF_ETH_TYPE(0806) NXM_OF_IP_DST_W(C0D80000/FFFF0000)
-
-# TCP source port
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC(4231)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC_W(5050/F0F0)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC_W(5050/ffff)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_OF_TCP_SRC(4231)
-
-# TCP destination port
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST(4231)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST_W(FDE0/FFF0)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST_W(FDE0/ffff)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_OF_TCP_DST(4231)
-
-# TCP flags
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_NX_TCP_FLAGS(0131)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_NX_TCP_FLAGS_W(00F0/0FF0)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_NX_TCP_FLAGS_W(01E2/ffff)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_NX_TCP_FLAGS(0fff)
-
-# UDP source port
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC(8732)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC_W(0132/01FF)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC_W(0132/ffff)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_UDP_SRC(7823)
-
-# UDP destination port
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST(1782)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST_W(5005/F00F)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST_W(5005/FFFF)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(02) NXM_OF_UDP_DST(1293)
-
-# ICMP type
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01) NXM_OF_ICMP_TYPE(12)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(00) NXM_OF_ICMP_TYPE(10)
-
-# ICMP code
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01) NXM_OF_ICMP_CODE(12)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(00) NXM_OF_ICMP_CODE(10)
-NXM_OF_ETH_TYPE(0800) NXM_OF_ICMP_CODE(10)
-NXM_OF_ICMP_CODE(00)
-
-# ARP opcode
-NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(0001)
-NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(1111)
-NXM_OF_ETH_TYPE(0000) NXM_OF_ARP_OP(0001)
-NXM_OF_ARP_OP(0001)
-NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(0001) NXM_OF_ARP_OP(0001)
-
-# ARP source protocol address
-NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA(ac100014)
-NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA_W(C0a81234/FFFFFF00)
-NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA_W(C0a81234/aaaaaa00)
-NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA_W(C0a81234/ffffffff)
-NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_SPA(ac100014)
-NXM_OF_ARP_SPA_W(C0D80000/FFFF0000)
-
-# ARP destination protocol address
-NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA(ac100014)
-NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA_W(C0a812fe/FFFFFF00)
-NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA_W(C0a81234/77777777)
-NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA_W(C0a81234/ffffffff)
-NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_TPA(ac100014)
-NXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
-
-# ARP source hardware address
-NXM_OF_ETH_TYPE(0806) NXM_NX_ARP_SHA(0002e30f80a4)
-NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_SHA(0002e30f80a4)
-NXM_NX_ARP_SHA(0002e30f80a4)
-
-# ARP destination hardware address
-NXM_OF_ETH_TYPE(0806) NXM_NX_ARP_THA(0002e30f80a4)
-NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_THA(0002e30f80a4)
-NXM_NX_ARP_THA(0002e30f80a4)
-
-# RARP opcode
-NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_OP(0003)
-NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_OP(1111)
-NXM_OF_ETH_TYPE(0000) NXM_OF_ARP_OP(0003)
-NXM_OF_ARP_OP(0003)
-NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_OP(0003) NXM_OF_ARP_OP(0003)
-
-# RARP source protocol address
-NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_SPA(ac100014)
-NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_SPA_W(C0a81200/FFFFFF00)
-NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_SPA_W(C0a81234/aaaaaa00)
-NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_SPA_W(C0a81234/ffffffff)
-NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_SPA(ac100014)
-NXM_OF_ARP_SPA_W(C0D80000/FFFF0000)
-
-# RARP destination protocol address
-NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_TPA(ac100014)
-NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_TPA_W(C0a81200/FFFFFF00)
-NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_TPA_W(C0a81234/77777777)
-NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_TPA_W(C0a81234/ffffffff)
-NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_TPA(ac100014)
-NXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
-
-# RARP source hardware address
-NXM_OF_ETH_TYPE(8035) NXM_NX_ARP_SHA(0002e30f80a4)
-NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_SHA(0002e30f80a4)
-NXM_NX_ARP_SHA(0002e30f80a4)
-
-# RARP destination hardware address
-NXM_OF_ETH_TYPE(8035) NXM_NX_ARP_THA(0002e30f80a4)
-NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_THA(0002e30f80a4)
-NXM_NX_ARP_THA(0002e30f80a4)
-
-# IPv6 source
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/5a5a5a5a5a5a5a5a0000000000000000)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffffffffffffffffffff)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/00000000000000000000000000000000)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffffffff000000000000)
-
-# IPv6 destination
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/77777777777777777777777777777777)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffffffffffffffffffff)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST_W(00000000000000000000000000000000/00000000000000000000000000000000)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
-
-# IPv6 Flow Label
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_LABEL(1000000f)
-NXM_NX_IPV6_LABEL(0000000f)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_LABEL(0000000f)
-
-# ND target address
-NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
-NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
-NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/0123456789abcdeffedcba9876543210)
-NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/ffffffffffffffffffffffffffffffff)
-NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET_W(00000000000000000000000000000000/00000000000000000000000000000000)
-NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/fedcba98765432100123456789abcdef)
-
-# ND source hardware address
-NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_SLL(0002e30f80a4)
-NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_SLL(0002e30f80a4)
-NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3b) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_SLL(0002e30f80a4)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_SLL(0002e30f80a4)
-
-# ND destination hardware address
-NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_TLL(0002e30f80a4)
-NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_TLL(0002e30f80a4)
-NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3b) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_TLL(0002e30f80a4)
-NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_TLL(0002e30f80a4)
-
-# IPv4 fragments.
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(00)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(01)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(02)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(03)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/03)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/fd)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/02)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(01/01)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(02/02)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(03/03)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(03/ff)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(03/00)
-NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(f3)
-
-# IPv6 fragments.
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(00)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(01)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(02)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(03)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/03)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/01)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/02)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(01/01)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(02/02)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(03/03)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(03/00)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(03/ff)
-NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(f3)
-
-# Flow cookie.
-NXM_NX_COOKIE(00000000abcdef01)
-NXM_NX_COOKIE_W(84200000abcdef01/84200000FFFFFFFF)
-NXM_NX_COOKIE_W(84200000abcdef01/ffffffffffffffff)
-NXM_NX_COOKIE_W(0000000000000000/0000000000000000)
-
-# Tunnel ID.
-NXM_NX_TUN_ID(00000000abcdef01)
-NXM_NX_TUN_ID_W(84200000abcdef01/84200000FFFFFFFF)
-NXM_NX_TUN_ID_W(84200000abcdef01/FFFFFFFFFFFFFFFF)
-NXM_NX_TUN_ID_W(0000000000000000/0000000000000000)
-
-# Register 0.
-NXM_NX_REG0(acebdf56)
-NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
-NXM_NX_REG0_W(a0e0d050/ffffffff)
-NXM_NX_REG0_W(00000000/00000000)
-
-# Connection tracking fields,
-NXM_OF_ETH_TYPE(0800) NXM_NX_CT_STATE(00000020)
-NXM_OF_ETH_TYPE(0800) NXM_NX_CT_STATE(00001080)
-NXM_OF_ETH_TYPE(0800) NXM_NX_CT_STATE_W(00000020/00000020)
-NXM_OF_ETH_TYPE(0800) NXM_NX_CT_STATE_W(00000020/000000F0)
-NXM_OF_ETH_TYPE(0800) NXM_NX_CT_ZONE(5a5a)
-NXM_OF_ETH_TYPE(0800) NXM_NX_CT_MARK(5a5a5a5a)
-NXM_OF_ETH_TYPE(0800) NXM_NX_CT_MARK_W(5a5a5a5a/fefefefe)
-NXM_OF_ETH_TYPE(0800) NXM_NX_CT_LABEL(1234567890abcdef1234567890abcdef)
-NXM_OF_ETH_TYPE(0800) NXM_NX_CT_LABEL_W(10203040506070809000a0b0c0d0e0f0/f1f2f3f4f5f6f7f8f9f0fafbfcfdfeff)
-
-# dp_hash (testing experimenter OXM).
-NXM_NX_DP_HASH(01234567)
-NXOXM_ET_DP_HASH(01234567)
-
-# ERSPAN (testing experimenter OXM).
-NXOXM_ET_ERSPAN_VER(01)
-NXOXM_ET_ERSPAN_IDX(01020304)
-NXOXM_ET_ERSPAN_DIR(01)
-NXOXM_ET_ERSPAN_HWID(12)
-
-# Invalid field number.
-01020304(1111/3333)
-
-# Invalid field numbers (experimenter OXM).
-ffff020800002320(11112222)
-ffff030800002320(1111/3333)
-])
-AT_CHECK([ovs-ofctl -vPATTERN:'console:%c|%p|%m' --strict parse-nx-match < nx-match.txt], [0], [dnl
-<any>
-
-# in port
-NXM_OF_IN_PORT(0000)
-NXM_OF_IN_PORT(fffe)
-
-# eth dst
-NXM_OF_ETH_DST(0002e30f80a4)
-NXM_OF_ETH_DST_W(010000000000/010000000000)
-NXM_OF_ETH_DST_W(000000000000/010000000000)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-NXM_OF_ETH_DST(0002e30f80a4)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-NXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-
-# eth src
-NXM_OF_ETH_SRC(020898456ddb)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-NXM_OF_ETH_SRC(020898456ddb)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-
-# eth type
-NXM_OF_ETH_TYPE(0800)
-NXM_OF_IN_PORT(0012), NXM_OF_ETH_TYPE(0800) 
-
-# vlan tci
-NXM_OF_VLAN_TCI(f009)
-nx_pull_match() returned error OFPBMC_DUP_FIELD
-NXM_OF_VLAN_TCI(0000)
-NXM_OF_VLAN_TCI(3123)
-NXM_OF_VLAN_TCI(0123)
-NXM_OF_VLAN_TCI_W(1123/1fff)
-NXM_OF_VLAN_TCI(1123)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-NXM_OF_VLAN_TCI_W(f000/f000)
-NXM_OF_VLAN_TCI_W(0000/e000)
-
-# IP TOS
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_TOS(f0)
-nx_pull_match() returned error OFPBMC_BAD_VALUE
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IP ECN
-NXM_OF_ETH_TYPE(0800), NXM_NX_IP_ECN(03)
-nx_pull_match() returned error OFPBMC_BAD_VALUE
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IP protocol
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01)
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(05)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IP TTL
-NXM_OF_ETH_TYPE(0800), NXM_NX_IP_TTL(80)
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_TTL(ff)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IP source
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(ac100014)
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC_W(c0a80000/ffff0000)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(c0a80000)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IP destination
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST(ac100014)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST(c0a80000)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# TCP source port
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(4231)
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC_W(5050/f0f0)
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(5050)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# TCP destination port
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(4231)
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST_W(fde0/fff0)
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(fde0)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# TCP flags
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS(0131)
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS_W(00f0/0ff0)
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS(01e2)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# UDP source port
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC(8732)
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC_W(0132/01ff)
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC(0132)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# UDP destination port
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(1782)
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST_W(5005/f00f)
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(5005)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# ICMP type
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01), NXM_OF_ICMP_TYPE(12)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# ICMP code
-NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01), NXM_OF_ICMP_CODE(12)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# ARP opcode
-NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_OP(0001)
-nx_pull_match() returned error OFPBMC_BAD_VALUE
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_DUP_FIELD
-
-# ARP source protocol address
-NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA(ac100014)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA(c0a81234)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# ARP destination protocol address
-NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA(ac100014)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA(c0a81234)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# ARP source hardware address
-NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_SHA(0002e30f80a4)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# ARP destination hardware address
-NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_THA(0002e30f80a4)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# RARP opcode
-NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_OP(0003)
-nx_pull_match() returned error OFPBMC_BAD_VALUE
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_DUP_FIELD
-
-# RARP source protocol address
-NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_SPA(ac100014)
-NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_SPA_W(c0a81200/ffffff00)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_SPA(c0a81234)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# RARP destination protocol address
-NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_TPA(ac100014)
-NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_TPA_W(c0a81200/ffffff00)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_TPA(c0a81234)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# RARP source hardware address
-NXM_OF_ETH_TYPE(8035), NXM_NX_ARP_SHA(0002e30f80a4)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# RARP destination hardware address
-NXM_OF_ETH_TYPE(8035), NXM_NX_ARP_THA(0002e30f80a4)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IPv6 source
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010000000000000000)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IPv6 destination
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST(20010db83c4d00010000000000000000)
-NXM_OF_ETH_TYPE(86dd)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IPv6 Flow Label
-nx_pull_match() returned error OFPBMC_BAD_VALUE
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_LABEL(0000000f)
-
-# ND target address
-NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
-NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(88), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
-NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-
-# ND source hardware address
-NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005), NXM_NX_ND_SLL(0002e30f80a4)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# ND destination hardware address
-NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(88), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005), NXM_NX_ND_TLL(0002e30f80a4)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IPv4 fragments.
-NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(00)
-NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(01)
-NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(02)
-NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
-NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(00)
-NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(00/01)
-NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(00/02)
-NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(01/01)
-NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(02/02)
-NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
-NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-nx_pull_match() returned error OFPBMC_BAD_VALUE
-
-# IPv6 fragments.
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(00)
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(01)
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(02)
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(00)
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(00/01)
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(00/02)
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(01/01)
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(02/02)
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
-nx_pull_match() returned error OFPBMC_BAD_VALUE
-
-# Flow cookie.
-NXM_NX_COOKIE(00000000abcdef01)
-NXM_NX_COOKIE_W(84200000abcdef01/84200000ffffffff)
-NXM_NX_COOKIE(84200000abcdef01)
-<any>
-
-# Tunnel ID.
-NXM_NX_TUN_ID(00000000abcdef01)
-NXM_NX_TUN_ID_W(84200000abcdef01/84200000ffffffff)
-NXM_NX_TUN_ID(84200000abcdef01)
-<any>
-
-# Register 0.
-NXM_NX_REG0(acebdf56)
-NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
-NXM_NX_REG0(a0e0d050)
-<any>
-
-# Connection tracking fields,
-dnl
-dnl When re-serialising, bits 8-31 are wildcarded, because current OVS userspace
-dnl doesn't understand (or store) those bits.
-NXM_OF_ETH_TYPE(0800), NXM_NX_CT_STATE_W(00000020/000000ff)
-nx_pull_match() returned error OFPBMC_BAD_VALUE
-NXM_OF_ETH_TYPE(0800), NXM_NX_CT_STATE_W(00000020/00000020)
-NXM_OF_ETH_TYPE(0800), NXM_NX_CT_STATE_W(00000020/000000f0)
-NXM_OF_ETH_TYPE(0800), NXM_NX_CT_ZONE(5a5a)
-NXM_OF_ETH_TYPE(0800), NXM_NX_CT_MARK(5a5a5a5a)
-NXM_OF_ETH_TYPE(0800), NXM_NX_CT_MARK_W(5a5a5a5a/fefefefe)
-NXM_OF_ETH_TYPE(0800), NXM_NX_CT_LABEL(1234567890abcdef1234567890abcdef)
-NXM_OF_ETH_TYPE(0800), NXM_NX_CT_LABEL_W(10203040506070809000a0b0c0d0e0f0/f1f2f3f4f5f6f7f8f9f0fafbfcfdfeff)
-
-# dp_hash (testing experimenter OXM).
-NXM_NX_DP_HASH(01234567)
-NXM_NX_DP_HASH(01234567)
-
-# ERSPAN (testing experimenter OXM).
-NXOXM_ET_ERSPAN_VER_W(01/01)
-NXOXM_ET_ERSPAN_IDX(01020304)
-NXOXM_ET_ERSPAN_DIR_W(01/01)
-NXOXM_ET_ERSPAN_HWID_W(12/12)
-
-# Invalid field number.
-nx_pull_match() returned error OFPBMC_BAD_FIELD
-
-# Invalid field numbers (experimenter OXM).
-nx_pull_match() returned error OFPBMC_BAD_FIELD
-nx_pull_match() returned error OFPBMC_BAD_FIELD
-], [stderr])
-
-# Check that at least the first warning made it.  (It's rate-limited
-# so a variable number could show up, especially under valgrind etc.)
-AT_CHECK([grep '1-bits in value' stderr | sed 1q], [0], [dnl
-nx_match|WARN|Rejecting NXM/OXM entry 0:0:1:1:12 with 1-bits in value for bits wildcarded by the mask.
-])
-
-# Check that there wasn't any other stderr output.
-AT_CHECK([grep -v '1-bits in value' stderr], [1])
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl parse-ofp10-match])
-AT_KEYWORDS([OF1.0])
-AT_DATA([test-data], [dnl
-# in_port=LOCAL
-003820fe fffe xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx xxxx xx xx xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-# dl_src=00:01:02:03:04:05
-003820fb xxxx 000102030405 xxxxxxxxxxxx xxxx xx xx xxxx xx xx xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-# dl_dst=10:20:30:40:50:60
-003820f7 xxxx xxxxxxxxxxxx 102030405060 xxxx xx xx xxxx xx xx xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-# dl_vlan=291
-003820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx 0123 xx xx xxxx xx xx xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-# dl_vlan_pcp=5
-002820ff xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx 05 xx xxxx xx xx xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-# dl_vlan=291,dl_vlan_pcp=4
-002820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx 0123 04 xx xxxx xx xx xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-dnl dl_vlan_pcp doesn't make sense when 802.1Q is not present, so
-dnl OVS ignores it and drops it on output.
-# vlan_tci=0x0000
-#  1: 38 -> 28
-003820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx ffff xx xx xxxx xx xx xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-dnl dl_vlan_pcp doesn't make sense when 802.1Q is not present, so
-dnl OVS ignores it and drops it on output.
-# vlan_tci=0x0000
-# 20: 05 -> 00
-002820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx ffff 05 xx xxxx xx xx xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-dnl Invalid VID and PCP discards out-of-range bits:
-# dl_vlan=256,dl_vlan_pcp=7
-# 18: f1 -> 01
-# 20: ff -> 07
-002820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx f100 ff xx xxxx xx xx xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-# dl_type=0x1234
-003820ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 1234 xx xx xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-# ip,nw_proto=5
-003820cf xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 05 xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-dnl Ignore nw_proto if not IP or ARP:
-# dl_type=0x1234,nw_proto=5
-# normal:  3: cf -> ef
-# normal: 25: 05 -> 00
-& ofp_match|INFO|normalization changed ofp_match, details:
-& ofp_match|INFO| pre: dl_type=0x1234,nw_proto=5
-& ofp_match|INFO|post: dl_type=0x1234
-003820cf xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 1234 xx 05 xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-# ip,nw_tos=252
-001820ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 fc xx xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-dnl Ignore nw_tos if not IP:
-# arp,nw_tos=4
-# 24: 05 -> 04
-# normal:  1: 18 -> 38
-# normal: 24: 04 -> 00
-& ofp_match|INFO|normalization changed ofp_match, details:
-& ofp_match|INFO| pre: arp,nw_tos=4
-& ofp_match|INFO|post: arp
-001820ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 05 xx xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-dnl Low 2 bits of invalid TOS are forced to 0:
-# ip,nw_tos=48
-# 24: 31 -> 30
-001820ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 31 xx xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-# arp,arp_op=2
-003820cf xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx 02 xxxx dnl
-xxxxxxxx xxxxxxxx xxxx xxxx
-
-# ip,nw_src=192.168.128.85
-003800ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx xx xxxx dnl
-c0a88055 xxxxxxxx xxxx xxxx
-
-# ip,nw_src=192.168.128.0/24
-# 31: 55 -> 00
-003808ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx xx xxxx dnl
-c0a88055 xxxxxxxx xxxx xxxx
-
-# ip,nw_dst=192.168.128.85
-003020ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx xx xxxx dnl
-xxxxxxxx c0a88055 xxxx xxxx
-
-# ip,nw_dst=192.168.128.0/24
-# 35: 55 -> 00
-003220ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx xx xxxx dnl
-xxxxxxxx c0a88055 xxxx xxxx
-
-# arp,arp_spa=192.168.128.85
-003800ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl
-c0a88055 xxxxxxxx xxxx xxxx
-
-# arp,arp_spa=192.168.128.0/24
-# 31: 55 -> 00
-003808ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl
-c0a88055 xxxxxxxx xxxx xxxx
-
-# arp,arp_tpa=192.168.128.85
-003020ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl
-xxxxxxxx c0a88055 xxxx xxxx
-
-# arp,arp_tpa=192.168.128.0/24
-# 35: 55 -> 00
-003220ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl
-xxxxxxxx c0a88055 xxxx xxxx
-
-dnl Ignore nw_src if not IP or ARP:
-# dl_type=0x1234,nw_src=192.168.128.0/24
-# 31: 55 -> 00
-# normal:  2: 08 -> 20
-# normal: 28: c0 -> 00
-# normal: 29: a8 -> 00
-# normal: 30: 80 -> 00
-& ofp_match|INFO|normalization changed ofp_match, details:
-& ofp_match|INFO| pre: dl_type=0x1234,nw_src=192.168.128.0/24
-& ofp_match|INFO|post: dl_type=0x1234
-003808ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 1234 xx xx xxxx dnl
-c0a88055 xxxxxxxx xxxx xxxx
-
-dnl Ignore nw_dst if not IP or ARP:
-# dl_type=0x1234,nw_dst=192.168.128.0/24
-# 35: 55 -> 00
-# normal:  1: 32 -> 38
-# normal: 32: c0 -> 00
-# normal: 33: a8 -> 00
-# normal: 34: 80 -> 00
-& ofp_match|INFO|normalization changed ofp_match, details:
-& ofp_match|INFO| pre: dl_type=0x1234,nw_dst=192.168.128.0/24
-& ofp_match|INFO|post: dl_type=0x1234
-003220ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 1234 xx xx xxxx dnl
-xxxxxxxx c0a88055 xxxx xxxx
-
-# tcp,tp_src=443
-0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 06 xxxx dnl
-xxxxxxxx xxxxxxxx 01bb xxxx
-
-# tcp,tp_dst=443
-0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 06 xxxx dnl
-xxxxxxxx xxxxxxxx xxxx 01bb
-
-# udp,tp_src=443
-0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 11 xxxx dnl
-xxxxxxxx xxxxxxxx 01bb xxxx
-
-# udp,tp_dst=443
-0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 11 xxxx dnl
-xxxxxxxx xxxxxxxx xxxx 01bb
-
-# sctp,tp_src=443
-0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 84 xxxx dnl
-xxxxxxxx xxxxxxxx 01bb xxxx
-
-# sctp,tp_dst=443
-0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 84 xxxx dnl
-xxxxxxxx xxxxxxxx xxxx 01bb
-
-# icmp,icmp_type=5
-0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 01 xxxx dnl
-xxxxxxxx xxxxxxxx 0005 xxxx
-
-# icmp,icmp_code=8
-0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 01 xxxx dnl
-xxxxxxxx xxxxxxxx xxxx 0008
-
-dnl Ignore tp_src if not TCP/UDP/SCTP:
-# ip,nw_proto=21,tp_src=443
-# normal:  3: 8f -> cf
-# normal: 36: 01 -> 00
-# normal: 37: bb -> 00
-& ofp_match|INFO|normalization changed ofp_match, details:
-& ofp_match|INFO| pre: ip,nw_proto=21,tp_src=443
-& ofp_match|INFO|post: ip,nw_proto=21
-0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 15 xxxx dnl
-xxxxxxxx xxxxxxxx 01bb xxxx
-
-dnl Ignore tp_dst if not TCP/UDP/SCTP:
-# ip,nw_proto=21,tp_dst=443
-# normal:  3: 4f -> cf
-# normal: 38: 01 -> 00
-# normal: 39: bb -> 00
-dnl The normalization details are suppressed here due to rate-limiting.
-0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 15 xxxx dnl
-xxxxxxxx xxxxxxxx xxxx 01bb
-
-])
-sed '/^[[#&]]/d' < test-data > input.txt
-sed -n 's/^# //p; /^$/p' < test-data > expout
-sed -n 's/^& //p' < test-data > experr
-AT_CAPTURE_FILE([input.txt])
-AT_CAPTURE_FILE([expout])
-AT_CAPTURE_FILE([experr])
-AT_CHECK(
-  [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-ofp10-match < input.txt],
-  [0], [expout], [experr])
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl parse-ofp11-match])
-AT_KEYWORDS([OF1.1])
-AT_DATA([test-data], [dnl
-# in_port=LOCAL
-0000 0058 fffffffe 000003fe dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# bad ofp11_match: OFPBMC_BAD_VALUE
-& ofp_port|WARN|port 305419896 is outside the supported range 0 through 65279 or 0xffffff00 through 0xffffffff
-0000 0058 12345678 000003fe dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# dl_src=00:01:02:03:04:05
-0000 0058 00000000 000003ff dnl
-000102030405000000000000 000000000000ffffffffffff dnl
-0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# dl_src=55:55:55:55:55:55/55:55:55:55:55:55
-0000 0058 00000000 000003ff dnl
-555555555555aaaaaaaaaaaa 000000000000ffffffffffff dnl
-0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# dl_dst=00:01:02:03:04:05
-0000 0058 00000000 000003ff dnl
-000000000000ffffffffffff 000102030405000000000000 dnl
-0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# dl_dst=01:00:00:00:00:00/01:00:00:00:00:00
-0000 0058 00000000 000003ff dnl
-000000000000ffffffffffff 010000000000feffffffffff dnl
-0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# dl_dst=00:01:02:03:04:05/fe:ff:ff:ff:ff:ff
-0000 0058 00000000 000003ff dnl
-000000000000ffffffffffff 000102030405010000000000 dnl
-0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# dl_dst=55:55:55:55:55:55/55:55:55:55:55:55
-0000 0058 00000000 000003ff dnl
-000000000000ffffffffffff 555555555555aaaaaaaaaaaa dnl
-0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-dnl dl_vlan_pcp is ignored if dl_vlan is wildcarded, which causes the
-dnl the wildcard bit and the dl_vlan_pcp to be dropped for output:
-# in_port=1
-# 11: fa -> fe
-# 38: 03 -> 00
-0000 0058 00000001 000003fa dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 03 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# dl_vlan=291
-0000 0058 00000000 000003fd dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0123 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-dnl OFPVID_NONE:
-# vlan_tci=0x0000
-0000 0058 00000000 000003fd dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-ffff 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-dnl OFPVID_NONE ignores dl_vlan_pcp even if not wildcarded, which causes
-dnl the wildcard bit and the dl_vlan_pcp to be dropped for output:
-# vlan_tci=0x0000
-# 11: f9 -> fd
-# 38: 05 -> 00
-0000 0058 00000000 000003f9 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-ffff 05 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# vlan_tci=0x1000/0x1000
-0000 0058 00000000 000003fd dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-fffe 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-dnl Try invalid VID:
-# bad ofp11_match: OFPBMC_BAD_VALUE
-0000 0058 00000000 000003fd dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-1234 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# dl_vlan_pcp=4
-0000 0058 00000000 000003f9 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-fffe 04 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# dl_vlan=10,dl_vlan_pcp=6
-0000 0058 00000000 000003f9 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-000a 06 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# dl_type=0x1234
-0000 0058 00000000 000003f7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 1234 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# ip,nw_tos=252
-0000 0058 00000000 000003e7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 fc 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-dnl Try invalid TOS:
-# bad ofp11_match: OFPBMC_BAD_VALUE
-0000 0058 00000000 000003e7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 01 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# ip,nw_proto=5
-0000 0058 00000000 000003d7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 05 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# arp,arp_op=2
-0000 0058 00000000 000003d7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0806 00 02 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# ip,nw_src=192.168.128.0/24
-0000 0058 00000000 000003f7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# ip,nw_src=128.160.128.0/165.165.165.165
-# 44: c0 -> 80
-# 45: a8 -> a0
-0000 0058 00000000 000003f7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 00 c0a880005a5a5a5a 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# ip,nw_dst=192.168.128.0/24
-0000 0058 00000000 000003f7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 00 00000000ffffffff c0a88000000000ff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# ip,nw_dst=128.160.128.0/165.165.165.165
-# 52: c0 -> 80
-# 53: a8 -> a0
-0000 0058 00000000 000003f7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 00 00000000ffffffff c0a880005a5a5a5a 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# arp,arp_spa=192.168.128.0/24
-0000 0058 00000000 000003f7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0806 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# arp,arp_tpa=192.168.128.0/24
-0000 0058 00000000 000003f7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0806 00 00 00000000ffffffff c0a88000000000ff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# tcp,tp_src=443
-0000 0058 00000000 00000397 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 06 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# tcp,tp_dst=443
-0000 0058 00000000 00000357 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 06 00000000ffffffff 00000000ffffffff 0000 01bb dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# udp,tp_src=443
-0000 0058 00000000 00000397 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# icmp,icmp_type=5
-0000 0058 00000000 00000397 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 01 00000000ffffffff 00000000ffffffff 0005 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# icmp,icmp_code=8
-0000 0058 00000000 00000357 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 01 00000000ffffffff 00000000ffffffff 0000 0008 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# udp,tp_src=443
-0000 0058 00000000 00000397 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# udp,tp_dst=443
-0000 0058 00000000 00000357 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 0000 01bb dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# sctp
-0000 0058 00000000 000003d7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# sctp,tp_src=443
-0000 0058 00000000 00000397 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# sctp,tp_dst=443
-0000 0058 00000000 00000357 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 0000 01bb dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-dnl Ignore tp_src if not TCP/UDP/SCTP:
-# ip,nw_proto=21
-# 11: 97 -> d7
-# 60: 01 -> 00
-# 61: bb -> 00
-0000 0058 00000000 00000397 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 15 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-dnl Ignore tp_dst if not TCP/UDP/SCTP:
-# ip,nw_proto=22
-# 11: 57 -> d7
-# 62: 01 -> 00
-# 63: bb -> 00
-0000 0058 00000000 00000357 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0800 00 16 00000000ffffffff 00000000ffffffff 0000 01bb dnl
-00000000 00 000000 0000000000000000ffffffffffffffff
-
-# mpls,mpls_label=284280
-# 64: 12 -> 00
-# 65: 34 -> 04
-0000 0058 00000000 000002f7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 8847 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-12345678 00 000000 0000000000000000ffffffffffffffff
-
-# mplsm,mpls_tc=2
-# 68: 5a -> 02
-0000 0058 00000000 000001f7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 8848 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 5a 000000 0000000000000000ffffffffffffffff
-
-dnl mpls_label and mpls_tc must be ignored if dl_type is not MPLS:
-# dl_type=0x1234
-# 10: 00 -> 03
-# 64: 12 -> 00
-# 65: 34 -> 00
-# 66: 56 -> 00
-# 67: 78 -> 00
-# 68: 5a -> 00
-0000 0058 00000000 000000f7 dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 1234 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-12345678 5a 000000 0000000000000000ffffffffffffffff
-
-dnl metadata match:
-# metadata=0x1234567890abcdef
-0000 0058 00000000 000003ff dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 1234567890abcdef0000000000000000
-
-dnl metadata match:
-# metadata=0x5555555555555555/0x5555555555555555
-0000 0058 00000000 000003ff dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 5555555555555555aaaaaaaaaaaaaaaa
-
-dnl metadata match:
-# metadata=0x1234000090ab0000/0xffff0000ffff0000
-# 74: 56 -> 00
-# 75: 78 -> 00
-# 78: cd -> 00
-# 79: ef -> 00
-0000 0058 00000000 000003ff dnl
-000000000000ffffffffffff 000000000000ffffffffffff dnl
-0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
-00000000 00 000000 1234567890abcdef0000ffff0000ffff
-
-])
-sed '/^[[#&]]/d' < test-data > input.txt
-sed -n 's/^# //p; /^$/p' < test-data > expout
-sed -n 's/^& //p' < test-data > experr
-AT_CAPTURE_FILE([input.txt])
-AT_CAPTURE_FILE([expout])
-AT_CAPTURE_FILE([experr])
-AT_CHECK(
-  [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-ofp11-match < input.txt],
-  [0], [expout], [experr])
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl parse-nx-match loose])
-AT_KEYWORDS([nx-match])
-AT_DATA([nx-match.txt], [dnl
-NXM_OF_IN_PORT(0001), 01020304(1111/3333), NXM_OF_ETH_TYPE(0800)
-NXM_OF_IN_PORT(0001), ffff020800002320(11112222), NXM_OF_ETH_TYPE(0800)
-NXM_OF_IN_PORT(0001), ffff030800002320(1111/3333), NXM_OF_ETH_TYPE(0800)
-])
-
-AT_CHECK([ovs-ofctl --strict parse-nx-match < nx-match.txt], [0], [dnl
-nx_pull_match() returned error OFPBMC_BAD_FIELD
-nx_pull_match() returned error OFPBMC_BAD_FIELD
-nx_pull_match() returned error OFPBMC_BAD_FIELD
-])
-
-AT_CHECK([ovs-ofctl parse-nx-match < nx-match.txt], [0], [dnl
-NXM_OF_IN_PORT(0001), NXM_OF_ETH_TYPE(0800)
-NXM_OF_IN_PORT(0001), NXM_OF_ETH_TYPE(0800)
-NXM_OF_IN_PORT(0001), NXM_OF_ETH_TYPE(0800)
-])
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl parse-oxm (OpenFlow 1.2)])
-AT_KEYWORDS([oxm])
-AT_DATA([oxm.txt], [dnl
-<any>
-
-# in port
-OXM_OF_IN_PORT(00000000)
-OXM_OF_IN_PORT(fffffffe)
-
-# metadata
-OXM_OF_METADATA(5a5a5a5a5a5a5a5a)
-OXM_OF_METADATA_W(0000000000000000/00000000ffffffff)
-OXM_OF_METADATA_W(1234567890abcdef/ffff0000ffff0000)
-OXM_OF_METADATA_W(1234567890abcdef/ffffffffffffffff)
-OXM_OF_METADATA_W(1234567890abcdef/0000000000000000)
-
-# eth dst
-OXM_OF_ETH_DST(0002e30f80a4)
-OXM_OF_ETH_DST_W(010000000000/010000000000)
-OXM_OF_ETH_DST_W(000000000000/010000000000)
-OXM_OF_ETH_DST_W(ffffffffffff/010000000000)
-OXM_OF_ETH_DST_W(0002e30f80a4/ffffffffffff)
-OXM_OF_ETH_DST_W(0002e30f80a4/000000000000)
-OXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
-
-# eth src
-OXM_OF_ETH_SRC(020898456ddb)
-
-# eth type
-OXM_OF_ETH_TYPE(0800)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IN_PORT(00000012)
-
-# vlan
-OXM_OF_VLAN_VID(1009) OXM_OF_VLAN_VID(1009) # Duplicate Field
-OXM_OF_VLAN_VID(f009)           # Bad Value
-OXM_OF_VLAN_PCP(00)             # Bad Pre-Requisite
-OXM_OF_VLAN_VID(0000)           # Packets without 802.1Q header or with VID=0
-OXM_OF_VLAN_VID(1123)           # Packets with VID=123, any PCP
-OXM_OF_VLAN_VID(1123) OXM_OF_VLAN_PCP(01) # Packets with VID=123, PCP=1.
-OXM_OF_VLAN_VID(0123)           # Does not make sense (but supported anyway)
-OXM_OF_VLAN_VID_W(0123/0123)      # Does not make sense (but supported anyway)
-OXM_OF_VLAN_VID_W(1123/0123)      # Does not make sense (but supported anyway)
-OXM_OF_VLAN_VID_W(0123/1123)      # Does not make sense (but supported anyway)
-OXM_OF_VLAN_VID(0123) OXM_OF_VLAN_PCP(01)  #Bad Pre-Requisite
-OXM_OF_VLAN_VID_W(1123/1fff)    # Packets with VID=123, any PCP.
-OXM_OF_VLAN_VID_W(1123/ffff)    # Packets with VID=123, any PCP.
-OXM_OF_VLAN_VID_W(0000/0000)    # Packets with or without 802.1Q header
-OXM_OF_VLAN_VID_W(1103/1f0f),   # Packets with # VID=123 (masked)
-OXM_OF_VLAN_VID_W(1103/1f0f), OXM_OF_VLAN_PCP(01)  # Packets with VID=123 (masked), any PCP.
-OXM_OF_VLAN_VID_W(1000/1000)    # Packets with any VID, any PCP
-OXM_OF_VLAN_VID_W(1000/1000), OXM_OF_VLAN_PCP(01)  # Packets with any VID, PCP=1.
-
-# IP TOS
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_DSCP(f0)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_DSCP(41)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_DSCP(3f)
-OXM_OF_IP_DSCP(3f)
-
-# IP ECN
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_ECN(03)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_ECN(06)
-OXM_OF_IP_ECN(03)
-
-# IP protocol
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(05)
-OXM_OF_IP_PROTO(05)
-
-# IP source
-OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC(ac100014)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC_W(C0a80000/FFFF0000)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC_W(C0a80000/FFFFFFFF)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC_W(00000000/00000000)
-OXM_OF_ETH_TYPE(0806) OXM_OF_IPV4_SRC(ac100014)
-OXM_OF_IPV4_SRC_W(C0D80000/FFFF0000)
-
-# IP destination
-OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST(ac100014)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST_W(C0a80000/FFFF0000)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST_W(C0a88012/FFFFFFFF)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST_W(00000000/00000000)
-OXM_OF_IPV4_DST(ac100014)
-OXM_OF_ETH_TYPE(0806) OXM_OF_IPV4_DST_W(C0D80000/FFFF0000)
-
-# TCP source port
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC(4231)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC_W(5050/F0F0)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC_W(5050/FFFF)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC_W(0000/0000)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(07) OXM_OF_TCP_SRC(4231)
-
-# TCP destination port
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST(4231)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST_W(FDE0/FFF0)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST_W(FDE0/FFFF)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST_W(0000/0000)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(07) OXM_OF_TCP_DST(4231)
-
-# UDP source port
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC(8732)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC_W(0132/01FF)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC_W(0132/FFFF)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC_W(0000/0000)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_UDP_SRC(7823)
-
-# UDP destination port
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST(1782)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST_W(5005/F00F)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST_W(5005/FFFF)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST_W(0000/0000)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(02) OXM_OF_UDP_DST(1293)
-
-# SCTP source port
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_SRC(8732)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_SRC_W(0132/01FF)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_SRC_W(0132/FFFF)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_SRC_W(0000/0000)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_SCTP_SRC(7823)
-
-# SCTP destination port
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_DST(1782)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_DST_W(5005/F00F)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_DST_W(5005/FFFF)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_DST_W(0000/0000)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(02) OXM_OF_SCTP_DST(1293)
-
-# ICMP type
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01) OXM_OF_ICMPV4_TYPE(12)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(00) OXM_OF_ICMPV4_TYPE(10)
-
-# ICMP code
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01) OXM_OF_ICMPV4_CODE(12)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(00) OXM_OF_ICMPV4_CODE(10)
-OXM_OF_ETH_TYPE(0800) OXM_OF_ICMPV4_CODE(10)
-OXM_OF_ICMPV4_CODE(00)
-
-# ARP opcode
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(0001)
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(1111)
-OXM_OF_ETH_TYPE(0000) OXM_OF_ARP_OP(0001)
-OXM_OF_ARP_OP(0001)
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(0001) OXM_OF_ARP_OP(0001)
-
-# ARP source protocol address
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA(ac100014)
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA_W(C0a81200/FFFFFF00)
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA_W(C0a81234/FFFFFFFF)
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA_W(00000000/00000000)
-OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_SPA(ac100014)
-OXM_OF_ARP_SPA_W(C0D80000/FFFF0000)
-
-# ARP destination protocol address
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA(ac100014)
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA_W(C0a81200/FFFFFF00)
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA_W(C0a812fe/FFFFFFFF)
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA_W(00000000/00000000)
-OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_TPA(ac100014)
-OXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
-
-# ARP source hardware address
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA(0002e30f80a4)
-OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_SHA(0002e30f80a4)
-OXM_OF_ARP_SHA(0002e30f80a4)
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA_W(0002e30f80a4/ffffffffffff)
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA_W(000000000000/000000000000)
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA_W(000000000004/00000000000f)
-
-# ARP destination hardware address
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA(0002e30f80a4)
-OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_THA(0002e30f80a4)
-OXM_OF_ARP_THA(0002e30f80a4)
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA_W(0002e30f80a4/ffffffffffff)
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA_W(000000000000/000000000000)
-OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA_W(000000000004/00000000000f)
-
-# IPv6 source
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffffffffffffffffffff)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC_W(00000000000000000000000000000000/00000000000000000000000000000000)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
-
-# IPv6 destination
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffffffffffffffffffff)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST_W(00000000000000000000000000000000/00000000000000000000000000000000)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
-
-# IPv6 Flow Label
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL(1000000f)
-OXM_OF_IPV6_FLABEL(0000000f)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL(0000000f)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(0000000f/0000000f)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(0000000f/000fffff)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(00000000/000ffff0)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(0000000f/100fffff)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(0000000f/ffffffff)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(00000000/00000000)
-
-# ND source hardware address
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IP_PROTO(3a) OXM_OF_ICMPV6_TYPE(87) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_SLL(0002e30f80a4)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IP_PROTO(3a) OXM_OF_ICMPV6_TYPE(88) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_SLL(0002e30f80a4)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IP_PROTO(3b) OXM_OF_ICMPV6_TYPE(87) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_SLL(0002e30f80a4)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(3a) OXM_OF_ICMPV6_TYPE(87) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_SLL(0002e30f80a4)
-
-# ND destination hardware address
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IP_PROTO(3a) OXM_OF_ICMPV6_TYPE(88) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_TLL(0002e30f80a4)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IP_PROTO(3a) OXM_OF_ICMPV6_TYPE(87) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_TLL(0002e30f80a4)
-OXM_OF_ETH_TYPE(86dd) OXM_OF_IP_PROTO(3b) OXM_OF_ICMPV6_TYPE(87) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_TLL(0002e30f80a4)
-OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(3a) OXM_OF_ICMPV6_TYPE(88) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_TLL(0002e30f80a4)
-
-# Registers 0, 1, and 2.
-NXM_NX_REG0(acebdf56)
-NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
-NXM_NX_REG0(a0e0d050)
-NXM_NX_REG1(acebdf56)
-NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
-NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
-NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
-NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
-
-# Extended registers 0, 1, and 2.
-# (For OpenFlow 1.2, OVS transforms these into its extension registers.)
-OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
-OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
-OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
-OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
-OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
-OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
-OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
-OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
-
-# Invalid field number.
-01020304(1111/3333)
-
-# Invalid field numbers (experimenter OXM).
-ffff020800002320(11112222)
-ffff030800002320(1111/3333)
-])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' --strict parse-oxm OpenFlow12 < oxm.txt],
-  [0], [dnl
-<any>
-
-# in port
-OXM_OF_IN_PORT(00000000)
-OXM_OF_IN_PORT(fffffffe)
-
-# metadata
-OXM_OF_METADATA(5a5a5a5a5a5a5a5a)
-OXM_OF_METADATA_W(0000000000000000/00000000ffffffff)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-OXM_OF_METADATA(1234567890abcdef)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-
-# eth dst
-OXM_OF_ETH_DST(0002e30f80a4)
-OXM_OF_ETH_DST_W(010000000000/010000000000)
-OXM_OF_ETH_DST_W(000000000000/010000000000)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-OXM_OF_ETH_DST(0002e30f80a4)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-OXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
-
-# eth src
-OXM_OF_ETH_SRC(020898456ddb)
-
-# eth type
-OXM_OF_ETH_TYPE(0800)
-OXM_OF_IN_PORT(00000012), OXM_OF_ETH_TYPE(0800)
-
-# vlan
-nx_pull_match() returned error OFPBMC_DUP_FIELD
-nx_pull_match() returned error OFPBMC_BAD_VALUE
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-OXM_OF_VLAN_VID(0000)
-OXM_OF_VLAN_VID(1123)
-OXM_OF_VLAN_VID(1123), OXM_OF_VLAN_PCP(01)
-OXM_OF_VLAN_VID(0123)
-OXM_OF_VLAN_VID_W(0123/0123)
-nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
-OXM_OF_VLAN_VID_W(0123/1123)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-OXM_OF_VLAN_VID(1123)
-OXM_OF_VLAN_VID(1123)
-OXM_OF_PACKET_TYPE(00000000)
-OXM_OF_VLAN_VID_W(1103/1f0f)
-OXM_OF_VLAN_VID_W(1103/1f0f), OXM_OF_VLAN_PCP(01)
-OXM_OF_VLAN_VID_W(1000/1000)
-OXM_OF_VLAN_VID_W(1000/1000), OXM_OF_VLAN_PCP(01)
-
-# IP TOS
-nx_pull_match() returned error OFPBMC_BAD_VALUE
-nx_pull_match() returned error OFPBMC_BAD_VALUE
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_DSCP(3f)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IP ECN
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_ECN(03)
-nx_pull_match() returned error OFPBMC_BAD_VALUE
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IP protocol
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(05)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IP source
-OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC(ac100014)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC_W(c0a80000/ffff0000)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC(c0a80000)
-OXM_OF_ETH_TYPE(0800)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IP destination
-OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST(ac100014)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST_W(c0a80000/ffff0000)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST(c0a88012)
-OXM_OF_ETH_TYPE(0800)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# TCP source port
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC(4231)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC_W(5050/f0f0)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC(5050)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# TCP destination port
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST(4231)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST_W(fde0/fff0)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST(fde0)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# UDP source port
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC(8732)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC_W(0132/01ff)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC(0132)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# UDP destination port
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST(1782)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST_W(5005/f00f)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST(5005)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# SCTP source port
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_SRC(8732)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_SRC_W(0132/01ff)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_SRC(0132)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# SCTP destination port
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_DST(1782)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_DST_W(5005/f00f)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_DST(5005)
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# ICMP type
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01), OXM_OF_ICMPV4_TYPE(12)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# ICMP code
-OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01), OXM_OF_ICMPV4_CODE(12)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# ARP opcode
-OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_OP(0001)
-nx_pull_match() returned error OFPBMC_BAD_VALUE
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_DUP_FIELD
-
-# ARP source protocol address
-OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA(ac100014)
-OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA_W(c0a81200/ffffff00)
-OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA(c0a81234)
-OXM_OF_ETH_TYPE(0806)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# ARP destination protocol address
-OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA(ac100014)
-OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA_W(c0a81200/ffffff00)
-OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA(c0a812fe)
-OXM_OF_ETH_TYPE(0806)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# ARP source hardware address
-OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SHA(0002e30f80a4)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SHA(0002e30f80a4)
-OXM_OF_ETH_TYPE(0806)
-OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SHA_W(000000000004/00000000000f)
-
-# ARP destination hardware address
-OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_THA(0002e30f80a4)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_THA(0002e30f80a4)
-OXM_OF_ETH_TYPE(0806)
-OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_THA_W(000000000004/00000000000f)
-
-# IPv6 source
-OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
-OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC(20010db83c4d00010000000000000000)
-OXM_OF_ETH_TYPE(86dd)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IPv6 destination
-OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
-OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST(20010db83c4d00010000000000000000)
-OXM_OF_ETH_TYPE(86dd)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# IPv6 Flow Label
-nx_pull_match() returned error OFPBMC_BAD_VALUE
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL(0000000f)
-OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL_W(0000000f/0000000f)
-OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL(0000000f)
-OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL_W(00000000/000ffff0)
-OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL(0000000f)
-OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL(0000000f)
-OXM_OF_ETH_TYPE(86dd)
-
-# ND source hardware address
-OXM_OF_ETH_TYPE(86dd), OXM_OF_IP_PROTO(3a), OXM_OF_ICMPV6_TYPE(87), OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005), OXM_OF_IPV6_ND_SLL(0002e30f80a4)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# ND destination hardware address
-OXM_OF_ETH_TYPE(86dd), OXM_OF_IP_PROTO(3a), OXM_OF_ICMPV6_TYPE(88), OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005), OXM_OF_IPV6_ND_TLL(0002e30f80a4)
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-nx_pull_match() returned error OFPBMC_BAD_PREREQ
-
-# Registers 0, 1, and 2.
-NXM_NX_REG0(acebdf56)
-NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
-NXM_NX_REG0(a0e0d050)
-NXM_NX_REG1(acebdf56)
-NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
-NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
-NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
-NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
-
-# Extended registers 0, 1, and 2.
-# (For OpenFlow 1.2, OVS transforms these into its extension registers.)
-NXM_NX_REG0(acebdf56)
-NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
-NXM_NX_REG0(a0e0d050)
-NXM_NX_REG1(acebdf56)
-NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
-NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
-NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
-NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
-
-# Invalid field number.
-nx_pull_match() returned error OFPBMC_BAD_FIELD
-
-# Invalid field numbers (experimenter OXM).
-nx_pull_match() returned error OFPBMC_BAD_FIELD
-nx_pull_match() returned error OFPBMC_BAD_FIELD
-], [stderr])
-
-# Check that at least the first warning made it.  (It's rate-limited
-# so a variable number could show up, especially under valgrind etc.)
-AT_CHECK([grep '1-bits in value' stderr | sed 1q], [0], [dnl
-nx_match|WARN|Rejecting NXM/OXM entry 0:32768:2:1:16 with 1-bits in value for bits wildcarded by the mask.
-])
-
-# Check that there wasn't any other stderr output.
-AT_CHECK([grep -v '1-bits in value' stderr], [1])
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl parse-oxm (OpenFlow 1.3)])
-AT_KEYWORDS([oxm])
-AT_DATA([oxm.txt], [dnl
-# actset_output
-ONFOXM_ET_ACTSET_OUTPUT(00000000)
-ONFOXM_ET_ACTSET_OUTPUT(fffffffe)
-ONFOXM_ET_ACTSET_OUTPUT(fffffff7)
-OXM_OF_ACTSET_OUTPUT(00000000)
-OXM_OF_ACTSET_OUTPUT(fffffffe)
-OXM_OF_ACTSET_OUTPUT(fffffff7)
-])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' --strict parse-oxm OpenFlow13 < oxm.txt],
-  [0], [dnl
-# actset_output
-ONFOXM_ET_ACTSET_OUTPUT(00000000)
-ONFOXM_ET_ACTSET_OUTPUT(fffffffe)
-ONFOXM_ET_ACTSET_OUTPUT(fffffff7)
-ONFOXM_ET_ACTSET_OUTPUT(00000000)
-ONFOXM_ET_ACTSET_OUTPUT(fffffffe)
-ONFOXM_ET_ACTSET_OUTPUT(fffffff7)
-], [])
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl parse-oxm (OpenFlow 1.5)])
-AT_KEYWORDS([oxm])
-AT_DATA([oxm.txt], [dnl
-# Extended registers 0 and 1.
-OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
-OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
-OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
-OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
-OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
-OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
-OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
-OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
-
-# Registers 0, 1, and 2.
-# (OpenFlow 1.5 transforms these into the standard "xregs".)
-NXM_NX_REG0(acebdf56)
-NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
-NXM_NX_REG0(a0e0d050)
-NXM_NX_REG1(acebdf56)
-NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
-NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
-NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
-NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
-
-# actset_output
-ONFOXM_ET_ACTSET_OUTPUT(00000000)
-ONFOXM_ET_ACTSET_OUTPUT(fffffffe)
-ONFOXM_ET_ACTSET_OUTPUT(fffffff7)
-OXM_OF_ACTSET_OUTPUT(00000000)
-OXM_OF_ACTSET_OUTPUT(fffffffe)
-OXM_OF_ACTSET_OUTPUT(fffffff7)
-])
-AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' --strict parse-oxm OpenFlow15 < oxm.txt],
-  [0], [dnl
-# Extended registers 0 and 1.
-OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
-OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
-OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
-OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
-OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
-OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
-OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
-OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
-
-# Registers 0, 1, and 2.
-# (OpenFlow 1.5 transforms these into the standard "xregs".)
-OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
-OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
-OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
-OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
-OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
-OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
-OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
-OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
-
-# actset_output
-OXM_OF_ACTSET_OUTPUT(00000000)
-OXM_OF_ACTSET_OUTPUT(fffffffe)
-OXM_OF_ACTSET_OUTPUT(fffffff7)
-OXM_OF_ACTSET_OUTPUT(00000000)
-OXM_OF_ACTSET_OUTPUT(fffffffe)
-OXM_OF_ACTSET_OUTPUT(fffffff7)
-], [])
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl parse-oxm loose])
-AT_KEYWORDS([oxm])
-AT_DATA([oxm.txt], [dnl
-OXM_OF_IN_PORT(00000001), 01020304(1111/3333), OXM_OF_ETH_TYPE(0800)
-OXM_OF_IN_PORT(00000001), ffff020800002320(11112222), OXM_OF_ETH_TYPE(0800)
-OXM_OF_IN_PORT(00000001), ffff030800002320(1111/3333), OXM_OF_ETH_TYPE(0800)
-])
-
-AT_CHECK([ovs-ofctl --strict parse-oxm OpenFlow12 < oxm.txt], [0], [dnl
-nx_pull_match() returned error OFPBMC_BAD_FIELD
-nx_pull_match() returned error OFPBMC_BAD_FIELD
-nx_pull_match() returned error OFPBMC_BAD_FIELD
-])
-
-AT_CHECK([ovs-ofctl parse-oxm OpenFlow12 < oxm.txt], [0], [dnl
-OXM_OF_IN_PORT(00000001), OXM_OF_ETH_TYPE(0800)
-OXM_OF_IN_PORT(00000001), OXM_OF_ETH_TYPE(0800)
-OXM_OF_IN_PORT(00000001), OXM_OF_ETH_TYPE(0800)
-])
-AT_CLEANUP
-
-AT_SETUP([experimenter OXM encoding])
-AT_DATA([oxm.txt], [dnl
-NXOXM_ET_ERSPAN_VER(01)
-
-NXOXM_ET_ERSPAN_IDX(01020304)
-NXOXM_ET_ERSPAN_IDX_W(01020304/0fffffff)
-
-NXOXM_ET_ERSPAN_DIR(01)
-
-NXOXM_ET_ERSPAN_HWID(12)
-])
-
-# Test experimenter OXM encoding.
-AT_CHECK([ovs-ofctl -m --strict parse-oxm OpenFlow15 < oxm.txt], [0], [dnl
-NXOXM_ET_ERSPAN_VER_W(01/01)
-00000000  00 01 00 0e ff ff 19 06-00 00 23 20 01 01 00 00
-
-NXOXM_ET_ERSPAN_IDX(01020304)
-00000000  00 01 00 10 ff ff 16 08-00 00 23 20 01 02 03 04
-NXOXM_ET_ERSPAN_IDX_W(01020304/0fffffff)
-00000000  00 01 00 14 ff ff 17 0c-00 00 23 20 01 02 03 04
-00000010  0f ff ff ff 00 00 00 00
-
-NXOXM_ET_ERSPAN_DIR_W(01/01)
-00000000  00 01 00 0e ff ff 1b 06-00 00 23 20 01 01 00 00
-
-NXOXM_ET_ERSPAN_HWID_W(12/12)
-00000000  00 01 00 0e ff ff 1d 06-00 00 23 20 12 12 00 00
-])
-
-AT_CHECK([ovs-ofctl -m --strict parse-oxm OpenFlow12 < oxm.txt], [0], [dnl
-NXOXM_ET_ERSPAN_VER_W(01/01)
-00000000  00 01 00 0e ff ff 19 06-00 00 23 20 01 01 00 00
-
-NXOXM_ET_ERSPAN_IDX(01020304)
-00000000  00 01 00 10 ff ff 16 08-00 00 23 20 01 02 03 04
-NXOXM_ET_ERSPAN_IDX_W(01020304/0fffffff)
-00000000  00 01 00 14 ff ff 17 0c-00 00 23 20 01 02 03 04
-00000010  0f ff ff ff 00 00 00 00
-
-NXOXM_ET_ERSPAN_DIR_W(01/01)
-00000000  00 01 00 0e ff ff 1b 06-00 00 23 20 01 01 00 00
-
-NXOXM_ET_ERSPAN_HWID_W(12/12)
-00000000  00 01 00 0e ff ff 1d 06-00 00 23 20 12 12 00 00
-])
-AT_CLEANUP
-
-AT_SETUP([check TCP flags expression in OXM and NXM])
-# NXM/OXM input for matching on TCP flags.
-tcp_flags='OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_FLAGS(0fff)'
-
-# Check that marshaling into NXM gives all NXM headers.
-AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-nxm], [0],
-  [NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS(0fff)
-])
-
-# Check that marshaling in OXM for OF1.2 gives OXM headers except for
-# TCP flags, which didn't have an OXM definition.
-AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-oxm OpenFlow12], [0],
-    [OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS(0fff)
-])
-
-# Check that marshaling in OXM for OF1.3 and OF1.4 gives OXM headers,
-# including the ONF extension for TCP flags introduced in OF1.3.
-AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-oxm OpenFlow13], [0],
-    [OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), ONFOXM_ET_TCP_FLAGS(0fff)
-])
-AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-oxm OpenFlow14], [0],
-    [OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), ONFOXM_ET_TCP_FLAGS(0fff)
-])
-
-# OpenFlow 1.5 added an OXM header for TCP flags:
-AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-oxm OpenFlow15], [0],
-  [OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_FLAGS(0fff)
-])
-AT_CLEANUP
-
-dnl Check all of the patterns mentioned in the "VLAN Matching" section
-dnl in the topics/design doc
-AT_SETUP([ovs-ofctl check-vlan])
-AT_KEYWORDS([VLAN])
-
-dnl [1]
-AT_CHECK([ovs-ofctl check-vlan 0000 0000], [0], [dnl
- -> 0000/0000
-NXM: <any> -> 0000/0000
-OXM: <any> -> 0000/0000,--
-OF1.0: 0000/1,00/1 -> 0000/0000
-OF1.1: 0000/1,00/1 -> 0000/0000
-])
-
-dnl [2]
-AT_CHECK([ovs-ofctl check-vlan 0000 ffff], [0], [dnl
-vlan_tci=0x0000 -> 0000/ffff
-NXM: NXM_OF_VLAN_TCI(0000) -> 0000/ffff
-OXM: OXM_OF_VLAN_VID(0000) -> 0000/1fff,--
-OF1.0: ffff/0,00/0 -> 0000/ffff
-OF1.1: ffff/0,00/1 -> 0000/ffff
-])
-
-dnl [3]
-AT_CHECK([ovs-ofctl check-vlan 1abc 1fff], [0], [dnl
-dl_vlan=2748 -> 1abc/1fff
-NXM: NXM_OF_VLAN_TCI_W(1abc/1fff) -> 1abc/1fff
-OXM: OXM_OF_VLAN_VID(1abc) -> 1abc/1fff,--
-OF1.0: 0abc/0,00/1 -> 1abc/1fff
-OF1.1: 0abc/0,00/1 -> 1abc/1fff
-])
-
-dnl [4]
-AT_CHECK([ovs-ofctl check-vlan b000 f000], [0], [dnl
-dl_vlan_pcp=5 -> b000/f000
-NXM: NXM_OF_VLAN_TCI_W(b000/f000) -> b000/f000
-OXM: OXM_OF_VLAN_VID_W(1000/1000), OXM_OF_VLAN_PCP(05) -> 1000/1000,05
-OF1.0: 0000/1,05/0 -> b000/f000
-OF1.1: fffe/0,05/0 -> b000/f000
-])
-
-dnl [5]
-AT_CHECK([ovs-ofctl check-vlan babc ffff], [0], [dnl
-dl_vlan=2748,dl_vlan_pcp=5 -> babc/ffff
-NXM: NXM_OF_VLAN_TCI(babc) -> babc/ffff
-OXM: OXM_OF_VLAN_VID(1abc), OXM_OF_VLAN_PCP(05) -> 1abc/1fff,05
-OF1.0: 0abc/0,05/0 -> babc/ffff
-OF1.1: 0abc/0,05/0 -> babc/ffff
-])
-
-dnl [6]
-AT_CHECK([ovs-ofctl check-vlan 0000 0fff], [0], [dnl
-vlan_tci=0x0000/0x0fff -> 0000/0fff
-NXM: NXM_OF_VLAN_TCI_W(0000/0fff) -> 0000/0fff
-OXM: OXM_OF_VLAN_VID_W(0000/0fff) -> 0000/0fff,--
-OF1.0: 0000/0,00/1 -> 1000/1fff
-OF1.1: 0000/0,00/1 -> 1000/1fff
-])
-
-dnl [7]
-AT_CHECK([ovs-ofctl check-vlan 0000 f000], [0], [dnl
-vlan_tci=0x0000/0xf000 -> 0000/f000
-NXM: NXM_OF_VLAN_TCI_W(0000/f000) -> 0000/f000
-OXM: OXM_OF_VLAN_VID_W(0000/1000) -> 0000/1000,--
-OF1.0: ffff/0,00/0 -> 0000/ffff
-OF1.1: ffff/0,00/1 -> 0000/ffff
-])
-
-dnl [8]
-AT_CHECK([ovs-ofctl check-vlan 0000 efff], [0], [dnl
-vlan_tci=0x0000/0xefff -> 0000/efff
-NXM: NXM_OF_VLAN_TCI_W(0000/efff) -> 0000/efff
-OXM: OXM_OF_VLAN_VID_W(0000/0fff) -> 0000/0fff,--
-OF1.0: 0000/0,00/0 -> 1000/ffff
-OF1.1: 0000/0,00/0 -> 1000/ffff
-])
-
-dnl [9]
-AT_CHECK([ovs-ofctl check-vlan 1001 1001], [0], [dnl
-vlan_tci=0x1001/0x1001 -> 1001/1001
-NXM: NXM_OF_VLAN_TCI_W(1001/1001) -> 1001/1001
-OXM: OXM_OF_VLAN_VID_W(1001/1001) -> 1001/1001,--
-OF1.0: 0001/0,00/1 -> 1001/1fff
-OF1.1: 0001/0,00/1 -> 1001/1fff
-])
-
-dnl [10]
-AT_CHECK([ovs-ofctl check-vlan 3000 3000], [0], [dnl
-vlan_tci=0x3000/0x3000 -> 3000/3000
-NXM: NXM_OF_VLAN_TCI_W(3000/3000) -> 3000/3000
-OXM: OXM_OF_VLAN_VID_W(1000/1000), OXM_OF_VLAN_PCP(01) -> 1000/1000,01
-OF1.0: 0000/1,01/0 -> 3000/f000
-OF1.1: fffe/0,01/0 -> 3000/f000
-])
-AT_CHECK
-AT_CLEANUP
-
-dnl Check that "-F openflow10" rejects a flow_mod with unsupported features,
-dnl such as tunnels and metadata.
-AT_SETUP([ovs-ofctl -F option and NXM features])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 tun_id=123,actions=drop],
-  [1], [], [ovs-ofctl: none of the usable flow formats (NXM,OXM) is among the allowed flow formats (OpenFlow10)
-])
-AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 metadata=123,actions=drop],
-  [1], [], [ovs-ofctl: none of the usable flow formats (NXM,OXM,OpenFlow11) is among the allowed flow formats (OpenFlow10)
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Check that "-F nxm" really forces add-flow to use the NXM flow format.
-dnl (If it doesn't, then either the tun_id won't show up at all, or it will
-dnl additionally show up as the top 32 bits of the cookie.)  This checks
-dnl for regression against bug #4566.
-AT_SETUP([ovs-ofctl -F option with flow_mods])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -F nxm add-flow br0 tun_id=0x12345678,actions=drop])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [dnl
-NXST_FLOW reply:
- tun_id=0x12345678 actions=drop
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Check that "-F openflow10" is really honored on dump-flows.
-dnl (If it isn't, then dump-flows will show the register match.)
-AT_SETUP([ovs-ofctl dump-flows honors -F option])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl add-flow br0 reg0=0x12345,actions=drop])
-AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip], [0], [dnl
-OFPST_FLOW reply:
- actions=drop
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Check that "-F openflow10" fails on dump-flows if the requested match
-dnl can't be represented in OpenFlow 1.0.
-AT_SETUP([ovs-ofctl dump-flows rejects bad -F option])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl -F openflow10 dump-flows unix:br0.mgmt reg0=0xabcdef], [1], [],
-  [ovs-ofctl: none of the usable flow formats (NXM,OXM) is among the allowed flow formats (OpenFlow10)
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Check that add-flow reports non-normalized flows (feature #5029).
-AT_SETUP([ovs-ofctl add-flow reports non-normalized flows])
-OVS_VSWITCHD_START
-AT_CHECK([ovs-ofctl TESTABLE_LOG add-flow br0 nw_src=1.2.3.4,actions=5],
-  [0], [], [dnl
-ofp_match|INFO|normalization changed ofp_match, details:
-ofp_match|INFO| pre: nw_src=1.2.3.4
-ofp_match|INFO|post: @&t@
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Check that --sort and --rsort works with dump-flows
-dnl Default field is 'priority'. Flow entries are displayed based
-dnl on field to sort.
-AT_SETUP([ovs-ofctl dump-flows with sorting])
-OVS_VSWITCHD_START
-AT_KEYWORDS([sort])
-AT_DATA([allflows.txt], [[
-priority=4,in_port=23213 actions=output:42
-priority=5,in_port=1029 actions=output:43
-priority=7,in_port=1029 actions=output:43
-priority=3,in_port=1028 actions=output:44
-priority=1,in_port=1026 actions=output:45
-priority=6,in_port=1027 actions=output:64
-priority=2,in_port=1025 actions=output:47
-priority=8,tcp,tp_src=5 actions=drop
-priority=9,tcp,tp_src=6 actions=drop
-priority=10,tun_metadata0=0xab actions=drop
-priority=11,tun_metadata0=0xcd actions=drop
-]])
-
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=0,len=4}->tun_metadata0"])
-AT_CHECK([ovs-ofctl add-flows br0 allflows.txt
-], [0], [ignore])
-
-AT_CHECK([ovs-ofctl --sort dump-flows br0 | ofctl_strip], [0], [dnl
- priority=1,in_port=1026 actions=output:45
- priority=2,in_port=1025 actions=output:47
- priority=3,in_port=1028 actions=output:44
- priority=4,in_port=23213 actions=output:42
- priority=5,in_port=1029 actions=output:43
- priority=6,in_port=1027 actions=output:64
- priority=7,in_port=1029 actions=output:43
- priority=8,tcp,tp_src=5 actions=drop
- priority=9,tcp,tp_src=6 actions=drop
- priority=10,tun_metadata0=0xab actions=drop
- priority=11,tun_metadata0=0xcd actions=drop
-])
-AT_CHECK([ovs-ofctl --rsort dump-flows br0 | ofctl_strip], [0], [dnl
- priority=11,tun_metadata0=0xcd actions=drop
- priority=10,tun_metadata0=0xab actions=drop
- priority=9,tcp,tp_src=6 actions=drop
- priority=8,tcp,tp_src=5 actions=drop
- priority=7,in_port=1029 actions=output:43
- priority=6,in_port=1027 actions=output:64
- priority=5,in_port=1029 actions=output:43
- priority=4,in_port=23213 actions=output:42
- priority=3,in_port=1028 actions=output:44
- priority=2,in_port=1025 actions=output:47
- priority=1,in_port=1026 actions=output:45
-])
-AT_CHECK([ovs-ofctl --sort=in_port dump-flows br0 | ofctl_strip], [0], [dnl
- priority=2,in_port=1025 actions=output:47
- priority=1,in_port=1026 actions=output:45
- priority=6,in_port=1027 actions=output:64
- priority=3,in_port=1028 actions=output:44
- priority=7,in_port=1029 actions=output:43
- priority=5,in_port=1029 actions=output:43
- priority=4,in_port=23213 actions=output:42
- priority=11,tun_metadata0=0xcd actions=drop
- priority=10,tun_metadata0=0xab actions=drop
- priority=9,tcp,tp_src=6 actions=drop
- priority=8,tcp,tp_src=5 actions=drop
-])
-AT_CHECK([ovs-ofctl --rsort=in_port dump-flows br0 | ofctl_strip], [0], [dnl
- priority=4,in_port=23213 actions=output:42
- priority=7,in_port=1029 actions=output:43
- priority=5,in_port=1029 actions=output:43
- priority=3,in_port=1028 actions=output:44
- priority=6,in_port=1027 actions=output:64
- priority=1,in_port=1026 actions=output:45
- priority=2,in_port=1025 actions=output:47
- priority=11,tun_metadata0=0xcd actions=drop
- priority=10,tun_metadata0=0xab actions=drop
- priority=9,tcp,tp_src=6 actions=drop
- priority=8,tcp,tp_src=5 actions=drop
-])
-AT_CHECK([ovs-ofctl --sort=tcp_src dump-flows br0 | ofctl_strip], [0], [dnl
- priority=8,tcp,tp_src=5 actions=drop
- priority=9,tcp,tp_src=6 actions=drop
- priority=11,tun_metadata0=0xcd actions=drop
- priority=10,tun_metadata0=0xab actions=drop
- priority=7,in_port=1029 actions=output:43
- priority=6,in_port=1027 actions=output:64
- priority=5,in_port=1029 actions=output:43
- priority=4,in_port=23213 actions=output:42
- priority=3,in_port=1028 actions=output:44
- priority=2,in_port=1025 actions=output:47
- priority=1,in_port=1026 actions=output:45
-])
-AT_CHECK(
-  [ovs-ofctl --sort=in_port --sort=tcp_src --sort=tun_metadata0 dump-flows br0 | ofctl_strip], [0],
-  [ priority=2,in_port=1025 actions=output:47
- priority=1,in_port=1026 actions=output:45
- priority=6,in_port=1027 actions=output:64
- priority=3,in_port=1028 actions=output:44
- priority=7,in_port=1029 actions=output:43
- priority=5,in_port=1029 actions=output:43
- priority=4,in_port=23213 actions=output:42
- priority=8,tcp,tp_src=5 actions=drop
- priority=9,tcp,tp_src=6 actions=drop
- priority=10,tun_metadata0=0xab actions=drop
- priority=11,tun_metadata0=0xcd actions=drop
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl dump-flows --names])
-AT_KEYWORDS([port names])
-OVS_VSWITCHD_START([\
-    -- add-port br0 xyzzy -- set Interface xyzzy type=dummy -- \
-    -- add-port br0 x-y -- set Interface x-y type=dummy -- \
-    -- add-port br0 abc123 -- set Interface abc123 type=dummy -- \
-    -- add-port br0 reallyverylongportname -- set Interface reallyverylongportname type=dummy -- \
-    -- add-port br0 conflictinglongportname1 -- set Interface conflictinglongportname1 type=dummy -- \
-    -- add-port br0 conflictinglongportname2 -- set Interface conflictinglongportname2 type=dummy])
-
-# These plain port names should be accepted.
-AT_CHECK([ovs-ofctl add-flow br0 in_port=xyzzy,actions=x-y,abc123])
-
-# reallyverylongportname is accepted truncated, but not in full.
-AT_CHECK([ovs-ofctl add-flow br0 in_port=reallyverylongp,actions=drop])
-AT_CHECK([ovs-ofctl add-flow br0 in_port=reallyverylongportname,actions=drop],
-  [1], [], [ovs-ofctl: reallyverylongportname: invalid or unknown port for in_port
-])
-
-# conflictinglongportname1 and 2 can't be accepted even truncated, since
-# they conflict when truncated.
-AT_CHECK([ovs-ofctl add-flow br0 in_port=conflictinglongportname1,actions=drop], [1], [], [ovs-ofctl: conflictinglongportname1: invalid or unknown port for in_port
-])
-AT_CHECK([ovs-ofctl add-flow br0 in_port=conflictinglongportname2,actions=drop], [1], [], [ovs-ofctl: conflictinglongportname2: invalid or unknown port for in_port
-])
-AT_CHECK([ovs-ofctl add-flow br0 in_port=conflictinglong,actions=drop], [1], [], [ovs-ofctl: conflictinglong: invalid or unknown port for in_port
-])
-
-# Show that the port names get displayed properly and that port names that
-# aren't alphanumeric get quoted.
-AT_CHECK([ovs-ofctl --names dump-flows br0 | ofctl_strip | sort], [0], [dnl
- in_port=reallyverylongp actions=drop
- in_port=xyzzy actions=output:"x-y",output:abc123
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl diff-flows])
-OVS_VSWITCHD_START
-
-# Add tons of flows to br0.
-for i in `seq 0 1023`; do echo "dl_vlan=$i,actions=drop"; done > add-flows.txt
-AT_CHECK([ovs-ofctl add-flows br0 add-flows.txt])
-
-# Dump them and compare against what we expect by hand, then with diff-flows.
-for i in `seq 0 1023`; do echo " dl_vlan=$i actions=drop"; done | sort > expout
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sed '/NXST_FLOW/d' | sort],
-  [0], [expout])
-AT_CHECK([ovs-ofctl diff-flows br0 add-flows.txt])
-
-# Remove even-numbered flows, compare again.
-for i in `seq 0 1023 2`; do echo "dl_vlan=$i"; done > del-flows.txt
-AT_CHECK([ovs-ofctl del-flows br0 - < del-flows.txt])
-for i in `seq 0 1023 2`; do echo "+dl_vlan=$i actions=drop"; done | sort > expout
-AT_CHECK([ovs-ofctl diff-flows br0 add-flows.txt | sort], [0], [expout])
-for i in `seq 0 1023 2`; do echo "-dl_vlan=$i actions=drop"; done | sort > expout
-AT_CHECK([ovs-ofctl diff-flows add-flows.txt br0 | sort], [0], [expout])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl diff-flows - tunnel metadata])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=0,len=4}->tun_metadata0,{class=0xffff,type=1,len=8}->tun_metadata1"])
-
-# Tunnel metadata requires dynamic allocation of space in the metadata table.
-# To stress this, try flows with different sizes for metadata, in different
-# orders, and interspersed with other fields to see if they still compare
-# correctly.
-AT_DATA([flows.txt], [dnl
-priority=0,tun_metadata0=0,actions=drop
-priority=1,tun_metadata1=0xef/0xff,tun_metadata0=0xabcd,actions=drop
-priority=2,tun_metadata0=0xffffffff,actions=drop
-])
-
-AT_DATA([flows2.txt], [dnl
-priority=2,tun_metadata0=0xffffffff,actions=drop
-priority=0,tun_metadata0=0,actions=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl diff-flows br0 flows2.txt], [2], [dnl
--priority=1,tun_metadata0=0xabcd,tun_metadata1=0xef/0xff actions=drop
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl ofpacts that differ bytewise don't necessarily differ when
-dnl converted to another representation, such as OpenFlow 1.0
-dnl or to a string.  "resubmit(,1)" is an example of an action
-dnl of this type: "ofpact_resubmit"s can differ in their "compat"
-dnl values even though this doesn't affect the string format.
-dnl
-dnl This test checks that "ovs-ofctl diff-flows" doesn't report
-dnl false ofpacts differences.
-AT_SETUP([ovs-ofctl diff-flows - suppress false differences])
-OVS_VSWITCHD_START
-AT_DATA([flows.txt], [actions=resubmit(,1)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl diff-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl add-flow br0 idle_timeout=60,dl_vlan=9,actions=output:1])
-AT_CHECK([ovs-ofctl diff-flows br0 flows.txt], [2], [dnl
--dl_vlan=9 idle_timeout=60 actions=output:1
-])
-AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=120,cookie=1234,dl_vlan=9,actions=output:1])
-AT_CHECK([ovs-ofctl diff-flows flows.txt br0], [2], [dnl
-+dl_vlan=9 cookie=0x4d2 hard_timeout=120 actions=output:1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl -F and -O interaction])
-AT_CHECK([ovs-ofctl -F oxm -O openflow10], [1], [],
-  [ovs-ofctl: None of the enabled OpenFlow versions (OpenFlow10) supports any of the enabled flow formats (OXM).  (Use -O to enable additional OpenFlow versions or -F to enable additional flow formats.)
-])
-AT_CHECK([ovs-ofctl -F oxm -O openflow11], [1], [],
-  [ovs-ofctl: None of the enabled OpenFlow versions (OpenFlow11) supports any of the enabled flow formats (OXM).  (Use -O to enable additional OpenFlow versions or -F to enable additional flow formats.)
-])
-AT_CHECK([ovs-ofctl -F oxm -O openflow10,openflow11], [1], [],
-  [ovs-ofctl: None of the enabled OpenFlow versions (OpenFlow10, OpenFlow11) supports any of the enabled flow formats (OXM).  (Use -O to enable additional OpenFlow versions or -F to enable additional flow formats.)
-])
-AT_CHECK([ovs-ofctl -F oxm -O openflow10,openflow12], [1], [],
- [ovs-ofctl: missing command name; use --help for help
-])
-AT_CHECK([ovs-ofctl -F oxm -O openflow12], [1], [],
-  [ovs-ofctl: missing command name; use --help for help
-])
-AT_CHECK([ovs-ofctl -F oxm -O openflow13], [1], [],
-  [ovs-ofctl: missing command name; use --help for help
-])
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl ofp-parse])
-# Test the echo request/reply messages (0 payload).
-AT_CHECK([printf '\1\2\0\10\0\0\0\0\1\3\0\10\0\0\0\0' > binary_ofp_msg])
-AT_CHECK([ovs-ofctl ofp-parse binary_ofp_msg], [0], [dnl
-OFPT_ECHO_REQUEST (xid=0x0): 0 bytes of payload
-OFPT_ECHO_REPLY (xid=0x0): 0 bytes of payload
-])
-
-# Test the hello (xid:1 3-byte payload).
-AT_CHECK([printf '\1\0\0\13\0\0\0\1\101\102\103' > binary_ofp_msg])
-AT_CHECK([ovs-ofctl ofp-parse - < binary_ofp_msg], [0], [dnl
-OFPT_HELLO (xid=0x1):
- version bitmap: 0x01
- unknown data in hello:
-00000000  01 00 00 0b 00 00 00 01-41 42 43                |........ABC     |
-])
-AT_CLEANUP
-
-AT_SETUP([tcp flags - filtering])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 \
-                    -- add-port br0 p2 -- set Interface p2 type=dummy ofport_request=2])
-AT_DATA([flows.txt], [dnl
-        in_port=1,tcp,tp_dst=80,tcp_flags=+syn-rst-ack-fin,action=2  # Allow outbound web traffic bare-SYN
-        in_port=1,tcp,tp_dst=80,tcp_flags=+ack,action=2  # Allow outbound web traffic with ACK bit
-        in_port=1,tcp,tp_dst=80,tcp_flags=+rst,action=2  # Allow outbound web traffic with RST bit
-        in_port=2,tcp,tp_src=80,tcp_flags=+ack,action=1  # Allow inbound web traffic with ACK bit
-        in_port=2,tcp,tp_src=80,tcp_flags=+rst,action=1  # Allow inbound web traffic with RST bit
-        priority=0,in_port=1,action=drop  # Default drop outbound
-        priority=0,in_port=2,action=drop  # Default drop inbound
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-ofctl add-flow br0 "tcp,tcp_flags=+ack-ack,action="], [1], [],
-  [ovs-ofctl: ack: Each TCP flag can be specified only once
-])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +4], [0], [dnl
-    p1 1/1: (dummy)
-    p2 2/2: (dummy)
-])
-
-dnl Outbound web traffic with bare-SYN
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=80),tcp_flags(0x002)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 2
-])
-
-dnl Outbopund web traffic with ACK bit
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=80),tcp_flags(0x110)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 2
-])
-
-dnl Outbound web traffic with RST bit
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=80),tcp_flags(0x104)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 2
-])
-
-dnl Inbound web traffic with ACK bit
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=80,dst=8),tcp_flags(0x010)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 1
-])
-
-dnl Inbound web traffic with RST bit
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=80,dst=8),tcp_flags(0x014)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 1
-])
-
-dnl Inbound web traffic with SYN bit without ACK or RST bits
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=80,dst=8),tcp_flags(0xfeb)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: drop
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Check importance parameter added in OF1.4.
-dnl It validates whether importance set via add-flow via OpenFlow1.4+ gets
-dnl set or not by validating it against the dump-flows output via OpenFlow1.4+
-dnl If add-flow or dump-flows is used with later version of OpenFlow prior to 1.4+
-dnl then the importance will be considered zero whether provided as an argument.
-
-AT_SETUP([ovs-ofctl rule with importance])
-OVS_VSWITCHD_START
-dnl Flow with importance parameter added via OF1.4+ and later version
-AT_CHECK([ovs-ofctl -O OpenFlow14 add-flow br0 priority=21,importance=21,actions=normal])
-AT_CHECK([ovs-ofctl add-flow br0 priority=22,importance=22,actions=normal])
-
-dnl Importance parameter will only be visible of flows that are added via OF1.4+ if dumped via OF1.4+
-AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sed '/ST_FLOW reply/d' | sort], [0], [dnl
- importance=21, priority=21 actions=NORMAL
- reset_counts priority=22 actions=NORMAL
-])
-
-dnl Importance parameter will not be visible if flow is dumped with previous version prior to OF1.4+ whether added via OF1.4+
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sed '/ST_FLOW reply/d' | sort], [0], [dnl
- priority=21 actions=NORMAL
- priority=22 actions=NORMAL
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-dnl Importance parameter added in OF1.4.
-dnl This validates whether flows with importance
-dnl parameter are getting replaced with "replace-flows" or
-dnl not by validating dump-flows output after replace with the expected output.
-
-AT_SETUP([ovs-ofctl replace-flows with importance])
-OVS_VSWITCHD_START
-
-dnl Add flows to br0 with importance via OF1.4+. For more details refer "ovs-ofctl rule with importance" test case.
-for i in 1 2 3 4 5 6 7 8; do echo "dl_vlan=$i,importance=$i,actions=drop"; done > add-flows.txt
-AT_CHECK([ovs-ofctl -O OpenFlow14 add-flows br0 add-flows.txt])
-
-dnl Replace the flows in the bridge.
-for i in 1 3 5 7; do echo " importance=`expr $i + 10`, dl_vlan=$i actions=drop"; done > replace-flows.txt
-AT_CHECK([ovs-ofctl -O OpenFlow14 replace-flows br0 replace-flows.txt])
-
-dnl Dump them and compare the dump flows output against the expected output.
-cat replace-flows.txt > expout
-AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sed '/OFPST_FLOW/d' | sort],
-  [0], [expout])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ovs-ofctl replace-flows with --bundle])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-appctl vlog/set vconn:dbg])
-
-dnl Add flows to br0 with importance via OF1.4+, using an OF1.4+ bundle. For more details refer "ovs-ofctl rule with importance" test case.
-for i in 1 2 3 4 5 6 7 8; do echo "table=$i,dl_vlan=$i,importance=$i,actions=drop"; done > add-flows.txt
-AT_CHECK([ovs-ofctl --bundle --no-names add-flows br0 add-flows.txt])
-
-dnl Replace some flows in the bridge.
-for i in 1 3 5 7; do echo " table=$i, importance=`expr $i + 10`, dl_vlan=$i actions=drop"; done > replace-flows.txt
-AT_CHECK([ovs-ofctl --bundle --no-names replace-flows br0 replace-flows.txt])
-
-dnl Dump them and compare the dump flows output against the expected output.
-cat replace-flows.txt > expout
-AT_CHECK([ovs-ofctl -O OpenFlow14 --no-names dump-flows br0 | ofctl_strip | sed '/OFPST_FLOW/d' | sort],
-  [0], [expout])
-
-dnl Check logs for OpenFlow trace
-# Prevent race.
-OVS_WAIT_UNTIL([vconn_sub < ovs-vswitchd.log | test `grep -- "|vconn|DBG|unix: sent (Success): OFPST_FLOW reply" | wc -l` -ge 2])
-# AT_CHECK([sed -n "s/^.*\(|vconn|DBG|.*xid=.*:\).*$/\1/p" ovs-vswitchd.log], [0], [dnl
-AT_CHECK([print_vconn_debug | vconn_sub | ofctl_strip], [0], [dnl
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO (OF1.4):
- version bitmap: 0x05
-vconn|DBG|unix: negotiated OpenFlow version 0x05 (we support version 0x06 and earlier, peer supports version 0x05)
-vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=OPEN_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=OPEN_REPLY flags=0
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:1 dl_vlan=1 importance:1 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:2 dl_vlan=2 importance:2 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:3 dl_vlan=3 importance:3 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:4 dl_vlan=4 importance:4 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:5 dl_vlan=5 importance:5 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:6 dl_vlan=6 importance:6 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:7 dl_vlan=7 importance:7 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:8 dl_vlan=8 importance:8 actions=drop
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST (OF1.4):
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY (OF1.4):
-vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=COMMIT_REPLY flags=0
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO (OF1.4):
- version bitmap: 0x05
-vconn|DBG|unix: negotiated OpenFlow version 0x05 (we support version 0x06 and earlier, peer supports version 0x05)
-vconn|DBG|unix: received: OFPST_FLOW request (OF1.4):
-vconn|DBG|unix: sent (Success): OFPST_FLOW reply (OF1.4):
- table=1, importance=1, dl_vlan=1 actions=drop
- table=2, importance=2, dl_vlan=2 actions=drop
- table=3, importance=3, dl_vlan=3 actions=drop
- table=4, importance=4, dl_vlan=4 actions=drop
- table=5, importance=5, dl_vlan=5 actions=drop
- table=6, importance=6, dl_vlan=6 actions=drop
- table=7, importance=7, dl_vlan=7 actions=drop
- table=8, importance=8, dl_vlan=8 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=OPEN_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=OPEN_REPLY flags=0
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:1 dl_vlan=1 importance:11 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): DEL_STRICT table:2 dl_vlan=2 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:3 dl_vlan=3 importance:13 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): DEL_STRICT table:4 dl_vlan=4 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:5 dl_vlan=5 importance:15 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): DEL_STRICT table:6 dl_vlan=6 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): ADD table:7 dl_vlan=7 importance:17 actions=drop
-vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
- bundle_id=0 flags=atomic ordered
-OFPT_FLOW_MOD (OF1.4): DEL_STRICT table:8 dl_vlan=8 actions=drop
-vconn|DBG|unix: received: OFPT_BARRIER_REQUEST (OF1.4):
-vconn|DBG|unix: sent (Success): OFPT_BARRIER_REPLY (OF1.4):
-vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
-vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
- bundle_id=0 type=COMMIT_REPLY flags=0
-vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
- version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
-vconn|DBG|unix: received: OFPT_HELLO (OF1.4):
- version bitmap: 0x05
-vconn|DBG|unix: negotiated OpenFlow version 0x05 (we support version 0x06 and earlier, peer supports version 0x05)
-vconn|DBG|unix: received: OFPST_FLOW request (OF1.4):
-vconn|DBG|unix: sent (Success): OFPST_FLOW reply (OF1.4):
- table=1, importance=11, dl_vlan=1 actions=drop
- table=3, importance=13, dl_vlan=3 actions=drop
- table=5, importance=15, dl_vlan=5 actions=drop
- table=7, importance=17, dl_vlan=7 actions=drop
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ovs-ofctl ct-flush-zone])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-appctl vlog/set ct_dpif:dbg])
-AT_CHECK([ovs-ofctl ct-flush-zone br0 123])
-
-OVS_WAIT_UNTIL([grep -q "|ct_dpif|DBG|.*ct_flush:" ovs-vswitchd.log])
-AT_CHECK([grep -q "ct_dpif|DBG|.*ct_flush: zone 123" ovs-vswitchd.log])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ovs-ofctl snoop])
-OVS_VSWITCHD_START
-
-dnl setup controller for br0 before starting the controller
-AT_CHECK([ovs-vsctl -vsyslog:off set-controller br0 unix:testcontroller])
-
-dnl then start listening on the '.snoop' connection
-on_exit 'kill `cat ovs-ofctl-snoop.pid`'
-AT_CHECK([ovs-ofctl -vsyslog:off --detach --no-chdir --pidfile=ovs-ofctl-snoop.pid snoop br0 > snoopbr0.txt 2>&1])
-
-dnl finally start the controller
-on_exit 'kill `cat ovs-testcontroller.pid`'
-AT_CHECK([ovs-testcontroller -vsyslog:off --detach --no-chdir --pidfile punix:testcontroller], [0], [ignore])
-OVS_WAIT_UNTIL([test -e testcontroller])
-
-dnl check for some of the initial handshake messages
-OVS_WAIT_UNTIL([egrep "OFPT_FEATURES_REQUEST" snoopbr0.txt >/dev/null 2>&1])
-OVS_WAIT_UNTIL([egrep "OFPT_FEATURES_REPLY" snoopbr0.txt >/dev/null 2>&1])
-OVS_WAIT_UNTIL([egrep "OFPT_SET_CONFIG" snoopbr0.txt >/dev/null 2>&1])
-
-dnl need to suppress the 'connection failed' WARN message in ovs-vswitchd
-dnl because we need ovs-vswitchd to have the controller config before starting
-dnl the controller to 'snoop' the OpenFlow messages from beginning
-OVS_VSWITCHD_STOP(["/connection failed (No such file or directory)/d"])
-AT_CLEANUP
diff --git a/tests/ovs-router.at b/tests/ovs-router.at
deleted file mode 100644
index 6dacc2954..000000000
--- a/tests/ovs-router.at
+++ /dev/null
@@ -1,83 +0,0 @@
-AT_BANNER([ovs-router])
-
-AT_SETUP([appctl - route/add with gateway])
-AT_KEYWORDS([ovs_router])
-OVS_VSWITCHD_START([add-port br0 p2 -- set Interface p2 type=gre \
-                        options:local_ip=2.2.2.2 options:remote_ip=1.1.1.1 \
-                        -- add-port br0 p1  -- set interface p1 type=dummy])
-AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 2.2.2.2/24], [0], [OK
-])
-AT_CHECK([ovs-appctl ovs/route/add 1.1.1.0/24 br0 2.2.2.10], [0], [OK
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([appctl - route/lookup])
-AT_KEYWORDS([ovs_router])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
-AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 192.0.2.1/24], [0], [OK
-])
-AT_CHECK([ovs-appctl ovs/route/add 198.51.100.0/24 br0 192.0.2.254], [0], [OK
-])
-AT_CHECK([ovs-appctl ovs/route/add 192.0.2.1/24 br0 pkt_mark=123], [0], [OK
-])
-
-AT_CHECK([ovs-appctl ovs/route/add 198.51.100.200/24 br0 192.0.2.250 pkt_mark=1234], [0], [OK
-])
-
-AT_CHECK([ovs-appctl ovs/route/show | grep User | sort], [0], [User: 192.0.2.0/24 MARK 123 dev br0 SRC 192.0.2.1
-User: 198.51.100.0/24 MARK 1234 dev br0 GW 192.0.2.250 SRC 192.0.2.1
-User: 198.51.100.0/24 dev br0 GW 192.0.2.254 SRC 192.0.2.1
-])
-
-AT_CHECK([ovs-appctl ovs/route/lookup 198.51.100.1], [0], [src 192.0.2.1
-gateway 192.0.2.254
-dev br0
-])
-
-AT_CHECK([ovs-appctl ovs/route/lookup 198.51.100.1 pkt_mark=1234], [0], [src 192.0.2.1
-gateway 192.0.2.250
-dev br0
-])
-AT_CHECK([ovs-appctl ovs/route/del 198.51.100.0/24 pkt_mark=1234], [0], [OK
-])
-AT_CHECK([ovs-appctl ovs/route/show | grep User | sort], [0], [User: 192.0.2.0/24 MARK 123 dev br0 SRC 192.0.2.1
-User: 198.51.100.0/24 dev br0 GW 192.0.2.254 SRC 192.0.2.1
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([appctl - route/lookup6])
-AT_KEYWORDS([ovs_router])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
-AT_CHECK([ovs-appctl netdev-dummy/ip6addr br0 2001:db8:cafe::1/64], [0], [OK
-])
-AT_CHECK([ovs-appctl ovs/route/add 2001:db8:babe::/64 br0 2001:db8:cafe::2], [0], [OK
-])
-AT_CHECK([ovs-appctl ovs/route/add 2001:db8:babe::/64 br0 2001:db8:cafe::3 pkt_mark=321], [0], [OK
-])
-
-AT_CHECK([ovs-appctl ovs/route/show | grep User | sort], [0], [dnl
-User: 2001:db8:babe::/64 MARK 321 dev br0 GW 2001:db8:cafe::3 SRC 2001:db8:cafe::1
-User: 2001:db8:babe::/64 dev br0 GW 2001:db8:cafe::2 SRC 2001:db8:cafe::1
-])
-
-AT_CHECK([ovs-appctl ovs/route/lookup 2001:db8:babe::1eaf], [0], [src 2001:db8:cafe::1
-gateway 2001:db8:cafe::2
-dev br0
-])
-
-AT_CHECK([ovs-appctl ovs/route/lookup 2001:db8:babe::1eaf pkt_mark=321], [0], [src 2001:db8:cafe::1
-gateway 2001:db8:cafe::3
-dev br0
-])
-
-AT_CHECK([ovs-appctl ovs/route/del 2001:db8:babe::/64 pkt_mark=321], [0], [OK
-])
-AT_CHECK([ovs-appctl ovs/route/show | grep User | sort], [0], [dnl
-User: 2001:db8:babe::/64 dev br0 GW 2001:db8:cafe::2 SRC 2001:db8:cafe::1
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/ovs-vsctl.at b/tests/ovs-vsctl.at
deleted file mode 100644
index 77604c58a..000000000
--- a/tests/ovs-vsctl.at
+++ /dev/null
@@ -1,1444 +0,0 @@
-dnl OVS_VSCTL_SETUP
-dnl
-dnl Creates an empty database in the current directory and then starts
-dnl an ovsdb-server on it for ovs-vsctl to connect to.
-m4_define([OVS_VSCTL_SETUP],
-  [OVSDB_INIT([db])
-   AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:db.sock db >/dev/null 2>&1], [0], [ignore], [ignore])
-   on_exit 'kill `cat ovsdb-server.pid`'])
-
-dnl OVS_VSCTL_CLEANUP
-dnl
-dnl Kills off the database server.
-m4_define([OVS_VSCTL_CLEANUP], [OVS_APP_EXIT_AND_WAIT_BY_TARGET([ovsdb-server], [ovsdb-server.pid])])
-
-dnl RUN_OVS_VSCTL(COMMAND, ...)
-dnl
-dnl Executes each ovs-vsctl COMMAND.
-m4_define([RUN_OVS_VSCTL],
-  [m4_foreach([command], [$@], [ovs-vsctl --no-wait -vreconnect:emer command
-])])
-m4_define([RUN_OVS_VSCTL_ONELINE],
-  [m4_foreach([command], [$@], [ovs-vsctl --no-wait -vreconnect:emer --oneline -- command
-])])
-
-dnl RUN_OVS_VSCTL_TOGETHER(COMMAND, ...)
-dnl
-dnl Executes each ovs-vsctl COMMAND in a single run of ovs-vsctl.
-m4_define([RUN_OVS_VSCTL_TOGETHER],
-  [ovs-vsctl --no-wait -vreconnect:emer --oneline dnl
-m4_foreach([command], [$@], [ -- command])])
-
-dnl CHECK_BRIDGES([BRIDGE, PARENT, VLAN], ...)
-dnl
-dnl Verifies that "ovs-vsctl list-br" prints the specified list of bridges,
-dnl which must be in alphabetical order.  Also checks that each BRIDGE has the
-dnl specified PARENT and is on the given VLAN.
-m4_define([_CHECK_BRIDGE],
-  [AT_CHECK([RUN_OVS_VSCTL([br-to-parent $1])], [0], [$2
-])
-
-   # Check br-to-vlan, without --oneline.
-   AT_CHECK([RUN_OVS_VSCTL([br-to-vlan $1])], [0], [$3
-])
-   # Check br-to-vlan, with --oneline.
-   # (This particular test is interesting with --oneline because it returns
-   # an integer instead of a string and that can cause type mismatches inside
-   # python if not done carefully.)
-   AT_CHECK([RUN_OVS_VSCTL_ONELINE([br-to-vlan $1])], [0], [$3
-])
-
-   # Check multiple queries in a single run.
-   AT_CHECK([RUN_OVS_VSCTL_TOGETHER([br-to-parent $1], [br-to-vlan $1])], [0],
-[$2
-$3
-])])
-m4_define([CHECK_BRIDGES],
-  [dnl Check that the bridges appear on list-br, without --oneline.
-   AT_CHECK(
-     [RUN_OVS_VSCTL([list-br])],
-     [0],
-     [m4_foreach([brinfo], [$@], [m4_car(brinfo)
-])])
-
-   dnl Check that the bridges appear on list-br, with --oneline.
-   AT_CHECK(
-     [RUN_OVS_VSCTL_ONELINE([list-br])],
-     [0],
-     [m4_join([\n], m4_foreach([brinfo], [$@], [m4_car(brinfo),]))
-])
-
-   dnl Check that each bridge exists according to br-exists and that
-   dnl a bridge that should not exist does not.
-   m4_foreach([brinfo], [$@],
-              [AT_CHECK([RUN_OVS_VSCTL([br-exists m4_car(brinfo)])])])
-   AT_CHECK([RUN_OVS_VSCTL([br-exists nonexistent])], [2])
-
-   dnl Check that each bridge has the expected parent and VLAN.
-   m4_map([_CHECK_BRIDGE], [$@])])
-
-dnl CHECK_PORTS(BRIDGE, PORT[, PORT...])
-dnl
-dnl Verifies that "ovs-vsctl list-ports BRIDGE" prints the specified
-dnl list of ports, which must be in alphabetical order.  Also checks
-dnl that "ovs-vsctl port-to-br" reports that each port is
-dnl in BRIDGE.
-m4_define([CHECK_PORTS],
-  [dnl Check ports without --oneline.
-   AT_CHECK(
-     [RUN_OVS_VSCTL([list-ports $1])],
-     [0],
-     [m4_foreach([port], m4_cdr($@), [port
-])])
-
-   dnl Check ports with --oneline.
-   AT_CHECK(
-     [RUN_OVS_VSCTL_ONELINE([list-ports $1])],
-     [0],
-     [m4_join([\n], m4_shift($@))
-])
-   AT_CHECK([RUN_OVS_VSCTL([port-to-br $1])], [1], [],
-            [ovs-vsctl: no port named $1
-])
-   m4_foreach(
-     [port], m4_cdr($@),
-     [AT_CHECK([RUN_OVS_VSCTL([[port-to-br] port])], [0], [$1
-])])])
-
-dnl CHECK_IFACES(BRIDGE, IFACE[, IFACE...])
-dnl
-dnl Verifies that "ovs-vsctl list-ifaces BRIDGE" prints the specified
-dnl list of ifaces, which must be in alphabetical order.  Also checks
-dnl that "ovs-vsctl iface-to-br" reports that each interface is
-dnl in BRIDGE.
-m4_define([CHECK_IFACES],
-  [AT_CHECK(
-     [RUN_OVS_VSCTL([list-ifaces $1])],
-     [0],
-     [m4_foreach([iface], m4_cdr($@), [iface
-])])
-   AT_CHECK([RUN_OVS_VSCTL([iface-to-br $1])], [1], [],
-            [ovs-vsctl: no interface named $1
-])
-   m4_foreach(
-     [iface], m4_cdr($@),
-     [AT_CHECK([RUN_OVS_VSCTL([[iface-to-br] iface])], [0], [$1
-])])])
-
-dnl ----------------------------------------------------------------------
-AT_BANNER([ovs-vsctl unit tests])
-
-AT_SETUP([ovs-vsctl connection retry])
-dnl Without --retry, there should be no retry for active connections.
-AT_CHECK([ovs-vsctl --db=unix:foo --timeout=10 -vreconnect:emer -- init],
-  [1], [], [stderr])
-AT_CHECK([[sed 's/([^()]*)/(...reason...)/' stderr]], [0],
-  [ovs-vsctl: unix:foo: database connection failed (...reason...)
-])
-
-dnl With --retry, we should retry for active connections.
-AT_CHECK(
-  [ovs-vsctl --db=unix:foo --timeout=1 --retry -vreconnect:emer -vPATTERN:console:'%c|%p|%m' -- init
-   echo $? > status],
-  [0], [], [stderr])
-AT_CHECK([grep -c 'terminating with signal' stderr], [0], [1
-])
-if test "$IS_WIN32" = "yes"; then
-  AT_CHECK([cat status], [0], [3
-])
-else
-  # 128 + SIGALRM
-  AT_CHECK([cat status], [0], [142
-])
-fi
-
-dnl Without --retry, we should retry for passive connections.
-AT_CHECK(
-  [ovs-vsctl --db=punix:foo --timeout=1 -vreconnect:emer -vPATTERN:console:'%c|%p|%m' -- init
-   echo $? > status],
-  [0], [], [stderr])
-AT_CHECK([grep -c 'terminating with signal' stderr], [0], [1
-])
-if test "$IS_WIN32" = "yes"; then
-  AT_CHECK([cat status], [0], [3
-])
-else
-  # 128 + SIGALRM
-  AT_CHECK([cat status], [0], [142
-])
-fi
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-AT_BANNER([ovs-vsctl unit tests -- real bridges])
-
-AT_SETUP([add-br a])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL([add-br a])])
-CHECK_BRIDGES([a, a, 0])
-CHECK_PORTS([a])
-CHECK_IFACES([a])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-br a, add-br a])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL([add-br a])], [0])
-AT_CHECK([RUN_OVS_VSCTL([add-br a])], [1], [],
-  [ovs-vsctl: cannot create a bridge named a because a bridge named a already exists
-])
-AT_CHECK([RUN_OVS_VSCTL([add-br ''])], [1], [],
-  [ovs-vsctl: bridge name must not be empty string
-])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-br a, add-br b])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL([add-br a], [add-br b])])
-AT_CHECK([RUN_OVS_VSCTL([--may-exist add-br a b 9])], [1], [],
-  [ovs-vsctl: "--may-exist add-br a b 9" but a is not a VLAN bridge
-])
-CHECK_BRIDGES([a, a, 0], [b, b, 0])
-CHECK_PORTS([a])
-CHECK_IFACES([a])
-CHECK_PORTS([b])
-CHECK_IFACES([b])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-br a, add-br b, del-br a])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL([add-br a], [add-br b], [del-br a])])
-CHECK_BRIDGES([b, b, 0])
-CHECK_PORTS([b])
-CHECK_IFACES([b])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-br a, del-br a, add-br a])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
-  [add-br a],
-  [del-br a],
-  [add-br a],
-  [set Interface a other_config:key=value],
-  [get Interface a other_config:key])], [0], [
-
-
-
-value
-])
-CHECK_BRIDGES([a, a, 0])
-CHECK_PORTS([a])
-CHECK_IFACES([a])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-br a, add-port a a1, add-port a a2])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL(
-   [add-br a],
-   [--if-exists del-br b],
-   [add-port a a1],
-   [add-port a a2])])
-CHECK_BRIDGES([a, a, 0])
-CHECK_PORTS([a], [a1], [a2])
-CHECK_IFACES([a], [a1], [a2])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-br a, add-port a a1, add-port a a1])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL(
-   [add-br a],
-   [add-port a a1])])
-AT_CHECK([RUN_OVS_VSCTL([add-port a a1])], [1], [],
-  [ovs-vsctl: cannot create a port named a1 because a port named a1 already exists on bridge a
-])
-AT_CHECK([RUN_OVS_VSCTL([add-port a ''])], [1], [],
-  [ovs-vsctl: port name must not be empty string
-])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-br a b, add-port a a1, add-port b b1, del-br a])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
-   [add-br a],
-   [add-br b],
-   [add-port a a1],
-   [add-port b b1],
-   [--if-exists del-port b b2],
-   [del-br a])], [0], [
-
-
-
-
-
-])
-CHECK_BRIDGES([b, b, 0])
-CHECK_PORTS([b], [b1])
-CHECK_IFACES([b], [b1])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-br a, add-bond a bond0 a1 a2 a3])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL(
-   [add-br a],
-   [add-bond a bond0 a1 a2 a3])])
-AT_CHECK([RUN_OVS_VSCTL([--may-exist add-bond a bond0 a3 a1 a2])])
-AT_CHECK([RUN_OVS_VSCTL([--may-exist add-bond a bond0 a2 a1])], [1], [],
-  [ovs-vsctl: "--may-exist add-bond a bond0 a2 a1" but bond0 actually has interface(s) a1, a2, a3
-])
-AT_CHECK([RUN_OVS_VSCTL([add-bond a '' x y z])], [1], [],
-  [ovs-vsctl: port name must not be empty string
-])
-AT_CHECK([RUN_OVS_VSCTL([add-bond a x '' y z])], [1], [],
-  [ovs-vsctl: interface name must not be empty string
-])
-CHECK_BRIDGES([a, a, 0])
-CHECK_PORTS([a], [bond0])
-CHECK_IFACES([a], [a1], [a2], [a3])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-bond-iface and del-bond-iface])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-
-# Create 2-interface bond.
-AT_CHECK([RUN_OVS_VSCTL(
-   [add-br a],
-   [add-bond a bond0 a1 a2])])
-CHECK_BRIDGES([a, a, 0])
-CHECK_PORTS([a], [bond0])
-CHECK_IFACES([a], [a1], [a2])
-
-# Add interface a3 to bond.
-AT_CHECK([RUN_OVS_VSCTL([add-bond-iface bond0 a3])])
-CHECK_BRIDGES([a, a, 0])
-CHECK_PORTS([a], [bond0])
-CHECK_IFACES([a], [a1], [a2], [a3])
-
-# Delete interface a2 from bond.
-AT_CHECK([RUN_OVS_VSCTL([del-bond-iface bond0 a2])])
-CHECK_BRIDGES([a, a, 0])
-CHECK_PORTS([a], [bond0])
-CHECK_IFACES([a], [a1], [a3])
-
-# Add interface a2 to bond.
-AT_CHECK([RUN_OVS_VSCTL([add-bond-iface bond0 a2])])
-CHECK_BRIDGES([a, a, 0])
-CHECK_PORTS([a], [bond0])
-CHECK_IFACES([a], [a1], [a2], [a3])
-
-# Delete interface a2 from bond.
-AT_CHECK([RUN_OVS_VSCTL([del-bond-iface a2])])
-CHECK_BRIDGES([a, a, 0])
-CHECK_PORTS([a], [bond0])
-CHECK_IFACES([a], [a1], [a3])
-
-AT_CHECK([RUN_OVS_VSCTL([--if-exists del-bond-iface bond0 a4])])
-AT_CHECK([RUN_OVS_VSCTL([del-bond-iface bond0 a4])], [1], [],
-  [ovs-vsctl: no interface named a4
-])
-AT_CHECK([RUN_OVS_VSCTL([del-bond-iface a4])], [1], [],
-  [ovs-vsctl: no interface named a4
-])
-AT_CHECK([RUN_OVS_VSCTL_TOGETHER([add-port a a4], [del-bond-iface bond0 a4])], [1], [],
-  [ovs-vsctl: port bond0 does not have an interface a4
-])
-AT_CHECK([RUN_OVS_VSCTL([--may-exist add-bond-iface bond0 a3])])
-AT_CHECK([RUN_OVS_VSCTL_TOGETHER([add-bond a bond1 b1 b2 b3], [--may-exist add-bond-iface bond1 a3])], [1], [],
-  [ovs-vsctl: "--may-exist add-bond-iface bond1 a3" but a3 is actually attached to port bond0
-])
-AT_CHECK([RUN_OVS_VSCTL([add-bond-iface bond0 a3])], [1], [],
-  [ovs-vsctl: cannot create an interface named a3 because an interface named a3 already exists on bridge a
-])
-AT_CHECK([RUN_OVS_VSCTL_TOGETHER([del-bond-iface a1], [del-bond-iface a3])], [1], [],
-  [ovs-vsctl: cannot delete last interface from port bond0
-])
-
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-br a b, add-port a a1, add-port b b1, del-port a a1])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL(
-  [add-br a],
-  [add-br b],
-  [add-port a a1 tag=9],
-  [get port a1 tag],
-  [--may-exist add-port b b1],
-  [del-port a a1])], [0], [9
-])
-AT_CHECK([RUN_OVS_VSCTL([--may-exist add-port b b1])])
-AT_CHECK([RUN_OVS_VSCTL([del-port a])], [1], [],
-  [ovs-vsctl: cannot delete port a because it is the local port for bridge a (deleting this port requires deleting the entire bridge)
-])
-AT_CHECK([RUN_OVS_VSCTL([--if-exists del-port a])])
-AT_CHECK([RUN_OVS_VSCTL([--may-exist add-port a b1])], [1], [],
-  [ovs-vsctl: "--may-exist add-port a b1" but b1 is actually attached to bridge b
-])
-CHECK_BRIDGES([a, a, 0], [b, b, 0])
-CHECK_PORTS([a])
-CHECK_IFACES([a])
-CHECK_PORTS([b], [b1])
-CHECK_IFACES([b], [b1])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-br a, add-bond a bond0 a1 a2 a3, del-port bond0])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
-  [add-br a],
-  [add-bond a bond0 a1 a2 a3 tag=9],
-  [get Port bond0 tag],
-  [del-port bond0])], [0], [
-
-9
-
-])
-CHECK_BRIDGES([a, a, 0])
-CHECK_PORTS([a])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([external IDs])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL_ONELINE(
-  [add-br a],
-  [add-port a a1],
-  [add-bond a bond0 a2 a3],
-  [br-set-external-id a key0 value0],
-  [set port a1 external-ids:key1=value1],
-  [set interface a2 external-ids:key2=value2],
-  [set interface a2 external-ids:key3=value3],
-  [set interface a3 external-ids:key4=value4],
-  [br-get-external-id a],
-  [br-get-external-id a key0],
-  [br-get-external-id a key1],
-  [br-set-external-id a key0 othervalue],
-  [br-get-external-id a],
-  [br-set-external-id a key0],
-  [br-get-external-id a],
-  [get port a1 external-ids],
-  [get interface a2 external-ids],
-  [get interface a3 external-ids])], [0], [
-
-
-
-
-
-
-
-key0=value0
-value0
-
-
-key0=othervalue
-
-
-{"key1"="value1"}
-{"key2"="value2", "key3"="value3"}
-{"key4"="value4"}
-])
-AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
-  [br-get-external-id a],
-  [get port a1 external-ids],
-  [get interface a2 external-ids],
-  [get interface a3 external-ids])], [0],
-[
-{"key1"="value1"}
-{"key2"="value2", "key3"="value3"}
-{"key4"="value4"}
-])
-CHECK_BRIDGES([a, a, 0])
-CHECK_PORTS([a], [a1], [bond0])
-CHECK_IFACES([a], [a1], [a2], [a3])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([controllers])
-AT_KEYWORDS([controller ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
-  [add-br br0],
-
-  [get-controller br0],
-  [set-controller br0 tcp:4.5.6.7],
-  [get-controller br0],
-
-  [del-controller br0],
-  [get-controller br0],
-
-  [set-controller br0 tcp:8.9.10.11 tcp:5.4.3.2],
-  [get-controller br0],
-
-  [--inactivity-probe=30000 set-controller br0 tcp:1.2.3.4],
-  [get-controller br0])], [0], [
-
-
-tcp:4.5.6.7
-
-
-
-tcp:5.4.3.2\ntcp:8.9.10.11
-
-tcp:1.2.3.4
-])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-dnl OVS_VSCTL_SETUP_SIMPLE_FAKE_CONF([VLAN])
-m4_define([OVS_VSCTL_SETUP_SIMPLE_FAKE_CONF],
-  [AT_CHECK(
-     [RUN_OVS_VSCTL(
-        [add-br xenbr0],
-        [--may-exist add-br xenbr0],
-        [add-port xenbr0 eth0],
-        [--may-exist add-port xenbr0 eth0],
-        [add-br xapi1 xenbr0 $1],
-        [--may-exist add-br xapi1 xenbr0 $1],
-        [add-port xapi1 eth0.$1])])])
-
-dnl OVS_VSCTL_FAKE_BRIDGE_TESTS([VLAN])
-m4_define([OVS_VSCTL_FAKE_BRIDGE_TESTS], [
-AT_BANNER([ovs-vsctl unit tests -- fake bridges (VLAN $1)])
-
-AT_SETUP([simple fake bridge (VLAN $1)])
-AT_KEYWORDS([ovs-vsctl fake-bridge])
-OVS_VSCTL_SETUP
-OVS_VSCTL_SETUP_SIMPLE_FAKE_CONF([$1])
-AT_CHECK([RUN_OVS_VSCTL([--may-exist add-br xapi1])], [1], [],
-  [ovs-vsctl: "--may-exist add-br xapi1" but xapi1 is a VLAN bridge for VLAN $1
-])
-AT_CHECK([RUN_OVS_VSCTL([--may-exist add-br xapi1 xxx $1])], [1], [],
-  [ovs-vsctl: "--may-exist add-br xapi1 xxx $1" but xapi1 has the wrong parent xenbr0
-])
-AT_CHECK([RUN_OVS_VSCTL([--may-exist add-br xapi1 xenbr0 10])], [1], [],
-  [ovs-vsctl: "--may-exist add-br xapi1 xenbr0 10" but xapi1 is a VLAN bridge for the wrong VLAN $1
-])
-AT_CHECK([RUN_OVS_VSCTL([--may-exist add-br dup xenbr0 $1])], [1], [],
-  [ovs-vsctl: bridge xenbr0 already has a child VLAN bridge xapi1 on VLAN $1
-])
-CHECK_BRIDGES([xapi1, xenbr0, $1], [xenbr0, xenbr0, 0])
-CHECK_PORTS([xenbr0], [eth0])
-CHECK_IFACES([xenbr0], [eth0])
-CHECK_PORTS([xapi1], [eth0.$1])
-CHECK_IFACES([xapi1], [eth0.$1])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([list bridges -- real and fake (VLAN $1)])
-AT_KEYWORDS([ovs-vsctl fake-bridge])
-OVS_VSCTL_SETUP
-OVS_VSCTL_SETUP_SIMPLE_FAKE_CONF([$1])
-AT_CHECK([RUN_OVS_VSCTL_ONELINE([-- list-br])], [0],
-  [xapi1\nxenbr0
-])
-AT_CHECK([RUN_OVS_VSCTL_ONELINE([-- --real list-br])], [0],
-  [xenbr0
-])
-AT_CHECK([RUN_OVS_VSCTL_ONELINE([-- --fake list-br])], [0],
-  [xapi1
-])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([simple fake bridge + del-br fake bridge (VLAN $1)])
-AT_KEYWORDS([ovs-vsctl fake-bridge])
-OVS_VSCTL_SETUP
-OVS_VSCTL_SETUP_SIMPLE_FAKE_CONF([$1])
-AT_CHECK([RUN_OVS_VSCTL([del-br xapi1])])
-CHECK_BRIDGES([xenbr0, xenbr0, 0])
-CHECK_PORTS([xenbr0], [eth0])
-CHECK_IFACES([xenbr0], [eth0])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([simple fake bridge + del-br real bridge (VLAN $1)])
-AT_KEYWORDS([ovs-vsctl fake-bridge])
-OVS_VSCTL_SETUP
-OVS_VSCTL_SETUP_SIMPLE_FAKE_CONF([$1])
-AT_CHECK([RUN_OVS_VSCTL([del-br xenbr0])])
-CHECK_BRIDGES
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([simple fake bridge + external IDs (VLAN $1)])
-AT_KEYWORDS([ovs-vsctl fake-bridge])
-OVS_VSCTL_SETUP
-OVS_VSCTL_SETUP_SIMPLE_FAKE_CONF([$1])
-AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
-  [br-set-external-id xenbr0 key0 value0],
-  [br-set-external-id xapi1 key1 value1],
-  [br-get-external-id xenbr0],
-  [br-get-external-id xenbr0 key0],
-  [br-get-external-id xapi1],
-  [br-get-external-id xapi1 key1])], [0], [
-
-key0=value0
-value0
-key1=value1
-value1
-])
-CHECK_BRIDGES([xapi1, xenbr0, $1], [xenbr0, xenbr0, 0])
-CHECK_PORTS([xenbr0], [eth0])
-CHECK_IFACES([xenbr0], [eth0])
-CHECK_PORTS([xapi1], [eth0.$1])
-CHECK_IFACES([xapi1], [eth0.$1])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([simple fake bridge + del-port from parent (VLAN $1)])
-AT_KEYWORDS([ovs-vsctl fake-bridge del-port])
-OVS_VSCTL_SETUP
-OVS_VSCTL_SETUP_SIMPLE_FAKE_CONF([$1])
-AT_CHECK([RUN_OVS_VSCTL([del-port xenbr0 eth0.$1])], [1], [],
- [ovs-vsctl: bridge xenbr0 does not have a port eth0.$1 (although its child bridge xapi1 does)
-])
-CHECK_PORTS([xenbr0], [eth0])
-CHECK_IFACES([xenbr0], [eth0])
-CHECK_PORTS([xapi1], [eth0.$1])
-CHECK_IFACES([xapi1], [eth0.$1])
-AT_CHECK([RUN_OVS_VSCTL([del-port xapi1 eth0.$1])])
-CHECK_PORTS([xenbr0], [eth0])
-CHECK_IFACES([xenbr0], [eth0])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-]) # OVS_VSCTL_FAKE_BRIDGE_TESTS
-
-OVS_VSCTL_FAKE_BRIDGE_TESTS([9])
-OVS_VSCTL_FAKE_BRIDGE_TESTS([0])
-
-dnl OVS_VSCTL_SETUP_BOND_FAKE_CONF([VLAN])
-m4_define([OVS_VSCTL_SETUP_BOND_FAKE_CONF],
-  [AT_CHECK(
-     [RUN_OVS_VSCTL(
-        [add-br xapi1],
-        [add-bond xapi1 bond0 eth0 eth1],
-        [add-br xapi2 xapi1 $1],
-        [add-port xapi2 bond0.$1])])])
-
-AT_SETUP([fake bridge on bond])
-AT_KEYWORDS([ovs-vsctl fake-bridge])
-OVS_VSCTL_SETUP
-OVS_VSCTL_SETUP_BOND_FAKE_CONF([11])
-CHECK_BRIDGES([xapi1, xapi1, 0], [xapi2, xapi1, 11])
-CHECK_PORTS([xapi1], [bond0])
-CHECK_IFACES([xapi1], [eth0], [eth1])
-CHECK_PORTS([xapi2], [bond0.11])
-CHECK_IFACES([xapi2], [bond0.11])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([fake bridge on bond + del-br fake bridge])
-AT_KEYWORDS([ovs-vsctl fake-bridge])
-OVS_VSCTL_SETUP
-OVS_VSCTL_SETUP_BOND_FAKE_CONF([11])
-AT_CHECK([RUN_OVS_VSCTL_ONELINE([del-br xapi2])], [0], [
-])
-CHECK_BRIDGES([xapi1, xapi1, 0])
-CHECK_PORTS([xapi1], [bond0])
-CHECK_IFACES([xapi1], [eth0], [eth1])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([fake bridge on bond + del-br real bridge])
-AT_KEYWORDS([ovs-vsctl fake-bridge])
-OVS_VSCTL_SETUP
-OVS_VSCTL_SETUP_BOND_FAKE_CONF([11])
-AT_CHECK([RUN_OVS_VSCTL([del-br xapi1])])
-CHECK_BRIDGES
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-AT_BANNER([ovs-vsctl unit tests -- manager commands])
-
-AT_SETUP([managers])
-AT_KEYWORDS([manager ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
-  [del-manager],
-  [get-manager],
-  [set-manager tcp:4.5.6.7],
-  [get-manager],
-  [set-manager tcp:8.9.10.11 tcp:5.4.3.2],
-  [get-manager],
-  [--inactivity-probe=30000 set-manager tcp:1.2.3.4],
-  [get-manager],
-  [del-manager],
-  [get-manager])], [0], [
-
-
-tcp:4.5.6.7
-
-tcp:5.4.3.2\ntcp:8.9.10.11
-
-tcp:1.2.3.4
-
-
-])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-AT_BANNER([ovs-vsctl unit tests -- database commands])
-
-AT_SETUP([database commands -- positive checks])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK(
-  [RUN_OVS_VSCTL_TOGETHER([--id=@br0 create bridge name=br123],
-                          [set b br123 name=br0],
-                          [set o . bridges=@br0])],
-  [0], [stdout])
-cp stdout out1
-AT_CHECK([RUN_OVS_VSCTL([list bridge], [get bridge br0 _uuid])],
-  [0], [stdout])
-cp stdout out2
-AT_CHECK([uuidfilt out1 out2], [0],
-  [[<0>
-
-
-_uuid               : <0>
-auto_attach         : []
-controller          : []
-datapath_id         : []
-datapath_type       : ""
-datapath_version    : ""
-external_ids        : {}
-fail_mode           : []
-flood_vlans         : []
-flow_tables         : {}
-ipfix               : []
-mcast_snooping_enable: false
-mirrors             : []
-name                : "br0"
-netflow             : []
-other_config        : {}
-ports               : []
-protocols           : []
-rstp_enable         : false
-rstp_status         : {}
-sflow               : []
-status              : {}
-stp_enable          : false
-<0>
-]], [ignore])
-AT_CHECK(
-  [RUN_OVS_VSCTL([--columns=fail_mode,name,datapath_type list bridge])],
-  [0],
-  [[fail_mode           : []
-name                : "br0"
-datapath_type       : ""
-]], [ignore])
-AT_CHECK(
-  [RUN_OVS_VSCTL([--columns=fail_mode,name,datapath_type find bridge])],
-  [0],
-  [[fail_mode           : []
-name                : "br0"
-datapath_type       : ""
-]], [ignore])
-AT_CHECK([
-  RUN_OVS_VSCTL_TOGETHER([--id=@br1 create bridge name=br1 datapath_type="foo"],
-                         [--id=@br2 create bridge name=br2 external-ids:bar=quux],
-                         [add o . bridges @br1 @br2])],
-  [0], [stdout])
-AT_CHECK(
-  [RUN_OVS_VSCTL([--columns=name find bridge datapath_type!=foo])], [0], [stdout],
-  [ignore])
-AT_CHECK([sed -n '/./p' stdout | sort], [0],
-  [[name                : "br0"
-name                : "br2"
-]])
-AT_CHECK(
-  [RUN_OVS_VSCTL(
-    [set bridge br0 \
-      'other_config:datapath_id="0123456789ab"' \
-      'other_config:hwaddr="00:11:22:33:44:55"' \
-      'external-ids={"uuids"="9c45f225-a7cf-439d-976d-83db6271fda1"}' -- \
-     add bridge br0 external_ids '"roles"="local; remote; cloud"'])])
-AT_CHECK([RUN_OVS_VSCTL_ONELINE([get bridge br0 other_config external-ids])],
-  [0], [{datapath_id="0123456789ab", hwaddr="00:11:22:33:44:55"}\n{roles="local; remote; cloud", uuids="9c45f225-a7cf-439d-976d-83db6271fda1"}
-])
-AT_CHECK([RUN_OVS_VSCTL([get bridge br0 other_config:hwaddr -- --if-exists get bridge br0 other-config:nonexistent])],
-  [0], ["00:11:22:33:44:55"
-
-])
-AT_CHECK([RUN_OVS_VSCTL([remove bridge br0 other_config hwaddr 'datapath_id=""' -- get bridge br0 other_config])],
-  [0], [{datapath_id="0123456789ab"}
-])
-AT_CHECK([RUN_OVS_VSCTL([remove bridge br0 other_config 'datapath_id="0123456789ab"' -- get bridge br0 other_config])],
-  [0], [{}
-])
-AT_CHECK([RUN_OVS_VSCTL([clear bridge br0 external-ids -- get bridge br0 external_ids])],
-  [0], [{}
-])
-AT_CHECK([RUN_OVS_VSCTL_TOGETHER([destroy bridge br0],
-                                 [destroy bridge br1],
-                                 [destroy bridge br2],
-                                 [clear o . bridges])],
-  [0], [stdout])
-AT_CHECK([RUN_OVS_VSCTL([list bridge])])
-AT_CHECK([RUN_OVS_VSCTL([--if-exists get bridge x datapath_id])])
-AT_CHECK([RUN_OVS_VSCTL([--if-exists list bridge x])])
-AT_CHECK([RUN_OVS_VSCTL([--if-exists set controller x connection_mode=standalone])])
-AT_CHECK(
-  [RUN_OVS_VSCTL([--if-exists remove netflow x targets '"1.2.3.4:567"'])])
-AT_CHECK(
-  [RUN_OVS_VSCTL([--if-exists clear netflow x targets])])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([database commands -- negative checks])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-
-AT_CHECK([ovs-vsctl --may-exist],
-  [1], [ignore], [ovs-vsctl: missing command name (use --help for help)
-])
-AT_CHECK([ovs-vsctl --may-exist --],
-  [1], [ignore], [ovs-vsctl: missing command name (use --help for help)
-])
-AT_CHECK([ovs-vsctl -- --may-exist],
-  [1], [ignore], [ovs-vsctl: missing command name (use --help for help)
-])
-
-AT_CHECK([RUN_OVS_VSCTL([add-br br0])], [0], [ignore])
-AT_CHECK([RUN_OVS_VSCTL([add-br br1])], [0], [ignore])
-AT_CHECK([RUN_OVS_VSCTL([set-controller br1 tcp:127.0.0.1])], [0], [ignore])
-AT_CHECK([RUN_OVS_VSCTL([list netflow br0])], [1], [],
-  [ovs-vsctl: no row "br0" in table NetFlow
-])
-AT_CHECK([
-    RUN_OVS_VSCTL_TOGETHER([--id=@n create netflow targets='"1.2.3.4:567"'],
-                           [set bridge br0 netflow=@n])],
-  [0], [stdout])
-cp stdout netflow-uuid
-AT_CHECK([RUN_OVS_VSCTL([list netflow `cat netflow-uuid`])], [0], [stdout])
-AT_CHECK([uuidfilt netflow-uuid stdout], [0],
-  [[<0>
-
-_uuid               : <0>
-active_timeout      : 0
-add_id_to_interface : false
-engine_id           : []
-engine_type         : []
-external_ids        : {}
-targets             : ["1.2.3.4:567"]
-]], [ignore])
-AT_CHECK([RUN_OVS_VSCTL([list interx x])],
-  [1], [], [ovs-vsctl: unknown table "interx"
-])
-AT_CHECK([RUN_OVS_VSCTL([list bridge x])],
-  [1], [], [ovs-vsctl: no row "x" in table Bridge
-])
-AT_CHECK([RUN_OVS_VSCTL([get bridge x datapath_id])],
-  [1], [], [ovs-vsctl: no row "x" in table Bridge
-])
-AT_CHECK([RUN_OVS_VSCTL([get bridge br0 d])],
-  [1], [], [ovs-vsctl: Bridge contains more than one column whose name matches "d"
-])
-AT_CHECK([RUN_OVS_VSCTL([get bridge br0 x])],
-  [1], [], [ovs-vsctl: Bridge does not contain a column whose name matches "x"
-])
-AT_CHECK([RUN_OVS_VSCTL([get bridge br0 :y=z])],
-  [1], [], [ovs-vsctl: :y=z: missing column name
-])
-AT_CHECK([RUN_OVS_VSCTL([get bridge br0 datapath_id:y=z])],
-  [1], [], [ovs-vsctl: datapath_id:y=z: trailing garbage "=z" in argument
-])
-AT_CHECK([RUN_OVS_VSCTL([set bridge br0 'datapath_id:y>=z'])],
-  [1], [], [ovs-vsctl: datapath_id:y>=z: argument does not end in "=" followed by a value.
-])
-AT_CHECK([RUN_OVS_VSCTL([set controller x connection_mode=standalone])],
-  [1], [], [ovs-vsctl: no row "x" in table Controller
-])
-AT_CHECK([RUN_OVS_VSCTL([wait-until bridge br0 datapath_id:y,z])],
-  [1], [], [ovs-vsctl: datapath_id:y,z: argument does not end in "=", "!=", "<", ">", "<=", ">=", "{=}", "{!=}", "{<}", "{>}", "{<=}", or "{>=}" followed by a value.
-])
-AT_CHECK([RUN_OVS_VSCTL([get bridge br0 datapath_id::])],
-  [1], [], [ovs-vsctl: datapath_id::: trailing garbage ":" in argument
-])
-AT_CHECK([RUN_OVS_VSCTL([get bridge br0 datapath_id:x])],
-  [1], [], [ovs-vsctl: cannot specify key to get for non-map column datapath_id
-])
-AT_CHECK([RUN_OVS_VSCTL([get bridge br0 external_ids:x])],
-  [1], [], [ovs-vsctl: no key "x" in Bridge record "br0" column external_ids
-])
-AT_CHECK([RUN_OVS_VSCTL([set bridge br0 flood_vlans=-1])],
-  [1], [], [ovs-vsctl: constraint violation: -1 is not in the valid range 0 to 4095 (inclusive)
-])
-AT_CHECK([RUN_OVS_VSCTL([set bridge br0 flood_vlans=4096])],
-  [1], [], [ovs-vsctl: constraint violation: 4096 is not in the valid range 0 to 4095 (inclusive)
-])
-AT_CHECK([RUN_OVS_VSCTL([set c br1 'connection-mode=xyz'])],
-  [1], [], [[ovs-vsctl: constraint violation: xyz is not one of the allowed values ([in-band, out-of-band])
-]])
-AT_CHECK([RUN_OVS_VSCTL([set c br1 connection-mode:x=y])],
-  [1], [], [ovs-vsctl: cannot specify key to set for non-map column connection_mode
-])
-AT_CHECK([RUN_OVS_VSCTL([add bridge br1 datapath_id x y])],
-  [1], [], [ovs-vsctl: "add" operation would put 2 values in column datapath_id of table Bridge but the maximum number is 1
-])
-AT_CHECK([RUN_OVS_VSCTL([remove netflow `cat netflow-uuid` targets '"1.2.3.4:567"'])],
-  [1], [], [ovs-vsctl: "remove" operation would put 0 values in column targets of table NetFlow but the minimum number is 1
-])
-AT_CHECK([RUN_OVS_VSCTL([remove netflow x targets '"1.2.3.4:567"'])],
-  [1], [], [ovs-vsctl: no row "x" in table NetFlow
-])
-AT_CHECK([RUN_OVS_VSCTL([clear netflow x targets])],
-  [1], [], [ovs-vsctl: no row "x" in table NetFlow
-])
-AT_CHECK([RUN_OVS_VSCTL([clear netflow `cat netflow-uuid` targets])],
-  [1], [], [ovs-vsctl: "clear" operation cannot be applied to column targets of table NetFlow, which is not allowed to be empty
-])
-AT_CHECK([RUN_OVS_VSCTL([destroy bridge br2])],
-  [1], [], [ovs-vsctl: no row "br2" in table Bridge
-])
-AT_CHECK([RUN_OVS_VSCTL([add in br1 name x])],
-  [1], [], [ovs-vsctl: cannot modify read-only column name in table Interface
-])
-AT_CHECK([RUN_OVS_VSCTL([set port br0 name=br2])],
-  [1], [], [ovs-vsctl: cannot modify read-only column name in table Port
-])
-AT_CHECK([RUN_OVS_VSCTL([remove bridge br0 name br1])],
-  [1], [], [ovs-vsctl: cannot modify read-only column name in table Bridge
-])
-AT_CHECK([RUN_OVS_VSCTL([remove bridge br1 flood-vlans true])],
-  [1], [], [ovs-vsctl: "true" is not a valid integer or range
-])
-AT_CHECK([RUN_OVS_VSCTL([clear bridge br1 name])],
-  [1], [], [ovs-vsctl: cannot modify read-only column name in table Bridge
-])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([database commands -- conditions])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK(
-  [RUN_OVS_VSCTL_TOGETHER(
-     [add-br br0],
-     [add-br br1], [set bridge br1 flood_vlans=0 other-config:x='""'],
-     [add-br br2], [set bridge br2 flood_vlans=1 other-config:x=y],
-     [add-br br3], [set bridge br3 flood_vlans=0,1 other-config:x=z],
-     [add-br br4], [set bridge br4 flood_vlans=2],
-     [add-br br5], [set bridge br5 flood_vlans=0,2],
-     [add-br br6], [set bridge br6 flood_vlans=1,2],
-     [add-br br7], [set bridge br7 flood_vlans=0,1,2])], [0], [
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-])
-m4_define([VSCTL_CHECK_FIND],
-  [AT_CHECK([echo `ovs-vsctl --bare --no-wait -vreconnect:emer -- --columns=name find bridge '$1' | sort`], [0], [$2
-])])
-
-# Arithmetic relational operators without keys.
-VSCTL_CHECK_FIND([flood_vlans=0], [br1])
-VSCTL_CHECK_FIND([flood_vlans=1], [br2])
-VSCTL_CHECK_FIND([flood_vlans=0,2], [br5])
-VSCTL_CHECK_FIND([flood_vlans=0,1,2], [br7])
-VSCTL_CHECK_FIND([flood_vlans=3], [])
-
-VSCTL_CHECK_FIND([flood_vlans!=0], [br0 br2 br3 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([flood_vlans!=1], [br0 br1 br3 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([flood_vlans!=0,2], [br0 br1 br2 br3 br4 br6 br7])
-VSCTL_CHECK_FIND([flood_vlans!=0,1,2], [br0 br1 br2 br3 br4 br5 br6])
-VSCTL_CHECK_FIND([flood_vlans!=3], [br0 br1 br2 br3 br4 br5 br6 br7])
-
-VSCTL_CHECK_FIND([flood_vlans<2], [br0 br1 br2])
-VSCTL_CHECK_FIND([flood_vlans<0,2], [br0 br1 br2 br3 br4])
-VSCTL_CHECK_FIND([flood_vlans>1], [br3 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([flood_vlans>0,1], [br5 br6 br7])
-VSCTL_CHECK_FIND([flood_vlans<=2], [br0 br1 br2 br4])
-VSCTL_CHECK_FIND([flood_vlans<=0,2], [br0 br1 br2 br3 br4 br5])
-VSCTL_CHECK_FIND([flood_vlans>=1], [br2 br3 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([flood_vlans>=0,1], [br3 br5 br6 br7])
-
-# Set relational operators without keys.
-VSCTL_CHECK_FIND([flood_vlans{=}0], [br1])
-VSCTL_CHECK_FIND([flood_vlans{=}1], [br2])
-VSCTL_CHECK_FIND([flood_vlans{=}0,2], [br5])
-VSCTL_CHECK_FIND([flood_vlans{=}0,1,2], [br7])
-VSCTL_CHECK_FIND([flood_vlans{=}3], [])
-
-VSCTL_CHECK_FIND([flood_vlans{!=}0], [br0 br2 br3 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([flood_vlans{!=}1], [br0 br1 br3 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([flood_vlans{!=}0,2], [br0 br1 br2 br3 br4 br6 br7])
-VSCTL_CHECK_FIND([flood_vlans{!=}0,1,2], [br0 br1 br2 br3 br4 br5 br6])
-VSCTL_CHECK_FIND([flood_vlans{!=}3], [br0 br1 br2 br3 br4 br5 br6 br7])
-
-VSCTL_CHECK_FIND([flood_vlans{<}[[]]], [])
-VSCTL_CHECK_FIND([flood_vlans{<=}[[]]], [br0])
-VSCTL_CHECK_FIND([flood_vlans{<}0], [br0])
-VSCTL_CHECK_FIND([flood_vlans{<=}0], [br0 br1])
-VSCTL_CHECK_FIND([flood_vlans{<}1,2], [br0 br2 br4])
-VSCTL_CHECK_FIND([flood_vlans{<=}1,2], [br0 br2 br4 br6])
-
-VSCTL_CHECK_FIND([flood_vlans{>}[[]]], [br1 br2 br3 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([flood_vlans{>=}[[]]], [br0 br1 br2 br3 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([flood_vlans{>}0], [br3 br5 br7])
-VSCTL_CHECK_FIND([flood_vlans{>=}0], [br1 br3 br5 br7])
-VSCTL_CHECK_FIND([flood_vlans{>}0,2], [br7])
-VSCTL_CHECK_FIND([flood_vlans{>=}1,2], [br6 br7])
-VSCTL_CHECK_FIND([flood_vlans{>=}0,2], [br5 br7])
-
-# Arithmetic relational operators with keys.
-VSCTL_CHECK_FIND([other-config:x=""], [br1])
-VSCTL_CHECK_FIND([other-config:x=y], [br2])
-VSCTL_CHECK_FIND([other-config:x=z], [br3])
-
-VSCTL_CHECK_FIND([other-config:x!=""], [br2 br3])
-VSCTL_CHECK_FIND([other-config:x!=y], [br1 br3])
-VSCTL_CHECK_FIND([other-config:x!=z], [br1 br2])
-
-VSCTL_CHECK_FIND([other-config:x>y], [br3])
-VSCTL_CHECK_FIND([other-config:x>=y], [br2 br3])
-VSCTL_CHECK_FIND([other-config:x<y], [br1])
-VSCTL_CHECK_FIND([other-config:x<=y], [br1 br2])
-
-# Set relational operators with keys.
-VSCTL_CHECK_FIND([other-config:x{=}[[]]], [br0 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([other-config:x{=}""], [br1])
-VSCTL_CHECK_FIND([other-config:x{=}y], [br2])
-VSCTL_CHECK_FIND([other-config:x{=}z], [br3])
-
-VSCTL_CHECK_FIND([other-config:x{!=}[[]]], [br1 br2 br3])
-VSCTL_CHECK_FIND([other-config:x{!=}""], [br0 br2 br3 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([other-config:x{!=}y], [br0 br1 br3 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([other-config:x{!=}z], [br0 br1 br2 br4 br5 br6 br7])
-
-VSCTL_CHECK_FIND([other-config:x{<=}[[]]], [br0 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([other-config:x{<=}x], [br0 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([other-config:x{<=}""], [br0 br1 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([other-config:x{<=}y], [br0 br2 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([other-config:x{<=}z], [br0 br3 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([other-config:x{<=}x,y,z], [br0 br2 br3 br4 br5 br6 br7])
-
-VSCTL_CHECK_FIND([other-config:x{<}[[]]], [])
-VSCTL_CHECK_FIND([other-config:x{<}x], [br0 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([other-config:x{<}""], [br0 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([other-config:x{<}y], [br0 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([other-config:x{<}z], [br0 br4 br5 br6 br7])
-
-VSCTL_CHECK_FIND([other-config:x{>=}[[]]], [br0 br1 br2 br3 br4 br5 br6 br7])
-VSCTL_CHECK_FIND([other-config:x{>=}x], [])
-VSCTL_CHECK_FIND([other-config:x{>=}""], [br1])
-VSCTL_CHECK_FIND([other-config:x{>=}y], [br2])
-VSCTL_CHECK_FIND([other-config:x{>=}z], [br3])
-
-VSCTL_CHECK_FIND([other-config:x{>}[[]]], [br1 br2 br3])
-VSCTL_CHECK_FIND([other-config:x{>}x], [])
-VSCTL_CHECK_FIND([other-config:x{>}""], [])
-VSCTL_CHECK_FIND([other-config:x{>}y], [])
-VSCTL_CHECK_FIND([other-config:x{>}z], [])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([database commands -- wait-until immediately true])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL(
-    [add-br br0],
-    [add-bond br0 bond0 eth0 eth1],
-    [set port bond0 bond_updelay=500 other-config:abc=def])])
-AT_CHECK([RUN_OVS_VSCTL([[wait-until Open_vSwitch . manager_options=[]]])])
-AT_CHECK([RUN_OVS_VSCTL([[wait-until Open_vSwitch . bridges!=[]]])])
-AT_CHECK([RUN_OVS_VSCTL([[wait-until Port bond0 other-config:abc=def]])])
-AT_CHECK([RUN_OVS_VSCTL([[wait-until port bond0 'bond_updelay>50' 'other-config:abc>d' 'other-config:abc<e']])])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([database commands -- wait-until must wait])
-AT_KEYWORDS([ovs-vsctl])
-
-OVS_VSCTL_SETUP
-
-# Start ovs-vsctls in background.
-(RUN_OVS_VSCTL([[wait-until o . bridges!=[] -- get bridge br10 other-config:abc]])) > stdout1 &
-(RUN_OVS_VSCTL([[wait-until bridge br1 -- get bridge br1 other-config:abc]])) > stdout2 &
-(RUN_OVS_VSCTL([[wait-until bridge br1 other-config={abc=def} -- get bridge br1 other-config]])) > stdout3 &
-(RUN_OVS_VSCTL([[wait-until port bond0 'bond_updelay>50' -- get port bond0 bond-updelay]])) > stdout4 &
-
-# Give the ovs-vsctls a chance to read the database
-sleep 1
-
-AT_CHECK([RUN_OVS_VSCTL([add-br br10 -- set bridge br10 other-config:abc=quux])
-RUN_OVS_VSCTL([add-br br1 -- set bridge br1 other-config:abc=def -- add-bond br1 bond0 eth0 eth1 -- set port bond0 bond_updelay=500])])
-
-# Wait for the ovs-vsctls to finish.
-wait
-
-# Check output
-AT_CHECK([cat stdout1], [0], [quux
-])
-AT_CHECK([cat stdout2], [0], [def
-])
-AT_CHECK([cat stdout3], [0], [{abc=def}
-])
-AT_CHECK([cat stdout4], [0], [500
-])
-
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([--id option on create, get commands])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL([add-br br0],
-                        [add-port br0 eth0],
-                        [add-port br0 eth1])])
-AT_CHECK(
-  [RUN_OVS_VSCTL_TOGETHER(
-    [set bridge br0 mirrors=@m],
-    [--id=@eth0 get port eth0],
-    [--id=@eth1 get port eth1],
-    [--id=@m create mirror name=mymirror select-dst-port=@eth0 select-src-port=@eth0 output-port=@eth1])],
-  [0], [stdout])
-AT_CHECK(
-  [uuidfilt stdout], [0], [dnl
-
-
-
-<0>
-])
-AT_CHECK(
-  [RUN_OVS_VSCTL(
-    [list port eth0 eth1],
-    [list mirror],
-    [list bridge br0])],
-  [0], [stdout])
-AT_CHECK(
-  [sed -n -e '/uuid/p' -e '/name/p' -e '/mirrors/p' -e '/select/p' -e '/output/p' < stdout | uuidfilt], [0], [dnl
-[_uuid               : <0>
-name                : "eth0"
-_uuid               : <1>
-name                : "eth1"
-_uuid               : <2>
-name                : mymirror
-output_port         : <1>
-output_vlan         : []
-select_all          : false
-select_dst_port     : [<0>]
-select_src_port     : [<0>]
-select_vlan         : []
-_uuid               : <3>
-mirrors             : [<2>]
-name                : "br0"
-]])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([unreferenced record warnings])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK(
-  [ovs-vsctl -vPATTERN:console:'%c|%p|%m' --no-wait -vreconnect:emer \
-     -- create Bridge name=br0 | uuidfilt],
-  [0], [<0>
-], [db_ctl_base|WARN|applying "create" command to table Bridge without --id option will have no effect
-])
-AT_CHECK(
-  [ovs-vsctl -vPATTERN:console:'%c|%p|%m' --no-wait -vreconnect:emer \
-     -- --id=@br0 create Bridge name=br0 | uuidfilt],
-  [0], [<0>
-], [vsctl|WARN|row id "@br0" was created but no reference to it was inserted, so it will not actually appear in the database
-])
-AT_CHECK(
-  [ovs-vsctl -vPATTERN:console:'%c|%p|%m' --no-wait -vreconnect:emer \
-     -- --id=@eth0_iface create Interface name=eth0 \
-     -- --id=@eth0 create Port name=eth0 interfaces=@eth0_iface \
-     -- --id=@m0 create Mirror name=m0 output_port=@eth0 \
-     -- --id=@br0 create Bridge name=br0 mirrors=@m0 \
-     -- set Open_vSwitch . bridges=@br0 | uuidfilt],
-  [0], [<0>
-<1>
-<2>
-<3>
-], [vsctl|WARN|row id "@eth0" was created but only a weak reference to it was inserted, so it will not actually appear in the database
-])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-dnl This test really shows a bug -- "create" followed by "list" in
-dnl the same execution shows the wrong UUID on the "list" command.
-dnl The bug is documented in ovs-vsctl.8.
-AT_SETUP([created row UUID is wrong in same execution])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL([--id=@br0 create Bridge name=br0 -- add Open_vSwitch . bridges @br0 -- list bridge])],
-  [0], [stdout])
-AT_CHECK([uuidfilt stdout], [0],
-  [[<0>
-_uuid               : <1>
-auto_attach         : []
-controller          : []
-datapath_id         : []
-datapath_type       : ""
-datapath_version    : ""
-external_ids        : {}
-fail_mode           : []
-flood_vlans         : []
-flow_tables         : {}
-ipfix               : []
-mcast_snooping_enable: false
-mirrors             : []
-name                : "br0"
-netflow             : []
-other_config        : {}
-ports               : []
-protocols           : []
-rstp_enable         : false
-rstp_status         : {}
-sflow               : []
-status              : {}
-stp_enable          : false
-]], [ignore])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-dnl This test will create a linux-htb QoS record that
-dnl points to a few queues and use it on a1 and a2 port.
-dnl It also destroys all records from Qos and Queue table.
-AT_SETUP([--all option on destroy command])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL(
-   [add-br a],
-   [add-port a a1],
-   [add-port a a2])])
-CHECK_BRIDGES([a, a, 0])
-CHECK_PORTS([a], [a1], [a2])
-CHECK_IFACES([a], [a1], [a2])
-AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
-   [set Port a1 qos=@newqos],
-   [set Port a2 qos=@newqos],
-   [--id=@newqos create QoS type=linux-htb other-config:max-rate=1000000000 queues=0=@q0,1=@q1],
-   [--id=@q0 create Queue other-config:min-rate=100000000 other-config:max-rate=100000000],
-   [--id=@q1 create Queue other-config:min-rate=500000000])], [0], [ignore])
-AT_CHECK([RUN_OVS_VSCTL(
-   [--columns=other_config,type list Qos])], [0],
-[other_config        : {max-rate="1000000000"}
-type                : linux-htb
-])
-AT_CHECK([RUN_OVS_VSCTL(
-   [--columns=other_config list Queue | sort | sed '/^$/d'])], [0],
-[other_config        : {max-rate="100000000", min-rate="100000000"}
-other_config        : {min-rate="500000000"}
-])
-AT_CHECK([RUN_OVS_VSCTL(
-   [clear Port a1 qos],
-   [clear Port a2 qos])])
-AT_CHECK([RUN_OVS_VSCTL(
-   [--columns=qos list Port a1 a2])], [0],
-[[qos                 : []
-
-qos                 : []
-]])
-AT_CHECK([RUN_OVS_VSCTL(
-   [--all destroy Qos])])
-AT_CHECK([RUN_OVS_VSCTL(
-   [-- list Qos])])
-AT_CHECK([RUN_OVS_VSCTL(
-   [--all destroy Queue])])
-AT_CHECK([RUN_OVS_VSCTL(
-   [-- list Queue])])
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-AT_BANNER([ovs-vsctl add-port -- reserved port names])
-
-AT_SETUP([add-port -- reserved names 1])
-OVS_VSWITCHD_START
-
-# Test creating all reserved port names
-m4_foreach(
-[reserved_name],
-[[ovs-netdev],
-[ovs-dummy],
-[genev_sys],
-[gre_sys],
-[lisp_sys],
-[vxlan_sys]],
-[
-# Try creating the port
-cat >experr <<EOF
-ovs-vsctl: Error detected while setting up 'reserved_name'.  See ovs-vswitchd log for details.
-ovs-vsctl: The default log directory is "$OVS_RUNDIR".
-EOF
-AT_CHECK([ovs-vsctl add-port br0 reserved_name], [0], [], [experr])
-# Prevent race.
-OVS_WAIT_UNTIL([test `grep -- "|WARN|" ovs-vswitchd.log | wc -l` -ge 1])
-# Detect the warning log message
-AT_CHECK([sed -n "s/^.*\(|bridge|WARN|.*\)$/\1/p" ovs-vswitchd.log], [0], [dnl
-|bridge|WARN|could not create interface reserved_name, name is reserved
-])
-# Delete the warning log message
-AT_CHECK([sed "/|bridge|WARN|/d" ovs-vswitchd.log > ovs-vswitchd.log], [0], [], [])
-# Delete the port
-AT_CHECK([ovs-vsctl del-port br0 reserved_name], [0], [], [])])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([add-port -- reserved names 2])
-# Creates all type of tunnel ports
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
-                    options:remote_ip=1.1.1.1 ofport_request=1\
-                    -- add-port br0 p3 -- set Interface p3 type=lisp \
-                    options:remote_ip=2.2.2.2 ofport_request=3 \
-                    -- add-port br0 p4 -- set Interface p4 type=vxlan \
-                    options:remote_ip=2.2.2.2 ofport_request=4 \
-                    -- add-port br0 p5 -- set Interface p5 type=geneve \
-                    options:remote_ip=2.2.2.2 ofport_request=5])
-
-# Test creating all reserved tunnel port names
-m4_foreach(
-[reserved_name],
-[[genev_sys],
-[gre_sys],
-[lisp_sys],
-[vxlan_sys]],
-[
-# Try creating the port
-cat >experr <<EOF
-ovs-vsctl: Error detected while setting up 'reserved_name'.  See ovs-vswitchd log for details.
-ovs-vsctl: The default log directory is "$OVS_RUNDIR".
-EOF
-AT_CHECK([ovs-vsctl add-port br0 reserved_name], [0], [], [experr])
-# Prevent race.
-OVS_WAIT_UNTIL([test `grep -- "|WARN|" ovs-vswitchd.log | wc -l` -ge 1])
-# Detect the warning log message
-AT_CHECK([sed -n "s/^.*\(|bridge|WARN|.*\)$/\1/p" ovs-vswitchd.log], [0], [dnl
-|bridge|WARN|could not create interface reserved_name, name is reserved
-])
-# Delete the warning log message
-AT_CHECK([sed "/|bridge|WARN|/d" ovs-vswitchd.log > ovs-vswitchd.log], [0], [], [])
-# Delete the port
-AT_CHECK([ovs-vsctl del-port br0 reserved_name], [0], [], [])])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([naming in db commands])
-AT_KEYWORDS([ovs-vsctl])
-OVS_VSCTL_SETUP
-
-dnl First check that the database commands can refer to row by database UUID.
-AT_CHECK([RUN_OVS_VSCTL([add-br br0])])
-uuid=`[]RUN_OVS_VSCTL(get port br0 _uuid)`
-AT_CHECK([RUN_OVS_VSCTL([get port $uuid name])], [0], ["br0"
-])
-
-dnl Next check that, if a database row is given a name that has the same form
-dnl as the database UUIDs, the name can still be used to refer to rows.
-AT_CHECK([RUN_OVS_VSCTL([add-br 0fcd11a1-2ba8-4b38-a358-4bccf2bf3057])])
-AT_CHECK([RUN_OVS_VSCTL([get interface 0fcd11a1-2ba8-4b38-a358-4bccf2bf3057 type])], [0], [internal
-])
-
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([bootstrap ca cert])
-AT_KEYWORDS([ovs-vsctl ssl])
-AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
-PKIDIR=`pwd`
-OVS_PKI="sh $abs_top_srcdir/utilities/ovs-pki.in --dir=$PKIDIR/pki --log=$PKIDIR/ovs-pki.log"
-AT_CHECK([$OVS_PKI init && $OVS_PKI req+sign vsctl switch && $OVS_PKI req ovsdbserver && $OVS_PKI self-sign ovsdbserver], [0], [ignore], [ignore])
-
-dnl Create database.
-OVSDB_INIT([conf.db])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --private-key=$PKIDIR/ovsdbserver-privkey.pem --certificate=$PKIDIR/ovsdbserver-cert.pem --ca-cert=$PKIDIR/pki/switchca/cacert.pem --remote=pssl:0:127.0.0.1 --log-file="`pwd`"/ovsdb-server.log conf.db], [0], [ignore], [ignore])
-on_exit "kill `cat ovsdb-server.pid`"
-PARSE_LISTENING_PORT([ovsdb-server.log], [SSL_PORT])
-
-# During bootstrap, the connection gets torn down. So the o/p of ovs-vsctl is error.
-AT_CHECK([ovs-vsctl -t 5 --db=ssl:127.0.0.1:$SSL_PORT --private-key=$PKIDIR/vsctl-privkey.pem --certificate=$PKIDIR/vsctl-cert.pem --bootstrap-ca-cert=$PKIDIR/cacert.pem show], [1], [ignore], [ignore])
-
-# If the bootstrap was successful, the following file should exist.
-OVS_WAIT_UNTIL([test -e $PKIDIR/cacert.pem])
-
-# After bootstrap, the connection should be successful.
-AT_CHECK([ovs-vsctl -t 5 --no-wait --db=ssl:127.0.0.1:$SSL_PORT --private-key=$PKIDIR/vsctl-privkey.pem --certificate=$PKIDIR/vsctl-cert.pem --bootstrap-ca-cert=$PKIDIR/cacert.pem add-br br0], [0])
-AT_CHECK([ovs-vsctl -t 5 --no-wait --db=ssl:127.0.0.1:$SSL_PORT --private-key=$PKIDIR/vsctl-privkey.pem --certificate=$PKIDIR/vsctl-cert.pem --bootstrap-ca-cert=$PKIDIR/cacert.pem list-br], [0], [br0
-])
-
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([peer ca cert])
-AT_KEYWORDS([ovs-vsctl ssl])
-AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
-PKIDIR=`pwd`
-OVS_PKI="sh $abs_top_srcdir/utilities/ovs-pki.in --dir=$PKIDIR/pki --log=$PKIDIR/ovs-pki.log"
-AT_CHECK([$OVS_PKI init && $OVS_PKI req+sign vsctl switch && $OVS_PKI req+sign ovsdbserver controller], [0], [ignore], [ignore])
-
-dnl Create database.
-OVSDB_INIT([conf.db])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --private-key=$PKIDIR/ovsdbserver-privkey.pem --certificate=$PKIDIR/ovsdbserver-cert.pem --ca-cert=$PKIDIR/pki/switchca/cacert.pem --peer-ca-cert=$PKIDIR/pki/controllerca/cacert.pem --remote=pssl:0:127.0.0.1 --log-file="`pwd`"/ovsdb-server.log conf.db], [0], [ignore], [ignore])
-on_exit "kill `cat ovsdb-server.pid`"
-PARSE_LISTENING_PORT([ovsdb-server.log], [SSL_PORT])
-
-# During bootstrap, the connection gets torn down. So the o/p of ovs-vsctl is error.
-AT_CHECK([ovs-vsctl -t 5 --db=ssl:127.0.0.1:$SSL_PORT --private-key=$PKIDIR/vsctl-privkey.pem --certificate=$PKIDIR/vsctl-cert.pem --bootstrap-ca-cert=$PKIDIR/cacert.pem show], [1], [ignore], [ignore])
-
-# If the bootstrap was successful, the following file should exist.
-OVS_WAIT_UNTIL([test -e $PKIDIR/cacert.pem])
-
-# After bootstrap, the connection should be successful.
-AT_CHECK([ovs-vsctl -t 5 --no-wait --db=ssl:127.0.0.1:$SSL_PORT --private-key=$PKIDIR/vsctl-privkey.pem --certificate=$PKIDIR/vsctl-cert.pem --bootstrap-ca-cert=$PKIDIR/cacert.pem add-br br0], [0])
-AT_CHECK([ovs-vsctl -t 5 --no-wait --db=ssl:127.0.0.1:$SSL_PORT --private-key=$PKIDIR/vsctl-privkey.pem --certificate=$PKIDIR/vsctl-cert.pem --bootstrap-ca-cert=$PKIDIR/cacert.pem list-br], [0], [br0
-])
-
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([TLS server name indication (SNI)])
-AT_KEYWORDS([ovsdb server positive ssl tls sni])
-AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
-AT_SKIP_IF([test "$OPENSSL_SUPPORTS_SNI" = no])
-AT_SKIP_IF([test "$HAVE_UNBOUND" = no])
-OVSDB_INIT([conf.db])
-PKIDIR=$abs_top_builddir/tests
-AT_CHECK([ovsdb-server --log-file --detach --no-chdir --pidfile --private-key=$PKIDIR/testpki-privkey2.pem --certificate=$PKIDIR/testpki-cert2.pem --ca-cert=$PKIDIR/testpki-cacert.pem --remote=pssl:0:127.0.0.1 -vPATTERN:file:%m -vstream_ssl conf.db], [0], [ignore], [ignore])
-PARSE_LISTENING_PORT([ovsdb-server.log], [SSL_PORT])
-
-AT_CHECK([ovs-vsctl -t 5 --no-wait --db=ssl:localhost:$SSL_PORT --private-key=$PKIDIR/testpki-privkey.pem --certificate=$PKIDIR/testpki-cert.pem --bootstrap-ca-cert=$PKIDIR/testpki-cacert.pem add-br br0])
-
-AT_CAPTURE_FILE([ovsdb-server.log])
-AT_CHECK([grep "server name" ovsdb-server.log], [0],
-         [connection indicated server name localhost
-])
-
-OVS_VSCTL_CLEANUP
-AT_CLEANUP
diff --git a/tests/ovs-vswitchd.at b/tests/ovs-vswitchd.at
deleted file mode 100644
index a30792b7d..000000000
--- a/tests/ovs-vswitchd.at
+++ /dev/null
@@ -1,265 +0,0 @@
-AT_BANNER([ovs-vswitchd])
-
-dnl The OVS initscripts never make an empty database (one without even an
-dnl Open_vSwitch record) visible to ovs-vswitchd, but hand-rolled scripts
-dnl sometimes do.  At one point, "ovs-vswitchd --detach" would never detach
-dnl and use 100% CPU if this happened, so this test checks for regression.
-AT_SETUP([ovs-vswitchd detaches correctly with empty db])
-on_exit 'kill `cat ovsdb-server.pid ovs-vswitchd.pid`'
-
-dnl Create database.
-touch .conf.db.~lock~
-AT_CHECK([ovsdb-tool create conf.db $abs_top_srcdir/vswitchd/vswitch.ovsschema])
-
-dnl Start ovsdb-server.  *Don't* initialize database.
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --log-file --remote=punix:$OVS_RUNDIR/db.sock], [0], [ignore], [ignore])
-AT_CAPTURE_FILE([ovsdb-server.log])
-
-dnl Start ovs-vswitchd.
-AT_CHECK([ovs-vswitchd --detach --no-chdir --pidfile --enable-dummy --disable-system --log-file], [0], [], [stderr])
-AT_CAPTURE_FILE([ovs-vswitchd.log])
-
-dnl ovs-vswitchd detached OK or we wouldn't have made it this far.  Success.
-OVS_APP_EXIT_AND_WAIT([ovs-vswitchd])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
-
-
-dnl ----------------------------------------------------------------------
-m4_define([OVS_VSCTL_CHECK_RX_PKT], [
-AT_CHECK([ovs-vsctl list int $1 | grep statistics | sed -n 's/^.*\(rx_packets=[[0-9]][[0-9]]*\).*$/\1/p'],[0],
-[dnl
-rx_packets=$2
-])
-])
-
-AT_SETUP([ovs-vswitchd -- stats-update-interval])
-OVS_VSWITCHD_START([add-port br0 p1 -- set int p1 type=internal])
-ovs-appctl time/stop
-
-dnl at the beginning, the update of rx_packets should happen every 5 seconds.
-ovs-appctl time/warp 11000 1000
-OVS_VSCTL_CHECK_RX_PKT([p1], [0])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-ovs-appctl time/warp 11000 1000
-OVS_VSCTL_CHECK_RX_PKT([p1], [1])
-
-dnl set the stats update interval to 100K ms, the following 'recv' should not be updated.
-AT_CHECK([ovs-vsctl set O . other_config:stats-update-interval=100000])
-ovs-appctl time/warp 51000 1000
-for i in `seq 1 5`; do
-    AT_CHECK([ovs-appctl netdev-dummy/receive p1 'eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-done
-
-OVS_VSCTL_CHECK_RX_PKT([p1], [1])
-dnl advance the clock by 100K ms, the previous 'recv' should be updated.
-ovs-appctl time/warp 100000 1000
-OVS_VSCTL_CHECK_RX_PKT([p1], [6])
-
-dnl now remove the configuration. 'recv' one packet.  there should be an update after 5000 ms.
-AT_CHECK([ovs-vsctl clear O . other_config])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-ovs-appctl time/warp 11000 1000
-OVS_VSCTL_CHECK_RX_PKT([p1], [7])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-AT_SETUP([ovs-vswitchd -- start additional ovs-vswitchd process])
-OVS_VSWITCHD_START
-
-# start another ovs-vswitchd process.
-ovs-vswitchd --log-file=fakelog --unixctl=unixctl2 --pidfile=ovs-vswitchd-2.pid &
-on_exit 'kill `cat ovs-vswitchd-2.pid`'
-
-# sleep for a while
-sleep 5
-
-# stop the process.
-OVS_APP_EXIT_AND_WAIT_BY_TARGET(["`pwd`"/unixctl2], [`pwd`/ovs-vswitchd-2.pid])
-
-# check the fakelog, should only see one ERR for reporting
-# the existing ovs-vswitchd process.
-AT_CHECK([test `grep ERR fakelog | wc -l` -eq 1])
-
-AT_CHECK([tail -n1 fakelog | sed -e 's/^.*ERR|//; s/pid [[0-9]]*//'], [0], [dnl
-another ovs-vswitchd process is running, disabling this process () until it goes away
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-AT_SETUP([ovs-vswitchd -- switch over to another ovs-vswitchd process])
-OVS_VSWITCHD_START
-
-# start a new ovs-vswitchd process.
-ovs-vswitchd --log-file=fakelog --enable-dummy --unixctl=unixctl2 --pidfile=ovs-vswitchd-2.pid &
-on_exit 'kill `cat ovs-vswitchd-2.pid`'
-
-# sleep for a while.
-sleep 5
-
-# kill the current active ovs-vswitchd process.
-kill `cat ovs-vswitchd.pid`
-
-sleep 5
-
-# check the creation of br0 on the new ovs-vswitchd process.
-AT_CHECK([grep "bridge br0" fakelog | sed -e 's/port [[0-9]]*$/port/;
-s/datapath ID [[a-z0-9]]*$/datapath ID/;s/^.*INFO|//'], [0], [dnl
-bridge br0: added interface br0 on port
-bridge br0: using datapath ID
-])
-
-# stop the process.
-OVS_APP_EXIT_AND_WAIT_BY_TARGET(["`pwd`"/unixctl2], [ovs-vswitchd-2.pid])
-
-# check the fakelog, should not see WARN/ERR/EMER log other than the one
-# for reporting the existing ovs-vswitchd process and the one for killing
-# the process.
-AT_CHECK([sed -n "
-/|ERR|another ovs-vswitchd process is running/d
-/|WARN|/p
-/|ERR|/p
-/|EMER|/p" fakelog
-])
-
-# cleanup.
-kill `cat ovsdb-server.pid`
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-AT_SETUP([ovs-vswitchd -- invalid database path])
-
-# start an ovs-vswitchd process with invalid db path.
-ovs-vswitchd unix:invalid.db.sock --log-file --enable-dummy --pidfile &
-on_exit 'kill `cat ovs-vswitchd.pid`'
-
-# sleep for a while.
-sleep 10
-
-# stop the process.
-OVS_APP_EXIT_AND_WAIT([ovs-vswitchd])
-
-# should not see this log (which indicates high cpu utilization).
-AT_CHECK([grep "wakeup due to" ovs-vswitchd.log], [ignore])
-
-# check the log, should not see any WARN/ERR/EMER log.
-AT_CHECK([sed -n "
-/|WARN|/p
-/|ERR|/p
-/|EMER|/p" ovs-vswitchd.log
-])
-
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-AT_SETUP([ovs-vswitchd -- set service controller])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-OVS_VSWITCHD_START
-
-AT_CHECK([ovs-vsctl set-controller br0 punix:$(pwd)/br0.void])
-OVS_WAIT_UNTIL([test -e br0.void])
-
-AT_CHECK([ovs-vsctl set-controller br0 punix:$(pwd)/br0.void/../overwrite.file])
-OVS_WAIT_UNTIL([test -n "`grep ERR ovs-vswitchd.log | grep overwrite.file`"])
-
-OVS_VSWITCHD_STOP(["/Not adding Unix domain socket controller/d"])
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-dnl OVSDB server before release version 2.5 does not support the monitor_cond
-dnl method.  This test defeatures the OVSDB server to simulate an older
-dnl OVSDB server and make sure ovs-vswitchd can still work with it
-AT_SETUP([ovs-vswitchd -- Compatible with OVSDB server - w/o monitor_cond])
-OVS_VSWITCHD_START
-
-dnl defeature OVSDB server -- no monitor_cond
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/disable-monitor-cond])
-
-sleep 1
-
-AT_CHECK([ovs-vsctl add-port br0 p0  -- set interface p0 type=internal])
-AT_CHECK([ovs-vsctl add-port br0 p1  -- set interface p1 type=internal])
-
-dnl ovs-vswitchd should still 'see' ovsdb change with the 'monitor' method
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p0 1/1: (dummy-internal)
-    p1 2/2: (dummy-internal)
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-AT_SETUP([ovs-vswitchd - do not create sockets with unsafe names])
-OVS_VSWITCHD_START
-
-# On Unix systems, test for sockets with "test -S".
-#
-# On Windows systems, we simulate a socket with a regular file that contains
-# a TCP port number, so use "test -f" there instead.
-if test $IS_WIN32 = yes; then
-   S=f
-else
-   S=S
-fi
-
-# Create a bridge with an ordinary name and make sure that the management
-# socket gets creatd.
-AT_CHECK([ovs-vsctl add-br a -- set bridge a datapath-type=dummy])
-AT_CHECK([test -$S a.mgmt])
-
-# Create a bridge with an unsafe name and make sure that the management
-# socket does not get created.
-mkdir b
-
-cat >experr <<EOF
-ovs-vsctl: Error detected while setting up 'b/c'.  See ovs-vswitchd log for details.
-ovs-vsctl: The default log directory is "$OVS_RUNDIR".
-EOF
-AT_CHECK([ovs-vsctl add-br b/c -- set bridge b/c datapath-type=dummy], [0], [], [experr])
-AT_CHECK([test ! -e b/c.mgmt])
-
-OVS_VSWITCHD_STOP(['/ignoring bridge with invalid name/d'])
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-AT_SETUP([ovs-vswitchd - set datapath IDs])
-OVS_VSWITCHD_START([remove bridge br0 other-config datapath-id])
-
-# Get the default dpid and verify that it is of the expected form.
-AT_CHECK([ovs-vsctl --timeout=10 wait-until bridge br0 datapath-id!='[[]]'])
-AT_CHECK([ovs-vsctl get bridge br0 datapath-id], [0], [stdout])
-orig_dpid=$(tr -d \" < stdout)
-AT_CHECK([sed 's/[[0-9a-f]]/x/g' stdout], [0], ["xxxxxxxxxxxxxxxx"
-])
-AT_CHECK_UNQUOTED([ovs-ofctl show br0 | strip_xids | head -1], [0], [dnl
-OFPT_FEATURES_REPLY: dpid:$orig_dpid
-])
-
-# Set a dpid with 16 hex digits.
-AT_CHECK([ovs-vsctl set bridge br0 other-config:datapath-id=0123456789abcdef])
-AT_CHECK([ovs-vsctl --timeout=10 wait-until bridge br0 datapath-id=0123456789abcdef])
-AT_CHECK([ovs-ofctl show br0 | strip_xids | head -1], [0], [dnl
-OFPT_FEATURES_REPLY: dpid:0123456789abcdef
-])
-
-# Set a dpif with 0x prefix.
-AT_CHECK([ovs-vsctl set bridge br0 other-config:datapath-id=0x5ad515c0])
-AT_CHECK([ovs-vsctl --timeout=10 wait-until bridge br0 datapath-id=000000005ad515c0])
-AT_CHECK([ovs-ofctl show br0 | strip_xids | head -1], [0], [dnl
-OFPT_FEATURES_REPLY: dpid:000000005ad515c0
-])
-
-# Set invalid all-zeros dpid and make sure that the default reappears.
-AT_CHECK([ovs-vsctl set bridge br0 other-config:datapath-id=0x00])
-AT_CHECK([ovs-vsctl --timeout=10 wait-until bridge br0 datapath-id=$orig_dpid])
-AT_CHECK_UNQUOTED([ovs-ofctl show br0 | strip_xids | head -1], [0], [dnl
-OFPT_FEATURES_REPLY: dpid:$orig_dpid
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/ovs-xapi-sync.at b/tests/ovs-xapi-sync.at
deleted file mode 100644
index 2f00704ba..000000000
--- a/tests/ovs-xapi-sync.at
+++ /dev/null
@@ -1,75 +0,0 @@
-AT_BANNER([ovs-xapi-sync])
-
-AT_SETUP([ovs-xapi-sync])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
-
-# Mock up the XenAPI.
-cp "$top_srcdir/tests/MockXenAPI.py" XenAPI.py
-PYTHONPATH=`pwd`:$PYTHONPATH
-export PYTHONPATH
-
-cp "$top_srcdir/vswitchd/vswitch.ovsschema" .
-
-cp "$top_srcdir/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync" \
-   ovs-xapi-sync
-
-on_exit 'kill `cat pid ovs-xapi-sync.pid`'
-
-mkdir var var/run
-touch var/run/xapi_init_complete.cookie
-
-ovs_vsctl () {
-    ovs-vsctl --no-wait -vreconnect:emer "$@"
-}
-
-# Start ovsdb-server.
-OVS_VSCTL_SETUP
-
-# Start ovs-xapi-sync.
-AT_CHECK([$PYTHON ./ovs-xapi-sync "--pidfile=ovs-xapi-sync.pid" \
-                  "--root-prefix=`pwd`" unix:db.sock >log 2>&1 &])
-AT_CAPTURE_FILE([log])
-
-# Add bridges and check ovs-xapi-sync's work.
-AT_CHECK([ovs_vsctl -- add-br xenbr0 -- add-br xenbr1])
-OVS_WAIT_UNTIL([test "X`ovs_vsctl get bridge xenbr0 fail-mode`" != "X[[]]"])
-AT_CHECK([ovs_vsctl \
-                -- get bridge xenbr0 fail-mode other-config external-ids \
-                -- get bridge xenbr1 fail-mode other-config external-ids], [0],
-         [[secure
-{}
-{bridge-id="custom bridge ID"}
-secure
-{disable-in-band="true"}
-{}
-]])
-
-# Add vif and check daemon's work.
-AT_CHECK([ovs_vsctl \
-                -- add-port xenbr0 vif1.0 \
-                -- set Interface vif1.0 'external-ids={attached-mac="00:11:22:33:44:55", xs-network-uuid="9b66c68b-a74e-4d34-89a5-20a8ab352d1e", xs-vif-uuid="6ab1b260-398e-49ba-827b-c7696108964c", xs-vm-uuid="fcb8a3f6-dc04-41d2-8b8a-55afd2b755b8"'}])
-OVS_WAIT_UNTIL([ovs_vsctl get interface vif1.0 external-ids:iface-id >/dev/null 2>&1])
-AT_CHECK([ovs_vsctl get interface vif1.0 external-ids], [0],
-  [{attached-mac="00:11:22:33:44:55", iface-id="custom iface ID", iface-status=active, vm-id="custom vm ID", xs-network-uuid="9b66c68b-a74e-4d34-89a5-20a8ab352d1e", xs-vif-uuid="6ab1b260-398e-49ba-827b-c7696108964c", xs-vm-uuid="fcb8a3f6-dc04-41d2-8b8a-55afd2b755b8"}
-])
-
-# Add corresponding tap and check daemon's work.
-AT_CHECK([ovs_vsctl add-port xenbr0 tap1.0])
-OVS_WAIT_UNTIL([ovs_vsctl get interface tap1.0 external-ids:iface-id >/dev/null 2>&1])
-AT_CHECK([ovs_vsctl \
-                -- get interface vif1.0 external-ids \
-                -- get interface tap1.0 external-ids], [0],
-  [{attached-mac="00:11:22:33:44:55", iface-id="custom iface ID", iface-status=inactive, vm-id="custom vm ID", xs-network-uuid="9b66c68b-a74e-4d34-89a5-20a8ab352d1e", xs-vif-uuid="6ab1b260-398e-49ba-827b-c7696108964c", xs-vm-uuid="fcb8a3f6-dc04-41d2-8b8a-55afd2b755b8"}
-{attached-mac="00:11:22:33:44:55", iface-id="custom iface ID", iface-status=active, vm-id="custom vm ID", xs-network-uuid="9b66c68b-a74e-4d34-89a5-20a8ab352d1e", xs-vif-uuid="6ab1b260-398e-49ba-827b-c7696108964c", xs-vm-uuid="fcb8a3f6-dc04-41d2-8b8a-55afd2b755b8"}
-])
-
-# Remove corresponding tap and check daemon's work.
-AT_CHECK([ovs_vsctl del-port tap1.0])
-OVS_WAIT_UNTIL([test `ovs_vsctl get interface vif1.0 external-ids:iface-status` = active])
-AT_CHECK([ovs_vsctl get interface vif1.0 external-ids], [0],
-  [{attached-mac="00:11:22:33:44:55", iface-id="custom iface ID", iface-status=active, vm-id="custom vm ID", xs-network-uuid="9b66c68b-a74e-4d34-89a5-20a8ab352d1e", xs-vif-uuid="6ab1b260-398e-49ba-827b-c7696108964c", xs-vm-uuid="fcb8a3f6-dc04-41d2-8b8a-55afd2b755b8"}
-])
-
-OVSDB_SERVER_SHUTDOWN
-
-AT_CLEANUP
diff --git a/tests/ovsdb-client.at b/tests/ovsdb-client.at
deleted file mode 100644
index 8d777a027..000000000
--- a/tests/ovsdb-client.at
+++ /dev/null
@@ -1,173 +0,0 @@
-AT_BANNER([OVSDB -- ovsdb-client commands])
-
-AT_SETUP([ovsdb-client get-schema-version and get-schema-cksum])
-AT_KEYWORDS([ovsdb client positive])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket db], [0], [ignore], [ignore])
-AT_CHECK([ovsdb-client get-schema-version unix:socket ordinals], [0], [5.1.3
-])
-AT_CHECK([ovsdb-client get-schema-cksum unix:socket ordinals], [0], [12345678 9
-])
-OVSDB_SERVER_SHUTDOWN
-AT_CLEANUP
-
-AT_SETUP([ovsdb-client backup and restore])
-AT_KEYWORDS([ovsdb client positive])
-
-on_exit 'kill `cat *.pid`'
-
-dnl Create a database.
-ordinal_schema > schema
-touch .db.~lock~
-AT_CHECK([ovsdb-tool create db schema])
-
-dnl Put some data in the database.
-AT_CHECK(
-  [[for pair in 'zero 0' 'one 1' 'two 2' 'three 3' 'four 4' 'five 5'; do
-      set -- $pair
-      ovsdb-tool transact db '
-        ["ordinals",
-         {"op": "insert",
-          "table": "ordinals",
-          "row": {"name": "'$1'", "number": '$2'}},
-         {"op": "comment",
-          "comment": "add row for '"$pair"'"}]'
-    done | uuidfilt]], [0],
-[[[{"uuid":["uuid","<0>"]},{}]
-[{"uuid":["uuid","<1>"]},{}]
-[{"uuid":["uuid","<2>"]},{}]
-[{"uuid":["uuid","<3>"]},{}]
-[{"uuid":["uuid","<4>"]},{}]
-[{"uuid":["uuid","<5>"]},{}]
-]], [ignore])
-
-dnl Start the database server.
-AT_CHECK([ovsdb-server -vfile -vvlog:off --detach --no-chdir --pidfile --log-file --remote=punix:db.sock db], [0])
-AT_CAPTURE_FILE([ovsdb-server.log])
-
-dnl Dump a copy of the data and a backup of it.
-AT_CHECK([ovsdb-client dump > dump1])
-AT_CHECK([ovsdb-client backup > backup])
-
-dnl Mess up the data a little, verify that it changed, then restore it
-dnl and verify restoration.
-AT_CHECK(
-  [[ovsdb-client transact '
-      ["ordinals",
-       {"op": "update",
-        "table": "ordinals",
-        "where": [],
-        "row": {"name": ""}}]']],
-  [0],
-  [[[{"count":6}]
-]])
-AT_CHECK([ovsdb-client --no-headings dump ordinals | sort -k 3 | uuidfilt], [0], [dnl
-ordinals table
-<0> "" 0
-<1> "" 1
-<2> "" 2
-<3> "" 3
-<4> "" 4
-<5> "" 5
-])
-AT_CHECK([ovsdb-client restore < backup])
-AT_CHECK([ovsdb-client dump | tr -s ' ' | sort -k 3 | uuidfilt], [0], [dnl
-ordinals table
------------------------------------- ----- ------
-<0> zero 0
-<1> one 1
-<2> two 2
-<3> three 3
-<4> four 4
-<5> five 5
-_uuid name number
-])
-# Combining the original dump and the backup dump should reveal that the
-# rows have different uuids:
-AT_CHECK([(ovsdb-client dump; cat dump1) | tr -s ' ' | sort -k 3 | uuidfilt], [0], [dnl
-ordinals table
-ordinals table
------------------------------------- ----- ------
------------------------------------- ----- ------
-<0> zero 0
-<1> zero 0
-<2> one 1
-<3> one 1
-<4> two 2
-<5> two 2
-<6> three 3
-<7> three 3
-<8> four 4
-<9> four 4
-<10> five 5
-<11> five 5
-_uuid name number
-_uuid name number
-])
-
-dnl Stop the database server, then re-start it based on the backup.
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CHECK([ovsdb-server -vfile -vvlog:off --detach --no-chdir --pidfile --log-file --remote=punix:db.sock backup], [0])
-
-dnl Dump a new copy of the data.
-AT_CHECK([ovsdb-client dump > dump2])
-sort dump2 > expout
-
-dnl Verify that the two dumps are the same.
-AT_CHECK([sort dump1], [0], [expout])
-
-AT_CLEANUP
-
-AT_SETUP([ovsdb-client query])
-AT_KEYWORDS([ovsdb client positive])
-
-on_exit 'kill `cat *.pid`'
-
-dnl Create a database.
-ordinal_schema > schema
-touch .db.~lock~
-AT_CHECK([ovsdb-tool create db schema])
-
-dnl Start the database server.
-AT_CHECK([ovsdb-server -vfile -vvlog:off --detach --no-chdir --pidfile --log-file --remote=punix:db.sock db], [0])
-AT_CAPTURE_FILE([ovsdb-server.log])
-
-dnl Put some data in the database.
-dnl Use "query" for some of them, which won't have any effect.
-AT_CHECK(
-  [[for txn in 'transact zero 0' \
-               'query one 1' \
-               'transact two 2' \
-               'query three 3' \
-               'transact four 4' \
-               'query five 5'
-    do
-      set -- $txn
-      ovsdb-client $1 '
-        ["ordinals",
-         {"op": "insert",
-          "table": "ordinals",
-          "row": {"name": "'$2'", "number": '$3'}},
-         {"op": "comment",
-          "comment": "add row for '"$pair"'"}]'
-    done | uuidfilt]], [0],
-[[[{"uuid":["uuid","<0>"]},{}]
-[{"uuid":["uuid","<1>"]},{}]
-[{"uuid":["uuid","<2>"]},{}]
-[{"uuid":["uuid","<3>"]},{}]
-[{"uuid":["uuid","<4>"]},{}]
-[{"uuid":["uuid","<5>"]},{}]
-]], [ignore])
-
-AT_CHECK([ovsdb-client -f csv dump | sort -t, -k 3 | uuidfilt], [0], [dnl
-ordinals table
-<0>,zero,0
-<1>,two,2
-<2>,four,4
-_uuid,name,number
-])
-
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-
-AT_CLEANUP
diff --git a/tests/ovsdb-cluster-testsuite.at b/tests/ovsdb-cluster-testsuite.at
deleted file mode 100644
index c411c184e..000000000
--- a/tests/ovsdb-cluster-testsuite.at
+++ /dev/null
@@ -1,10 +0,0 @@
-AT_INIT
-
-m4_ifdef([AT_COLOR_TESTS], [AT_COLOR_TESTS])
-
-m4_include([tests/ovs-macros.at])
-m4_include([tests/ovsdb-macros.at])
-m4_include([tests/ofproto-macros.at])
-
-m4_include([tests/ovsdb-execution.at])
-m4_include([tests/ovsdb-cluster.at])
diff --git a/tests/ovsdb-cluster.at b/tests/ovsdb-cluster.at
deleted file mode 100644
index 69c7a630b..000000000
--- a/tests/ovsdb-cluster.at
+++ /dev/null
@@ -1,450 +0,0 @@
-OVS_START_SHELL_HELPERS
-# ovsdb_check_cluster N_SERVERS SCHEMA_FUNC OUTPUT TRANSACTION...
-ovsdb_check_cluster () {
-    local n=$1 schema_func=$2 output=$3
-    shift; shift; shift
-
-    $schema_func > schema
-    schema=`ovsdb-tool schema-name schema`
-    AT_CHECK([ovsdb-tool '-vPATTERN:console:%c|%p|%m' create-cluster s1.db schema unix:s1.raft], [0], [], [stderr])
-    AT_CHECK([grep -v 'from ephemeral to persistent' stderr], [1])
-    cid=`ovsdb-tool db-cid s1.db`
-    for i in `seq 2 $n`; do
-        AT_CHECK([ovsdb-tool join-cluster s$i.db $schema unix:s$i.raft unix:s1.raft])
-    done
-
-    on_exit 'kill `cat *.pid`'
-    for i in `seq $n`; do
-        AT_CHECK([ovsdb-server -vraft -vconsole:off -vsyslog:off --detach --no-chdir --log-file=s$i.log --pidfile=s$i.pid --unixctl=s$i --remote=punix:s$i.ovsdb s$i.db])
-    done
-    for i in `seq $n`; do
-        AT_CHECK([ovsdb_client_wait unix:s$i.ovsdb $schema connected])
-    done
-
-    for txn
-    do
-      AT_CHECK([ovsdb-client --timeout=30 -vjsonrpc -vconsole:off -vsyslog:off -vvlog:off --log-file transact unix:s1.ovsdb,unix:s2.ovsdb,unix:s3.ovsdb "$txn"], [0], [stdout])
-      cat stdout >> output
-    done
-    AT_CHECK_UNQUOTED([uuidfilt output], [0], [$output])
-    for i in `seq $n`; do
-        OVS_APP_EXIT_AND_WAIT_BY_TARGET([`pwd`/s$i], [s$i.pid])
-    done
-
-    AT_CHECK([ovsdb-tool check-cluster s*.db])
-}
-OVS_END_SHELL_HELPERS
-
-# Test a 1-server cluster.
-AT_BANNER([OVSDB - clustered transactions (1 server)])
-m4_define([OVSDB_CHECK_EXECUTION],
-  [AT_SETUP([$1 - cluster of 1])
-   AT_KEYWORDS([ovsdb server positive unix cluster cluster1 $5])
-   ovsdb_check_cluster 1 "$2" '$4' m4_foreach([txn], [$3], ['txn' ])
-   AT_CLEANUP])
-EXECUTION_EXAMPLES
-
-# Test a 3-server cluster.
-AT_BANNER([OVSDB - clustered transactions (3 servers)])
-m4_define([OVSDB_CHECK_EXECUTION],
-  [AT_SETUP([$1 - cluster of 3])
-   AT_KEYWORDS([ovsdb server positive unix cluster cluster3 $5])
-   ovsdb_check_cluster 3 "$2" '$4' m4_foreach([txn], [$3], ['txn' ])
-   AT_CLEANUP])
-EXECUTION_EXAMPLES
-
-# Test a 5-server cluster.
-AT_BANNER([OVSDB - clustered transactions (5 servers)])
-m4_define([OVSDB_CHECK_EXECUTION],
-  [AT_SETUP([$1 - cluster of 5])
-   AT_KEYWORDS([ovsdb server positive unix cluster cluster5 $5])
-   ovsdb_check_cluster 5 "$2" '$4' m4_foreach([txn], [$3], ['txn' ])
-   AT_CLEANUP])
-EXECUTION_EXAMPLES
-
-
-OVS_START_SHELL_HELPERS
-# ovsdb_cluster_failure_test SCHEMA_FUNC OUTPUT TRANSACTION...
-ovsdb_cluster_failure_test () {
-    # Initial state: s1 is leader, s2 and s3 are followers
-    remote_1=$1
-    remote_2=$2
-    crash_node=$3
-    crash_command=$4
-    if test "$crash_node" == "1"; then
-        new_leader=$5
-    fi
-
-    cp $top_srcdir/ovn/ovn-nb.ovsschema schema
-    schema=`ovsdb-tool schema-name schema`
-    AT_CHECK([ovsdb-tool '-vPATTERN:console:%c|%p|%m' create-cluster s1.db schema unix:s1.raft], [0], [], [dnl
-ovsdb|WARN|schema: changed 2 columns in 'OVN_Northbound' database from ephemeral to persistent, including 'status' column in 'Connection' table, because clusters do not support ephemeral columns
-])
-
-    n=3
-    join_cluster() {
-        local i=$1
-        others=
-        for j in `seq 1 $n`; do
-            if test $i != $j; then
-                others="$others unix:s$j.raft"
-            fi
-        done
-        AT_CHECK([ovsdb-tool join-cluster s$i.db $schema unix:s$i.raft $others])
-    }
-    start_server() {
-        local i=$1
-        printf "\ns$i: starting\n"
-        AT_CHECK([ovsdb-server -vjsonrpc -vconsole:off -vsyslog:off --detach --no-chdir --log-file=s$i.log --pidfile=s$i.pid --unixctl=s$i --remote=punix:s$i.ovsdb s$i.db])
-    }
-    connect_server() {
-        local i=$1
-        printf "\ns$i: waiting to connect to storage\n"
-        AT_CHECK([ovsdb_client_wait --log-file=connect$i.log unix:s$i.ovsdb $schema connected])
-    }
-    cid=`ovsdb-tool db-cid s1.db`
-    for i in `seq 2 $n`; do join_cluster $i; done
-
-    on_exit 'kill `cat *.pid`'
-    for i in `seq $n`; do start_server $i; done
-    for i in `seq $n`; do connect_server $i; done
-
-    export OVN_NB_DB=unix:s$remote_1.ovsdb,unix:s$remote_2.ovsdb
-
-    # To ensure $new_leader node the new leader, we delay election timer for
-    # the other follower.
-    if test -n "$new_leader"; then
-        if test "$new_leader" == "2"; then
-            delay_election_node=3
-        else
-            delay_election_node=2
-        fi
-        AT_CHECK([ovs-appctl -t "`pwd`"/s$delay_election_node cluster/failure-test delay-election], [0], [ignore])
-    fi
-    AT_CHECK([ovs-appctl -t "`pwd`"/s$crash_node cluster/failure-test $crash_command], [0], [ignore])
-    AT_CHECK([ovn-nbctl -v --timeout=10 --no-leader-only --no-shuffle-remotes create logical_switch name=ls1], [0], [ignore], [ignore])
-
-    # Make sure that the node really crashed.
-    AT_CHECK([ls s$crash_node.ovsdb], [2], [ignore], [ignore])
-    # XXX: Client will fail if remotes contains unix socket that doesn't exist (killed).
-    if test "$remote_1" == "$crash_node"; then
-        export OVN_NB_DB=unix:s$remote_2.ovsdb
-    fi
-    AT_CHECK([ovn-nbctl --no-leader-only ls-list | awk '{ print $2 }'], [0], [(ls1)
-])
-}
-OVS_END_SHELL_HELPERS
-AT_BANNER([OVSDB - cluster failure with pending transaction])
-
-AT_SETUP([OVSDB cluster - txn on follower-2, leader crash before sending appendReq, follower-2 becomes leader])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-ovsdb_cluster_failure_test 2 3 1 crash-before-sending-append-request 2
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on follower-2, leader crash before sending appendReq, follower-3 becomes leader])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-ovsdb_cluster_failure_test 2 3 1 crash-before-sending-append-request 3
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on follower-2, leader crash before sending execRep, follower-2 becomes leader])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-ovsdb_cluster_failure_test 2 3 1 crash-before-sending-execute-command-reply 2
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on follower-2, leader crash before sending execRep, follower-3 becomes leader])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-ovsdb_cluster_failure_test 2 3 1 crash-before-sending-execute-command-reply 3
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on follower-2, leader crash after sending execRep, follower-2 becomes leader])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-ovsdb_cluster_failure_test 2 3 1 crash-after-sending-execute-command-reply 2
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on follower-2, leader crash after sending execRep, follower-3 becomes leader])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-ovsdb_cluster_failure_test 2 3 1 crash-after-sending-execute-command-reply 3
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on leader, leader crash before sending appendReq, follower-2 becomes leader])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-ovsdb_cluster_failure_test 1 2 1 crash-before-sending-append-request 2
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on leader, leader crash before sending appendReq, follower-3 becomes leader])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-ovsdb_cluster_failure_test 1 2 1 crash-before-sending-append-request 3
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on leader, leader crash after sending appendReq, follower-2 becomes leader])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-# XXX: Detect and skip repeated transaction before enabling this test
-AT_CHECK([exit 77])
-ovsdb_cluster_failure_test 1 2 1 crash-after-sending-append-request 2
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on leader, leader crash after sending appendReq, follower-3 becomes leader])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-# XXX: Detect and skip repeated transaction before enabling this test
-AT_CHECK([exit 77])
-ovsdb_cluster_failure_test 1 2 1 crash-after-sending-append-request 3
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on follower-2, follower-2 crash before sending execReq, reconnect to follower-3])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-ovsdb_cluster_failure_test 2 3 2 crash-before-sending-execute-command-request
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on follower-2, follower-2 crash before sending execReq, reconnect to leader])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-ovsdb_cluster_failure_test 2 1 2 crash-before-sending-execute-command-request
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on follower-2, follower-2 crash after sending execReq, reconnect to follower-3])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-# XXX: Detect and skip repeated transaction before enabling this test
-AT_CHECK([exit 77])
-ovsdb_cluster_failure_test 2 3 2 crash-after-sending-execute-command-request
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on follower-2, follower-2 crash after sending execReq, reconnect to leader])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-# XXX: Detect and skip repeated transaction before enabling this test
-AT_CHECK([exit 77])
-ovsdb_cluster_failure_test 2 1 2 crash-after-sending-execute-command-request
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on leader, follower-2 crash after receiving appendReq for the update])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-ovsdb_cluster_failure_test 1 1 2 crash-after-receiving-append-request-update
-AT_CLEANUP
-
-AT_SETUP([OVSDB cluster - txn on follower-2, follower-3 crash after receiving appendReq for the update])
-AT_KEYWORDS([ovsdb server negative unix cluster pending-txn])
-ovsdb_cluster_failure_test 2 2 3 crash-after-receiving-append-request-update
-AT_CLEANUP
-
-
-AT_BANNER([OVSDB - cluster tests])
-
-# Torture test.
-OVS_START_SHELL_HELPERS
-ovsdb_torture_test () {
-    local n=$1                  # Number of cluster members
-    local victim=$2             # Cluster member to kill or remove
-    local variant=$3            # 'kill' and restart or 'remove' and add
-    cp $top_srcdir/ovn-sb.ovsschema schema
-    schema=`ovsdb-tool schema-name schema`
-    AT_CHECK([ovsdb-tool '-vPATTERN:console:%c|%p|%m' create-cluster s1.db schema unix:s1.raft], [0], [], [dnl
-ovsdb|WARN|schema: changed 2 columns in 'OVN_Southbound' database from ephemeral to persistent, including 'status' column in 'Connection' table, because clusters do not support ephemeral columns
-])
-
-    join_cluster() {
-        local i=$1
-        others=
-        for j in `seq 1 $n`; do
-            if test $i != $j; then
-                others="$others unix:s$j.raft"
-            fi
-        done
-        AT_CHECK([ovsdb-tool join-cluster s$i.db $schema unix:s$i.raft $others])
-    }
-
-    start_server() {
-        local i=$1
-        printf "\ns$i: starting\n"
-        AT_CHECK([ovsdb-server -vjsonrpc -vconsole:off -vsyslog:off --detach --no-chdir --log-file=s$i.log --pidfile=s$i.pid --unixctl=s$i --remote=punix:s$i.ovsdb s$i.db])
-    }
-    stop_server() {
-        local i=$1
-        printf "\ns$i: stopping\n"
-        OVS_APP_EXIT_AND_WAIT_BY_TARGET([`pwd`/s$i], [s$i.pid])
-    }
-    connect_server() {
-        local i=$1
-        printf "\ns$i: waiting to connect to storage\n"
-        AT_CHECK([ovsdb_client_wait --log-file=connect$i.log unix:s$i.ovsdb $schema connected])
-    }
-    remove_server() {
-        local i=$1
-        printf "\ns$i: removing from cluster\n"
-        AT_CHECK([ovs-appctl --timeout=30 -t "`pwd`"/s$i cluster/leave OVN_Southbound])
-        printf "\ns$i: waiting for removal to complete\n"
-        AT_CHECK([ovsdb_client_wait --log-file=remove$i.log unix:s$i.ovsdb $schema removed])
-        stop_server $i
-    }
-    add_server() {
-        local i=$1
-        rm s$i.db
-        join_cluster $i
-        start_server $i
-        connect_server $i
-    }
-
-    cid=`ovsdb-tool db-cid s1.db`
-    for i in `seq 2 $n`; do join_cluster $i; done
-
-    on_exit 'kill `cat *.pid`'
-    for i in `seq $n`; do start_server $i; done
-    for i in `seq $n`; do connect_server $i; done
-
-    OVN_SB_DB=unix:s1.ovsdb
-    for i in `seq 2 $n`; do
-        OVN_SB_DB=$OVN_SB_DB,unix:s$i.ovsdb
-    done
-    export OVN_SB_DB
-
-    n1=10 n2=5 n3=50
-    echo "starting $n1*$n2 ovn-sbctl processes..."
-    for i in $(seq 0 $(expr $n1 - 1) ); do
-        (for j in $(seq $n2); do
-             : > $i-$j.running
-             txn="add SB_Global . external_ids $i-$j=$i-$j"
-             for k in $(seq $n3); do
-                 txn="$txn -- add SB_Global . external_ids $i-$j-$k=$i-$j-$k"
-             done
-             run_as "ovn-sbctl($i-$j)" ovn-sbctl "-vPATTERN:console:ovn-sbctl($i-$j)|%D{%H:%M:%S}|%05N|%c|%p|%m" --log-file=$i-$j.log -vfile -vsyslog:off -vtimeval:off --timeout=120 --no-leader-only $txn
-             status=$?
-             if test $status != 0; then
-                 echo "$i-$j exited with status $status" > $i-$j:$status
-             fi
-             rm $i-$j.running
-         done
-         : > $i.done)&
-    done
-    echo "...done"
-
-    echo "waiting for ovn-sbctl processes to exit..."
-    # Use file instead of var because code inside "while" runs in a subshell.
-    echo 0 > phase
-    i=0
-    (while :; do echo; sleep 0.1; done) | while read REPLY; do
-        printf "t=%2d s:" $i
-        done=0
-        for j in $(seq 0 $(expr $n1 - 1)); do
-            if test -f $j.done; then
-                printf " $j"
-                done=$(expr $done + 1)
-            fi
-        done
-        printf '\n'
-        if test $done = $n1; then
-            break
-        fi
-
-        case $(cat phase) in # (
-        0)
-            if test $done -ge $(expr $n1 / 10); then
-                if test $variant = kill; then
-                    stop_server $victim
-                else
-                    remove_server $victim
-                fi
-                echo 1 > phase
-                next=$(expr $i + 2)
-            fi
-            ;; # (
-        1)
-            if test $i -ge $next; then
-                if test $variant = kill; then
-                    start_server $victim
-                    connect_server $victim
-                else
-                    add_server $victim
-                fi
-                echo 2 > phase
-            fi
-            ;;
-        esac
-
-        i=$(expr $i + 1)
-    done
-    echo "...done"
-    AT_CHECK([if test $(cat phase) != 2; then exit 77; fi])
-
-    for i in $(seq 0 $(expr $n1 - 1) ); do
-        for j in `seq $n2`; do
-            echo "$i-$j=$i-$j"
-            for k in `seq $n3`; do
-                echo "$i-$j-$k=$i-$j-$k"
-            done
-        done
-    done | sort > expout
-    AT_CHECK([ovn-sbctl --timeout=30 --log-file=finalize.log -vtimeval:off -vfile -vsyslog:off --bare get SB_Global . external-ids | tr ',' '\n' | sed 's/[[{}"" ]]//g' | sort], [0], [expout])
-
-    for i in `seq $n`; do
-        if test $i != $victim || test $(cat phase) != 1; then
-            stop_server $i
-        fi
-    done
-
-    # We ignore stdout because non-fatal warnings get printed there.
-    AT_CHECK([ovsdb-tool check-cluster s*.db], [0], [ignore])
-}
-OVS_END_SHELL_HELPERS
-
-AT_SETUP([OVSDB 3-server torture test - kill/restart leader])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster3])
-ovsdb_torture_test 3 1 kill
-AT_CLEANUP
-AT_SETUP([OVSDB 3-server torture test - kill/restart follower 1])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster3])
-ovsdb_torture_test 3 2 kill
-AT_CLEANUP
-AT_SETUP([OVSDB 3-server torture test - kill/restart follower 2])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster3])
-ovsdb_torture_test 3 3 kill
-AT_CLEANUP
-AT_SETUP([OVSDB 5-server torture test - kill/restart leader])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster5])
-ovsdb_torture_test 5 1 kill
-AT_CLEANUP
-AT_SETUP([OVSDB 5-server torture test - kill/restart follower 1])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster5])
-ovsdb_torture_test 5 2 kill
-AT_CLEANUP
-AT_SETUP([OVSDB 5-server torture test - kill/restart follower 2])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster5])
-ovsdb_torture_test 5 3 kill
-AT_CLEANUP
-AT_SETUP([OVSDB 5-server torture test - kill/restart follower 3])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster5])
-ovsdb_torture_test 5 4 kill
-AT_CLEANUP
-AT_SETUP([OVSDB 5-server torture test - kill/restart follower 4])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster5])
-ovsdb_torture_test 5 5 kill
-AT_CLEANUP
-
-AT_SETUP([OVSDB 3-server torture test - remove/re-add leader])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster3])
-ovsdb_torture_test 3 1 remove
-AT_CLEANUP
-AT_SETUP([OVSDB 3-server torture test - remove/re-add follower 1])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster3])
-ovsdb_torture_test 3 2 remove
-AT_CLEANUP
-AT_SETUP([OVSDB 3-server torture test - remove/re-add follower 2])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster3])
-ovsdb_torture_test 3 3 remove
-AT_CLEANUP
-AT_SETUP([OVSDB 5-server torture test - remove/re-add leader])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster5])
-ovsdb_torture_test 5 1 remove
-AT_CLEANUP
-AT_SETUP([OVSDB 5-server torture test - remove/re-add follower 1])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster5])
-ovsdb_torture_test 5 2 remove
-AT_CLEANUP
-AT_SETUP([OVSDB 5-server torture test - remove/re-add follower 2])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster5])
-ovsdb_torture_test 5 3 remove
-AT_CLEANUP
-AT_SETUP([OVSDB 5-server torture test - remove/re-add follower 3])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster5])
-ovsdb_torture_test 5 4 remove
-AT_CLEANUP
-AT_SETUP([OVSDB 5-server torture test - remove/re-add follower 4])
-AT_KEYWORDS([ovsdb server positive unix cluster cluster5])
-ovsdb_torture_test 5 5 remove
-AT_CLEANUP
diff --git a/tests/ovsdb-column.at b/tests/ovsdb-column.at
deleted file mode 100644
index b8d093991..000000000
--- a/tests/ovsdb-column.at
+++ /dev/null
@@ -1,13 +0,0 @@
-AT_BANNER([OVSDB -- columns])
-
-OVSDB_CHECK_POSITIVE_CPY([ordinary column],
-  [[parse-column mycol '{"type": "integer"}']],
-  [[{"type":"integer"}]])
-
-OVSDB_CHECK_POSITIVE_CPY([immutable column],
-  [[parse-column mycol '{"type": "real", "mutable": false}']],
-  [[{"mutable":false,"type":"real"}]])
-
-OVSDB_CHECK_POSITIVE_CPY([ephemeral column],
-  [[parse-column mycol '{"type": "uuid", "ephemeral": true}']],
-  [[{"ephemeral":true,"type":"uuid"}]])
diff --git a/tests/ovsdb-condition.at b/tests/ovsdb-condition.at
deleted file mode 100644
index 58af7f638..000000000
--- a/tests/ovsdb-condition.at
+++ /dev/null
@@ -1,970 +0,0 @@
-AT_BANNER([OVSDB -- conditions])
-
-OVSDB_CHECK_POSITIVE([null condition],
-  [[parse-conditions \
-    '{"columns": {"name": {"type": "string"}}}' \
-    '[]']],
-  [[[]]])
-
-OVSDB_CHECK_POSITIVE([conditions on scalars],
-  [[parse-conditions \
-    '{"columns":
-        {"i": {"type": "integer"},
-         "r": {"type": "real"},
-         "b": {"type": "boolean"},
-         "s": {"type": "string"},
-         "u": {"type": "uuid"}}}' \
-    '[["i", "==", 0]]' \
-    '[["i", "!=", 1]]' \
-    '[["i", "<", 2]]' \
-    '[["i", "<=", 3]]' \
-    '[["i", ">", 4]]' \
-    '[["i", ">=", 5]]' \
-    '[["i", "includes", 6]]' \
-    '[["i", "excludes", 7]]' \
-    '[["r", "==", 0.5]]' \
-    '[["r", "!=", 1.5]]' \
-    '[["r", "<", 2.5]]' \
-    '[["r", "<=", 3.5]]' \
-    '[["r", ">", 4.5]]' \
-    '[["r", ">=", 5.5]]' \
-    '[["r", "includes", 6.5]]' \
-    '[["r", "excludes", 7.5]]' \
-    '[["b", "==", true]]' \
-    '[["b", "!=", false]]' \
-    '[["b", "includes", false]]' \
-    '[["b", "excludes", true]]' \
-    '[["s", "==", "a"]]' \
-    '[["s", "!=", "b"]]' \
-    '[["s", "includes", "c"]]' \
-    '[["s", "excludes", "d"]]' \
-    '[["u", "==", ["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]]]' \
-    '[["u", "!=", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]' \
-    '[["u", "includes", ["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]]' \
-    '[["u", "excludes", ["uuid", "62315898-64e0-40b9-b26f-ff74225303e6"]]]']],
-  [[[["i","==",0]]
-[["i","!=",1]]
-[["i","<",2]]
-[["i","<=",3]]
-[["i",">",4]]
-[["i",">=",5]]
-[["i","includes",6]]
-[["i","excludes",7]]
-[["r","==",0.5]]
-[["r","!=",1.5]]
-[["r","<",2.5]]
-[["r","<=",3.5]]
-[["r",">",4.5]]
-[["r",">=",5.5]]
-[["r","includes",6.5]]
-[["r","excludes",7.5]]
-[["b","==",true]]
-[["b","!=",false]]
-[["b","includes",false]]
-[["b","excludes",true]]
-[["s","==","a"]]
-[["s","!=","b"]]
-[["s","includes","c"]]
-[["s","excludes","d"]]
-[["u","==",["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]
-[["u","!=",["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"]]]
-[["u","includes",["uuid","ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]]
-[["u","excludes",["uuid","62315898-64e0-40b9-b26f-ff74225303e6"]]]]],
-  [condition])
-
-AT_SETUP([disallowed conditions on scalars])
-AT_KEYWORDS([ovsdb negative condition])
-AT_CHECK([[test-ovsdb parse-conditions \
-    '{"columns":
-        {"i": {"type": "integer"},
-         "r": {"type": "real"},
-         "b": {"type": "boolean"},
-         "s": {"type": "string"},
-         "u": {"type": "uuid"}}}' \
-    '[["b", ">", true]]' \
-    '[["b", ">=", false]]' \
-    '[["b", "<", false]]' \
-    '[["b", "<=", false]]' \
-    '[["s", ">", "a"]]' \
-    '[["s", ">=", "b"]]' \
-    '[["s", "<", "c"]]' \
-    '[["s", "<=", "d"]]' \
-    '[["u", ">", ["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]]]' \
-    '[["u", ">=", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]' \
-    '[["u", "<", ["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]]' \
-    '[["u", "<=", ["uuid", "62315898-64e0-40b9-b26f-ff74225303e6"]]]' \
-    '[["i", "==", ["set", []]]]' \
-    '[["i", "!=", ["set", []]]]' \
-    '[["i", ">", ["set", []]]]' \
-    '[["i", ">=", ["set", []]]]' \
-    '[["i", "<", ["set", []]]]' \
-    '[["i", "<=", ["set", []]]]' \
-    '[["i", "includes", ["set", []]]]' \
-    '[["i", "excludes", ["set", []]]]' \
-    '[["i", ">", ["set", []]]]' \
-    '[["i", "==", ["set", []]]]' \
-    '[["r", "==", ["set", []]]]' \
-    '[["r", "!=", ["set", []]]]' \
-    '[["r", ">", ["set", []]]]' \
-    '[["r", ">=", ["set", []]]]' \
-    '[["r", "<", ["set", []]]]' \
-    '[["r", "<=", ["set", []]]]' \
-    '[["r", "includes", ["set", []]]]' \
-    '[["r", "excludes", ["set", []]]]' \
-    '[["r", ">", ["set", []]]]' \
-    '[["r", "==", ["set", []]]]' \
-    '[["b", "==", ["set", []]]]' \
-    '[["b", "!=", ["set", []]]]' \
-    '[["b", ">", ["set", []]]]' \
-    '[["b", ">=", ["set", []]]]' \
-    '[["b", "<", ["set", []]]]' \
-    '[["b", "<=", ["set", []]]]' \
-    '[["b", "includes", ["set", []]]]' \
-    '[["b", "excludes", ["set", []]]]' \
-    '[["b", ">", ["set", []]]]' \
-    '[["b", "==", ["set", []]]]' \
-    '[["s", "==", ["set", []]]]' \
-    '[["s", "!=", ["set", []]]]' \
-    '[["s", ">", ["set", []]]]' \
-    '[["s", ">=", ["set", []]]]' \
-    '[["s", "<", ["set", []]]]' \
-    '[["s", "<=", ["set", []]]]' \
-    '[["s", "includes", ["set", []]]]' \
-    '[["s", "excludes", ["set", []]]]' \
-    '[["s", ">", ["set", []]]]' \
-    '[["s", "==", ["set", []]]]' \
-    '[["u", "==", ["set", []]]]' \
-    '[["u", "!=", ["set", []]]]' \
-    '[["u", ">", ["set", []]]]' \
-    '[["u", ">=", ["set", []]]]' \
-    '[["u", "<", ["set", []]]]' \
-    '[["u", "<=", ["set", []]]]' \
-    '[["u", "includes", ["set", []]]]' \
-    '[["u", "excludes", ["set", []]]]' \
-    '[["u", ">", ["set", []]]]' \
-    '[["u", "==", ["set", []]]]' \
-]],
-  [1], [],
-  [[test-ovsdb: syntax "["b",">",true]": syntax error: Type mismatch: ">" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["b",">=",false]": syntax error: Type mismatch: ">=" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["b","<",false]": syntax error: Type mismatch: "<" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["b","<=",false]": syntax error: Type mismatch: "<=" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["s",">","a"]": syntax error: Type mismatch: ">" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["s",">=","b"]": syntax error: Type mismatch: ">=" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["s","<","c"]": syntax error: Type mismatch: "<" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["s","<=","d"]": syntax error: Type mismatch: "<=" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["u",">",["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]": syntax error: Type mismatch: ">" operator may not be applied to column u of type uuid.
-test-ovsdb: syntax "["u",">=",["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"]]": syntax error: Type mismatch: ">=" operator may not be applied to column u of type uuid.
-test-ovsdb: syntax "["u","<",["uuid","ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]": syntax error: Type mismatch: "<" operator may not be applied to column u of type uuid.
-test-ovsdb: syntax "["u","<=",["uuid","62315898-64e0-40b9-b26f-ff74225303e6"]]": syntax error: Type mismatch: "<=" operator may not be applied to column u of type uuid.
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["b",">",["set",[]]]": syntax error: Type mismatch: ">" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["b",">=",["set",[]]]": syntax error: Type mismatch: ">=" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["b","<",["set",[]]]": syntax error: Type mismatch: "<" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["b","<=",["set",[]]]": syntax error: Type mismatch: "<=" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["b",">",["set",[]]]": syntax error: Type mismatch: ">" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["s",">",["set",[]]]": syntax error: Type mismatch: ">" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["s",">=",["set",[]]]": syntax error: Type mismatch: ">=" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["s","<",["set",[]]]": syntax error: Type mismatch: "<" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["s","<=",["set",[]]]": syntax error: Type mismatch: "<=" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["s",">",["set",[]]]": syntax error: Type mismatch: ">" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["u",">",["set",[]]]": syntax error: Type mismatch: ">" operator may not be applied to column u of type uuid.
-test-ovsdb: syntax "["u",">=",["set",[]]]": syntax error: Type mismatch: ">=" operator may not be applied to column u of type uuid.
-test-ovsdb: syntax "["u","<",["set",[]]]": syntax error: Type mismatch: "<" operator may not be applied to column u of type uuid.
-test-ovsdb: syntax "["u","<=",["set",[]]]": syntax error: Type mismatch: "<=" operator may not be applied to column u of type uuid.
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["u",">",["set",[]]]": syntax error: Type mismatch: ">" operator may not be applied to column u of type uuid.
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-]])
-AT_CLEANUP
-
-OVSDB_CHECK_POSITIVE([conditions on optional scalars],
-  [[parse-conditions \
-    '{"columns":
-        {"i": {"type": {"key": "integer", "min": 0, "max": 1}},
-         "r": {"type": {"key": "real", "min": 0, "max": 1}},
-         "b": {"type": {"key": "boolean", "min": 0, "max": 1}},
-         "s": {"type": {"key": "string", "min": 0, "max": 1}},
-         "u": {"type": {"key": "uuid", "min": 0, "max": 1}}}}' \
-    '[["i", "==", 0]]' \
-    '[["i", "!=", 1]]' \
-    '[["i", "<", 2]]' \
-    '[["i", "<=", 3]]' \
-    '[["i", ">", 4]]' \
-    '[["i", ">=", 5]]' \
-    '[["i", "includes", 6]]' \
-    '[["i", "excludes", 7]]' \
-    '[["r", "==", 0.5]]' \
-    '[["r", "!=", 1.5]]' \
-    '[["r", "<", 2.5]]' \
-    '[["r", "<=", 3.5]]' \
-    '[["r", ">", 4.5]]' \
-    '[["r", ">=", 5.5]]' \
-    '[["r", "includes", 6.5]]' \
-    '[["r", "excludes", 7.5]]' \
-    '[["b", "==", true]]' \
-    '[["b", "!=", false]]' \
-    '[["b", "includes", false]]' \
-    '[["b", "excludes", true]]' \
-    '[["s", "==", "a"]]' \
-    '[["s", "!=", "b"]]' \
-    '[["s", "includes", "c"]]' \
-    '[["s", "excludes", "d"]]' \
-    '[["u", "==", ["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]]]' \
-    '[["u", "!=", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]' \
-    '[["u", "includes", ["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]]' \
-    '[["u", "excludes", ["uuid", "62315898-64e0-40b9-b26f-ff74225303e6"]]]']],
-  [[[["i","==",0]]
-[["i","!=",1]]
-[["i","<",2]]
-[["i","<=",3]]
-[["i",">",4]]
-[["i",">=",5]]
-[["i","includes",6]]
-[["i","excludes",7]]
-[["r","==",0.5]]
-[["r","!=",1.5]]
-[["r","<",2.5]]
-[["r","<=",3.5]]
-[["r",">",4.5]]
-[["r",">=",5.5]]
-[["r","includes",6.5]]
-[["r","excludes",7.5]]
-[["b","==",true]]
-[["b","!=",false]]
-[["b","includes",false]]
-[["b","excludes",true]]
-[["s","==","a"]]
-[["s","!=","b"]]
-[["s","includes","c"]]
-[["s","excludes","d"]]
-[["u","==",["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]
-[["u","!=",["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"]]]
-[["u","includes",["uuid","ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]]
-[["u","excludes",["uuid","62315898-64e0-40b9-b26f-ff74225303e6"]]]]],
-  [condition])
-
-AT_SETUP([disallowed conditions on optional scalars])
-AT_KEYWORDS([ovsdb negative condition])
-AT_CHECK([[test-ovsdb parse-conditions \
-    '{"columns":
-        {"i": {"type": {"key": "integer", "min": 0, "max": 1}},
-         "r": {"type": {"key": "real", "min": 0, "max": 1}},
-         "b": {"type": {"key": "boolean", "min": 0, "max": 1}},
-         "s": {"type": {"key": "string", "min": 0, "max": 1}},
-         "u": {"type": {"key": "uuid", "min": 0, "max": 1}}}}' \
-    '[["b", ">", true]]' \
-    '[["b", ">=", false]]' \
-    '[["b", "<", false]]' \
-    '[["b", "<=", false]]' \
-    '[["s", ">", "a"]]' \
-    '[["s", ">=", "b"]]' \
-    '[["s", "<", "c"]]' \
-    '[["s", "<=", "d"]]' \
-    '[["u", ">", ["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]]]' \
-    '[["u", ">=", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]' \
-    '[["u", "<", ["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]]' \
-    '[["u", "<=", ["uuid", "62315898-64e0-40b9-b26f-ff74225303e6"]]]' \
-    '[["i", ">", ["set", []]]]' \
-    '[["i", ">=", ["set", []]]]' \
-    '[["i", "<", ["set", []]]]' \
-    '[["i", "<=", ["set", []]]]' \
-    '[["i", ">", ["set", []]]]' \
-    '[["r", ">", ["set", []]]]' \
-    '[["r", ">=", ["set", []]]]' \
-    '[["r", "<", ["set", []]]]' \
-    '[["r", "<=", ["set", []]]]' \
-    '[["r", ">", ["set", []]]]' \
-    '[["b", ">", ["set", []]]]' \
-    '[["b", ">=", ["set", []]]]' \
-    '[["b", "<", ["set", []]]]' \
-    '[["b", "<=", ["set", []]]]' \
-    '[["b", ">", ["set", []]]]' \
-    '[["s", ">", ["set", []]]]' \
-    '[["s", ">=", ["set", []]]]' \
-    '[["s", "<", ["set", []]]]' \
-    '[["s", "<=", ["set", []]]]' \
-    '[["s", ">", ["set", []]]]' \
-    '[["u", ">", ["set", []]]]' \
-    '[["u", ">=", ["set", []]]]' \
-    '[["u", "<", ["set", []]]]' \
-    '[["u", "<=", ["set", []]]]' \
-    '[["u", ">", ["set", []]]]' \
-]],
-  [1], [], [[test-ovsdb: syntax "["b",">",true]": syntax error: Type mismatch: ">" operator may not be applied to column b of type set of up to 1 booleans.
-test-ovsdb: syntax "["b",">=",false]": syntax error: Type mismatch: ">=" operator may not be applied to column b of type set of up to 1 booleans.
-test-ovsdb: syntax "["b","<",false]": syntax error: Type mismatch: "<" operator may not be applied to column b of type set of up to 1 booleans.
-test-ovsdb: syntax "["b","<=",false]": syntax error: Type mismatch: "<=" operator may not be applied to column b of type set of up to 1 booleans.
-test-ovsdb: syntax "["s",">","a"]": syntax error: Type mismatch: ">" operator may not be applied to column s of type set of up to 1 strings.
-test-ovsdb: syntax "["s",">=","b"]": syntax error: Type mismatch: ">=" operator may not be applied to column s of type set of up to 1 strings.
-test-ovsdb: syntax "["s","<","c"]": syntax error: Type mismatch: "<" operator may not be applied to column s of type set of up to 1 strings.
-test-ovsdb: syntax "["s","<=","d"]": syntax error: Type mismatch: "<=" operator may not be applied to column s of type set of up to 1 strings.
-test-ovsdb: syntax "["u",">",["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]": syntax error: Type mismatch: ">" operator may not be applied to column u of type set of up to 1 uuids.
-test-ovsdb: syntax "["u",">=",["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"]]": syntax error: Type mismatch: ">=" operator may not be applied to column u of type set of up to 1 uuids.
-test-ovsdb: syntax "["u","<",["uuid","ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]": syntax error: Type mismatch: "<" operator may not be applied to column u of type set of up to 1 uuids.
-test-ovsdb: syntax "["u","<=",["uuid","62315898-64e0-40b9-b26f-ff74225303e6"]]": syntax error: Type mismatch: "<=" operator may not be applied to column u of type set of up to 1 uuids.
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["set",[]]": syntax error: set must have exactly one member but 0 are present
-test-ovsdb: syntax "["b",">",["set",[]]]": syntax error: Type mismatch: ">" operator may not be applied to column b of type set of up to 1 booleans.
-test-ovsdb: syntax "["b",">=",["set",[]]]": syntax error: Type mismatch: ">=" operator may not be applied to column b of type set of up to 1 booleans.
-test-ovsdb: syntax "["b","<",["set",[]]]": syntax error: Type mismatch: "<" operator may not be applied to column b of type set of up to 1 booleans.
-test-ovsdb: syntax "["b","<=",["set",[]]]": syntax error: Type mismatch: "<=" operator may not be applied to column b of type set of up to 1 booleans.
-test-ovsdb: syntax "["b",">",["set",[]]]": syntax error: Type mismatch: ">" operator may not be applied to column b of type set of up to 1 booleans.
-test-ovsdb: syntax "["s",">",["set",[]]]": syntax error: Type mismatch: ">" operator may not be applied to column s of type set of up to 1 strings.
-test-ovsdb: syntax "["s",">=",["set",[]]]": syntax error: Type mismatch: ">=" operator may not be applied to column s of type set of up to 1 strings.
-test-ovsdb: syntax "["s","<",["set",[]]]": syntax error: Type mismatch: "<" operator may not be applied to column s of type set of up to 1 strings.
-test-ovsdb: syntax "["s","<=",["set",[]]]": syntax error: Type mismatch: "<=" operator may not be applied to column s of type set of up to 1 strings.
-test-ovsdb: syntax "["s",">",["set",[]]]": syntax error: Type mismatch: ">" operator may not be applied to column s of type set of up to 1 strings.
-test-ovsdb: syntax "["u",">",["set",[]]]": syntax error: Type mismatch: ">" operator may not be applied to column u of type set of up to 1 uuids.
-test-ovsdb: syntax "["u",">=",["set",[]]]": syntax error: Type mismatch: ">=" operator may not be applied to column u of type set of up to 1 uuids.
-test-ovsdb: syntax "["u","<",["set",[]]]": syntax error: Type mismatch: "<" operator may not be applied to column u of type set of up to 1 uuids.
-test-ovsdb: syntax "["u","<=",["set",[]]]": syntax error: Type mismatch: "<=" operator may not be applied to column u of type set of up to 1 uuids.
-test-ovsdb: syntax "["u",">",["set",[]]]": syntax error: Type mismatch: ">" operator may not be applied to column u of type set of up to 1 uuids.
-]])
-AT_CLEANUP
-
-OVSDB_CHECK_POSITIVE([conditions on sets],
-  [[parse-conditions \
-    '{"columns":
-        {"i": {"type": {"key": "integer", "min": 0, "max": "unlimited"}},
-         "r": {"type": {"key": "real", "min": 0, "max": "unlimited"}},
-         "b": {"type": {"key": "boolean", "min": 0, "max": "unlimited"}},
-         "s": {"type": {"key": "string", "min": 0, "max": "unlimited"}},
-         "u": {"type": {"key": "uuid", "min": 0, "max": "unlimited"}}}}' \
-    '[["i", "==", ["set", []]]]' \
-    '[["i", "!=", ["set", [1]]]]' \
-    '[["i", "includes", ["set", [1, 2]]]]' \
-    '[["i", "excludes", ["set", [1, 2, 3]]]]' \
-    '[["r", "==", ["set", []]]]' \
-    '[["r", "!=", ["set", [1.5]]]]' \
-    '[["r", "includes", ["set", [1.5, 2.5]]]]' \
-    '[["r", "excludes", ["set", [1.5, 2.5, 3.5]]]]' \
-    '[["b", "==", ["set", [true]]]]' \
-    '[["b", "!=", ["set", [false]]]]' \
-    '[["b", "includes", ["set", [false]]]]' \
-    '[["b", "excludes", ["set", [true, false]]]]' \
-    '[["s", "==", ["set", ["a"]]]]' \
-    '[["s", "!=", ["set", ["a", "b"]]]]' \
-    '[["s", "includes", ["set", ["c"]]]]' \
-    '[["s", "excludes", ["set", ["c", "d"]]]]' \
-    '[["u", "==", 
-       ["set", [["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]]]]]' \
-    '[["u", "==", 
-       ["set", [["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"],
-                ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]]]' \
-    '[["u", "includes", 
-       ["set", [["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"],
-                ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"],
-                ["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]]]]' \
-    '[["u", "excludes", 
-       ["set", [["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"],
-                ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"],
-                ["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"],
-                ["uuid", "62315898-64e0-40b9-b26f-ff74225303e6"]]]]]' \
-]],
-  [[[["i","==",["set",[]]]]
-[["i","!=",1]]
-[["i","includes",["set",[1,2]]]]
-[["i","excludes",["set",[1,2,3]]]]
-[["r","==",["set",[]]]]
-[["r","!=",1.5]]
-[["r","includes",["set",[1.5,2.5]]]]
-[["r","excludes",["set",[1.5,2.5,3.5]]]]
-[["b","==",true]]
-[["b","!=",false]]
-[["b","includes",false]]
-[["b","excludes",["set",[false,true]]]]
-[["s","==","a"]]
-[["s","!=",["set",["a","b"]]]]
-[["s","includes","c"]]
-[["s","excludes",["set",["c","d"]]]]
-[["u","==",["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]
-[["u","==",["set",[["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"],["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]]]
-[["u","includes",["set",[["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"],["uuid","ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"],["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]]]
-[["u","excludes",["set",[["uuid","62315898-64e0-40b9-b26f-ff74225303e6"],["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"],["uuid","ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"],["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]]]]],
-  [condition])
-
-OVSDB_CHECK_POSITIVE([condition sorting],
-  [[parse-conditions \
-    '{"columns": {"i": {"type": "integer"}}}' \
-    '[["i", "excludes", 7],
-      ["i", "!=", 8],
-      ["i", "==", 1],
-      ["i", "includes", 2],
-      ["i", "<=", 3],
-      ["i", "<", 4],
-      ["i", ">", 6],
-      ["i", ">=", 5],
-      ["_uuid", "==", ["uuid", "d50e85c6-8ae7-4b16-b69e-4395928bd9be"]]]']],
-  [[[["_uuid","==",["uuid","d50e85c6-8ae7-4b16-b69e-4395928bd9be"]],["i","==",1],["i","includes",2],["i","<=",3],["i","<",4],["i",">=",5],["i",">",6],["i","excludes",7],["i","!=",8]]]])
-
-OVSDB_CHECK_POSITIVE([boolean condition],
-  [[parse-conditions \
-    '{"columns": {"name": {"type": "string"}}}' \
-    '[true]']],
-  [[[true]]])
-
-OVSDB_CHECK_POSITIVE([boolean condition],
-  [[parse-conditions \
-    '{"columns": {"name": {"type": "string"}}}' \
-    '[false]']],
-  [[[false]]])
-
-OVSDB_CHECK_POSITIVE([evaluating null condition],
-  [[evaluate-conditions \
-    '{"columns": {"i": {"type": "integer"}}}' \
-    '[[]]' \
-    '[{"i": 0},
-      {"i": 1},
-      {"i": 2}']]],
-  [condition  0: TTT])
-
-OVSDB_CHECK_POSITIVE([evaluating conditions on integers],
-  [[evaluate-conditions \
-    '{"columns": {"i": {"type": "integer"}}}' \
-    '[[["i", "<", 1]],
-      [["i", "<=", 1]],
-      [["i", "==", 1]],
-      [["i", "!=", 1]],
-      [["i", ">=", 1]],
-      [["i", ">", 1]],
-      [["i", "includes", 1]],
-      [["i", "excludes", 1]],
-      [["i", ">", 0], ["i", "<", 2]]]' \
-    '[{"i": 0},
-      {"i": 1},
-      {"i": 2}']]],
-  [condition  0: T--
-condition  1: TT-
-condition  2: -T-
-condition  3: T-T
-condition  4: -TT
-condition  5: --T
-condition  6: -T-
-condition  7: T-T
-condition  8: -T-], [condition])
-
-OVSDB_CHECK_POSITIVE([evaluating conditions on reals],
-  [[evaluate-conditions \
-    '{"columns": {"r": {"type": "real"}}}' \
-    '[[["r", "<", 5.0]],
-      [["r", "<=", 5.0]],
-      [["r", "==", 5.0]],
-      [["r", "!=", 5.0]],
-      [["r", ">=", 5.0]],
-      [["r", ">", 5.0]],
-      [["r", "includes", 5.0]],
-      [["r", "excludes", 5.0]],
-      [["r", "!=", 0], ["r", "!=", 5.1]]]' \
-    '[{"r": 0},
-      {"r": 5.0},
-      {"r": 5.1}']]],
-  [condition  0: T--
-condition  1: TT-
-condition  2: -T-
-condition  3: T-T
-condition  4: -TT
-condition  5: --T
-condition  6: -T-
-condition  7: T-T
-condition  8: -T-], [condition])
-
-OVSDB_CHECK_POSITIVE([evaluating conditions on booleans],
-  [[evaluate-conditions \
-    '{"columns": {"b": {"type": "boolean"}}}' \
-    '[[["b", "==", true]],
-      [["b", "!=", true]],
-      [["b", "includes", true]],
-      [["b", "excludes", true]],
-      [["b", "==", false]],
-      [["b", "!=", false]],
-      [["b", "includes", false]],
-      [["b", "excludes", false]],
-      [["b", "==", true], ["b", "==", false]]]' \
-    '[{"b": true},
-      {"b": false}']]],
-  [condition  0: T-
-condition  1: -T
-condition  2: T-
-condition  3: -T
-condition  4: -T
-condition  5: T-
-condition  6: -T
-condition  7: T-
-condition  8: --], [condition])
-
-OVSDB_CHECK_POSITIVE([evaluating conditions on strings],
-  [[evaluate-conditions \
-    '{"columns": {"s": {"type": "string"}}}' \
-    '[[["s", "==", ""]],
-      [["s", "!=", ""]],
-      [["s", "includes", ""]],
-      [["s", "excludes", ""]],
-      [["s", "==", "foo"]],
-      [["s", "!=", "foo"]],
-      [["s", "includes", "foo"]],
-      [["s", "excludes", "foo"]],
-      [["s", "!=", "foo"], ["s", "!=", ""]]]' \
-    '[{"s": ""},
-      {"s": "foo"},
-      {"s": "xxx"}']]],
-  [condition  0: T--
-condition  1: -TT
-condition  2: T--
-condition  3: -TT
-condition  4: -T-
-condition  5: T-T
-condition  6: -T-
-condition  7: T-T
-condition  8: --T], [condition])
-
-OVSDB_CHECK_POSITIVE([evaluating conditions on UUIDs],
-  [[evaluate-conditions \
-    '{"columns": {"u": {"type": "uuid"}}}' \
-    '[[["u", "==", ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]]],
-      [["u", "!=", ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]]],
-      [["u", "includes", ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]]],
-      [["u", "excludes", ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]]],
-      [["u", "==", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]],
-      [["u", "!=", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]],
-      [["u", "includes", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]],
-      [["u", "excludes", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]]],
-      [["u", "!=", ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]],
-       ["u", "!=", ["uuid", "cb160ed6-92a6-4503-a6aa-a09a09e01f0d"]]]]' \
-    '[{"u": ["uuid", "8a1dbdb8-416f-4ce9-affa-3332691714b6"]},
-      {"u": ["uuid", "06151f9d-62d6-4f59-8504-e9765107faa9"]},
-      {"u": ["uuid", "00000000-0000-0000-0000-000000000000"]}']]],
-  [condition  0: T--
-condition  1: -TT
-condition  2: T--
-condition  3: -TT
-condition  4: -T-
-condition  5: T-T
-condition  6: -T-
-condition  7: T-T
-condition  8: T-T], [condition])
-
-OVSDB_CHECK_POSITIVE([evaluating conditions on sets],
-  [[evaluate-conditions \
-    '{"columns": {"i": {"type": {"key": "integer", "min": 0, "max": "unlimited"}}}}' \
-    '[[["i", "==", ["set", []]]],
-      [["i", "==", ["set", [0]]]],
-      [["i", "==", ["set", [1]]]],
-      [["i", "==", ["set", [0, 1]]]],
-      [["i", "==", ["set", [2]]]],
-      [["i", "==", ["set", [2, 0]]]],
-      [["i", "==", ["set", [2, 1]]]],
-      [["i", "==", ["set", [2, 1, 0]]]],
-      [["i", "!=", ["set", []]]],
-      [["i", "!=", ["set", [0]]]],
-      [["i", "!=", ["set", [1]]]],
-      [["i", "!=", ["set", [0, 1]]]],
-      [["i", "!=", ["set", [2]]]],
-      [["i", "!=", ["set", [2, 0]]]],
-      [["i", "!=", ["set", [2, 1]]]],
-      [["i", "!=", ["set", [2, 1, 0]]]],
-      [["i", "includes", ["set", []]]],
-      [["i", "includes", ["set", [0]]]],
-      [["i", "includes", ["set", [1]]]],
-      [["i", "includes", ["set", [0, 1]]]],
-      [["i", "includes", ["set", [2]]]],
-      [["i", "includes", ["set", [2, 0]]]],
-      [["i", "includes", ["set", [2, 1]]]],
-      [["i", "includes", ["set", [2, 1, 0]]]],
-      [["i", "excludes", ["set", []]]],
-      [["i", "excludes", ["set", [0]]]],
-      [["i", "excludes", ["set", [1]]]],
-      [["i", "excludes", ["set", [0, 1]]]],
-      [["i", "excludes", ["set", [2]]]],
-      [["i", "excludes", ["set", [2, 0]]]],
-      [["i", "excludes", ["set", [2, 1]]]],
-      [["i", "excludes", ["set", [2, 1, 0]]]],
-      [["i", "includes", ["set", [0]]],
-       ["i", "includes", ["set", [1]]]]]' \
-    '[{"i": ["set", []]},
-      {"i": ["set", [0]]},
-      {"i": ["set", [1]]},
-      {"i": ["set", [0, 1]]},
-      {"i": ["set", [2]]},
-      {"i": ["set", [2, 0]]},
-      {"i": ["set", [2, 1]]},
-      {"i": ["set", [2, 1, 0]]}]']],
-  [dnl
-condition  0: T---- ---
-condition  1: -T--- ---
-condition  2: --T-- ---
-condition  3: ---T- ---
-condition  4: ----T ---
-condition  5: ----- T--
-condition  6: ----- -T-
-condition  7: ----- --T
-condition  8: -TTTT TTT
-condition  9: T-TTT TTT
-condition 10: TT-TT TTT
-condition 11: TTT-T TTT
-condition 12: TTTT- TTT
-condition 13: TTTTT -TT
-condition 14: TTTTT T-T
-condition 15: TTTTT TT-
-condition 16: TTTTT TTT
-condition 17: -T-T- T-T
-condition 18: --TT- -TT
-condition 19: ---T- --T
-condition 20: ----T TTT
-condition 21: ----- T-T
-condition 22: ----- -TT
-condition 23: ----- --T
-condition 24: TTTTT TTT
-condition 25: T-T-T -T-
-condition 26: TT--T T--
-condition 27: T---T ---
-condition 28: TTTT- ---
-condition 29: T-T-- ---
-condition 30: TT--- ---
-condition 31: T---- ---
-condition 32: ---T- --T], [condition])
-
-# This is the same as the "set" test except that it adds values,
-# all of which always match.
-OVSDB_CHECK_POSITIVE([evaluating conditions on maps (1)],
-  [[evaluate-conditions \
-    '{"columns": {"i": {"type": {"key": "integer",
-                                 "value": "boolean",
-                                 "min": 0,
-                                 "max": "unlimited"}}}}' \
-    '[[["i", "==", ["map", []]]],
-      [["i", "==", ["map", [[0, true]]]]],
-      [["i", "==", ["map", [[1, false]]]]],
-      [["i", "==", ["map", [[0, true], [1, false]]]]],
-      [["i", "==", ["map", [[2, true]]]]],
-      [["i", "==", ["map", [[2, true], [0, true]]]]],
-      [["i", "==", ["map", [[2, true], [1, false]]]]],
-      [["i", "==", ["map", [[2, true], [1, false], [0, true]]]]],
-      [["i", "!=", ["map", []]]],
-      [["i", "!=", ["map", [[0, true]]]]],
-      [["i", "!=", ["map", [[1, false]]]]],
-      [["i", "!=", ["map", [[0, true], [1, false]]]]],
-      [["i", "!=", ["map", [[2, true]]]]],
-      [["i", "!=", ["map", [[2, true], [0, true]]]]],
-      [["i", "!=", ["map", [[2, true], [1, false]]]]],
-      [["i", "!=", ["map", [[2, true], [1, false], [0, true]]]]],
-      [["i", "includes", ["map", []]]],
-      [["i", "includes", ["map", [[0, true]]]]],
-      [["i", "includes", ["map", [[1, false]]]]],
-      [["i", "includes", ["map", [[0, true], [1, false]]]]],
-      [["i", "includes", ["map", [[2, true]]]]],
-      [["i", "includes", ["map", [[2, true], [0, true]]]]],
-      [["i", "includes", ["map", [[2, true], [1, false]]]]],
-      [["i", "includes", ["map", [[2, true], [1, false], [0, true]]]]],
-      [["i", "excludes", ["map", []]]],
-      [["i", "excludes", ["map", [[0, true]]]]],
-      [["i", "excludes", ["map", [[1, false]]]]],
-      [["i", "excludes", ["map", [[0, true], [1, false]]]]],
-      [["i", "excludes", ["map", [[2, true]]]]],
-      [["i", "excludes", ["map", [[2, true], [0, true]]]]],
-      [["i", "excludes", ["map", [[2, true], [1, false]]]]],
-      [["i", "excludes", ["map", [[2, true], [1, false], [0, true]]]]],
-      [["i", "includes", ["map", [[0, true]]]],
-       ["i", "includes", ["map", [[1, false]]]]]]' \
-    '[{"i": ["map", []]},
-      {"i": ["map", [[0, true]]]},
-      {"i": ["map", [[1, false]]]},
-      {"i": ["map", [[0, true], [1, false]]]},
-      {"i": ["map", [[2, true]]]},
-      {"i": ["map", [[2, true], [0, true]]]},
-      {"i": ["map", [[2, true], [1, false]]]},
-      {"i": ["map", [[2, true], [1, false], [0, true]]]}]']],
-  [dnl
-condition  0: T---- ---
-condition  1: -T--- ---
-condition  2: --T-- ---
-condition  3: ---T- ---
-condition  4: ----T ---
-condition  5: ----- T--
-condition  6: ----- -T-
-condition  7: ----- --T
-condition  8: -TTTT TTT
-condition  9: T-TTT TTT
-condition 10: TT-TT TTT
-condition 11: TTT-T TTT
-condition 12: TTTT- TTT
-condition 13: TTTTT -TT
-condition 14: TTTTT T-T
-condition 15: TTTTT TT-
-condition 16: TTTTT TTT
-condition 17: -T-T- T-T
-condition 18: --TT- -TT
-condition 19: ---T- --T
-condition 20: ----T TTT
-condition 21: ----- T-T
-condition 22: ----- -TT
-condition 23: ----- --T
-condition 24: TTTTT TTT
-condition 25: T-T-T -T-
-condition 26: TT--T T--
-condition 27: T---T ---
-condition 28: TTTT- ---
-condition 29: T-T-- ---
-condition 30: TT--- ---
-condition 31: T---- ---
-condition 32: ---T- --T], [condition])
-
-# This is the same as the "set" test except that it adds values,
-# and those values don't always match.
-OVSDB_CHECK_POSITIVE([evaluating conditions on maps (2)],
-  [[evaluate-conditions \
-    '{"columns": {"i": {"type": {"key": "integer",
-                                 "value": "boolean",
-                                 "min": 0,
-                                 "max": "unlimited"}}}}' \
-    '[[["i", "==", ["map", []]]],
-      [["i", "==", ["map", [[0, true]]]]],
-      [["i", "==", ["map", [[1, false]]]]],
-      [["i", "==", ["map", [[0, true], [1, false]]]]],
-      [["i", "==", ["map", [[2, true]]]]],
-      [["i", "==", ["map", [[2, true], [0, true]]]]],
-      [["i", "==", ["map", [[2, true], [1, false]]]]],
-      [["i", "==", ["map", [[2, true], [1, false], [0, true]]]]],
-      [["i", "!=", ["map", []]]],
-      [["i", "!=", ["map", [[0, true]]]]],
-      [["i", "!=", ["map", [[1, false]]]]],
-      [["i", "!=", ["map", [[0, true], [1, false]]]]],
-      [["i", "!=", ["map", [[2, true]]]]],
-      [["i", "!=", ["map", [[2, true], [0, true]]]]],
-      [["i", "!=", ["map", [[2, true], [1, false]]]]],
-      [["i", "!=", ["map", [[2, true], [1, false], [0, true]]]]],
-      [["i", "includes", ["map", []]]],
-      [["i", "includes", ["map", [[0, true]]]]],
-      [["i", "includes", ["map", [[1, false]]]]],
-      [["i", "includes", ["map", [[0, true], [1, false]]]]],
-      [["i", "includes", ["map", [[2, true]]]]],
-      [["i", "includes", ["map", [[2, true], [0, true]]]]],
-      [["i", "includes", ["map", [[2, true], [1, false]]]]],
-      [["i", "includes", ["map", [[2, true], [1, false], [0, true]]]]],
-      [["i", "excludes", ["map", []]]],
-      [["i", "excludes", ["map", [[0, true]]]]],
-      [["i", "excludes", ["map", [[1, false]]]]],
-      [["i", "excludes", ["map", [[0, true], [1, false]]]]],
-      [["i", "excludes", ["map", [[2, true]]]]],
-      [["i", "excludes", ["map", [[2, true], [0, true]]]]],
-      [["i", "excludes", ["map", [[2, true], [1, false]]]]],
-      [["i", "excludes", ["map", [[2, true], [1, false], [0, true]]]]],
-      [["i", "includes", ["map", [[0, true]]]],
-       ["i", "includes", ["map", [[1, false]]]]]]' \
-    '[{"i": ["map", []]},
-      {"i": ["map", [[0, true]]]},
-      {"i": ["map", [[0, false]]]},
-      {"i": ["map", [[1, false]]]},
-      {"i": ["map", [[1, true]]]},
-
-      {"i": ["map", [[0, true], [1, false]]]},
-      {"i": ["map", [[0, true], [1, true]]]},
-      {"i": ["map", [[2, true]]]},
-      {"i": ["map", [[2, false]]]},
-      {"i": ["map", [[2, true], [0, true]]]},
-
-      {"i": ["map", [[2, false], [0, true]]]},
-      {"i": ["map", [[2, true], [1, false]]]},
-      {"i": ["map", [[2, true], [1, true]]]},
-      {"i": ["map", [[2, true], [1, false], [0, true]]]},
-      {"i": ["map", [[2, true], [1, false], [0, false]]]}]']],
-  [dnl
-condition  0: T---- ----- -----
-condition  1: -T--- ----- -----
-condition  2: ---T- ----- -----
-condition  3: ----- T---- -----
-condition  4: ----- --T-- -----
-condition  5: ----- ----T -----
-condition  6: ----- ----- -T---
-condition  7: ----- ----- ---T-
-condition  8: -TTTT TTTTT TTTTT
-condition  9: T-TTT TTTTT TTTTT
-condition 10: TTT-T TTTTT TTTTT
-condition 11: TTTTT -TTTT TTTTT
-condition 12: TTTTT TT-TT TTTTT
-condition 13: TTTTT TTTT- TTTTT
-condition 14: TTTTT TTTTT T-TTT
-condition 15: TTTTT TTTTT TTT-T
-condition 16: TTTTT TTTTT TTTTT
-condition 17: -T--- TT--T T--T-
-condition 18: ---T- T---- -T-TT
-condition 19: ----- T---- ---T-
-condition 20: ----- --T-T -TTTT
-condition 21: ----- ----T ---T-
-condition 22: ----- ----- -T-TT
-condition 23: ----- ----- ---T-
-condition 24: TTTTT TTTTT TTTTT
-condition 25: T-TTT --TT- -TT-T
-condition 26: TTT-T -TTTT T-T--
-condition 27: T-T-T --TT- --T--
-condition 28: TTTTT TT-T- T----
-condition 29: T-TTT ---T- -----
-condition 30: TTT-T -T-T- T----
-condition 31: T-T-T ---T- -----
-condition 32: ----- T---- ---T-], [condition])
-
-OVSDB_CHECK_POSITIVE([evaluating conditions on optional integers],
-  [[evaluate-conditions \
-    '{"columns": {"i": {"type": {"key": "integer", "min": 0, "max": 1}}}}' \
-    '[[["i", "<", 1]],
-      [["i", "<=", 1]],
-      [["i", "==", 1]],
-      [["i", "!=", 1]],
-      [["i", ">=", 1]],
-      [["i", ">", 1]],
-      [["i", "includes", 1]],
-      [["i", "excludes", 1]],
-      [["i", ">", 0], ["i", "<", 2]],
-      [["i", "==", ["set", []]]],
-      [["i", "!=", ["set", []]]],
-      [["i", "includes", ["set", []]]],
-      [["i", "excludes", ["set", []]]]]' \
-    '[{"i": ["set", []]},
-      {"i": ["set", [0]]},
-      {"i": ["set", [1]]},
-      {"i": ["set", [2]]}]']],
-  [dnl
-condition  0: -T--
-condition  1: -TT-
-condition  2: --T-
-condition  3: TT-T
-condition  4: --TT
-condition  5: ---T
-condition  6: --T-
-condition  7: TT-T
-condition  8: --T-
-condition  9: T---
-condition 10: -TTT
-condition 11: TTTT
-condition 12: TTTT], [condition])
-
-OVSDB_CHECK_POSITIVE([evaluating conditions on optional strings],
-  [[evaluate-conditions \
-    '{"columns": {"s": {"type": {"key": "string", "min": 0, "max": 1}}}}' \
-    '[[["s", "==", ""]],
-      [["s", "!=", ""]],
-      [["s", "includes", ""]],
-      [["s", "excludes", ""]],
-      [["s", "==", "foo"]],
-      [["s", "!=", "foo"]],
-      [["s", "includes", "foo"]],
-      [["s", "excludes", "foo"]],
-      [["s", "!=", "foo"], ["s", "!=", ""]]]' \
-    '[{"s": ["set", [""]]},
-      {"s": ["set", ["foo"]]},
-      {"s": ["set", ["xxx"]]},
-      {"s": ["set", []]}]']],
-  [dnl
-condition  0: T---
-condition  1: -TTT
-condition  2: T---
-condition  3: -TTT
-condition  4: -T--
-condition  5: T-TT
-condition  6: -T--
-condition  7: T-TT
-condition  8: --TT], [condition])
-
-OVSDB_CHECK_POSITIVE([evaluating conditions on optional reals],
-  [[evaluate-conditions \
-    '{"columns": {"r": {"type": {"key": "real", "min": 0, "max": 1}}}}' \
-    '[[["r", "<", 5.0]],
-      [["r", "<=", 5.0]],
-      [["r", "==", 5.0]],
-      [["r", "!=", 5.0]],
-      [["r", ">=", 5.0]],
-      [["r", ">", 5.0]],
-      [["r", "includes", 5.0]],
-      [["r", "excludes", 5.0]],
-      [["r", "!=", 0], ["r", "!=", 5.1]],
-      [["r", "==", ["set", []]]],
-      [["r", "!=", ["set", []]]],
-      [["r", "includes", ["set", []]]],
-      [["r", "excludes", ["set", []]]]]' \
-    '[{"r": ["set", [0]]},
-      {"r": ["set", [5.0]]},
-      {"r": ["set", [5.1]]},
-      {"r": ["set", []]}]']],
-  [dnl
-condition  0: T---
-condition  1: TT--
-condition  2: -T--
-condition  3: T-TT
-condition  4: -TT-
-condition  5: --T-
-condition  6: -T--
-condition  7: T-TT
-condition  8: -T-T
-condition  9: ---T
-condition 10: TTT-
-condition 11: TTTT
-condition 12: TTTT], [condition])
-
-OVSDB_CHECK_POSITIVE([evaluating false boolean condition],
-  [[evaluate-conditions-any \
-    '{"columns": {"i": {"type": "integer"}}}' \
-    '[[false,["i","==",1]]]' \
-    '[{"i": 0},
-      {"i": 1},
-      {"i": 2}']]],
-  [condition  0: -T-])
-
-OVSDB_CHECK_POSITIVE([evaluating true boolean condition],
-  [[evaluate-conditions-any \
-    '{"columns": {"i": {"type": "integer"}}}' \
-    '[[true,["i","==",1]]]' \
-    '[{"i": 0},
-      {"i": 1},
-      {"i": 2}']]],
-  [condition  0: TTT])
-
-OVSDB_CHECK_POSITIVE([compare condition],
-  [[compare-conditions \
-    '{"columns": {"i": {"type": "integer"}}}' \
-    '[[true,["i","==",1],["i","==",2],["i","==",3]],
-      [["i","==",1],["i","==",3],["i","==",2],true],
-      [["i","==",1]],
-      [["i",">=",1]]']]],
-  [condition 0-1: 0
-condition 1-2: 1
-condition 2-3: -1])
diff --git a/tests/ovsdb-data.at b/tests/ovsdb-data.at
deleted file mode 100644
index 8c40bcfbf..000000000
--- a/tests/ovsdb-data.at
+++ /dev/null
@@ -1,928 +0,0 @@
-AT_BANNER([OVSDB -- default values])
-
-OVSDB_CHECK_POSITIVE_CPY([default atoms],
-  [default-atoms],
-  [[integer: OK
-real: OK
-boolean: OK
-string: OK
-uuid: OK]])
-
-OVSDB_CHECK_POSITIVE_CPY([default data],
-  [default-data],
-  [[key integer, value void, n_min 0: OK
-key integer, value integer, n_min 0: OK
-key integer, value real, n_min 0: OK
-key integer, value boolean, n_min 0: OK
-key integer, value string, n_min 0: OK
-key integer, value uuid, n_min 0: OK
-key real, value void, n_min 0: OK
-key real, value integer, n_min 0: OK
-key real, value real, n_min 0: OK
-key real, value boolean, n_min 0: OK
-key real, value string, n_min 0: OK
-key real, value uuid, n_min 0: OK
-key boolean, value void, n_min 0: OK
-key boolean, value integer, n_min 0: OK
-key boolean, value real, n_min 0: OK
-key boolean, value boolean, n_min 0: OK
-key boolean, value string, n_min 0: OK
-key boolean, value uuid, n_min 0: OK
-key string, value void, n_min 0: OK
-key string, value integer, n_min 0: OK
-key string, value real, n_min 0: OK
-key string, value boolean, n_min 0: OK
-key string, value string, n_min 0: OK
-key string, value uuid, n_min 0: OK
-key uuid, value void, n_min 0: OK
-key uuid, value integer, n_min 0: OK
-key uuid, value real, n_min 0: OK
-key uuid, value boolean, n_min 0: OK
-key uuid, value string, n_min 0: OK
-key uuid, value uuid, n_min 0: OK
-key integer, value void, n_min 1: OK
-key integer, value integer, n_min 1: OK
-key integer, value real, n_min 1: OK
-key integer, value boolean, n_min 1: OK
-key integer, value string, n_min 1: OK
-key integer, value uuid, n_min 1: OK
-key real, value void, n_min 1: OK
-key real, value integer, n_min 1: OK
-key real, value real, n_min 1: OK
-key real, value boolean, n_min 1: OK
-key real, value string, n_min 1: OK
-key real, value uuid, n_min 1: OK
-key boolean, value void, n_min 1: OK
-key boolean, value integer, n_min 1: OK
-key boolean, value real, n_min 1: OK
-key boolean, value boolean, n_min 1: OK
-key boolean, value string, n_min 1: OK
-key boolean, value uuid, n_min 1: OK
-key string, value void, n_min 1: OK
-key string, value integer, n_min 1: OK
-key string, value real, n_min 1: OK
-key string, value boolean, n_min 1: OK
-key string, value string, n_min 1: OK
-key string, value uuid, n_min 1: OK
-key uuid, value void, n_min 1: OK
-key uuid, value integer, n_min 1: OK
-key uuid, value real, n_min 1: OK
-key uuid, value boolean, n_min 1: OK
-key uuid, value string, n_min 1: OK
-key uuid, value uuid, n_min 1: OK]])
-
-AT_BANNER([OVSDB -- atoms without constraints])
-
-OVSDB_CHECK_POSITIVE_CPY([integer atom from JSON], 
-  [[parse-atoms '["integer"]' \
-    '[0]' \
-    '[-1]' \
-    '[1e3]' \
-    '[9223372036854775807]' \
-    '[-9223372036854775808]' ]], 
-  [0
--1
-1000
-9223372036854775807
--9223372036854775808])
-
-OVSDB_CHECK_POSITIVE([integer atom from string], 
-  [[parse-atom-strings -- '["integer"]' \
-    '0' \
-    '-1' \
-    '+1000' \
-    '9223372036854775807' \
-    '-9223372036854775808' \
-    '0-1000' \
-    '-1000-+1000' \
-    '-1000--10' \
-    '+10-+1000' \
-    '1-4096' \
-    '-4096--1' \
-    '-2000-2095']],
-  [0
--1
-1000
-9223372036854775807
--9223372036854775808
-0-1000
--1000-1000
--1000--10
-10-1000
-1-4096
--4096--1
--2000-2095])
-
-OVSDB_CHECK_POSITIVE_CPY([real atom from JSON], 
-  [[parse-atoms '["real"]' \
-    '[0]' \
-    '[0.0]' \
-    '[-0.0]' \
-    '[-1.25]' \
-    '[1e3]' \
-    '[1e37]' \
-    '[0.00390625]' ]], 
-  [0
-0
-0
--1.25
-1000
-1e+37
-0.00390625])
-
-OVSDB_CHECK_POSITIVE([real atom from string], 
-  [[parse-atom-strings -- '["real"]' \
-    '0' \
-    '0.0' \
-    '-0.0' \
-    '-1.25' \
-    '1e3' \
-    '1e37' \
-    '0.00390625' ]], 
-  [0
-0
-0
--1.25
-1000
-1e+37
-0.00390625])
-
-OVSDB_CHECK_POSITIVE_CPY([boolean atom from JSON],
-  [[parse-atoms '["boolean"]' '[true]' '[false]' ]],
-  [true
-false])
-
-OVSDB_CHECK_POSITIVE([boolean atom from string],
-  [[parse-atom-strings '["boolean"]' 'true' 'false' ]],
-  [true
-false])
-
-OVSDB_CHECK_POSITIVE_CPY([string atom from JSON],
-  [[parse-atoms '["string"]' '[""]' '["true"]' '["\"\\\/\b\f\n\r\t"]']],
-  [""
-"true"
-"\"\\/\b\f\n\r\t"])
-
-OVSDB_CHECK_POSITIVE([string atom from string],
-  [[parse-atom-strings '["string"]' \
-    'unquoted' \
-    '"quoted-string"' \
-    '"needs quotes"' \
-    '""' \
-    '"true"' \
-    '"\"\\\/\b\f\n\r\t"']],
-  [unquoted
-quoted-string
-"needs quotes"
-""
-"true"
-"\"\\/\b\f\n\r\t"])
-
-OVSDB_CHECK_POSITIVE_CPY([uuid atom from JSON],
-  [[parse-atoms '["uuid"]' '["uuid", "550e8400-e29b-41d4-a716-446655440000"]']],
-  [[["uuid","550e8400-e29b-41d4-a716-446655440000"]]])
-
-OVSDB_CHECK_POSITIVE([uuid atom from string],
-  [[parse-atom-strings '["uuid"]' '550e8400-e29b-41d4-a716-446655440000']],
-  [550e8400-e29b-41d4-a716-446655440000])
-
-OVSDB_CHECK_POSITIVE_CPY([integer atom sorting],
-  [[sort-atoms '["integer"]' '[55,0,-1,2,1]']],
-  [[[-1,0,1,2,55]]])
-
-OVSDB_CHECK_POSITIVE_CPY([real atom sorting],
-  [[sort-atoms '["real"]' '[1.25,1.23,0.0,-0.0,-1e99]']],
-  [[[-1e+99,0,0,1.23,1.25]]])
-
-OVSDB_CHECK_POSITIVE_CPY([boolean atom sorting],
-  [[sort-atoms '["boolean"]' '[true,false,true,false,false]']],
-  [[[false,false,false,true,true]]])
-
-OVSDB_CHECK_POSITIVE_CPY([string atom sorting],
-  [[sort-atoms '["string"]' '["abd","abc","\b","xxx"]']],
-  [[["\b","abc","abd","xxx"]]])
-
-OVSDB_CHECK_POSITIVE_CPY([uuid atom sorting],
-  [[sort-atoms '["uuid"]' '[
-    ["uuid", "00000000-0000-0000-0000-000000000001"],
-    ["uuid", "00000000-1000-0000-0000-000000000000"],
-    ["uuid", "00000000-0000-1000-0000-000000000000"],
-    ["uuid", "00010000-0000-0000-0000-000000000000"],
-    ["uuid", "00000000-0000-0000-0000-000000000100"],
-    ["uuid", "00000000-0000-0000-0000-000100000000"],
-    ["uuid", "00000000-0000-0010-0000-000000000000"],
-    ["uuid", "00000100-0000-0000-0000-000000000000"],
-    ["uuid", "00000000-0000-0001-0000-000000000000"],
-    ["uuid", "00000000-0000-0000-0000-000001000000"],
-    ["uuid", "01000000-0000-0000-0000-000000000000"],
-    ["uuid", "00000000-0000-0000-0000-000000001000"],
-    ["uuid", "00000000-0000-0000-0000-000010000000"],
-    ["uuid", "00000000-0000-0000-0000-010000000000"],
-    ["uuid", "00000000-0000-0100-0000-000000000000"],
-    ["uuid", "10000000-0000-0000-0000-000000000000"],
-    ["uuid", "00000000-0000-0000-0000-000000000010"],
-    ["uuid", "00000000-0100-0000-0000-000000000000"],
-    ["uuid", "00000000-0000-0000-0100-000000000000"],
-    ["uuid", "00000000-0000-0000-0001-000000000000"],
-    ["uuid", "00000010-0000-0000-0000-000000000000"],
-    ["uuid", "00000000-0000-0000-0010-000000000000"],
-    ["uuid", "00000000-0000-0000-0000-000000010000"],
-    ["uuid", "00000000-0000-0000-1000-000000000000"],
-    ["uuid", "00000000-0000-0000-0000-100000000000"],
-    ["uuid", "00000000-0000-0000-0000-001000000000"],
-    ["uuid", "00000000-0000-0000-0000-000000100000"],
-    ["uuid", "00000000-0000-0000-0000-000000000000"],
-    ["uuid", "00000000-0010-0000-0000-000000000000"],
-    ["uuid", "00100000-0000-0000-0000-000000000000"],
-    ["uuid", "00000000-0001-0000-0000-000000000000"],
-    ["uuid", "00000001-0000-0000-0000-000000000000"],
-    ["uuid", "00001000-0000-0000-0000-000000000000"]]']],
-  [[[["uuid","00000000-0000-0000-0000-000000000000"],["uuid","00000000-0000-0000-0000-000000000001"],["uuid","00000000-0000-0000-0000-000000000010"],["uuid","00000000-0000-0000-0000-000000000100"],["uuid","00000000-0000-0000-0000-000000001000"],["uuid","00000000-0000-0000-0000-000000010000"],["uuid","00000000-0000-0000-0000-000000100000"],["uuid","00000000-0000-0000-0000-000001000000"],["uuid","00000000-0000-0000-0000-000010000000"],["uuid","00000000-0000-0000-0000-000100000000"],["uuid","00000000-0000-0000-0000-001000000000"],["uuid","00000000-0000-0000-0000-010000000000"],["uuid","00000000-0000-0000-0000-100000000000"],["uuid","00000000-0000-0000-0001-000000000000"],["uuid","00000000-0000-0000-0010-000000000000"],["uuid","00000000-0000-0000-0100-000000000000"],["uuid","00000000-0000-0000-1000-000000000000"],["uuid","00000000-0000-0001-0000-000000000000"],["uuid","00000000-0000-0010-0000-000000000000"],["uuid","00000000-0000-0100-0000-000000000000"],["uuid","00000000-0000-1000-0000-000000000000"],["uuid","00000000-0001-0000-0000-000000000000"],["uuid","00000000-0010-0000-0000-000000000000"],["uuid","00000000-0100-0000-0000-000000000000"],["uuid","00000000-1000-0000-0000-000000000000"],["uuid","00000001-0000-0000-0000-000000000000"],["uuid","00000010-0000-0000-0000-000000000000"],["uuid","00000100-0000-0000-0000-000000000000"],["uuid","00001000-0000-0000-0000-000000000000"],["uuid","00010000-0000-0000-0000-000000000000"],["uuid","00100000-0000-0000-0000-000000000000"],["uuid","01000000-0000-0000-0000-000000000000"],["uuid","10000000-0000-0000-0000-000000000000"]]]])
-
-OVSDB_CHECK_POSITIVE_CPY([real not acceptable integer JSON atom],
-  [[parse-atoms '["integer"]' '[0.5]' ]],
-  [syntax "0.5": syntax error: expected integer])
-
-dnl <C0> is not allowed anywhere in a UTF-8 string.
-dnl <ED A0 80> is a surrogate and not allowed in UTF-8.
-OVSDB_CHECK_POSITIVE([no invalid UTF-8 sequences in strings],
-  [parse-atoms '[["string"]]' \
-     '@<:@"m4_esyscmd([printf "\300"])"@:>@' \
-     '@<:@"m4_esyscmd([printf "\355\240\200"])"@:>@' \
-],
-  [constraint violation: not a valid UTF-8 string: invalid UTF-8 sequence 0xc0
-constraint violation: not a valid UTF-8 string: invalid UTF-8 sequence 0xed 0xa0])
-
-dnl Python won't let invalid UTF-8 (its idea of invalid UTF-8, anyway) into it
-dnl at all, so this test never gets as far as a constraint violation.  It's
-dnl just a JSON parse error.
-dnl
-dnl <C0> is not allowed anywhere in a UTF-8 string.
-dnl (<ED A0 80> is not allowed in UTF-8 but Python doesn't care.)
-dnl <ED 80 7F> is not allowed in UTF-8.
-OVSDB_CHECK_POSITIVE_PY([no invalid UTF-8 sequences in strings - Python],
-  [parse-atoms '[["string"]]' \
-     '@<:@"m4_esyscmd([printf "\300"])"@:>@' \
-     '@<:@"m4_esyscmd([printf "\355\200\177"])"@:>@' \
-],
-  ["not a valid UTF-8 string: invalid UTF-8 sequence 0xc0"
-"not a valid UTF-8 string: invalid UTF-8 sequence 0xed 0x80"])
-
-OVSDB_CHECK_NEGATIVE([real not acceptable integer string atom],
-  [[parse-atom-strings '["integer"]' '0.5' ]],
-  ["0.5" is not a valid integer])
-
-OVSDB_CHECK_NEGATIVE([inverted range is not acceptable integer string atom positive and negative],
-  [[parse-atom-strings -- '["integer"]' '10--10' ]],
-  ["10--10" is not a valid range. Range end cannot be before start.])
-
-OVSDB_CHECK_NEGATIVE([inverted range is not acceptable integer string atom negative],
-  [[parse-atom-strings -- '["integer"]' '-10--100' ]],
-  ["-10--100" is not a valid range. Range end cannot be before start.])
-
-OVSDB_CHECK_NEGATIVE([inverted range is not acceptable integer string atom positive],
-  [[parse-atom-strings -- '["integer"]' '100-10' ]],
-  ["100-10" is not a valid range. Range end cannot be before start.])
-
-OVSDB_CHECK_NEGATIVE([too big range is not acceptable integer string atom positive and negative],
-  [[parse-atom-strings -- '["integer"]' '-2000-2096' ]],
-  [Range "-2000-2096" is too big.])
-
-OVSDB_CHECK_NEGATIVE([too big range is not acceptable integer string atom negative],
-  [[parse-atom-strings -- '["integer"]' '-4097--1' ]],
-  [Range "-4097--1" is too big.])
-
-OVSDB_CHECK_NEGATIVE([too big range is not acceptable integer string atom positive],
-  [[parse-atom-strings -- '["integer"]' '1-4097' ]],
-  [Range "1-4097" is too big.])
-
-OVSDB_CHECK_POSITIVE_CPY([string "true" not acceptable boolean JSON atom],
-  [[parse-atoms '["boolean"]' '["true"]' ]],
-  [syntax ""true"": syntax error: expected boolean])
-
-OVSDB_CHECK_NEGATIVE([string "true" not acceptable boolean string atom],
-  [[parse-atom-strings '["boolean"]' '"true"' ]],
-  [""true"" is not a valid boolean (use "true" or "false")])
-
-OVSDB_CHECK_POSITIVE_CPY([integer not acceptable string JSON atom],
-  [[parse-atoms '["string"]' '[1]']],
-  [syntax "1": syntax error: expected string])
-
-OVSDB_CHECK_POSITIVE_CPY([uuid atom must be expressed as JSON array],
-  [[parse-atoms '["uuid"]' '["550e8400-e29b-41d4-a716-446655440000"]']],
-  [[syntax ""550e8400-e29b-41d4-a716-446655440000"": syntax error: expected ["uuid", <string>]]])
-
-OVSDB_CHECK_POSITIVE_CPY([named-uuid requires symbol table],
-  [parse-atoms '[["uuid"]]' '[["named-uuid", "x"]]'],
-  [[syntax "["named-uuid","x"]": syntax error: expected ["uuid", <string>]]])
-
-OVSDB_CHECK_NEGATIVE([empty string atom must be quoted],
-  [[parse-atom-strings '["string"]' '']],
-  [An empty string is not valid as input; use "" to represent the empty string])
-
-OVSDB_CHECK_NEGATIVE([quotes must be balanced],
-  [parse-atom-strings '[["string"]]' '"asdf'],
-  ["asdf: missing quote at end of quoted string])
-
-OVSDB_CHECK_NEGATIVE([quoted string must not contain unescaped quote],
-  [parse-atom-strings '[["string"]]' '"as"df"'],
-  ["as"df": quoted string may not include unescaped "])
-
-OVSDB_CHECK_NEGATIVE([quoted string must not end with backslash],
-  [parse-atom-strings '[["string"]]' '"asdf\"'],
-  ["asdf\": quoted string may not end with backslash])
-
-OVSDB_CHECK_NEGATIVE([uuids must be valid],
-  [parse-atom-strings '[["uuid"]]' '1234-5678'],
-  ["1234-5678" is not a valid UUID])
-
-AT_BANNER([OVSDB -- atoms with enum constraints])
-
-OVSDB_CHECK_POSITIVE_CPY([integer atom enum], 
-  [[parse-atoms '[{"type": "integer", "enum": ["set", [1, 6, 8, 10]]}]' \
-    '[0]' \
-    '[1]' \
-    '[2]' \
-    '[3]' \
-    '[6]' \
-    '[7]' \
-    '[8]' \
-    '[9]' \
-    '[10]' \
-    '[11]']], 
-  [[constraint violation: 0 is not one of the allowed values ([1, 6, 8, 10])
-1
-constraint violation: 2 is not one of the allowed values ([1, 6, 8, 10])
-constraint violation: 3 is not one of the allowed values ([1, 6, 8, 10])
-6
-constraint violation: 7 is not one of the allowed values ([1, 6, 8, 10])
-8
-constraint violation: 9 is not one of the allowed values ([1, 6, 8, 10])
-10
-constraint violation: 11 is not one of the allowed values ([1, 6, 8, 10])]])
-
-OVSDB_CHECK_POSITIVE([integer atom enum from string],
-  [[parse-atom-strings '[{"type": "integer", "enum": ["set", [1, 6, 8, 10, 20, 21, 22, 23, 24, 25]]}]' \
-    '1' \
-    '6' \
-    '8' \
-    '10' \
-    '20-25']],
-  [[1
-6
-8
-10
-20-25]])
-
-OVSDB_CHECK_NEGATIVE([integer not in enum set from string],
-  [[parse-atom-strings '[{"type": "integer", "enum": ["set", [1, 6, 8, 10]]}]' '0' ]],
-  [[constraint violation: 0 is not one of the allowed values ([1, 6, 8, 10])]])
-
-OVSDB_CHECK_NEGATIVE([integer range not in enum set from string],
-  [[parse-atom-strings '[{"type": "integer", "enum": ["set", [1, 6, 8, 10]]}]' '8-10' ]],
-  [[constraint violation: 9 is not one of the allowed values ([1, 6, 8, 10])]])
-
-OVSDB_CHECK_POSITIVE_CPY([real atom enum], 
-  [[parse-atoms '[{"type": "real", "enum": ["set", [-1.5, 1.5]]}]' \
-    '[-2]' \
-    '[-1]' \
-    '[-1.5]' \
-    '[0]' \
-    '[1]' \
-    '[1.5]' \
-    '[2]']], 
-  [[constraint violation: -2 is not one of the allowed values ([-1.5, 1.5])
-constraint violation: -1 is not one of the allowed values ([-1.5, 1.5])
--1.5
-constraint violation: 0 is not one of the allowed values ([-1.5, 1.5])
-constraint violation: 1 is not one of the allowed values ([-1.5, 1.5])
-1.5
-constraint violation: 2 is not one of the allowed values ([-1.5, 1.5])]])
-
-OVSDB_CHECK_POSITIVE_CPY([boolean atom enum], 
-  [[parse-atoms '[{"type": "boolean", "enum": false}]' \
-    '[false]' \
-    '[true]']], 
-  [[false
-constraint violation: true is not one of the allowed values ([false])]])
-
-OVSDB_CHECK_POSITIVE_CPY([string atom enum], 
-  [[parse-atoms '[{"type": "string", "enum": ["set", ["abc", "def"]]}]' \
-    '[""]' \
-    '["ab"]' \
-    '["abc"]' \
-    '["def"]' \
-    '["defg"]' \
-    '["DEF"]']], 
-  [[constraint violation: "" is not one of the allowed values ([abc, def])
-constraint violation: ab is not one of the allowed values ([abc, def])
-"abc"
-"def"
-constraint violation: defg is not one of the allowed values ([abc, def])
-constraint violation: DEF is not one of the allowed values ([abc, def])]])
-
-OVSDB_CHECK_POSITIVE_CPY([uuid atom enum], 
-  [[parse-atoms '[{"type": "uuid", "enum": ["set", [["uuid", "6d53a6dd-2da7-4924-9927-97f613812382"], ["uuid", "52cbc842-137a-4db5-804f-9f34106a0ba3"]]]}]' \
-    '["uuid", "6d53a6dd-2da7-4924-9927-97f613812382"]' \
-    '["uuid", "52cbc842-137a-4db5-804f-9f34106a0ba3"]' \
-    '["uuid", "dab2a6b2-6094-4f43-a7ef-4c0f0608f176"]']], 
-  [[["uuid","6d53a6dd-2da7-4924-9927-97f613812382"]
-["uuid","52cbc842-137a-4db5-804f-9f34106a0ba3"]
-constraint violation: dab2a6b2-6094-4f43-a7ef-4c0f0608f176 is not one of the allowed values ([52cbc842-137a-4db5-804f-9f34106a0ba3, 6d53a6dd-2da7-4924-9927-97f613812382])]])
-
-AT_BANNER([OVSDB -- atoms with other constraints])
-
-OVSDB_CHECK_POSITIVE_CPY([integers >= 5], 
-  [[parse-atoms '[{"type": "integer", "minInteger": 5}]' \
-    '[0]' \
-    '[4]' \
-    '[5]' \
-    '[6]' \
-    '[12345]']], 
-  [constraint violation: 0 is less than minimum allowed value 5
-constraint violation: 4 is less than minimum allowed value 5
-5
-6
-12345])
-
-OVSDB_CHECK_POSITIVE_CPY([integers <= -1], 
-  [[parse-atoms '[{"type": "integer", "maxInteger": -1}]' \
-    '[0]' \
-    '[-1]' \
-    '[-2]' \
-    '[-123]']], 
-  [constraint violation: 0 is greater than maximum allowed value -1
--1
--2
--123])
-
-OVSDB_CHECK_POSITIVE_CPY([integers in range -10 to 10], 
-  [[parse-atoms '[{"type": "integer", "minInteger": -10, "maxInteger": 10}]' \
-    '[-20]' \
-    '[-11]' \
-    '[-10]' \
-    '[-9]' \
-    '[1]' \
-    '[9]' \
-    '[10]' \
-    '[11]' \
-    '[123576]']], 
-  [constraint violation: -20 is not in the valid range -10 to 10 (inclusive)
-constraint violation: -11 is not in the valid range -10 to 10 (inclusive)
--10
--9
-1
-9
-10
-constraint violation: 11 is not in the valid range -10 to 10 (inclusive)
-constraint violation: 123576 is not in the valid range -10 to 10 (inclusive)])
-
-OVSDB_CHECK_POSITIVE_CPY([reals >= 5], 
-  [[parse-atoms '[{"type": "real", "minReal": 5}]' \
-    '[0]' \
-    '[4]' \
-    '[5]' \
-    '[6]' \
-    '[12345]']], 
-  [constraint violation: 0 is less than minimum allowed value 5
-constraint violation: 4 is less than minimum allowed value 5
-5
-6
-12345])
-
-OVSDB_CHECK_POSITIVE_CPY([reals <= -1], 
-  [[parse-atoms '[{"type": "real", "maxReal": -1}]' \
-    '[0]' \
-    '[-1]' \
-    '[-2]' \
-    '[-123]']], 
-  [constraint violation: 0 is greater than maximum allowed value -1
--1
--2
--123])
-
-OVSDB_CHECK_POSITIVE_CPY([reals in range -10 to 10], 
-  [[parse-atoms '[{"type": "real", "minReal": -10, "maxReal": 10}]' \
-    '[-20]' \
-    '[-11]' \
-    '[-10]' \
-    '[-9]' \
-    '[1]' \
-    '[9]' \
-    '[10]' \
-    '[11]' \
-    '[123576]']], 
-  [constraint violation: -20 is not in the valid range -10 to 10 (inclusive)
-constraint violation: -11 is not in the valid range -10 to 10 (inclusive)
--10
--9
-1
-9
-10
-constraint violation: 11 is not in the valid range -10 to 10 (inclusive)
-constraint violation: 123576 is not in the valid range -10 to 10 (inclusive)])
-
-OVSDB_CHECK_POSITIVE_CPY([strings at least 2 characters long],
-  [[parse-atoms '{"type": "string", "minLength": 2}' \
-    '[""]' \
-    '["a"]' \
-    '["ab"]' \
-    '["abc"]' \
-    '["\ud834\udd1e"]']],
-  [[constraint violation: "" length 0 is less than minimum allowed length 2
-constraint violation: "a" length 1 is less than minimum allowed length 2
-"ab"
-"abc"
-constraint violation: "𝄞" length 1 is less than minimum allowed length 2]],
-  [],
-  [],
-  [dnl This test requires a wide build of Python.
-   AT_CHECK([$PYTHON -c 'unichr(0x10000)' || exit 77],
-            [0], [ignore], [ignore])])
-
-OVSDB_CHECK_POSITIVE_CPY([strings no more than 2 characters long],
-  [[parse-atoms '{"type": "string", "maxLength": 2}' \
-    '[""]' \
-    '["a"]' \
-    '["ab"]' \
-    '["abc"]' \
-    '["de"]']],
-  [[""
-"a"
-"ab"
-constraint violation: "abc" length 3 is greater than maximum allowed length 2
-"de"]])
-
-AT_BANNER([OVSDB -- simple data])
-
-OVSDB_CHECK_POSITIVE_CPY([integer JSON datum],
-  [[parse-data '["integer"]' '[0]' '["set",[1]]' '[-1]']],
-  [0
-1
--1])
-
-OVSDB_CHECK_POSITIVE([integer string datum],
-  [[parse-data-strings -- '["integer"]' '0' '1' '-1' '+1']],
-  [0
-1
--1
-1])
-
-OVSDB_CHECK_POSITIVE_CPY([real JSON datum], 
-  [[parse-data '["real"]' '[0]' '["set",[1.0]]' '[-1.25]']],
-  [0
-1
--1.25])
-
-OVSDB_CHECK_POSITIVE([real string datum], 
-  [[parse-data-strings -- '["real"]' '0' '1.0' '-1.25']],
-  [0
-1
--1.25])
-
-OVSDB_CHECK_POSITIVE_CPY([boolean JSON datum],
-  [[parse-data '["boolean"]' '["set", [true]]' '[false]' ]],
-  [true
-false])
-
-OVSDB_CHECK_POSITIVE([boolean string datum],
-  [[parse-data-strings '["boolean"]' 'true' 'false' ]],
-  [true
-false])
-
-OVSDB_CHECK_POSITIVE_CPY([string JSON datum],
-  [[parse-data '["string"]' '["set",[""]]' '["true"]' '["\"\\\/\b\f\n\r\t"]']],
-  [""
-"true"
-"\"\\/\b\f\n\r\t"])
-
-OVSDB_CHECK_POSITIVE([string string datum],
-  [[parse-data-strings '["string"]' '"x"' '""' '"true"' '"\"\\\/\b\f\n\r\t"']],
-  [x
-""
-"true"
-"\"\\/\b\f\n\r\t"])
-
-AT_BANNER([OVSDB -- set data])
-
-OVSDB_CHECK_POSITIVE_CPY([JSON optional boolean],
-  [[parse-data '{"key": "boolean", "min": 0}' \
-    '[true]' \
-    '["set", [false]]' \
-    '["set", []]']], 
-  [[true
-false
-["set",[]]]],
-  [set])
-
-OVSDB_CHECK_POSITIVE([string optional boolean],
-  [[parse-data-strings '{"key": "boolean", "min": 0}' \
-    'true' \
-    'false' \
-    '[]']], 
-  [[true
-false
-[]]],
-  [set])
-
-OVSDB_CHECK_POSITIVE_CPY([JSON set of 0 or more integers],
-  [[parse-data '{"key": "integer", "min": 0, "max": "unlimited"}' \
-    '["set", [0]]' \
-    '[1]' \
-    '["set", [0, 1]]' \
-    '["set", [0, 1, 2]]' \
-    '["set", [0, 1, 2, 3, 4, 5]]' \
-    '["set", [0, 1, 2, 3, 4, 5, 6, 7, 8]]' \
-    '["set", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]']],
-  [[0
-1
-["set",[0,1]]
-["set",[0,1,2]]
-["set",[0,1,2,3,4,5]]
-["set",[0,1,2,3,4,5,6,7,8]]
-["set",[0,1,2,3,4,5,6,7,8,9,10]]]])
-
-OVSDB_CHECK_POSITIVE([string set of 0 or more integers],
-  [[parse-data-strings '{"key": "integer", "min": 0, "max": "unlimited"}' \
-    '0' \
-    '0,1' \
-    '0, 1, 2' \
-    '[0, 1,2, 3, 4, 5]' \
-    '0, 1,2, 3,4, 5, 6, 7, 8' \
-    '[0, 1, 2, 3, 4,5, 6,7, 8, 9, 10]' \
-    '0-8' \
-    '[0-10']]],
-  [[[0]
-[0, 1]
-[0, 1, 2]
-[0, 1, 2, 3, 4, 5]
-[0, 1, 2, 3, 4, 5, 6, 7, 8]
-[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
-[0, 1, 2, 3, 4, 5, 6, 7, 8]
-[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]])
-
-OVSDB_CHECK_POSITIVE_CPY([JSON set of 1 to 3 uuids],
-  [[parse-data '{"key": "uuid", "min": 1, "max": 3}' \
-    '["set", [["uuid", "550e8400-e29b-41d4-a716-446655440000"]]]' \
-    '["uuid", "b5078be0-7664-4299-b836-8bcc03ef941f"]' \
-    '["set", [["uuid", "c5051240-30ff-43ed-b4b9-93cf3f050813"],
-              ["uuid", "90558331-09af-4d2f-a572-509cad2e9088"],
-              ["uuid", "550e8400-e29b-41d4-a716-446655440000"]]]']],
-  [[["uuid","550e8400-e29b-41d4-a716-446655440000"]
-["uuid","b5078be0-7664-4299-b836-8bcc03ef941f"]
-["set",[["uuid","550e8400-e29b-41d4-a716-446655440000"],["uuid","90558331-09af-4d2f-a572-509cad2e9088"],["uuid","c5051240-30ff-43ed-b4b9-93cf3f050813"]]]]])
-
-OVSDB_CHECK_POSITIVE([string set of 1 to 3 uuids],
-  [[parse-data-strings '{"key": "uuid", "min": 1, "max": 3}' \
-    '[550e8400-e29b-41d4-a716-446655440000]' \
-    '[c5051240-30ff-43ed-b4b9-93cf3f050813,
-      90558331-09af-4d2f-a572-509cad2e9088,
-      550e8400-e29b-41d4-a716-446655440000]']],
-  [[[550e8400-e29b-41d4-a716-446655440000]
-[550e8400-e29b-41d4-a716-446655440000, 90558331-09af-4d2f-a572-509cad2e9088, c5051240-30ff-43ed-b4b9-93cf3f050813]]])
-
-OVSDB_CHECK_POSITIVE_CPY([JSON set of 0 to 3 strings],
-  [[parse-data '{"key": "string", "min": 0, "max": 3}' \
-    '["set", []]' \
-    '["a longer string"]' \
-    '["set", ["a relatively long string"]]' \
-    '["set", ["short string", "a relatively long string"]]' \
-    '["set", ["zzz", "short string", "a relatively long string"]]']],
-  [[["set",[]]
-"a longer string"
-"a relatively long string"
-["set",["a relatively long string","short string"]]
-["set",["a relatively long string","short string","zzz"]]]])
-
-OVSDB_CHECK_POSITIVE([string set of 0 to 3 strings],
-  [[parse-data-strings '{"key": "string", "min": 0, "max": 3}' \
-    '[]' \
-    '"a relatively long string"' \
-    '["short string", "a relatively long string"]' \
-    '"zzz","short string","a relatively long string"']],
-  [[[]
-["a relatively long string"]
-["a relatively long string", "short string"]
-["a relatively long string", "short string", zzz]]])
-
-OVSDB_CHECK_NEGATIVE_CPY([duplicate boolean not allowed in JSON set],
-  [[parse-data '{"key": "boolean", "max": 5}' '["set", [true, true]]']],
-  [ovsdb error: set contains duplicate])
-
-OVSDB_CHECK_NEGATIVE([duplicate boolean not allowed in string set],
-  [[parse-data-strings '{"key": "boolean", "max": 5}' 'true, true']],
-  [set contains duplicate value])
-
-OVSDB_CHECK_NEGATIVE_CPY([duplicate integer not allowed in JSON set],
-  [[parse-data '{"key": "integer", "max": 5}' '["set", [1, 2, 3, 1]]']],
-  [ovsdb error: set contains duplicate])
-
-OVSDB_CHECK_NEGATIVE([duplicate integer not allowed in string set],
-  [[parse-data-strings '{"key": "integer", "max": 5}' '[1, 2, 3, 1]']],
-  [set contains duplicate value])
-
-OVSDB_CHECK_NEGATIVE_CPY([duplicate real not allowed in JSON set],
-  [[parse-data '{"key": "real", "max": 5}' '["set", [0.0, -0.0]]']],
-  [ovsdb error: set contains duplicate])
-
-OVSDB_CHECK_NEGATIVE([duplicate real not allowed in string set],
-  [[parse-data-strings '{"key": "real", "max": 5}' '0.0, -0.0']],
-  [set contains duplicate value])
-
-OVSDB_CHECK_NEGATIVE_CPY([duplicate string not allowed in JSON set],
-  [[parse-data '{"key": "string", "max": 5}' '["set", ["asdf", "ASDF", "asdf"]]']],
-  [ovsdb error: set contains duplicate])
-
-OVSDB_CHECK_NEGATIVE([duplicate string not allowed in string set],
-  [[parse-data-strings '{"key": "string", "max": 5}' 'asdf, ASDF, "asdf"']],
-  [set contains duplicate value])
-
-OVSDB_CHECK_NEGATIVE_CPY([duplicate uuid not allowed in JSON set],
-  [[parse-data '{"key": "uuid", "max": 5}' \
-    '["set", [["uuid", "7ef21525-0088-4a28-a418-5518413e43ea"],
-              ["uuid", "355ad037-f1da-40aa-b47c-ff9c7e8c6a38"],
-              ["uuid", "7ef21525-0088-4a28-a418-5518413e43ea"]]]']],
-  [ovsdb error: set contains duplicate])
-
-OVSDB_CHECK_NEGATIVE([duplicate uuid not allowed in string set],
-  [[parse-data-strings '{"key": "uuid", "max": 5}' \
-    '7ef21525-0088-4a28-a418-5518413e43ea,
-     355ad037-f1da-40aa-b47c-ff9c7e8c6a38,
-     7ef21525-0088-4a28-a418-5518413e43ea']],
-  [set contains duplicate value])
-
-AT_BANNER([OVSDB -- map data])
-
-OVSDB_CHECK_POSITIVE_CPY([JSON map of 1 integer to boolean],
-  [[parse-data '{"key": "integer", "value": "boolean"}' \
-    '["map", [[1, true]]]']],
-  [[["map",[[1,true]]]]])
-
-OVSDB_CHECK_POSITIVE([string map of 1 integer to boolean],
-  [[parse-data-strings '{"key": "integer", "value": "boolean"}' \
-    '1=true']],
-  [[1=true]])
-
-OVSDB_CHECK_POSITIVE_CPY([JSON map of at least 1 integer to boolean],
-  [[parse-data '{"key": "integer", "value": "boolean", "max": "unlimited"}' \
-    '["map", [[1, true]]]' \
-    '["map", [[0, true], [1, false], [2, true], [3, true], [4, true]]]' \
-    '["map", [[3, false], [0, true], [4, false]]]']],
-  [[["map",[[1,true]]]
-["map",[[0,true],[1,false],[2,true],[3,true],[4,true]]]
-["map",[[0,true],[3,false],[4,false]]]]])
-
-OVSDB_CHECK_POSITIVE([string map of at least 1 integer to boolean],
-  [[parse-data-strings '{"key": "integer", "value": "boolean", "max": "unlimited"}' \
-    '1=true' \
-    '0=true 1=false 2=true, 3=true 4=true,' \
-    '3=false,0=true ,4=false']],
-  [[{1=true}
-{0=true, 1=false, 2=true, 3=true, 4=true}
-{0=true, 3=false, 4=false}]])
-
-OVSDB_CHECK_POSITIVE_CPY([JSON map of 1 boolean to integer],
- [[parse-data '{"key": "boolean", "value": "integer"}' \
-   '["map", [[true, 1]]]']],
- [[["map",[[true,1]]]]])
-
-OVSDB_CHECK_POSITIVE([string map of 1 boolean to integer],
- [[parse-data-strings '{"key": "boolean", "value": "integer"}' \
-   'true=1']],
- [[true=1]])
-
-OVSDB_CHECK_POSITIVE_CPY([JSON map of 1 uuid to real],
-  [[parse-data '{"key": "uuid", "value": "real", "min": 1, "max": 5}' \
-    '["map", [[["uuid", "cad8542b-6ee1-486b-971b-7dcbf6e14979"], 1.0],
-              [["uuid", "6b94b968-2702-4f64-9457-314a34d69b8c"], 2.0],
-              [["uuid", "d2c4a168-24de-47eb-a8a3-c1abfc814979"], 3.0],
-              [["uuid", "25bfa475-d072-4f60-8be1-00f48643e9cb"], 4.0],
-              [["uuid", "1c92b8ca-d5e4-4628-a85d-1dc2d099a99a"], 5.0]]]']],
-  [[["map",[[["uuid","1c92b8ca-d5e4-4628-a85d-1dc2d099a99a"],5],[["uuid","25bfa475-d072-4f60-8be1-00f48643e9cb"],4],[["uuid","6b94b968-2702-4f64-9457-314a34d69b8c"],2],[["uuid","cad8542b-6ee1-486b-971b-7dcbf6e14979"],1],[["uuid","d2c4a168-24de-47eb-a8a3-c1abfc814979"],3]]]]])
-
-OVSDB_CHECK_POSITIVE([string map of 1 uuid to real],
-  [[parse-data-strings '{"key": "uuid", "value": "real", "min": 1, "max": 5}' \
-    'cad8542b-6ee1-486b-971b-7dcbf6e14979=1.0,
-     6b94b968-2702-4f64-9457-314a34d69b8c=2.0,
-     d2c4a168-24de-47eb-a8a3-c1abfc814979=3.0,
-     25bfa475-d072-4f60-8be1-00f48643e9cb=4.0,
-     1c92b8ca-d5e4-4628-a85d-1dc2d099a99a=5.0']],
-  [[{1c92b8ca-d5e4-4628-a85d-1dc2d099a99a=5, 25bfa475-d072-4f60-8be1-00f48643e9cb=4, 6b94b968-2702-4f64-9457-314a34d69b8c=2, cad8542b-6ee1-486b-971b-7dcbf6e14979=1, d2c4a168-24de-47eb-a8a3-c1abfc814979=3}]])
-
-OVSDB_CHECK_POSITIVE_CPY([JSON map of 10 string to string],
-  [[parse-data '{"key": "string", "value": "string", "min": 1, "max": 10}' \
-    '["map", [["2 gills", "1 chopin"],
-              ["2 chopins", "1 pint"],
-              ["2 pints", "1 quart"],
-              ["2 quarts", "1 pottle"],
-              ["2 pottles", "1 gallon"],
-              ["2 gallons", "1 peck"],
-              ["2 pecks", "1 demibushel"],
-              ["2 demibushel", "1 firkin"],
-              ["2 firkins", "1 kilderkin"],
-              ["2 kilderkins", "1 barrel"]]]']],
-   [[["map",[["2 chopins","1 pint"],["2 demibushel","1 firkin"],["2 firkins","1 kilderkin"],["2 gallons","1 peck"],["2 gills","1 chopin"],["2 kilderkins","1 barrel"],["2 pecks","1 demibushel"],["2 pints","1 quart"],["2 pottles","1 gallon"],["2 quarts","1 pottle"]]]]])
-
-OVSDB_CHECK_POSITIVE([string map of 10 string to string],
-  [[parse-data-strings '{"key": "string", "value": "string", "min": 1, "max": 10}' \
-    '{"2 gills"="1 chopin",
-      "2 chopins"= "1 pint",
-      "2 pints"= "1 quart",
-      "2 quarts"= "1 pottle",
-      "2 pottles"= "1 gallon",
-      "2 gallons"= "1 peck",
-      "2 pecks"= "1 demibushel",
-      "2 demibushel"= "1 firkin",
-      "2 firkins"= "1 kilderkin",
-      "2 kilderkins"= "1 barrel"}']],
-   [[{"2 chopins"="1 pint", "2 demibushel"="1 firkin", "2 firkins"="1 kilderkin", "2 gallons"="1 peck", "2 gills"="1 chopin", "2 kilderkins"="1 barrel", "2 pecks"="1 demibushel", "2 pints"="1 quart", "2 pottles"="1 gallon", "2 quarts"="1 pottle"}]])
-
-OVSDB_CHECK_NEGATIVE_CPY([duplicate integer key not allowed in JSON map],
-  [[parse-data '{"key": "integer", "value": "boolean", "max": 5}' \
-    '["map", [[1, true], [2, false], [1, false]]]']],
-  [ovsdb error: map contains duplicate key])
-
-OVSDB_CHECK_NEGATIVE([duplicate integer key not allowed in string map],
-  [[parse-data-strings '{"key": "integer", "value": "boolean", "max": 5}' \
-    '1=true 2=false 1=false']],
-  [map contains duplicate key])
-
-OVSDB_CHECK_POSITIVE([generate and apply diff -- integer],
-  [[diff-data '["integer"]' '[0]' '[2]']],
-  [[diff: 2
-apply diff: 2
-OK]])
-
-OVSDB_CHECK_POSITIVE([generate and apply diff -- boolean],
-  [[diff-data '["boolean"]' '[true]' '[false]']],
-  [[diff: false
-apply diff: false
-OK]])
-
-OVSDB_CHECK_POSITIVE([generate and apply diff -- string],
-  [[diff-data '["string"]' '["AAA"]' '["BBB"]']],
-  [[diff: "BBB"
-apply diff: "BBB"
-OK]])
-
-dnl Test set modifications.
-OVSDB_CHECK_POSITIVE([generate and apply diff -- set],
-  [[diff-data '{"key": "integer", "min":0, "max": 3}' \
-  '["set", [0, 1]]'  '["set", [1,2]]' \
-  '["set", [0, 1]]'  '["set", [1]]' \
-  '["set", []]'  '["set", [0, 1]]' \
-  '["set", [0, 1]]'  '["set", []]'
-  ]],
-  [[diff: ["set",[0,2]]
-apply diff: ["set",[1,2]]
-OK
-diff: 0
-apply diff: 1
-OK
-diff: ["set",[0,1]]
-apply diff: ["set",[0,1]]
-OK
-diff: ["set",[0,1]]
-apply diff: ["set",[]]
-OK]])
-
-dnl Test set modifications causes data to violate set size constrain.
-OVSDB_CHECK_NEGATIVE([generate and apply diff -- set -- size error],
-  [[diff-data '{"key": "integer", "min":0, "max": 3}' \
-  '["set", [0, 1]]'  '["set", [1, 2, 3, 4]]']],
-  [[ovsdb error: Datum crated by diff has size error]])
-
-dnl Test set modifications.
-OVSDB_CHECK_POSITIVE([generate and apply diff -- map],
-  [[diff-data '{"key": "string", "value": "string", "min":0, "max": 3}' \
-  '["map", [["2 gills", "1 chopin"]]]'  '["map", [["2 pints", "1 quart"]]]' \
-  '["map", [["2 gills", "1 chopin"]]]'  '["map", [["2 gills", "1 chopin"]]]' \
-  '["map", [["2 gills", "1 chopin"]]]'  '["map", []]' \
-  '["map", []]'  '["map", [["2 pints", "1 quart"]]]' \
-  '["map", [["2 gills", "1 chopin"]]]'  '["map", [["2 gills", "1 gallon"]]]' \
-  ]],
-  [[diff: ["map",[["2 gills","1 chopin"],["2 pints","1 quart"]]]
-apply diff: ["map",[["2 pints","1 quart"]]]
-OK
-diff: ["map",[]]
-apply diff: ["map",[["2 gills","1 chopin"]]]
-OK
-diff: ["map",[["2 gills","1 chopin"]]]
-apply diff: ["map",[]]
-OK
-diff: ["map",[["2 pints","1 quart"]]]
-apply diff: ["map",[["2 pints","1 quart"]]]
-OK
-diff: ["map",[["2 gills","1 gallon"]]]
-apply diff: ["map",[["2 gills","1 gallon"]]]
-OK]])
-
-OVSDB_CHECK_NEGATIVE([generate and apply diff with map -- size error],
-  [[diff-data '{"key": "string", "value": "string", "min":0, "max": 3}' \
-  '["map", [["2 gills", "1 chopin"]]]' \
-  '["map", [["2 gills", "1 gallon"],
-            ["2 pints", "1 quart"],
-            ["2 quarts", "1 pottle"],
-            ["2 gallons", "1 peck"]]]' \
-  ]],
-  [[ovsdb error: Datum crated by diff has size error]])
diff --git a/tests/ovsdb-execution.at b/tests/ovsdb-execution.at
deleted file mode 100644
index 3129e73f4..000000000
--- a/tests/ovsdb-execution.at
+++ /dev/null
@@ -1,1140 +0,0 @@
-AT_BANNER([OVSDB -- execution])
-
-m4_divert_push([PREPARE_TESTS])
-[
-
-ordinal_schema () {
-    cat <<'EOF'
-    {"name": "ordinals",
-     "tables": {
-       "ordinals": {
-         "columns": {
-           "number": {"type": "integer"},
-           "name": {"type": "string"}},
-         "indexes": [["number"]]}},
-     "version": "5.1.3",
-     "cksum": "12345678 9"}
-EOF
-}
-
-constraint_schema () {
-    cat << 'EOF'
-    {"name": "constraints",
-     "tables": {
-       "a": {
-         "columns": {
-           "a": {"type": "integer"},
-           "a2a": {"type": {"key": {"type": "uuid", "refTable": "a"},
-                            "min": 0, "max": "unlimited"}},
-           "a2b": {"type": {"key": {"type": "uuid", "refTable": "b"},
-                            "min": 0, "max": "unlimited"}}}},
-       "b": {
-         "columns": {
-           "b": {"type": "integer"},
-           "b2a": {"type": {"key": {"type": "uuid", "refTable": "a"},
-                            "min": 0, "max": "unlimited"}},
-           "b2b": {"type": {"key": {"type": "uuid", "refTable": "b"},
-                            "min": 0, "max": "unlimited"}},
-           "x": {"type": {"key": "integer", "min": 1, "max": 2}}}},
-       "constrained": {
-         "columns": {
-           "positive": {"type": {"key": {"type": "integer",
-                                         "minInteger": 1}}}},
-         "maxRows": 1}}}
-EOF
-}
-
-weak_schema () {
-    cat <<'EOF'
-    {"name": "weak",
-     "tables": {
-       "a": {
-         "columns": {
-           "a": {"type": "integer"},
-           "a2a": {"type": {"key": {"type": "uuid",
-                                    "refTable": "a",
-                                    "refType": "weak"},
-                            "min": 0, "max": "unlimited"}},
-           "a2a1": {"type": {"key": {"type": "uuid",
-                                     "refTable": "a",
-                                     "refType": "weak"}}},
-           "a2b": {"type": {"key": {"type": "uuid",
-                                    "refTable": "b",
-                                    "refType": "weak"}}}}},
-       "b": {
-         "columns": {
-           "b": {"type": "integer"},
-           "b2a": {"type": {"key": {"type": "uuid",
-                                    "refTable": "a",
-                                    "refType": "weak"},
-                            "min": 0, "max": "unlimited"}}}}}}
-EOF
-}
-
-gc_schema () {
-    cat <<'EOF'
-    {"name": "gc",
-     "tables": {
-       "root": {
-         "columns": {
-           "a": {"type": {"key": {"type": "uuid",
-                                  "refTable": "a"},
-                            "min": 0, "max": "unlimited"}}},
-         "isRoot": true},
-       "a": {
-         "columns": {
-           "a": {"type": "integer"},
-           "a2a": {"type": {"key": {"type": "uuid",
-                                    "refTable": "a"},
-                            "min": 0, "max": "unlimited"}},
-           "a2b": {"type": {"key": {"type": "uuid",
-                                    "refTable": "b"},
-                            "min": 0, "max": "unlimited"}},
-           "wa2a": {"type": {"key": {"type": "uuid",
-                                     "refTable": "a",
-                                     "refType": "weak"},
-                             "min": 0, "max": "unlimited"}},
-           "wa2b": {"type": {"key": {"type": "uuid",
-                                    "refTable": "b",
-                                    "refType": "weak"},
-                             "min": 0, "max": "unlimited"}}}},
-       "b": {
-         "columns": {
-           "b": {"type": "integer"},
-           "b2a": {"type": {"key": {"type": "uuid",
-                                    "refTable": "a"},
-                            "min": 0, "max": "unlimited"}},
-           "wb2a": {"type": {"key": {"type": "uuid",
-                                     "refTable": "a",
-                                     "refType": "weak"},
-                             "min": 0, "max": "unlimited"}}},
-         "isRoot": false}}}
-EOF
-}
-
-immutable_schema () {
-    cat <<'EOF'
-{"name": "immutable",
- "tables": {
-    "a": {
-        "columns": {"i": {"type": "integer", "mutable": false}}}}}
-EOF
-}
-]
-m4_divert_pop([PREPARE_TESTS])
-
-#
-# OVSDB_CHECK_EXECUTION_RO(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
-#
-# Runs "test-ovsdb execute-readonly" with the given SCHEMA and each of the
-# TRANSACTIONS (which should be a quoted list of quoted strings).
-#
-# Checks that the overall output is OUTPUT, but UUIDs in the output
-# are replaced by markers of the form <N> where N is a number.  The
-# first unique UUID is replaced by <0>, the next by <1>, and so on.
-# If a given UUID appears more than once it is always replaced by the
-# same marker.
-#
-# TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
-m4_define([OVSDB_CHECK_EXECUTION_RO],
-  [AT_SETUP([$1])
-   AT_KEYWORDS([ovsdb execute execution positive $5])
-   AT_CHECK([test-ovsdb execute-readonly "`$2`" m4_foreach([txn], [$3],
-                                         [ 'txn'])], [0], [stdout], [])
-   AT_CHECK([uuidfilt stdout], [0], [$4])
-   AT_CLEANUP])
-
-OVSDB_CHECK_EXECUTION_RO([block insert on read only DB],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {}}]]]],
-  [[[{"details":"insert operation not allowed when database server is in read only mode","error":"not allowed"}]
-]])
-
-OVSDB_CHECK_EXECUTION_RO([allow select on read only DB],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "select",
-       "table": "ordinals",
-       "where": []}]]]],
-  [[[{"rows":[]}]
-]])
-
-# OVSDB_CHECK_EXECUTION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
-#
-# Runs "test-ovsdb execute" with the given SCHEMA and each of the
-# TRANSACTIONS (which should be a quoted list of quoted strings).
-#
-# Checks that the overall output is OUTPUT, but UUIDs in the output
-# are replaced by markers of the form <N> where N is a number.  The
-# first unique UUID is replaced by <0>, the next by <1>, and so on.
-# If a given UUID appears more than once it is always replaced by the
-# same marker.
-#
-# TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
-m4_define([OVSDB_CHECK_EXECUTION],
-  [AT_SETUP([$1])
-   AT_KEYWORDS([ovsdb execute execution positive $5])
-   AT_CHECK([test-ovsdb execute "`$2`" m4_foreach([txn], [$3], [ 'txn'])],
-     [0], [stdout], [])
-   AT_CHECK([uuidfilt stdout], [0], [$4])
-   AT_CLEANUP])
-
-OVSDB_CHECK_EXECUTION([uuid-name must be <id>],
-  [constraint_schema],
-  [[[["constraints",
-      {"op": "insert",
-       "table": "a",
-       "row": {},
-       "uuid-name": "0"}]]]],
-  [[[{"details":"Parsing ovsdb operation 1 of 1 failed: Type mismatch for member 'uuid-name'.","error":"syntax error","syntax":"{\"op\":\"insert\",\"row\":{},\"table\":\"a\",\"uuid-name\":\"0\"}"}]
-]])
-
-OVSDB_CHECK_EXECUTION([named-uuid must be <id>],
-  [constraint_schema],
-  [[[["constraints",
-      {"op": "insert",
-       "table": "a",
-       "row": {"a2a": ["named-uuid", "0"]}}]]]],
-  [[[{"details":"named-uuid string is not a valid <id>","error":"syntax error","syntax":"[\"named-uuid\",\"0\"]"}]
-]])
-
-OVSDB_CHECK_EXECUTION([duplicate uuid-name not allowed],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {},
-       "uuid-name": "x"},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {},
-       "uuid-name": "x"}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"details":"This \"uuid-name\" appeared on an earlier \"insert\" operation.","error":"duplicate uuid-name","syntax":"\"x\""}]
-]])
-
-m4_define([ONE_EXECUTION_EXAMPLE], [dnl
-dnl At one point the "commit" code ignored new rows with all-default values,
-dnl so this checks for that problem.
-OVSDB_CHECK_EXECUTION([insert default row, query table],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {}}]]],
-   [[["ordinals",
-      {"op": "select",
-       "table": "ordinals",
-       "where": []}]]]],
-  [[[{"uuid":["uuid","<0>"]}]
-[{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<1>"],"name":"","number":0}]}]
-]])
-])
-
-m4_define([EXECUTION_EXAMPLES], [
-ONE_EXECUTION_EXAMPLE
-OVSDB_CHECK_EXECUTION([insert row, query table],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}}]]],
-   [[["ordinals",
-      {"op": "select",
-       "table": "ordinals",
-       "where": []}]]]],
-  [[[{"uuid":["uuid","<0>"]}]
-[{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<1>"],"name":"zero","number":0}]}]
-]])
-
-OVSDB_CHECK_EXECUTION([insert rows, query by value],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}}]]],
-   [[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}}]]],
-   [[["ordinals",
-      {"op": "select",
-       "table": "ordinals",
-       "where": [["name", "==", "zero"]]}]]],
-   [[["ordinals",
-      {"op": "select",
-       "table": "ordinals",
-       "where": [["name", "==", "one"]]}]]]],
-  [[[{"uuid":["uuid","<0>"]}]
-[{"uuid":["uuid","<1>"]}]
-[{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<2>"],"name":"zero","number":0}]}]
-[{"rows":[{"_uuid":["uuid","<1>"],"_version":["uuid","<3>"],"name":"one","number":1}]}]
-]])
-
-OVSDB_CHECK_EXECUTION([insert rows, query by named-uuid],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"},
-       "uuid-name": "first"},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"},
-       "uuid-name": "second"},
-      {"op": "select",
-       "table": "ordinals",
-       "where": [["_uuid", "==", ["named-uuid", "first"]]]},
-      {"op": "select",
-       "table": "ordinals",
-       "where": [["_uuid", "==", ["named-uuid", "second"]]]}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<2>"],"name":"zero","number":0}]},{"rows":[{"_uuid":["uuid","<1>"],"_version":["uuid","<3>"],"name":"one","number":1}]}]
-]])
-
-OVSDB_CHECK_EXECUTION([insert rows, update rows by value],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"},
-       "uuid-name": "first"}]]],
-   [[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"},
-       "uuid-name": "first"}]]],
-   [[["ordinals",
-      {"op": "update",
-       "table": "ordinals",
-       "where": [["name", "==", "zero"]],
-       "row": {"name": "nought"}}]]],
-   [[["ordinals",
-      {"op": "select",
-       "table": "ordinals",
-       "where": [],
-       "sort": ["number"]}]]]],
-  [[[{"uuid":["uuid","<0>"]}]
-[{"uuid":["uuid","<1>"]}]
-[{"count":1}]
-[{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<2>"],"name":"nought","number":0},{"_uuid":["uuid","<1>"],"_version":["uuid","<3>"],"name":"one","number":1}]}]
-]])
-
-OVSDB_CHECK_EXECUTION([insert rows, mutate rows],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"},
-       "uuid-name": "first"}]]],
-   [[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"},
-       "uuid-name": "first"}]]],
-   [[["ordinals",
-      {"op": "mutate",
-       "table": "ordinals",
-       "where": [["name", "==", "zero"]],
-       "mutations": [["number", "+=", 2]]}]]],
-   [[["ordinals",
-      {"op": "select",
-       "table": "ordinals",
-       "where": [],
-       "sort": ["number"]}]]]],
-  [[[{"uuid":["uuid","<0>"]}]
-[{"uuid":["uuid","<1>"]}]
-[{"count":1}]
-[{"rows":[{"_uuid":["uuid","<1>"],"_version":["uuid","<2>"],"name":"one","number":1},{"_uuid":["uuid","<0>"],"_version":["uuid","<3>"],"name":"zero","number":2}]}]
-]])
-
-OVSDB_CHECK_EXECUTION([insert rows, delete by named-uuid],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"},
-       "uuid-name": "first"},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"},
-       "uuid-name": "second"},
-      {"op": "delete",
-       "table": "ordinals",
-       "where": [["_uuid", "==", ["named-uuid", "first"]]]},
-      {"op": "select",
-       "table": "ordinals",
-       "where": [],
-       "columns": ["name","number"]}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"count":1},{"rows":[{"name":"one","number":1}]}]
-]])
-
-OVSDB_CHECK_EXECUTION([insert rows, delete rows by value],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"},
-       "uuid-name": "first"}]]],
-   [[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"},
-       "uuid-name": "first"}]]],
-   [[["ordinals",
-      {"op": "delete",
-       "table": "ordinals",
-       "where": [["name", "==", "zero"]]}]]],
-   [[["ordinals",
-      {"op": "select",
-       "table": "ordinals",
-       "where": []}]]]],
-  [[[{"uuid":["uuid","<0>"]}]
-[{"uuid":["uuid","<1>"]}]
-[{"count":1}]
-[{"rows":[{"_uuid":["uuid","<1>"],"_version":["uuid","<2>"],"name":"one","number":1}]}]
-]])
-
-OVSDB_CHECK_EXECUTION([insert rows, delete by (non-matching) value],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"},
-       "uuid-name": "first"}]]],
-   [[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"},
-       "uuid-name": "first"}]]],
-   [[["ordinals",
-      {"op": "delete",
-       "table": "ordinals",
-       "where": [["name", "==", "nought"]]}]]],
-   [[["ordinals",
-      {"op": "select",
-       "table": "ordinals",
-       "where": [],
-       "sort": ["number"]}]]]],
-  [[[{"uuid":["uuid","<0>"]}]
-[{"uuid":["uuid","<1>"]}]
-[{"count":0}]
-[{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<2>"],"name":"zero","number":0},{"_uuid":["uuid","<1>"],"_version":["uuid","<3>"],"name":"one","number":1}]}]
-]])
-
-OVSDB_CHECK_EXECUTION([insert rows, delete all],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"},
-       "uuid-name": "first"},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"},
-       "uuid-name": "second"},
-      {"op": "delete",
-       "table": "ordinals",
-       "where": []},
-      {"op": "select",
-       "table": "ordinals",
-       "where": [],
-       "columns": ["name","number"]}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"count":2},{"rows":[]}]
-]])
-
-OVSDB_CHECK_EXECUTION([insert row, query table, commit],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "select",
-       "table": "ordinals",
-       "where": []},
-      {"op": "commit",
-       "durable": false}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<1>"],"name":"zero","number":0}]},{}]
-]])
-
-OVSDB_CHECK_EXECUTION([insert row, query table, commit durably],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "select",
-       "table": "ordinals",
-       "where": []},
-      {"op": "commit",
-       "durable": true}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<1>"],"name":"zero","number":0}]},{}]
-]])
-
-OVSDB_CHECK_EXECUTION([equality wait with correct rows],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "wait",
-       "timeout": 0,
-       "table": "ordinals",
-       "where": [],
-       "columns": ["name", "number"],
-       "until": "==",
-       "rows": [{"name": "zero", "number": 0},
-                {"name": "one", "number": 1}]}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{}]
-]])
-
-OVSDB_CHECK_EXECUTION([equality wait with extra row],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "wait",
-       "timeout": 0,
-       "table": "ordinals",
-       "where": [],
-       "columns": ["name", "number"],
-       "until": "==",
-       "rows": [{"name": "zero", "number": 0},
-                {"name": "one", "number": 1},
-                {"name": "two", "number": 2}]}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"where\" clause test failed","error":"timed out"}]
-]])
-
-OVSDB_CHECK_EXECUTION([equality wait with missing row],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "wait",
-       "timeout": 0,
-       "table": "ordinals",
-       "where": [],
-       "columns": ["name", "number"],
-       "until": "==",
-       "rows": [{"name": "one", "number": 1}]}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"where\" clause test failed","error":"timed out"}]
-]])
-
-OVSDB_CHECK_EXECUTION([inequality wait with correct rows],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "wait",
-       "timeout": 0,
-       "table": "ordinals",
-       "where": [],
-       "columns": ["name", "number"],
-       "until": "!=",
-       "rows": [{"name": "zero", "number": 0},
-                {"name": "one", "number": 1}]}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"where\" clause test failed","error":"timed out"}]
-]])
-
-OVSDB_CHECK_EXECUTION([inequality wait with extra row],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "wait",
-       "timeout": 0,
-       "table": "ordinals",
-       "where": [],
-       "columns": ["name", "number"],
-       "until": "!=",
-       "rows": [{"name": "zero", "number": 0},
-                {"name": "one", "number": 1},
-                {"name": "two", "number": 2}]}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{}]
-]])
-
-OVSDB_CHECK_EXECUTION([inequality wait with missing row],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "wait",
-       "timeout": 0,
-       "table": "ordinals",
-       "where": [],
-       "columns": ["name", "number"],
-       "until": "!=",
-       "rows": [{"name": "one", "number": 1}]}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{}]
-]])
-
-OVSDB_CHECK_EXECUTION([insert and update constraints],
-  [constraint_schema],
-  [[[["constraints",
-      {"op": "insert",
-       "table": "constrained",
-       "row": {}}]]],
-   [[["constraints",
-      {"op": "insert",
-       "table": "constrained",
-       "row": {"positive": -1}}]]],
-   [[["constraints",
-      {"op": "update",
-       "table": "constrained",
-       "where": [],
-       "row": {"positive": -2}}]]],
-   [[["constraints",
-      {"op": "insert",
-       "table": "constrained",
-       "row": {"positive": 1}}]]],
-   [[["constraints",
-      {"op": "insert",
-       "table": "constrained",
-       "row": {"positive": 2}}]]]],
-  [[[{"details":"0 is less than minimum allowed value 1","error":"constraint violation"}]
-[{"details":"-1 is less than minimum allowed value 1","error":"constraint violation"}]
-[{"details":"-2 is less than minimum allowed value 1","error":"constraint violation"}]
-[{"uuid":["uuid","<0>"]}]
-[{"uuid":["uuid","<1>"]},{"details":"transaction causes \"constrained\" table to contain 2 rows, greater than the schema-defined limit of 1 row(s)","error":"constraint violation"}]
-]])
-
-OVSDB_CHECK_EXECUTION([index uniqueness checking],
-  [ordinal_schema],
-dnl Insert initial row.
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}}]]],
-dnl Try to insert row with identical value (fails).
-   [[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "another one"}}]]],
-dnl Remove initial row and insert new row with identical value in a single
-dnl transaction (succeeds).
-   [[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "another one"}},
-      {"op": "delete",
-       "table": "ordinals",
-       "where": [["name", "==", "one"]]}]]],
-dnl Remove row and insert two new rows with identical value in a single
-dnl transaction (fails).
-   [[["ordinals",
-      {"op": "delete",
-       "table": "ordinals",
-       "where": []},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "still another one"}}]]],
-dnl Add new row with different value (succeeds).
-   [[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]]],
-dnl Change rows so values collide (fails).
-   [[["ordinals",
-      {"op": "update",
-       "table": "ordinals",
-       "where": [],
-       "row": {"number": 3}}]]],
-dnl Swap rows' values (succeeds).
-   [[["ordinals",
-      {"op": "update",
-       "table": "ordinals",
-       "where": [["number", "==", 1]],
-       "row": {"number": 2, "name": "old two"}},
-      {"op": "update",
-       "table": "ordinals",
-       "where": [["name", "==", "two"]],
-       "row": {"number": 1, "name": "old one"}}]]],
-dnl Change all rows' values to values not used before and insert values that
-dnl collide (only) with their previous values (succeeds).
-   [[["ordinals",
-      {"op": "mutate",
-       "table": "ordinals",
-       "where": [],
-       "mutations": [["number", "*=", 10]]},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "new one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "new two"}},
-      {"op": "select",
-       "table": "ordinals",
-       "where": [],
-       "columns": ["number", "name"],
-       "sort": ["number"]}]]]],
-  [[[{"uuid":["uuid","<0>"]}]
-[{"uuid":["uuid","<1>"]},{"details":"Transaction causes multiple rows in \"ordinals\" table to have identical values (1) for index on column \"number\".  First row, with UUID <0>, existed in the database before this transaction and was not modified by the transaction.  Second row, with UUID <1>, was inserted by this transaction.","error":"constraint violation"}]
-[{"uuid":["uuid","<2>"]},{"count":1}]
-[{"count":1},{"uuid":["uuid","<3>"]},{"uuid":["uuid","<4>"]},{"details":"Transaction causes multiple rows in \"ordinals\" table to have identical values (1) for index on column \"number\".  First row, with UUID <4>, was inserted by this transaction.  Second row, with UUID <3>, was inserted by this transaction.","error":"constraint violation"}]
-[{"uuid":["uuid","<5>"]}]
-[{"count":2},{"details":"Transaction causes multiple rows in \"ordinals\" table to have identical values (3) for index on column \"number\".  First row, with UUID <5>, had the following index values before the transaction: 2.  Second row, with UUID <2>, had the following index values before the transaction: 1.","error":"constraint violation"}]
-[{"count":1},{"count":1}]
-[{"count":2},{"uuid":["uuid","<6>"]},{"uuid":["uuid","<7>"]},{"rows":[{"name":"new one","number":1},{"name":"new two","number":2},{"name":"old one","number":10},{"name":"old two","number":20}]}]
-]])
-
-OVSDB_CHECK_EXECUTION([referential integrity -- simple],
-  [constraint_schema],
-  [[[["constraints",
-      {"op": "insert",
-       "table": "b",
-       "row": {"b": 1},
-       "uuid-name": "brow"},
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 0,
-               "a2b": ["set", [["named-uuid", "brow"]]]}},
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 1,
-               "a2b": ["set", [["named-uuid", "brow"]]]}},
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 2,
-               "a2b": ["set", [["named-uuid", "brow"]]]}}]]],
-   [[["constraints",
-      {"op": "delete",
-       "table": "b",
-       "where": []}]]],
-dnl Check that "mutate" honors number-of-elements constraints on sets and maps.
-   [[["constraints",
-      {"op": "mutate",
-       "table": "b",
-       "where": [],
-       "mutations": [["x", "delete", 0]]}]]],
-   [[["constraints",
-      {"op": "delete",
-       "table": "a",
-       "where": [["a", "==", 0]]}]]],
-   [[["constraints",
-      {"op": "delete",
-       "table": "b",
-       "where": []}]]],
-   [[["constraints",
-      {"op": "delete",
-       "table": "a",
-       "where": [["a", "==", 1]]}]]],
-   [[["constraints",
-      {"op": "delete",
-       "table": "b",
-       "where": []}]]],
-   [[["constraints",
-      {"op": "delete",
-       "table": "a",
-       "where": [["a", "==", 2]]}]]],
-   [[["constraints",
-      {"op": "delete",
-       "table": "b",
-       "where": []}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]},{"uuid":["uuid","<3>"]}]
-[{"count":1},{"details":"cannot delete b row <0> because of 3 remaining reference(s)","error":"referential integrity violation"}]
-[{"details":"Attempted to store 0 elements in set of 1 to 2 integers.","error":"constraint violation"}]
-[{"count":1}]
-[{"count":1},{"details":"cannot delete b row <0> because of 2 remaining reference(s)","error":"referential integrity violation"}]
-[{"count":1}]
-[{"count":1},{"details":"cannot delete b row <0> because of 1 remaining reference(s)","error":"referential integrity violation"}]
-[{"count":1}]
-[{"count":1}]
-]])
-
-OVSDB_CHECK_EXECUTION([referential integrity -- mutual references],
-  [constraint_schema],
-  [[[["constraints",
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 0,
-               "a2b": ["set", [["named-uuid", "row2"]]],
-               "a2a": ["set", [["named-uuid", "row1"]]]},
-       "uuid-name": "row1"},
-      {"op": "insert",
-       "table": "b",
-       "row": {"b": 1,
-               "b2b": ["set", [["named-uuid", "row2"]]],
-               "b2a": ["set", [["named-uuid", "row1"]]]},
-       "uuid-name": "row2"}]]],
-   [[["constraints",
-      {"op": "insert",
-       "table": "a",
-       "row": {"a2b": ["set", [["uuid", "b516b960-5b19-4fc2-bb82-fe1cbd6d0241"]]]}}]]],
-   [[["constraints",
-      {"op": "delete",
-       "table": "a",
-       "where": [["a", "==", 0]]}]]],
-   [[["constraints",
-      {"op": "delete",
-       "table": "b",
-       "where": [["b", "==", 1]]}]]],
-   dnl Try the deletions again to make sure that the refcounts got rolled back.
-   [[["constraints",
-      {"op": "delete",
-       "table": "a",
-       "where": [["a", "==", 0]]}]]],
-   [[["constraints",
-      {"op": "delete",
-       "table": "b",
-       "where": [["b", "==", 1]]}]]],
-   [[["constraints",
-      {"op": "delete",
-       "table": "a",
-       "where": [["a", "==", 0]]},
-      {"op": "delete",
-       "table": "b",
-       "where": [["b", "==", 1]]}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]
-[{"uuid":["uuid","<2>"]},{"details":"Table a column a2b row <2> references nonexistent row <3> in table b.","error":"referential integrity violation"}]
-[{"count":1},{"details":"cannot delete a row <0> because of 1 remaining reference(s)","error":"referential integrity violation"}]
-[{"count":1},{"details":"cannot delete b row <1> because of 1 remaining reference(s)","error":"referential integrity violation"}]
-[{"count":1},{"details":"cannot delete a row <0> because of 1 remaining reference(s)","error":"referential integrity violation"}]
-[{"count":1},{"details":"cannot delete b row <1> because of 1 remaining reference(s)","error":"referential integrity violation"}]
-[{"count":1},{"count":1}]
-]])
-
-OVSDB_CHECK_EXECUTION([weak references],
-  [weak_schema],
-  [[[["weak",
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 0,
-               "a2a": ["set", [["named-uuid", "row1"],
-                               ["named-uuid", "row2"],
-                               ["uuid", "0e767b36-6822-4044-8307-d58467e04669"]]],
-               "a2a1": ["named-uuid", "row1"],
-               "a2b": ["named-uuid", "row3"]},
-       "uuid-name": "row1"},
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 1,
-               "a2a": ["set", [["named-uuid", "row1"],
-                               ["named-uuid", "row2"]]],
-               "a2a1": ["named-uuid", "row2"],
-               "a2b": ["named-uuid", "row3"]},
-       "uuid-name": "row2"},
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 2,
-               "a2a": ["set", [["named-uuid", "row1"],
-                               ["named-uuid", "row2"]]],
-               "a2a1": ["named-uuid", "row2"],
-               "a2b": ["named-uuid", "row4"]}},
-      {"op": "insert",
-       "table": "b",
-       "row": {"b": 2,
-               "b2a": ["named-uuid", "row1"]},
-       "uuid-name": "row3"},
-      {"op": "insert",
-       "table": "b",
-       "row": {"b": 3,
-               "b2a": ["named-uuid", "row2"]},
-       "uuid-name": "row4"}]]],
-   dnl Check that the nonexistent row UUID we added to row a0 was deleted,
-   dnl and that other rows were inserted as requested.
-   [[["weak",
-      {"op": "select",
-       "table": "a",
-       "where": [],
-       "columns": ["_uuid", "a2a", "a2a1", "a2b"],
-       "sort": ["a"]}]]],
-   [[["weak",
-      {"op": "select",
-       "table": "b",
-       "where": [],
-       "columns": ["_uuid", "b", "b2a"],
-       "sort": ["b"]}]]],
-   dnl Try to insert invalid all-zeros weak reference (the default) into
-   dnl "a2b", which requires exactly one value.
-   [[["weak",
-      {"op": "insert",
-       "table": "a",
-       "row": {"a2a1": ["named-uuid", "me"]},
-       "uuid-name": "me"}]]],
-   dnl Try to delete row from "b" that is referred to by weak references
-   dnl from "a" table "a2b" column that requires exactly one value.
-   [[["weak",
-      {"op": "delete",
-       "table": "b",
-       "where": [["b", "==", 3]]}]]],
-   dnl Try to delete row from "a" that is referred to by weak references
-   dnl from "a" table "a2a1" column that requires exactly one value.
-   [[["weak",
-      {"op": "delete",
-       "table": "a",
-       "where": [["a", "==", 1]]}]]],
-   dnl Delete the row that had the reference that caused the previous
-   dnl deletion to fail, then check that other rows are unchanged.
-   [[["weak",
-      {"op": "delete",
-       "table": "a",
-       "where": [["a", "==", 2]]}]]],
-   [[["weak",
-      {"op": "select",
-       "table": "a",
-       "where": [],
-       "columns": ["_uuid", "a2a", "a2a1", "a2b"],
-       "sort": ["a"]}]]],
-   [[["weak",
-      {"op": "select",
-       "table": "b",
-       "where": [],
-       "columns": ["_uuid", "b", "b2a"],
-       "sort": ["b"]}]]],
-   dnl Delete row a0 then check that references to it were removed.
-   [[["weak",
-      {"op": "delete",
-       "table": "a",
-       "where": [["a", "==", 0]]}]]],
-   [[["weak",
-      {"op": "select",
-       "table": "a",
-       "where": [],
-       "columns": ["_uuid", "a2a", "a2a1", "a2b"],
-       "sort": ["a"]}]]],
-   [[["weak",
-      {"op": "select",
-       "table": "b",
-       "where": [],
-       "columns": ["_uuid", "b", "b2a"],
-       "sort": ["b"]}]]],
-   dnl Delete row a1 then check that references to it were removed.
-   [[["weak",
-      {"op": "delete",
-       "table": "a",
-       "where": [["a", "==", 1]]}]]],
-   [[["weak",
-      {"op": "select",
-       "table": "a",
-       "where": [],
-       "columns": ["_uuid", "a2a", "a2a1", "a2b"],
-       "sort": ["a"]}]]],
-   [[["weak",
-      {"op": "select",
-       "table": "b",
-       "where": [],
-       "columns": ["_uuid", "b", "b2a"],
-       "sort": ["b"]}]]]],
-  [[[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]},{"uuid":["uuid","<3>"]},{"uuid":["uuid","<4>"]}]
-[{"rows":[{"_uuid":["uuid","<0>"],"a2a":["set",[["uuid","<0>"],["uuid","<1>"]]],"a2a1":["uuid","<0>"],"a2b":["uuid","<3>"]},{"_uuid":["uuid","<1>"],"a2a":["set",[["uuid","<0>"],["uuid","<1>"]]],"a2a1":["uuid","<1>"],"a2b":["uuid","<3>"]},{"_uuid":["uuid","<2>"],"a2a":["set",[["uuid","<0>"],["uuid","<1>"]]],"a2a1":["uuid","<1>"],"a2b":["uuid","<4>"]}]}]
-[{"rows":[{"_uuid":["uuid","<3>"],"b":2,"b2a":["uuid","<0>"]},{"_uuid":["uuid","<4>"],"b":3,"b2a":["uuid","<1>"]}]}]
-[{"uuid":["uuid","<5>"]},{"details":"Weak reference column \"a2b\" in \"a\" row <5> (inserted within this transaction) contained all-zeros UUID (probably as the default value for this column) but deleting this value caused a constraint volation because this column is not allowed to be empty.","error":"constraint violation"}]
-[{"count":1},{"details":"Deletion of 1 weak reference(s) to deleted (or never-existing) rows from column \"a2b\" in \"a\" row <2> caused this column to become empty, but constraints on this column disallow an empty column.","error":"constraint violation"}]
-[{"count":1},{"details":"Deletion of 1 weak reference(s) to deleted (or never-existing) rows from column \"a2a1\" in \"a\" row <2> caused this column to become empty, but constraints on this column disallow an empty column.","error":"constraint violation"}]
-[{"count":1}]
-[{"rows":[{"_uuid":["uuid","<0>"],"a2a":["set",[["uuid","<0>"],["uuid","<1>"]]],"a2a1":["uuid","<0>"],"a2b":["uuid","<3>"]},{"_uuid":["uuid","<1>"],"a2a":["set",[["uuid","<0>"],["uuid","<1>"]]],"a2a1":["uuid","<1>"],"a2b":["uuid","<3>"]}]}]
-[{"rows":[{"_uuid":["uuid","<3>"],"b":2,"b2a":["uuid","<0>"]},{"_uuid":["uuid","<4>"],"b":3,"b2a":["uuid","<1>"]}]}]
-[{"count":1}]
-[{"rows":[{"_uuid":["uuid","<1>"],"a2a":["uuid","<1>"],"a2a1":["uuid","<1>"],"a2b":["uuid","<3>"]}]}]
-[{"rows":[{"_uuid":["uuid","<3>"],"b":2,"b2a":["set",[]]},{"_uuid":["uuid","<4>"],"b":3,"b2a":["uuid","<1>"]}]}]
-[{"count":1}]
-[{"rows":[]}]
-[{"rows":[{"_uuid":["uuid","<3>"],"b":2,"b2a":["set",[]]},{"_uuid":["uuid","<4>"],"b":3,"b2a":["set",[]]}]}]
-]])
-
-OVSDB_CHECK_EXECUTION([immutable columns],
-  [immutable_schema],
-  [[[["immutable",
-      {"op": "insert",
-       "table": "a",
-       "row": {"i": 5},
-       "uuid-name": "row1"}]]],
-   [[["immutable",
-      {"op": "update",
-       "table": "a",
-       "row": {"i": 10},
-       "where": []}]]],
-   [[["immutable",
-      {"op": "update",
-       "table": "a",
-       "row": {"i": 5},
-       "where": []}]]],
-   [[["immutable",
-      {"op": "mutate",
-       "table": "a",
-       "where": [],
-       "mutations": [["i", "-=", 5]]}]]],
-   [[["immutable",
-      {"op": "mutate",
-       "table": "a",
-       "where": [],
-       "mutations": [["i", "*=", 1]]}]]]],
-  [[[{"uuid":["uuid","<0>"]}]
-[{"details":"Cannot update immutable column i in table a.","error":"constraint violation","syntax":"{\"op\":\"update\",\"row\":{\"i\":10},\"table\":\"a\",\"where\":[]}"}]
-[{"details":"Cannot update immutable column i in table a.","error":"constraint violation","syntax":"{\"op\":\"update\",\"row\":{\"i\":5},\"table\":\"a\",\"where\":[]}"}]
-[{"details":"Cannot mutate immutable column i in table a.","error":"constraint violation","syntax":"[\"i\",\"-=\",5]"}]
-[{"details":"Cannot mutate immutable column i in table a.","error":"constraint violation","syntax":"[\"i\",\"*=\",1]"}]
-]])
-
-OVSDB_CHECK_EXECUTION([garbage collection],
-  [gc_schema],
-  [dnl Check that inserting a row without any references is a no-op.
-   [[["gc",
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 0}}]]],
-   [[["gc",
-      {"op": "select",
-       "table": "a",
-       "where": [],
-       "columns": ["a"]}]]],
-   dnl Check that inserting a chain of rows that reference each other
-   dnl in turn is also a no-op.
-   [[["gc",
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 0, "a2a": ["named-uuid", "row1"]},
-       "uuid-name": "row0"},
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 1, "a2a": ["named-uuid", "row2"]},
-       "uuid-name": "row1"},
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 2, "a2a": ["named-uuid", "row3"]},
-       "uuid-name": "row2"},
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 3},
-       "uuid-name": "row3"}]]],
-   [[["gc",
-      {"op": "select",
-       "table": "a",
-       "where": [],
-       "columns": ["a"]}]]],
-   dnl Check that inserting a pair of rows that mutually reference each
-   dnl other causes the rows to be retained.
-   [[["gc",
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 4, "a2a": ["named-uuid", "row5"]},
-       "uuid-name": "row4"},
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 5, "a2a": ["named-uuid", "row4"]},
-       "uuid-name": "row5"}]]],
-   [[["gc",
-      {"op": "select",
-       "table": "a",
-       "where": [],
-       "columns": ["a"],
-       "sort": ["a"]}]]],
-   dnl Check that unreferencing one of the rows causes the other to be deleted.
-   [[["gc",
-      {"op": "update",
-       "table": "a",
-       "where": [["a", "==", 4]],
-       "row": {"a2a": ["set", []]}}]]],
-   [[["gc",
-      {"op": "select",
-       "table": "a",
-       "where": [],
-       "columns": ["a"]}]]],
-   dnl Check that inserting a pair of rows that mutually weak reference each
-   dnl other is a no-op.
-   [[["gc",
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 6, "wa2a": ["named-uuid", "row7"]},
-       "uuid-name": "row6"},
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 7, "wa2a": ["named-uuid", "row6"]},
-       "uuid-name": "row7"}]]],
-   [[["gc",
-      {"op": "select",
-       "table": "a",
-       "where": [],
-       "columns": ["a"]}]]],
-   dnl Check that a circular chain of rows is retained.
-   [[["gc",
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 8, "a2a": ["named-uuid", "row9"]},
-       "uuid-name": "row8"},
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 9, "a2a": ["named-uuid", "row10"]},
-       "uuid-name": "row9"},
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 10, "a2a": ["named-uuid", "row11"]},
-       "uuid-name": "row10"},
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 11, "a2a": ["named-uuid", "row8"]},
-       "uuid-name": "row11"}]]],
-   [[["gc",
-      {"op": "select",
-       "table": "a",
-       "where": [],
-       "columns": ["a"],
-       "sort": ["a"]}]]],
-   dnl Check that breaking the chain causes all of the rows to be deleted.
-   [[["gc",
-      {"op": "update",
-       "table": "a",
-       "where": [["a", "==", 9]],
-       "row": {"a2a": ["set", []]}}]]],
-   [[["gc",
-      {"op": "select",
-       "table": "a",
-       "where": [],
-       "columns": ["a"]}]]],
-   dnl Check that inserting a row only referenced by itself is a no-op.
-   [[["gc",
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 12, "a2a": ["named-uuid", "self"]},
-       "uuid-name": "self"}]]],
-   [[["gc",
-      {"op": "select",
-       "table": "a",
-       "where": [],
-       "columns": ["a"]}]]]],
-  [[[{"uuid":["uuid","<0>"]}]
-[{"rows":[]}]
-[{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]},{"uuid":["uuid","<3>"]},{"uuid":["uuid","<4>"]}]
-[{"rows":[]}]
-[{"uuid":["uuid","<5>"]},{"uuid":["uuid","<6>"]}]
-[{"rows":[{"a":4},{"a":5}]}]
-[{"count":1}]
-[{"rows":[]}]
-[{"uuid":["uuid","<7>"]},{"uuid":["uuid","<8>"]}]
-[{"rows":[]}]
-[{"uuid":["uuid","<9>"]},{"uuid":["uuid","<10>"]},{"uuid":["uuid","<11>"]},{"uuid":["uuid","<12>"]}]
-[{"rows":[{"a":8},{"a":9},{"a":10},{"a":11}]}]
-[{"count":1}]
-[{"rows":[]}]
-[{"uuid":["uuid","<13>"]}]
-[{"rows":[]}]
-]])])
-
-EXECUTION_EXAMPLES
diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at
deleted file mode 100644
index 7c937f742..000000000
--- a/tests/ovsdb-idl.at
+++ /dev/null
@@ -1,1924 +0,0 @@
-AT_BANNER([OVSDB -- interface description language (IDL)])
-
-m4_divert_text([PREPARE_TESTS], [
-# ovsdb_start_idltest [REMOTE] [SCHEMA]
-#
-# Creates a database using SCHEMA (default: idltest.ovsschema) and
-# starts a database server listening on punix:socket and REMOTE (if
-# specified).
-ovsdb_start_idltest () {
-    ovsdb-tool create db ${2:-$abs_srcdir/idltest.ovsschema} || return $?
-    ovsdb-server -vconsole:warn --log-file --detach --no-chdir --pidfile --remote=punix:socket ${1:+--remote=$1} db || return $?
-    on_exit 'kill `cat ovsdb-server.pid`'
-}
-
-# ovsdb_cluster_start_idltest [REMOTE] [SCHEMA]
-#
-# Creates a database using SCHEMA (default: idltest.ovsschema) and
-# starts a database cluster listening on punix:socket and REMOTE (if
-# specified).
-ovsdb_cluster_start_idltest () {
-   local n=$1
-   ovsdb-tool create-cluster s1.db $abs_srcdir/idltest.ovsschema unix:s1.raft || return $?
-   cid=`ovsdb-tool db-cid s1.db`
-   schema_name=`ovsdb-tool schema-name $abs_srcdir/idltest.ovsschema`
-   for i in `seq 2 $n`; do
-     ovsdb-tool join-cluster s$i.db $schema_name unix:s$i.raft unix:s1.raft || return $?
-   done
-   for i in `seq $n`; do
-     ovsdb-server -vraft -vconsole:warn --detach --no-chdir --log-file=s$i.log --pidfile=s$i.pid --unixctl=s$i --remote=punix:s$i.ovsdb ${2:+--remote=$2} s$i.db || return $?
-   done
-   on_exit 'kill `cat s*.pid`'
-}
-
-# ovsdb_cluster_leader [REMOTES] [DATABASE]
-#
-# Returns the leader of the DATABASE cluster.
-ovsdb_cluster_leader () {
-   remotes=$(echo $1 | tr "," "\n")
-   for remote in $remotes; do
-      ovsdb-client dump $remote _Server Database name leader | grep $2 | grep -q true
-      if [[ $? == 0 ]]; then
-        port=$(echo $remote | cut -d':' -f 3)
-        log=$(grep --include=s\*.log -rlnw -e "listening on port $port" ./)
-        pid=$(echo $log | sed 's/\(.*\.\)log/\1pid/' )
-        echo "${remote}|${pid}"
-        return
-      fi
-   done
-}])
-
-# OVSDB_CHECK_IDL_C(TITLE, [PRE-IDL-TXN], TRANSACTIONS, OUTPUT, [KEYWORDS],
-#                   [FILTER])
-#
-# Creates a database with a schema derived from idltest.ovsidl, runs
-# each PRE-IDL-TXN (if any), starts an ovsdb-server on that database,
-# and runs "test-ovsdb idl" passing each of the TRANSACTIONS along.
-#
-# Checks that the overall output is OUTPUT.  Before comparison, the
-# output is sorted (using "sort") and UUIDs in the output are replaced
-# by markers of the form <N> where N is a number.  The first unique
-# UUID is replaced by <0>, the next by <1>, and so on.  If a given
-# UUID appears more than once it is always replaced by the same
-# marker.  If FILTER is supplied then the output is also filtered
-# through the specified program.
-#
-# TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
-m4_define([OVSDB_CHECK_IDL_C],
-  [AT_SETUP([$1 - C])
-   AT_KEYWORDS([ovsdb server idl positive $5])
-   AT_CHECK([ovsdb_start_idltest])
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore])])
-   AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 idl unix:socket $3],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-# same as OVSDB_CHECK_IDL but uses tcp.
-m4_define([OVSDB_CHECK_IDL_TCP_C],
-  [AT_SETUP([$1 - C - tcp])
-   AT_KEYWORDS([ovsdb server idl positive tcp socket $5])
-   AT_CHECK([ovsdb_start_idltest "ptcp:0:127.0.0.1"])
-   PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT])
-
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact tcp:127.0.0.1:$TCP_PORT $2], [0], [ignore], [ignore])])
-   AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 idl tcp:127.0.0.1:$TCP_PORT $3],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-# same as OVSDB_CHECK_IDL but uses tcp6.
-m4_define([OVSDB_CHECK_IDL_TCP6_C],
-  [AT_SETUP([$1 - C - tcp6])
-   AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-   AT_SKIP_IF([test $HAVE_IPV6 = no])
-   AT_KEYWORDS([ovsdb server idl positive tcp6 socket $5])
-   AT_CHECK([ovsdb_start_idltest "ptcp:0:[[::1]]"])
-   PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT])
-
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact tcp:[[::1]]:$TCP_PORT $2], [0], [ignore], [ignore])])
-   AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 idl tcp:[[::1]]:$TCP_PORT $3],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-# same as OVSDB_CHECK_IDL but uses the Python IDL implementation.
-m4_define([OVSDB_CHECK_IDL_PYN],
-  [AT_SETUP([$1])
-   AT_SKIP_IF([test $7 = no])
-   AT_KEYWORDS([ovsdb server idl positive Python $5])
-   AT_CHECK([ovsdb_start_idltest])
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore])])
-   AT_CHECK([$8 $srcdir/test-ovsdb.py  -t10 idl $srcdir/idltest.ovsschema unix:socket $3],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-m4_define([OVSDB_CHECK_IDL_PY],
-   [OVSDB_CHECK_IDL_PYN([$1 - Python2], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON2], [$PYTHON2])
-    OVSDB_CHECK_IDL_PYN([$1 - Python3], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON3], [$PYTHON3])])
-
-m4_define([OVSDB_CHECK_IDL_REGISTER_COLUMNS_PYN],
-  [AT_SETUP([$1 - register_columns])
-   AT_SKIP_IF([test $7 = no])
-   AT_KEYWORDS([ovsdb server idl positive Python register_columns $5])
-   AT_CHECK([ovsdb_start_idltest])
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore])])
-   AT_CHECK([$8 $srcdir/test-ovsdb.py  -t10 idl $srcdir/idltest.ovsschema unix:socket ?simple:b,ba,i,ia,r,ra,s,sa,u,ua?link1:i,k,ka,l2?link2:i,l1?singleton:name $3],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-m4_define([OVSDB_CHECK_IDL_REGISTER_COLUMNS_PY],
-   [OVSDB_CHECK_IDL_REGISTER_COLUMNS_PYN([$1 - Python2], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON2], [$PYTHON2])
-    OVSDB_CHECK_IDL_REGISTER_COLUMNS_PYN([$1 - Python3], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON3], [$PYTHON3])])
-
-# same as OVSDB_CHECK_IDL but uses the Python IDL implementation with tcp
-m4_define([OVSDB_CHECK_IDL_TCP_PYN],
-  [AT_SETUP([$1 - tcp])
-   AT_SKIP_IF([test $7 = no])
-   AT_KEYWORDS([ovsdb server idl positive Python with tcp socket $5])
-   AT_CHECK([ovsdb_start_idltest "ptcp:0:127.0.0.1"])
-   PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT])
-
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact tcp:127.0.0.1:$TCP_PORT $2], [0], [ignore], [ignore])])
-   AT_CHECK([$8 $srcdir/test-ovsdb.py  -t10 idl $srcdir/idltest.ovsschema tcp:127.0.0.1:$TCP_PORT $3],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-m4_define([OVSDB_CHECK_IDL_TCP_PY],
-   [OVSDB_CHECK_IDL_TCP_PYN([$1 - Python2], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON2], [$PYTHON2])
-    OVSDB_CHECK_IDL_TCP_PYN([$1 - Python3], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON3], [$PYTHON3])])
-
-# same as OVSDB_CHECK_IDL but uses the Python IDL implementation with tcp
-# with multiple remotes with only one remote reachable
-m4_define([OVSDB_CHECK_IDL_TCP_MULTIPLE_REMOTES_PYN],
-  [AT_SETUP([$1 - tcp])
-   AT_SKIP_IF([test $7 = no])
-   AT_KEYWORDS([ovsdb server idl positive Python with tcp socket $5])
-   AT_CHECK([ovsdb_start_idltest "ptcp:0:127.0.0.1"])
-   PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT])
-   WRONG_PORT_1=$((TCP_PORT + 101))
-   WRONG_PORT_2=$((TCP_PORT + 102))
-   remote=tcp:127.0.0.1:$WRONG_PORT_1,tcp:127.0.0.1:$TCP_PORT,tcp:127.0.0.1:$WRONG_PORT_2
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact tcp:127.0.0.1:$TCP_PORT $2], [0], [ignore], [ignore])])
-   AT_CHECK([$8 $srcdir/test-ovsdb.py  -t20 idl $srcdir/idltest.ovsschema $remote $3],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-m4_define([OVSDB_CHECK_IDL_TCP_MULTIPLE_REMOTES_PY],
-   [OVSDB_CHECK_IDL_TCP_MULTIPLE_REMOTES_PYN([$1 - Python2 (multiple remotes)], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON], [$PYTHON])
-    OVSDB_CHECK_IDL_TCP_MULTIPLE_REMOTES_PYN([$1 - Python3 (multiple remotes)], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON3], [$PYTHON3])])
-
-# same as OVSDB_CHECK_IDL but uses the Python IDL implementation with tcp6
-m4_define([OVSDB_CHECK_IDL_TCP6_PYN],
-  [AT_SETUP([$1 - tcp6])
-   AT_SKIP_IF([test $7 = no])
-   AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-   AT_SKIP_IF([test $HAVE_IPV6 = no])
-   AT_KEYWORDS([ovsdb server idl positive Python with tcp6 socket $5])
-   AT_CHECK([ovsdb_start_idltest "ptcp:0:[[::1]]"])
-   PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT])
-   echo "TCP_PORT=$TCP_PORT"
-
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact "tcp:[[::1]]:$TCP_PORT" $2], [0], [ignore], [ignore])])
-   AT_CHECK([$8 $srcdir/test-ovsdb.py  -t10 idl $srcdir/idltest.ovsschema tcp:[[::1]]:$TCP_PORT $3],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-m4_define([OVSDB_CHECK_IDL_TCP6_PY],
-   [OVSDB_CHECK_IDL_TCP6_PYN([$1 - Python2], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON2], [$PYTHON2])
-    OVSDB_CHECK_IDL_TCP6_PYN([$1 - Python3], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON3], [$PYTHON3])])
-
-m4_define([OVSDB_CHECK_IDL_TCP6_MULTIPLE_REMOTES_PYN],
-  [AT_SETUP([$1 - tcp6])
-   AT_SKIP_IF([test $7 = no])
-   AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-   AT_SKIP_IF([test $HAVE_IPV6 = no])
-   AT_KEYWORDS([ovsdb server idl positive Python with tcp6 socket $5])
-   AT_CHECK([ovsdb_start_idltest "ptcp:0:[[::1]]"])
-   PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT])
-   WRONG_PORT_1=$((TCP_PORT + 101))
-   WRONG_PORT_2=$((TCP_PORT + 102))
-   remote="tcp:[[::1]]:$WRONG_PORT_1,tcp:[[::1]]:$TCP_PORT,tcp:[[::1]]:$WRONG_PORT_2"
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact "tcp:[[::1]]:$TCP_PORT" $2], [0], [ignore], [ignore])])
-   AT_CHECK([$8 $srcdir/test-ovsdb.py  -t20 idl $srcdir/idltest.ovsschema $remote $3],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-m4_define([OVSDB_CHECK_IDL_TCP6_MULTIPLE_REMOTES_PY],
-   [OVSDB_CHECK_IDL_TCP6_MULTIPLE_REMOTES_PYN([$1 - Python2 (multiple remotes)], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON], [$PYTHON])
-    OVSDB_CHECK_IDL_TCP6_MULTIPLE_REMOTES_PYN([$1 - Python3 (multiple remotes)], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON3], [$PYTHON3])])
-
-# same as OVSDB_CHECK_IDL but uses the Python IDL implementation with SSL
-m4_define([OVSDB_CHECK_IDL_SSL_PYN],
-  [AT_SETUP([$1 - SSL])
-   AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
-   AT_SKIP_IF([test $7 = no])
-   $8 -c "import OpenSSL.SSL"
-   SSL_PRESENT=$?
-   AT_SKIP_IF([test $SSL_PRESENT != 0])
-   AT_KEYWORDS([ovsdb server idl positive Python with ssl socket $5])
-   AT_CHECK([ovsdb-tool create db $abs_srcdir/idltest.ovsschema],
-             [0], [stdout], [ignore])
-   PKIDIR=$abs_top_builddir/tests
-   AT_CHECK([ovsdb-server -vconsole:warn --log-file --detach --no-chdir \
-             --pidfile \
-             --private-key=$PKIDIR/testpki-privkey2.pem \
-             --certificate=$PKIDIR/testpki-cert2.pem \
-             --ca-cert=$PKIDIR/testpki-cacert.pem \
-             --remote=pssl:0:127.0.0.1 db])
-   on_exit 'kill `cat ovsdb-server.pid`'
-   PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT])
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client \
-                --private-key=$PKIDIR/testpki-privkey2.pem \
-                --certificate=$PKIDIR/testpki-cert2.pem \
-                --ca-cert=$PKIDIR/testpki-cacert.pem \
-                transact "ssl:127.0.0.1:$TCP_PORT" $2], [0], [ignore], [ignore])])
-   AT_CHECK([$8 $srcdir/test-ovsdb.py  -t10 idl $srcdir/idltest.ovsschema \
-             ssl:127.0.0.1:$TCP_PORT $PKIDIR/testpki-privkey.pem \
-             $PKIDIR/testpki-cert.pem $PKIDIR/testpki-cacert.pem $3],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-m4_define([OVSDB_CHECK_IDL_SSL_PY],
-   [OVSDB_CHECK_IDL_SSL_PYN([$1 - Python2], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON], [$PYTHON])
-    OVSDB_CHECK_IDL_SSL_PYN([$1 - Python3], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON3], [$PYTHON3])])
-
-m4_define([OVSDB_CHECK_IDL],
-  [OVSDB_CHECK_IDL_C($@)
-   OVSDB_CHECK_IDL_TCP_C($@)
-   OVSDB_CHECK_IDL_TCP6_C($@)
-   OVSDB_CHECK_IDL_PY($@)
-   OVSDB_CHECK_IDL_REGISTER_COLUMNS_PY($@)
-   OVSDB_CHECK_IDL_TCP_PY($@)
-   OVSDB_CHECK_IDL_TCP_MULTIPLE_REMOTES_PY($@)
-   OVSDB_CHECK_IDL_TCP6_PY($@)
-   OVSDB_CHECK_IDL_TCP6_MULTIPLE_REMOTES_PY($@)
-   OVSDB_CHECK_IDL_SSL_PY($@)])
-
-# This test uses the Python IDL implementation with passive tcp
-m4_define([OVSDB_CHECK_IDL_PASSIVE_TCP_PYN],
-  [AT_SETUP([$1 ptcp])
-   AT_SKIP_IF([test $7 = no])
-   AT_KEYWORDS([ovsdb server idl positive Python with tcp socket $5])
-   # find free TCP port
-   AT_CHECK([ovsdb_start_idltest "ptcp:0:127.0.0.1"])
-   PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT])
-   OVSDB_SERVER_SHUTDOWN
-   rm -f db
-
-   # start OVSDB server in passive mode
-   AT_CHECK([ovsdb_start_idltest "tcp:127.0.0.1:$TCP_PORT"])
-   AT_CHECK([$8 $srcdir/test-ovsdb.py -t10 idl_passive $srcdir/idltest.ovsschema ptcp:127.0.0.1:$TCP_PORT $3],
-      [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP
-   ])
-
-m4_define([OVSDB_CHECK_IDL_PASSIVE_TCP_PY],
-    [OVSDB_CHECK_IDL_PASSIVE_TCP_PYN([$1 - Python2], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON2], [$PYTHON2])
-    OVSDB_CHECK_IDL_PASSIVE_TCP_PYN([$1 - Python3], [$2], [$3], [$4], [$5], [$6],
-                        [$HAVE_PYTHON3], [$PYTHON3])])
-
-OVSDB_CHECK_IDL_PASSIVE_TCP_PY([simple passive idl, initially empty, select empty],
-  [],
-  [['["idltest",{"op":"select","table":"link1","where":[]}]']],
-  [[000: empty
-001: {"error":null,"result":[{"rows":[]}]}
-002: done
-]])
-
-OVSDB_CHECK_IDL([simple idl, initially empty, no ops],
-  [],
-  [],
-  [000: empty
-001: done
-])
-
-OVSDB_CHECK_IDL([simple idl, initially empty, various ops],
-  [],
-  [['["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0,
-               "b": true,
-               "s": "mystring",
-               "u": ["uuid", "84f5c8f5-ac76-4dbc-a24f-8860eb407fc1"],
-               "ia": ["set", [1, 2, 3]],
-               "ra": ["set", [-0.5]],
-               "ba": ["set", [true]],
-               "sa": ["set", ["abc", "def"]],
-               "ua": ["set", [["uuid", "69443985-7806-45e2-b35f-574a04e720f9"],
-                              ["uuid", "aad11ef0-816a-4b01-93e6-03b8b4256b98"]]]}},
-      {"op": "insert",
-       "table": "simple",
-       "row": {}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "simple",
-       "where": [],
-       "row": {"b": true}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "simple",
-       "where": [],
-       "row": {"r": 123.5}}]' \
-    '["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"i": -1,
-               "r": 125,
-               "b": false,
-               "s": "",
-               "ia": ["set", [1]],
-               "ra": ["set", [1.5]],
-               "ba": ["set", [false]],
-               "sa": ["set", []],
-               "ua": ["set", []]}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "simple",
-       "where": [["i", "<", 1]],
-       "row": {"s": "newstring"}}]' \
-    '["idltest",
-      {"op": "delete",
-       "table": "simple",
-       "where": [["i", "==", 0]]}]' \
-    'reconnect']],
-  [[000: empty
-001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]}
-002: i=0 r=0 b=false s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-002: i=1 r=2 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
-003: {"error":null,"result":[{"count":2}]}
-004: i=0 r=0 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: i=1 r=2 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
-005: {"error":null,"result":[{"count":2}]}
-006: i=0 r=123.5 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-006: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
-007: {"error":null,"result":[{"uuid":["uuid","<6>"]}]}
-008: i=-1 r=125 b=false s= u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-008: i=0 r=123.5 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-008: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
-009: {"error":null,"result":[{"count":2}]}
-010: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-010: i=0 r=123.5 b=true s=newstring u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-010: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
-011: {"error":null,"result":[{"count":1}]}
-012: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-012: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
-013: reconnect
-014: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-014: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
-015: done
-]])
-
-OVSDB_CHECK_IDL([simple idl, initially populated],
-  [['["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0,
-               "b": true,
-               "s": "mystring",
-               "u": ["uuid", "84f5c8f5-ac76-4dbc-a24f-8860eb407fc1"],
-               "ia": ["set", [1, 2, 3]],
-               "ra": ["set", [-0.5]],
-               "ba": ["set", [true]],
-               "sa": ["set", ["abc", "def"]],
-               "ua": ["set", [["uuid", "69443985-7806-45e2-b35f-574a04e720f9"],
-                              ["uuid", "aad11ef0-816a-4b01-93e6-03b8b4256b98"]]]}},
-      {"op": "insert",
-       "table": "simple",
-       "row": {}}]']],
-  [['["idltest",
-      {"op": "update",
-       "table": "simple",
-       "where": [],
-       "row": {"b": true}}]']],
-  [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-000: i=1 r=2 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<5>
-001: {"error":null,"result":[{"count":2}]}
-002: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-002: i=1 r=2 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<5>
-003: done
-]])
-
-OVSDB_CHECK_IDL([simple idl, writing via IDL],
-  [['["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0,
-               "b": true,
-               "s": "mystring",
-               "u": ["uuid", "84f5c8f5-ac76-4dbc-a24f-8860eb407fc1"],
-               "ia": ["set", [1, 2, 3]],
-               "ra": ["set", [-0.5]],
-               "ba": ["set", [true]],
-               "sa": ["set", ["abc", "def"]],
-               "ua": ["set", [["uuid", "69443985-7806-45e2-b35f-574a04e720f9"],
-                              ["uuid", "aad11ef0-816a-4b01-93e6-03b8b4256b98"]]]}},
-      {"op": "insert",
-       "table": "simple",
-       "row": {}}]']],
-  [['verify 0 b, verify 1 r, set 0 b 1, set 1 r 3.5' \
-    'insert 2, verify 2 i, verify 1 b, delete 1']],
-  [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-000: i=1 r=2 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<5>
-001: commit, status=success
-002: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-002: i=1 r=3.5 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<5>
-003: commit, status=success
-004: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: i=2 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<6>
-005: done
-]])
-
-OVSDB_CHECK_IDL([simple idl, writing via IDL with unicode],
-  [['["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"s": "(╯°□°)╯︵ ┻━┻"}}]']],
-  [['set 0 b 1, insert 1, set 1 s "¯\_(ツ)_/¯"']],
-  [[000: i=0 r=0 b=false s=(╯°□°)╯︵ ┻━┻ u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-001: commit, status=success
-002: i=0 r=0 b=true s=(╯°□°)╯︵ ┻━┻ u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-002: i=1 r=0 b=false s="¯\_(ツ)_/¯" u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
-003: done
-]])
-
-m4_define([OVSDB_CHECK_IDL_PYN_WITH_EXPOUT],
-  [AT_SETUP([$1])
-   AT_SKIP_IF([test $7 = no])
-   AT_KEYWORDS([ovsdb server idl positive Python $5])
-   AT_CHECK([ovsdb_start_idltest])
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore])])
-   AT_CHECK([$8 $srcdir/test-ovsdb.py  -t10 idl $srcdir/idltest.ovsschema unix:socket $3],
-            [0], [stdout], [ignore])
-   echo "$4" > expout
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [expout])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-m4_define([OVSDB_CHECK_IDL_PY_WITH_EXPOUT],
-   [OVSDB_CHECK_IDL_PYN_WITH_EXPOUT([$1 - Python2], [$2], [$3], [$4], [$5], [$6],
-                                    [$HAVE_PYTHON2], [$PYTHON2])
-    OVSDB_CHECK_IDL_PYN_WITH_EXPOUT([$1 - Python3], [$2], [$3], [$4], [$5], [$6],
-                                    [$HAVE_PYTHON3], [$PYTHON3])])
-
-OVSDB_CHECK_IDL_PY_WITH_EXPOUT([simple idl, writing large data via IDL with unicode],
-  [['["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"s": "'$(printf "测试超过四千零九十六个字节的中文字符串以使解码出现问题。%.0s" {1..50})'"}}]']],
-  [['set 0 b 1, insert 1, set 1 s '$(printf "测试超过四千零九十六个字节的中文字符串以使解码出现问题。%.0s" {1..100})'']],
-  [[000: i=0 r=0 b=false s=$(printf "测试超过四千零九十六个字节的中文字符串以使解码出现问题。%.0s" {1..50}) u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-001: commit, status=success
-002: i=0 r=0 b=true s=$(printf "测试超过四千零九十六个字节的中文字符串以使解码出现问题。%.0s" {1..50}) u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-002: i=1 r=0 b=false s=$(printf "测试超过四千零九十六个字节的中文字符串以使解码出现问题。%.0s" {1..100}) u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
-003: done]])
-
-OVSDB_CHECK_IDL([simple idl, handling verification failure],
-  [['["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0}},
-      {"op": "insert",
-       "table": "simple",
-       "row": {}}]']],
-  [['set 0 b 1' \
-    '+["idltest",
-       {"op": "update",
-        "table": "simple",
-        "where": [["i", "==", 1]],
-        "row": {"r": 5.0}}]' \
-    '+verify 1 r, set 1 r 3' \
-    'verify 1 r, set 1 r 3' \
-    ]],
-  [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-000: i=1 r=2 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
-001: commit, status=success
-002: {"error":null,"result":[{"count":1}]}
-003: commit, status=try again
-004: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: i=1 r=5 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
-005: commit, status=success
-006: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-006: i=1 r=3 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
-007: done
-]])
-
-OVSDB_CHECK_IDL([simple idl, increment operation],
-  [['["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {}}]']],
-  [['set 0 r 2.0, increment 0']],
-  [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-001: commit, status=success, increment=1
-002: i=1 r=2 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-003: done
-]])
-
-OVSDB_CHECK_IDL([simple idl, aborting],
-  [['["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {}}]']],
-  [['set 0 r 2.0, abort' \
-'+set 0 b 1']],
-  [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-001: commit, status=aborted
-002: commit, status=success
-003: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: done
-]])
-
-OVSDB_CHECK_IDL([simple idl, destroy without commit or abort],
-  [['["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {}}]']],
-  [['set 0 r 2.0, destroy' \
-'+set 0 b 1']],
-  [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-001: destroy
-002: commit, status=success
-003: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: done
-]])
-
-OVSDB_CHECK_IDL([simple idl, conditional, false condition],
-  [['["idltest",
-       {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0,
-               "b": true}}]']],
-  [['condition simple []' \
-    'condition simple [true]']],
-  [[000: change conditions
-001: empty
-002: change conditions
-003: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: done
-]])
-
-OVSDB_CHECK_IDL([simple idl, conditional, true condition],
-  [['["idltest",
-       {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0,
-               "b": true}}]']],
-  [['condition simple []' \
-    'condition simple [true]']],
-  [[000: change conditions
-001: empty
-002: change conditions
-003: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: done
-]])
-
-OVSDB_CHECK_IDL([simple idl, conditional, multiple clauses in condition],
-  [['["idltest",
-       {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0,
-               "b": true}},
-       {"op": "insert",
-       "table": "simple",
-       "row": {"i": 2,
-               "r": 3.0,
-               "b": true}}]']],
-  [['condition simple []' \
-    'condition simple [["i","==",1],["i","==",2]]']],
-  [[000: change conditions
-001: empty
-002: change conditions
-003: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-003: i=2 r=3 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
-004: done
-]])
-
-OVSDB_CHECK_IDL([simple idl, conditional, modify as insert due to condition],
-  [['["idltest",
-       {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0,
-               "b": true}}]']],
-  [['condition simple []' \
-    'condition simple [["i","==",1]]']],
-  [[000: change conditions
-001: empty
-002: change conditions
-003: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: done
-]])
-
-OVSDB_CHECK_IDL([simple idl, conditional, modify as delete due to condition],
-  [['["idltest",
-       {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0,
-               "b": true}}]']],
-  [['condition simple []' \
-    'condition simple [["i","==",1],["i","==",2]]' \
-    'condition simple [["i","==",2]]' \
-    '["idltest",
-       {"op": "insert",
-       "table": "simple",
-       "row": {"i": 2,
-               "r": 3.0,
-               "b": true}}]']],
-  [[000: change conditions
-001: empty
-002: change conditions
-003: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: change conditions
-005: empty
-006: {"error":null,"result":[{"uuid":["uuid","<2>"]}]}
-007: i=2 r=3 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
-008: done
-]])
-
-OVSDB_CHECK_IDL([simple idl, conditional, multiple tables],
-  [['["idltest",
-       {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0,
-               "b": true}},
-       {"op": "insert",
-       "table": "link1",
-       "row": {"i": 0, "k": ["named-uuid", "self"]},
-       "uuid-name": "self"},
-        {"op": "insert",
-       "table": "link2",
-       "row": {"i": 2},
-       "uuid-name": "row0"}]']],
-  [['condition simple [];link1 [];link2 []' \
-    'condition simple [["i","==",1]]' \
-    'condition link1 [["i","==",0]]' \
-    'condition link2 [["i","==",3]]' \
-    '+["idltest",
-       {"op": "insert",
-       "table": "link2",
-       "row": {"i": 3},
-        "uuid-name": "row0"}]']],
-  [[000: change conditions
-001: empty
-002: change conditions
-003: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: change conditions
-005: i=0 k=0 ka=[] l2= uuid=<2>
-005: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-006: change conditions
-007: {"error":null,"result":[{"uuid":["uuid","<3>"]}]}
-008: i=0 k=0 ka=[] l2= uuid=<2>
-008: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-008: i=3 l1= uuid=<3>
-009: done
-]])
-
-OVSDB_CHECK_IDL([self-linking idl, consistent ops],
-  [],
-  [['["idltest",
-      {"op": "insert",
-       "table": "link1",
-       "row": {"i": 0, "k": ["named-uuid", "self"]},
-       "uuid-name": "self"}]' \
-    '["idltest",
-      {"op": "insert",
-       "table": "link1",
-       "row": {"i": 1, "k": ["named-uuid", "row2"]},
-       "uuid-name": "row1"},
-      {"op": "insert",
-       "table": "link1",
-       "row": {"i": 2, "k": ["named-uuid", "row1"]},
-       "uuid-name": "row2"}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "link1",
-       "where": [["i", "==", 1]],
-       "row": {"k": ["uuid", "#1#"]}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "link1",
-       "where": [],
-       "row": {"k": ["uuid", "#0#"]}}]']],
-  [[000: empty
-001: {"error":null,"result":[{"uuid":["uuid","<0>"]}]}
-002: i=0 k=0 ka=[] l2= uuid=<0>
-003: {"error":null,"result":[{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]}]}
-004: i=0 k=0 ka=[] l2= uuid=<0>
-004: i=1 k=2 ka=[] l2= uuid=<1>
-004: i=2 k=1 ka=[] l2= uuid=<2>
-005: {"error":null,"result":[{"count":1}]}
-006: i=0 k=0 ka=[] l2= uuid=<0>
-006: i=1 k=1 ka=[] l2= uuid=<1>
-006: i=2 k=1 ka=[] l2= uuid=<2>
-007: {"error":null,"result":[{"count":3}]}
-008: i=0 k=0 ka=[] l2= uuid=<0>
-008: i=1 k=0 ka=[] l2= uuid=<1>
-008: i=2 k=0 ka=[] l2= uuid=<2>
-009: done
-]])
-
-OVSDB_CHECK_IDL([self-linking idl, inconsistent ops],
-  [],
-  [['["idltest",
-      {"op": "insert",
-       "table": "link1",
-       "row": {"i": 0, "k": ["uuid", "cf197cc5-c8c9-42f5-82d5-c71a9f2cb96b"]}}]' \
-    '+["idltest",
-      {"op": "insert",
-       "table": "link1",
-       "uuid-name": "one",
-       "row": {"i": 1, "k": ["named-uuid", "one"]}},
-      {"op": "insert",
-       "table": "link1",
-       "row": {"i": 2, "k": ["named-uuid", "one"]}}]' \
-     '["idltest",
-      {"op": "update",
-       "table": "link1",
-       "where": [],
-       "row": {"k": ["uuid", "c2fca39a-e69a-42a4-9c56-5eca85839ce9"]}}]' \
-     '+["idltest",
-      {"op": "delete",
-       "table": "link1",
-       "where": [["_uuid", "==", ["uuid", "#1#"]]]}]' \
-     '+["idltest",
-      {"op": "delete",
-       "table": "link1",
-       "where": [["_uuid", "==", ["uuid", "#2#"]]]}]' \
-     '["idltest",
-      {"op": "delete",
-       "table": "link1",
-       "where": []}]' \
-]],
-  [[000: empty
-001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"details":"Table link1 column k row <0> references nonexistent row <1> in table link1.","error":"referential integrity violation"}]}
-002: {"error":null,"result":[{"uuid":["uuid","<2>"]},{"uuid":["uuid","<3>"]}]}
-003: i=1 k=1 ka=[] l2= uuid=<2>
-003: i=2 k=1 ka=[] l2= uuid=<3>
-004: {"error":null,"result":[{"count":2},{"details":"Table link1 column k row <x> references nonexistent row <4> in table link1.","error":"referential integrity violation"}]}
-005: {"error":null,"result":[{"count":1},{"details":"cannot delete link1 row <2> because of 1 remaining reference(s)","error":"referential integrity violation"}]}
-006: {"error":null,"result":[{"count":1}]}
-007: i=1 k=1 ka=[] l2= uuid=<2>
-008: {"error":null,"result":[{"count":1}]}
-009: empty
-010: done
-]],
-  [],
-  [[sed -e '/004:/s/row <[23]> references/row <x> references/']])
-
-OVSDB_CHECK_IDL([self-linking idl, sets],
-  [],
-  [['["idltest",
-      {"op": "insert",
-       "table": "link1",
-       "row": {"i": 0, "k": ["named-uuid", "i0"], "ka": ["set", [["named-uuid", "i0"]]]},
-       "uuid-name": "i0"},
-      {"op": "insert",
-       "table": "link1",
-       "row": {"i": 1, "k": ["named-uuid", "i0"], "ka": ["set", [["named-uuid", "i1"]]]},
-       "uuid-name": "i1"},
-      {"op": "insert",
-       "table": "link1",
-       "row": {"i": 2, "k": ["named-uuid", "i0"], "ka": ["set", [["named-uuid", "i2"]]]},
-       "uuid-name": "i2"},
-      {"op": "insert",
-       "table": "link1",
-       "row": {"i": 3, "k": ["named-uuid", "i0"], "ka": ["set", [["named-uuid", "i3"]]]},
-       "uuid-name": "i3"}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "link1",
-       "where": [],
-       "row": {"ka": ["set", [["uuid", "#0#"], ["uuid", "#1#"], ["uuid", "#2#"], ["uuid", "#3#"]]]}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "link1",
-       "where": [["i", "==", 2]],
-       "row": {"ka": ["set", [["uuid", "#0#"], ["uuid", "88702e78-845b-4a6e-ad08-cf68922ae84a"], ["uuid", "#2#"]]]}}]' \
-    '+["idltest",
-      {"op": "delete",
-       "table": "link1",
-       "where": []}]']],
-  [[000: empty
-001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]},{"uuid":["uuid","<3>"]}]}
-002: i=0 k=0 ka=[0] l2= uuid=<0>
-002: i=1 k=0 ka=[1] l2= uuid=<1>
-002: i=2 k=0 ka=[2] l2= uuid=<2>
-002: i=3 k=0 ka=[3] l2= uuid=<3>
-003: {"error":null,"result":[{"count":4}]}
-004: i=0 k=0 ka=[0 1 2 3] l2= uuid=<0>
-004: i=1 k=0 ka=[0 1 2 3] l2= uuid=<1>
-004: i=2 k=0 ka=[0 1 2 3] l2= uuid=<2>
-004: i=3 k=0 ka=[0 1 2 3] l2= uuid=<3>
-005: {"error":null,"result":[{"count":1},{"details":"Table link1 column ka row <2> references nonexistent row <4> in table link1.","error":"referential integrity violation"}]}
-006: {"error":null,"result":[{"count":4}]}
-007: empty
-008: done
-]])
-
-OVSDB_CHECK_IDL([external-linking idl, consistent ops],
-  [],
-  [['["idltest",
-      {"op": "insert",
-       "table": "link2",
-       "row": {"i": 0},
-       "uuid-name": "row0"},
-      {"op": "insert",
-       "table": "link1",
-       "row": {"i": 1, "k": ["named-uuid", "row1"], "l2": ["set", [["named-uuid", "row0"]]]},
-       "uuid-name": "row1"}]']],
-  [[000: empty
-001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]}
-002: i=0 l1= uuid=<0>
-002: i=1 k=1 ka=[] l2=0 uuid=<1>
-003: done
-]])
-
-OVSDB_CHECK_IDL([singleton idl, constraints],
-  [],
-  [['["idltest",
-      {"op": "insert",
-       "table": "singleton",
-       "row": {"name": "foo"}}]' \
-    '["idltest",
-      {"op": "insert",
-       "table": "singleton",
-       "row": {"name": "bar"}}]' \
-    '+["idltest",
-      {"op": "delete",
-       "table": "singleton",
-       "where": [["_uuid", "==", ["uuid", "#0#"]]]},
-      {"op": "insert",
-       "table": "singleton",
-       "row": {"name": "bar"}}]']],
-  [[000: empty
-001: {"error":null,"result":[{"uuid":["uuid","<0>"]}]}
-002: name=foo uuid=<0>
-003: {"error":null,"result":[{"uuid":["uuid","<1>"]},{"details":"transaction causes \"singleton\" table to contain 2 rows, greater than the schema-defined limit of 1 row(s)","error":"constraint violation"}]}
-004: {"error":null,"result":[{"count":1},{"uuid":["uuid","<2>"]}]}
-005: name=bar uuid=<2>
-006: done
-]])
-
-OVSDB_CHECK_IDL_PY([external-linking idl, insert ops],
-  [],
-  [['linktest']],
-  [[000: empty
-001: commit, status=success
-002: i=1 k=1 ka=[1] l2= uuid=<0>
-002: i=2 k=1 ka=[1 2] l2= uuid=<1>
-003: done
-]])
-
-OVSDB_CHECK_IDL_PY([getattr idl, insert ops],
-  [],
-  [['getattrtest']],
-  [[000: empty
-001: commit, status=success
-002: i=2 k=2 ka=[] l2= uuid=<0>
-003: done
-]])
-
-OVSDB_CHECK_IDL_PY([row-from-json idl, whats this],
-  [['["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1}},
-      {"op": "insert",
-       "table": "simple",
-       "row": {}}]']],
-  [['notifytest insert 2, notifytest set 1 b 1, notifytest delete 0']],
-  [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-000: i=1 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
-001: commit, status=success, events=create|2|None, delete|0|None, update|1|b
-002: i=1 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
-002: i=2 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
-003: done
-]])
-
-AT_SETUP([idl handling of missing tables and columns - C])
-AT_KEYWORDS([ovsdb server idl positive])
-
-# idltest2.ovsschema is the same as idltest.ovsschema, except that
-# table link2 and column l2 have been deleted.  But the IDL still
-# expects them to be there, so this test checks that it properly
-# tolerates them being missing.
-AT_CHECK([ovsdb_start_idltest "" "$abs_srcdir/idltest2.ovsschema"])
-AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 idl unix:socket ['["idltest",
-      {"op": "insert",
-       "table": "link1",
-       "row": {"i": 0, "k": ["named-uuid", "self"]},
-       "uuid-name": "self"}]' \
-    '["idltest",
-      {"op": "insert",
-       "table": "link1",
-       "row": {"i": 1, "k": ["named-uuid", "row2"]},
-       "uuid-name": "row1"},
-      {"op": "insert",
-       "table": "link1",
-       "row": {"i": 2, "k": ["named-uuid", "row1"]},
-       "uuid-name": "row2"}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "link1",
-       "where": [["i", "==", 1]],
-       "row": {"k": ["uuid", "#1#"]}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "link1",
-       "where": [],
-       "row": {"k": ["uuid", "#0#"]}}]']],
-         [0], [stdout], [stderr])
-AT_CHECK([sort stdout | uuidfilt], [0],
-    [[000: empty
-001: {"error":null,"result":[{"uuid":["uuid","<0>"]}]}
-002: i=0 k=0 ka=[] l2= uuid=<0>
-003: {"error":null,"result":[{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]}]}
-004: i=0 k=0 ka=[] l2= uuid=<0>
-004: i=1 k=2 ka=[] l2= uuid=<1>
-004: i=2 k=1 ka=[] l2= uuid=<2>
-005: {"error":null,"result":[{"count":1}]}
-006: i=0 k=0 ka=[] l2= uuid=<0>
-006: i=1 k=1 ka=[] l2= uuid=<1>
-006: i=2 k=1 ka=[] l2= uuid=<2>
-007: {"error":null,"result":[{"count":3}]}
-008: i=0 k=0 ka=[] l2= uuid=<0>
-008: i=1 k=0 ka=[] l2= uuid=<1>
-008: i=2 k=0 ka=[] l2= uuid=<2>
-009: done
-]])
-
-# Check that ovsdb-idl figured out that table link2 and column l2 are missing.
-AT_CHECK([grep ovsdb_idl stderr | sort], [0], [dnl
-test-ovsdb|ovsdb_idl|idltest database lacks link2 table (database needs upgrade?)
-test-ovsdb|ovsdb_idl|idltest database lacks singleton table (database needs upgrade?)
-test-ovsdb|ovsdb_idl|link1 table in idltest database lacks l2 column (database needs upgrade?)
-])
-
-# Check that ovsdb-idl sent on "monitor" request and that it didn't
-# mention that table or column, and (for paranoia) that it did mention another
-# table and column.
-AT_CHECK([grep -c '"monitor\|monitor_cond"' stderr], [0], [2
-])
-AT_CHECK([grep '"monitor\|monitor_cond"' stderr | grep link2], [1])
-AT_CHECK([grep '"monitor\|monitor_cond"' stderr | grep l2], [1])
-AT_CHECK([grep '"monitor\|monitor_cond"' stderr | grep -c '"link1"'], [0], [1
-])
-AT_CHECK([grep '"monitor\|monitor_cond"' stderr | grep -c '"ua"'], [0], [1
-])
-OVSDB_SERVER_SHUTDOWN
-AT_CLEANUP
-
-m4_define([OVSDB_CHECK_IDL_FETCH_COLUMNS_PYN],
-  [AT_SETUP([$1 fetch])
-   AT_SKIP_IF([test $8 = no])
-   AT_KEYWORDS([ovsdb server idl positive Python increment fetch $6])
-   AT_CHECK([ovsdb_start_idltest])
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore])])
-   AT_CHECK([$9 $srcdir/test-ovsdb.py  -t10 idl $srcdir/idltest.ovsschema unix:socket [$3] $4],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$7],,, [[| $7]]),
-            [0], [$5])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-m4_define([OVSDB_CHECK_IDL_FETCH_COLUMNS_PY],
-    [OVSDB_CHECK_IDL_FETCH_COLUMNS_PYN([$1 - Python2], [$2], [$3], [$4], [$5], [$6], [$7],
-                        [$HAVE_PYTHON2], [$PYTHON2])
-    OVSDB_CHECK_IDL_FETCH_COLUMNS_PYN([$1 - Python3], [$2], [$3], [$4], [$5], [$6], [$7],
-                        [$HAVE_PYTHON3], [$PYTHON3])])
-
-m4_define([OVSDB_CHECK_IDL_FETCH_COLUMNS],
-   [OVSDB_CHECK_IDL_FETCH_COLUMNS_PY($@)])
-
-OVSDB_CHECK_IDL_FETCH_COLUMNS([simple idl, initially populated],
-  [['["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0,
-               "b": true,
-               "s": "mystring",
-               "u": ["uuid", "84f5c8f5-ac76-4dbc-a24f-8860eb407fc1"],
-               "ia": ["set", [1, 2, 3]],
-               "ra": ["set", [-0.5]],
-               "ba": ["set", [true]],
-               "sa": ["set", ["abc", "def"]],
-               "ua": ["set", [["uuid", "69443985-7806-45e2-b35f-574a04e720f9"],
-                              ["uuid", "aad11ef0-816a-4b01-93e6-03b8b4256b98"]]]}},
-      {"op": "insert",
-       "table": "simple",
-       "row": {}}]']],
-  [?simple:i,r!],
-  ['fetch 0 r'],
-  [[000: i=0 uuid=<0>
-000: i=1 uuid=<1>
-001: commit, status=success
-002: i=0 r=0 uuid=<0>
-002: i=1 uuid=<1>
-003: done
-]])
-
-m4_define([OVSDB_CHECK_IDL_WO_MONITOR_COND_PYN],
-  [AT_SETUP([$1])
-   AT_SKIP_IF([test $6 = no])
-   AT_KEYWORDS([ovsdb server idl Python monitor $4])
-   AT_CHECK([ovsdb_start_idltest])
-   AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/disable-monitor-cond])
-   AT_CHECK([$7 $srcdir/test-ovsdb.py  -t10 idl $srcdir/idltest.ovsschema unix:socket $2],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$5],,, [[| $5]]),
-            [0], [$3])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-m4_define([OVSDB_CHECK_IDL_WO_MONITOR_COND_PY],
-    [OVSDB_CHECK_IDL_WO_MONITOR_COND_PYN([$1 - Python2], [$2], [$3], [$4], [$5],
-                        [$HAVE_PYTHON2], [$PYTHON2])
-    OVSDB_CHECK_IDL_WO_MONITOR_COND_PYN([$1 - Python3], [$2], [$3], [$4], [$5],
-                        [$HAVE_PYTHON3], [$PYTHON3])])
-
-
-m4_define([OVSDB_CHECK_IDL_WO_MONITOR_COND],
-   [OVSDB_CHECK_IDL_WO_MONITOR_COND_PY($@)])
-
-
-OVSDB_CHECK_IDL_WO_MONITOR_COND([simple idl disable monitor-cond],
-  [['["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0,
-               "b": true,
-               "s": "mystring",
-               "u": ["uuid", "84f5c8f5-ac76-4dbc-a24f-8860eb407fc1"],
-               "ia": ["set", [1, 2, 3]],
-               "ra": ["set", [-0.5]],
-               "ba": ["set", [true]],
-               "sa": ["set", ["abc", "def"]],
-               "ua": ["set", [["uuid", "69443985-7806-45e2-b35f-574a04e720f9"],
-                              ["uuid", "aad11ef0-816a-4b01-93e6-03b8b4256b98"]]]}},
-      {"op": "insert",
-       "table": "simple",
-       "row": {}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "simple",
-       "where": [],
-       "row": {"b": true}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "simple",
-       "where": [],
-       "row": {"r": 123.5}}]' \
-    '["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"i": -1,
-               "r": 125,
-               "b": false,
-               "s": "",
-               "ia": ["set", [1]],
-               "ra": ["set", [1.5]],
-               "ba": ["set", [false]],
-               "sa": ["set", []],
-               "ua": ["set", []]}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "simple",
-       "where": [["i", "<", 1]],
-       "row": {"s": "newstring"}}]' \
-    '["idltest",
-      {"op": "delete",
-       "table": "simple",
-       "where": [["i", "==", 0]]}]' \
-    'reconnect']],
-  [[000: empty
-001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]}
-002: i=0 r=0 b=false s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-002: i=1 r=2 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
-003: {"error":null,"result":[{"count":2}]}
-004: i=0 r=0 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: i=1 r=2 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
-005: {"error":null,"result":[{"count":2}]}
-006: i=0 r=123.5 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-006: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
-007: {"error":null,"result":[{"uuid":["uuid","<6>"]}]}
-008: i=-1 r=125 b=false s= u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-008: i=0 r=123.5 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-008: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
-009: {"error":null,"result":[{"count":2}]}
-010: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-010: i=0 r=123.5 b=true s=newstring u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-010: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
-011: {"error":null,"result":[{"count":1}]}
-012: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-012: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
-013: reconnect
-014: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-014: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
-015: done
-]])
-
-m4_define([OVSDB_CHECK_IDL_TRACK_C],
-  [AT_SETUP([$1 - C])
-   AT_KEYWORDS([ovsdb server idl tracking positive $5])
-   AT_CHECK([ovsdb_start_idltest])
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore])])
-   AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 -c idl unix:socket $3],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-m4_define([OVSDB_CHECK_IDL_TRACK],
-  [OVSDB_CHECK_IDL_TRACK_C($@)])
-
-OVSDB_CHECK_IDL_TRACK([track, simple idl, initially populated],
-  [['["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0,
-               "b": true,
-               "s": "mystring",
-               "u": ["uuid", "84f5c8f5-ac76-4dbc-a24f-8860eb407fc1"],
-               "ia": ["set", [1, 2, 3]],
-               "ra": ["set", [-0.5]],
-               "ba": ["set", [true]],
-               "sa": ["set", ["abc", "def"]],
-               "ua": ["set", [["uuid", "69443985-7806-45e2-b35f-574a04e720f9"],
-                              ["uuid", "aad11ef0-816a-4b01-93e6-03b8b4256b98"]]]}},
-      {"op": "insert",
-       "table": "simple",
-       "row": {}}]']],
-  [['["idltest",
-      {"op": "update",
-       "table": "simple",
-       "where": [],
-       "row": {"b": true}}]']],
-  [[000: i=1 r=2 b=true s=mystring u=<0> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<1> <2>] uuid=<3>
-000: updated columns: b ba i ia r ra s sa u ua
-001: {"error":null,"result":[{"count":2}]}
-002: i=0 r=0 b=true s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<5>
-002: i=1 r=2 b=true s=mystring u=<0> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<1> <2>] uuid=<3>
-002: updated columns: b
-003: done
-]])
-
-OVSDB_CHECK_IDL_TRACK([track, simple idl, initially empty, various ops],
-  [],
-  [['["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0,
-               "b": true,
-               "s": "mystring",
-               "u": ["uuid", "84f5c8f5-ac76-4dbc-a24f-8860eb407fc1"],
-               "ia": ["set", [1, 2, 3]],
-               "ra": ["set", [-0.5]],
-               "ba": ["set", [true]],
-               "sa": ["set", ["abc", "def"]],
-               "ua": ["set", [["uuid", "69443985-7806-45e2-b35f-574a04e720f9"],
-                              ["uuid", "aad11ef0-816a-4b01-93e6-03b8b4256b98"]]]}},
-      {"op": "insert",
-       "table": "simple",
-       "row": {}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "simple",
-       "where": [],
-       "row": {"b": true}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "simple",
-       "where": [],
-       "row": {"r": 123.5}}]' \
-    '["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"i": -1,
-               "r": 125,
-               "b": false,
-               "s": "",
-               "ia": ["set", [1]],
-               "ra": ["set", [1.5]],
-               "ba": ["set", [false]],
-               "sa": ["set", []],
-               "ua": ["set", []]}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "simple",
-       "where": [["i", "<", 1]],
-       "row": {"s": "newstring"}}]' \
-    '["idltest",
-      {"op": "delete",
-       "table": "simple",
-       "where": [["i", "==", 0]]}]' \
-    'reconnect']],
-  [[000: empty
-001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]}
-002: i=1 r=2 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<0>
-002: updated columns: b ba i ia r ra s sa u ua
-003: {"error":null,"result":[{"count":2}]}
-004: i=0 r=0 b=true s= u=<5> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: updated columns: b
-005: {"error":null,"result":[{"count":2}]}
-006: i=0 r=123.5 b=true s= u=<5> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-006: i=1 r=123.5 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<0>
-006: updated columns: r
-006: updated columns: r
-007: {"error":null,"result":[{"uuid":["uuid","<6>"]}]}
-008: i=-1 r=125 b=false s= u=<5> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-008: updated columns: ba i ia r ra
-009: {"error":null,"result":[{"count":2}]}
-010: i=-1 r=125 b=false s=newstring u=<5> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-010: i=0 r=123.5 b=true s=newstring u=<5> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-010: updated columns: s
-010: updated columns: s
-011: {"error":null,"result":[{"count":1}]}
-012: ##deleted## uuid=<1>
-013: reconnect
-014: i=-1 r=125 b=false s=newstring u=<5> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-014: i=1 r=123.5 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<0>
-014: updated columns: b ba i ia r ra s sa u ua
-014: updated columns: ba i ia r ra s
-015: done
-]])
-
-m4_define([OVSDB_CHECK_IDL_PARTIAL_UPDATE_MAP_COLUMN],
-  [AT_SETUP([$1 - C])
-   AT_KEYWORDS([ovsdb server idl partial update map column positive $5])
-   AT_CHECK([ovsdb_start_idltest])
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore])])
-   AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 -c idl-partial-update-map-column unix:socket $3],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-OVSDB_CHECK_IDL_PARTIAL_UPDATE_MAP_COLUMN([map, simple2 idl-partial-update-map-column, initially populated],
-[['["idltest", {"op":"insert", "table":"simple2",
-                "row":{"name":"myString1","smap":["map",[["key1","value1"],["key2","value2"]]]} }]']
-],
-[],
-[[000: Getting records
-001: name=myString1 smap=[[key1 : value1],[key2 : value2]] imap=[]
-002: After insert element
-003: name=String2 smap=[[key1 : myList1],[key2 : value2]] imap=[[3 : myids2]]
-004: After insert duplicated element
-005: name=String2 smap=[[key1 : myList1],[key2 : value2]] imap=[[3 : myids2]]
-006: After delete element
-007: name=String2 smap=[[key2 : value2]] imap=[[3 : myids2]]
-008: After trying to delete a deleted element
-009: name=String2 smap=[[key2 : value2]] imap=[[3 : myids2]]
-010: End test
-]])
-
-OVSDB_CHECK_IDL_PY([partial-map idl],
-[['["idltest", {"op":"insert", "table":"simple2",
-                "row":{"name":"myString1","smap":["map",[["key1","value1"],["key2","value2"]]]} }]']
-],
-  [?simple2:name,smap,imap 'partialmapinsertelement' 'partialmapinsertmultipleelements' 'partialmapdelelements' 'partialmapmutatenew'],
-[[000: name=myString1 smap=[(key1 value1) (key2 value2)] imap=[]
-001: commit, status=success
-002: name=String2 smap=[(key1 myList1) (key2 value2)] imap=[(3 myids2)]
-003: commit, status=success
-004: name=String2 smap=[(key1 myList1) (key2 myList2) (key3 myList3) (key4 myList4)] imap=[(3 myids2)]
-005: commit, status=success
-006: name=String2 smap=[(key2 myList2)] imap=[(3 myids2)]
-007: commit, status=success
-008: name=String2 smap=[(key2 myList2)] imap=[(3 myids2)]
-008: name=String2New smap=[(key1 newList1) (key2 newList2)] imap=[]
-009: done
-]])
-
-m4_define([OVSDB_CHECK_IDL_PARTIAL_UPDATE_SET_COLUMN],
-  [AT_SETUP([$1 - C])
-   AT_KEYWORDS([ovsdb server idl partial update set column positive $5])
-   AT_CHECK([ovsdb_start_idltest])
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore])])
-   AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 -c idl-partial-update-set-column unix:socket $3],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-OVSDB_CHECK_IDL_PARTIAL_UPDATE_SET_COLUMN([set, simple3 idl-partial-update-set-column, initially populated],
-[['["idltest", {"op":"insert", "table":"simple3",
-                "row":{"name":"mySet1","uset":["set", [[ "uuid", "0005b872-f9e5-43be-ae02-3184b9680e75" ], [ "uuid", "000d2f6a-76af-412f-b59d-e7bcd3e84eff" ]]]} }]']
-],
-[],
-[[000: Getting records
-001: name=mySet1 uset=[[<0>],[<1>]] uref=[]
-002: After rename+add new value
-003: name=String2 uset=[[<0>],[<1>],[<2>]] uref=[]
-004: After add new value
-005: name=String2 uset=[[<0>],[<1>],[<2>],[<3>]] uref=[]
-006: After delete value
-007: name=String2 uset=[[<0>],[<1>],[<3>]] uref=[]
-008: After trying to delete a deleted value
-009: name=String2 uset=[[<0>],[<1>],[<3>]] uref=[]
-010: After add to other table + set of strong ref
-011: name=String2 uset=[[<0>],[<1>],[<3>]] uref=[[<4>]]
-012: End test
-]])
-
-OVSDB_CHECK_IDL_PY([partial-set idl],
-[['["idltest", {"op":"insert", "table":"simple3", "uuid-name":"newrow",
-                    "row":{"name":"mySet1","uset":["set", [[ "uuid", "0005b872-f9e5-43be-ae02-3184b9680e75" ]]]} },
-               {"op":"insert", "table":"simple4", "row":{"name":"seed"}},
-               {"op":"mutate", "table":"simple3", "where":[["_uuid", "==", ["named-uuid", "newrow"]]],
-                    "mutations": [["uset", "insert", ["set", [["uuid", "000d2f6a-76af-412f-b59d-e7bcd3e84eff"]]]]]}]']
-],
-  ['partialrenamesetadd' 'partialduplicateadd' 'partialsetdel' 'partialsetref' 'partialsetoverrideops' 'partialsetadddelete' 'partialsetmutatenew'],
-[[000: name=mySet1 uset=[<0> <1>]
-001: commit, status=success
-002: name=String2 uset=[<0> <1> <2>]
-003: commit, status=success
-004: name=String2 uset=[<0> <1> <2> <3>]
-005: commit, status=success
-006: name=String2 uset=[<0> <1> <3>]
-007: commit, status=success
-008: name=String2 uset=[<0> <1> <3>]
-009: commit, status=success
-010: name=String2 uset=[<3>]
-011: commit, status=success
-012: name=String2 uset=[<4> <5>]
-013: commit, status=success
-014: name=String2 uset=[<4> <5>]
-014: name=String3 uset=[<6>]
-015: done
-]])
-
-m4_define([OVSDB_CHECK_IDL_NOTIFY_PYN],
-  [OVSDB_CHECK_IDL_PYN([$1], [], [$2], [$3], [notify $4], [$5], [$6], [$7])])
-
-m4_define([OVSDB_CHECK_IDL_NOTIFY_PY],
-    [OVSDB_CHECK_IDL_NOTIFY_PYN([$1 - Python2], [$2], [$3], [$4], [$5],
-                        [$HAVE_PYTHON2], [$PYTHON2])
-    OVSDB_CHECK_IDL_NOTIFY_PYN([$1 - Python3], [$2], [$3], [$4], [$5],
-                        [$HAVE_PYTHON3], [$PYTHON3])])
-
-# This test uses the Python IDL implementation with ssl
-m4_define([OVSDB_CHECK_IDL_NOTIFY_SSL_PYN],
-  [OVSDB_CHECK_IDL_SSL_PYN([$1], [], [$2], [$3], [notify $4], [$5], [$6], [$7])])
-
-m4_define([OVSDB_CHECK_IDL_NOTIFY_SSL_PY],
-    [OVSDB_CHECK_IDL_NOTIFY_SSL_PYN([$1 - Python2], [$2], [$3], [$4], [$5],
-                        [$HAVE_PYTHON2], [$PYTHON2])
-    OVSDB_CHECK_IDL_NOTIFY_SSL_PYN([$1 - Python3], [$2], [$3], [$4], [$5],
-                        [$HAVE_PYTHON3], [$PYTHON3])])
-
-m4_define([OVSDB_CHECK_IDL_NOTIFY],
-   [OVSDB_CHECK_IDL_NOTIFY_PY($@)
-    OVSDB_CHECK_IDL_NOTIFY_SSL_PY($@)])
-
-OVSDB_CHECK_IDL_NOTIFY([simple idl verify notify],
-  [['track-notify' \
-    '["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"i": 1,
-               "r": 2.0,
-               "b": true,
-               "s": "mystring",
-               "u": ["uuid", "84f5c8f5-ac76-4dbc-a24f-8860eb407fc1"],
-               "ia": ["set", [1, 2, 3]],
-               "ra": ["set", [-0.5]],
-               "ba": ["set", [true]],
-               "sa": ["set", ["abc", "def"]],
-               "ua": ["set", [["uuid", "69443985-7806-45e2-b35f-574a04e720f9"],
-                              ["uuid", "aad11ef0-816a-4b01-93e6-03b8b4256b98"]]]}},
-      {"op": "insert",
-       "table": "simple",
-       "row": {}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "simple",
-       "where": [],
-       "row": {"b": false}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "simple",
-       "where": [],
-       "row": {"r": 123.5}}]' \
-    '["idltest",
-      {"op": "insert",
-       "table": "simple",
-       "row": {"i": -1,
-               "r": 125,
-               "b": false,
-               "s": "",
-               "ia": ["set", [1]],
-               "ra": ["set", [1.5]],
-               "ba": ["set", [false]],
-               "sa": ["set", []],
-               "ua": ["set", []]}}]' \
-    '["idltest",
-      {"op": "update",
-       "table": "simple",
-       "where": [["i", "<", 1]],
-       "row": {"s": "newstring"}}]' \
-    '["idltest",
-      {"op": "delete",
-       "table": "simple",
-       "where": [["i", "==", 0]]}]' \
-    'reconnect']],
-  [[000: empty
-000: event:create, row={uuid=<0>}, updates=None
-000: event:create, row={uuid=<1>}, updates=None
-001: {"error":null,"result":[{"uuid":["uuid","<2>"]},{"uuid":["uuid","<3>"]}]}
-002: event:create, row={i=0 r=0 b=false s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>}, updates=None
-002: event:create, row={i=1 r=2 b=true s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>}, updates=None
-002: i=0 r=0 b=false s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
-002: i=1 r=2 b=true s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>
-003: {"error":null,"result":[{"count":2}]}
-004: event:update, row={i=1 r=2 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>}, updates={b=true uuid=<2>}
-004: i=0 r=0 b=false s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
-004: i=1 r=2 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>
-005: {"error":null,"result":[{"count":2}]}
-006: event:update, row={i=0 r=123.5 b=false s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>}, updates={r=0 uuid=<3>}
-006: event:update, row={i=1 r=123.5 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>}, updates={r=2 uuid=<2>}
-006: i=0 r=123.5 b=false s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
-006: i=1 r=123.5 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>
-007: {"error":null,"result":[{"uuid":["uuid","<8>"]}]}
-008: event:create, row={i=-1 r=125 b=false s= u=<4> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<8>}, updates=None
-008: i=-1 r=125 b=false s= u=<4> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<8>
-008: i=0 r=123.5 b=false s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
-008: i=1 r=123.5 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>
-009: {"error":null,"result":[{"count":2}]}
-010: event:update, row={i=-1 r=125 b=false s=newstring u=<4> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<8>}, updates={s= uuid=<8>}
-010: event:update, row={i=0 r=123.5 b=false s=newstring u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>}, updates={s= uuid=<3>}
-010: i=-1 r=125 b=false s=newstring u=<4> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<8>
-010: i=0 r=123.5 b=false s=newstring u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
-010: i=1 r=123.5 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>
-011: {"error":null,"result":[{"count":1}]}
-012: event:delete, row={i=0 r=123.5 b=false s=newstring u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>}, updates=None
-012: i=-1 r=125 b=false s=newstring u=<4> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<8>
-012: i=1 r=123.5 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>
-013: reconnect
-014: event:create, row={i=-1 r=125 b=false s=newstring u=<4> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<8>}, updates=None
-014: event:create, row={i=1 r=123.5 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>}, updates=None
-014: event:create, row={uuid=<0>}, updates=None
-014: event:create, row={uuid=<1>}, updates=None
-014: i=-1 r=125 b=false s=newstring u=<4> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<8>
-014: i=1 r=123.5 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>
-015: done
-]])
-
-# Tests to verify the functionality of the one column compound index.
-# It tests index for one column string and integer indexes.
-# The run of test-ovsdb generates the output of the display of data using the different indexes defined in
-# the program.
-# Then, some at_checks are used to verify the correctness of the corresponding index as well as the existence
-# of all the rows involved in the test.
-m4_define([OVSDB_CHECK_IDL_COMPOUND_INDEX_SINGLE_COLUMN_C],
-  [AT_SETUP([$1 - C])
-   AT_KEYWORDS([ovsdb server idl compound_index_single_column compound_index positive $5])
-   AT_CHECK([ovsdb_start_idltest])
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore])])
-# Generate the data to be tested.
-   AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 -c idl-compound-index unix:socket $3],
-            [0], [stdout], [ignore])
-# Filter the rows of data that corresponds to the string index eliminating the extra columns of data.
-# This is done to verifiy that the output data is in the correct and expected order.
-   AT_CHECK([[cat stdout | grep -oh '[0-9]\{3\}: s=.*' | sed -e 's/ i=.*//g']],
-            [0], [$4])
-# Here, the data is filtered and sorted in order to have all the rows in the index and be
-# able to determined that all the involved rows are present.
-   AT_CHECK([[cat stdout | grep -oh '[0-9]\{3\}: s=.*' | sort -k 1,1n -k 2,2 -k 3,3]],
-            [0], [$5])
-# Filter the rows of data that corresponds to the integer index eliminating the extra columns of data.
-# This is done to verifiy that the output data is in the correct and expected order.
-   AT_CHECK([[cat stdout | grep -oh '[0-9]\{3\}: i=.*' | sed -e 's/ s=.*//g']],
-            [0], [$6])
-# Here again, the data is filtered and sorted in order to have all the rows in the index and be
-# able to determined that all the involved rows are present.
-   AT_CHECK([[cat stdout | grep -oh '[0-9]\{3\}: i=.*' | sort -k 1,1n -k 2,2 -k 3,3]],
-            [0], [$7])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-OVSDB_CHECK_IDL_COMPOUND_INDEX_SINGLE_COLUMN_C([Compound_index, single column test ],
-    [['["idltest",
-      {"op": "insert", "table": "simple", "row": {"s":"List000", "i": 1, "b":true, "r":101.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List000", "i": 2, "b":false, "r":102.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List000", "i": 10, "b":true, "r":110.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List001", "i": 1, "b":false, "r":110.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List001", "i": 2, "b":true, "r":120.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List001", "i": 2, "b":true, "r":122.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List001", "i": 4, "b":true, "r":130.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List005", "i": 5, "b":true, "r":130.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List020", "i": 20, "b":true, "r":220.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List020", "i": 19, "b":true, "r":219.0}}
-      ]']],
-    [idl_compound_index_single_column],
-    [001: s=List000
-001: s=List000
-001: s=List000
-001: s=List001
-001: s=List001
-001: s=List001
-001: s=List001
-001: s=List005
-001: s=List020
-001: s=List020
-003: s=List001
-003: s=List001
-003: s=List001
-003: s=List001
-],
-[001: s=List000 i=1 b=True r=101.000000
-001: s=List000 i=10 b=True r=110.000000
-001: s=List000 i=2 b=False r=102.000000
-001: s=List001 i=1 b=False r=110.000000
-001: s=List001 i=2 b=True r=120.000000
-001: s=List001 i=2 b=True r=122.000000
-001: s=List001 i=4 b=True r=130.000000
-001: s=List005 i=5 b=True r=130.000000
-001: s=List020 i=19 b=True r=219.000000
-001: s=List020 i=20 b=True r=220.000000
-003: s=List001 i=1 b=False r=110.000000
-003: s=List001 i=2 b=True r=120.000000
-003: s=List001 i=2 b=True r=122.000000
-003: s=List001 i=4 b=True r=130.000000
-],
-[002: i=1
-002: i=1
-002: i=2
-002: i=2
-002: i=2
-002: i=4
-002: i=5
-002: i=10
-002: i=19
-002: i=20
-004: i=5
-005: i=4
-005: i=5
-006: i=5
-006: i=10
-006: i=19
-006: i=20
-006: i=54
-007: i=5
-007: i=19
-007: i=20
-007: i=30
-007: i=54
-008: i=1
-008: i=1
-008: i=2
-008: i=2
-008: i=2
-008: i=5
-008: i=19
-008: i=20
-008: i=30
-008: i=54
-],
-[002: i=1 s=List000 b=True r=101.000000
-002: i=1 s=List001 b=False r=110.000000
-002: i=10 s=List000 b=True r=110.000000
-002: i=19 s=List020 b=True r=219.000000
-002: i=2 s=List000 b=False r=102.000000
-002: i=2 s=List001 b=True r=120.000000
-002: i=2 s=List001 b=True r=122.000000
-002: i=20 s=List020 b=True r=220.000000
-002: i=4 s=List001 b=True r=130.000000
-002: i=5 s=List005 b=True r=130.000000
-004: i=5 s=List005 b=True r=130.000000
-005: i=4 s=List001 b=True r=130.000000
-005: i=5 s=List005 b=True r=130.000000
-006: i=10 s=List000 b=True r=110.000000
-006: i=19 s=List020 b=True r=219.000000
-006: i=20 s=List020 b=True r=220.000000
-006: i=5 s=List005 b=True r=130.000000
-006: i=54 s=Lista054 b=False r=0.000000
-007: i=19 s=List020 b=True r=219.000000
-007: i=20 s=List020 b=True r=220.000000
-007: i=30 s=List000 b=True r=110.000000
-007: i=5 s=List005 b=True r=130.000000
-007: i=54 s=Lista054 b=False r=0.000000
-008: i=1 s=List000 b=True r=101.000000
-008: i=1 s=List001 b=False r=110.000000
-008: i=19 s=List020 b=True r=219.000000
-008: i=2 s=List000 b=False r=102.000000
-008: i=2 s=List001 b=True r=120.000000
-008: i=2 s=List001 b=True r=122.000000
-008: i=20 s=List020 b=True r=220.000000
-008: i=30 s=List000 b=True r=110.000000
-008: i=5 s=List005 b=True r=130.000000
-008: i=54 s=Lista054 b=False r=0.000000
-])
-
-# Tests to verify the functionality of two column compound index.
-# It tests index for two columns using string and integer fields.
-# The run of test-ovsdb generates the output of the display of data using the different indexes defined in
-# the program.
-# Then, some at_checks are used to verify the correctness of the corresponding index as well as the existence
-# of all the rows involved in the test.
-m4_define([OVSDB_CHECK_IDL_COMPOUND_INDEX_DOUBLE_COLUMN_C],
-  [AT_SETUP([$1 - C])
-   AT_KEYWORDS([ovsdb server idl compound_index_double_column compound_index positive $5])
-   AT_CHECK([ovsdb_start_idltest])
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore])])
-# Generate the data to be tested.
-   AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 -c idl-compound-index unix:socket $3],
-            [0], [stdout], [ignore])
-# Filter the rows of data that corresponds to the string-integer index eliminating the extra columns of data.
-# This is done to verifiy that the output data is in the correct and expected order.
-   AT_CHECK([[cat stdout | grep -oh '[0-9]\{3\}: s=.*' | sed -e 's/ b=.*//g']],
-            [0], [$4])
-# Here, the data is filtered and sorted in order to have all the rows in the index and be
-# able to determined that all the involved rows are present.
-   AT_CHECK([[cat stdout | grep -oh '[0-9]\{3\}: s=.*' | sort -k 1,1n -k 2,2 -k 3,3]],
-            [0], [$5])
-# Filter the rows of data that corresponds to the integer index eliminating the extra columns of data.
-# This is done to verifiy that the output data is in the correct and expected order.
-   AT_CHECK([[cat stdout | grep -oh '[0-9]\{3\}: i=.*' | sed -e 's/ b=.*//g']],
-            [0], [$6])
-# Here again, the data is filtered and sorted in order to have all the rows in the index and be
-# able to determined that all the involved rows are present.
-   AT_CHECK([[cat stdout | grep -oh '[0-9]\{3\}: i=.*' | sort -k 1,1n -k 2,2 -k 3,3]],
-            [0], [$7])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-OVSDB_CHECK_IDL_COMPOUND_INDEX_DOUBLE_COLUMN_C([Compound_index, double column test ],
-    [['["idltest",
-      {"op": "insert", "table": "simple", "row": {"s":"List000", "i": 1, "b":true, "r":101.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List000", "i": 2, "b":false, "r":102.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List000", "i": 10, "b":true, "r":110.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List001", "i": 1, "b":false, "r":110.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List001", "i": 2, "b":true, "r":120.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List001", "i": 2, "b":true, "r":122.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List001", "i": 4, "b":true, "r":130.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List005", "i": 5, "b":true, "r":130.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List020", "i": 20, "b":true, "r":220.0}},
-      {"op": "insert", "table": "simple", "row": {"s":"List020", "i": 19, "b":true, "r":219.0}}
-      ]']],
-    [idl_compound_index_double_column],
-    [001: s=List000 i=1
-001: s=List000 i=2
-001: s=List000 i=10
-001: s=List001 i=1
-001: s=List001 i=2
-001: s=List001 i=2
-001: s=List001 i=4
-001: s=List005 i=5
-001: s=List020 i=19
-001: s=List020 i=20
-002: s=List000 i=10
-002: s=List000 i=2
-002: s=List000 i=1
-002: s=List001 i=4
-002: s=List001 i=2
-002: s=List001 i=2
-002: s=List001 i=1
-002: s=List005 i=5
-002: s=List020 i=20
-002: s=List020 i=19
-003: s=List000 i=10
-004: s=List001 i=1
-004: s=List001 i=2
-004: s=List001 i=2
-004: s=List001 i=4
-004: s=List005 i=5
-],
-    [001: s=List000 i=1 b=True r=101.000000
-001: s=List000 i=10 b=True r=110.000000
-001: s=List000 i=2 b=False r=102.000000
-001: s=List001 i=1 b=False r=110.000000
-001: s=List001 i=2 b=True r=120.000000
-001: s=List001 i=2 b=True r=122.000000
-001: s=List001 i=4 b=True r=130.000000
-001: s=List005 i=5 b=True r=130.000000
-001: s=List020 i=19 b=True r=219.000000
-001: s=List020 i=20 b=True r=220.000000
-002: s=List000 i=1 b=True r=101.000000
-002: s=List000 i=10 b=True r=110.000000
-002: s=List000 i=2 b=False r=102.000000
-002: s=List001 i=1 b=False r=110.000000
-002: s=List001 i=2 b=True r=120.000000
-002: s=List001 i=2 b=True r=122.000000
-002: s=List001 i=4 b=True r=130.000000
-002: s=List005 i=5 b=True r=130.000000
-002: s=List020 i=19 b=True r=219.000000
-002: s=List020 i=20 b=True r=220.000000
-003: s=List000 i=10 b=True r=110.000000
-004: s=List001 i=1 b=False r=110.000000
-004: s=List001 i=2 b=True r=120.000000
-004: s=List001 i=2 b=True r=122.000000
-004: s=List001 i=4 b=True r=130.000000
-004: s=List005 i=5 b=True r=130.000000
-],
-    [005: i=1 s=List000
-005: i=1 s=List001
-005: i=2 s=List000
-005: i=2 s=List001
-005: i=2 s=List001
-005: i=4 s=List001
-005: i=5 s=List005
-005: i=10 s=List000
-005: i=19 s=List020
-005: i=20 s=List020
-006: i=20 s=List020
-006: i=19 s=List020
-006: i=10 s=List000
-006: i=5 s=List005
-006: i=4 s=List001
-006: i=2 s=List000
-006: i=2 s=List001
-006: i=2 s=List001
-006: i=1 s=List000
-006: i=1 s=List001
-],
-    [005: i=1 s=List000 b=True r=101.000000
-005: i=1 s=List001 b=False r=110.000000
-005: i=10 s=List000 b=True r=110.000000
-005: i=19 s=List020 b=True r=219.000000
-005: i=2 s=List000 b=False r=102.000000
-005: i=2 s=List001 b=True r=120.000000
-005: i=2 s=List001 b=True r=122.000000
-005: i=20 s=List020 b=True r=220.000000
-005: i=4 s=List001 b=True r=130.000000
-005: i=5 s=List005 b=True r=130.000000
-006: i=1 s=List000 b=True r=101.000000
-006: i=1 s=List001 b=False r=110.000000
-006: i=10 s=List000 b=True r=110.000000
-006: i=19 s=List020 b=True r=219.000000
-006: i=2 s=List000 b=False r=102.000000
-006: i=2 s=List001 b=True r=120.000000
-006: i=2 s=List001 b=True r=122.000000
-006: i=20 s=List020 b=True r=220.000000
-006: i=4 s=List001 b=True r=130.000000
-006: i=5 s=List005 b=True r=130.000000
-])
-
-m4_define([OVSDB_CHECK_IDL_COMPOUND_INDEX_WITH_REF],
-  [AT_SETUP([$1 - C])
-   AT_KEYWORDS([ovsdb server idl compound_index compound_index_with_ref positive $5])
-   AT_CHECK([ovsdb_start_idltest])
-   m4_if([$2], [], [],
-     [AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore])])
-   AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 -c idl-compound-index-with-ref unix:socket $3],
-            [0], [stdout], [ignore])
-   AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
-            [0], [$4])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-OVSDB_CHECK_IDL_COMPOUND_INDEX_WITH_REF([set, simple3 idl-compound-index-with-ref, initially populated],
-[],
-[],
-[[000: After add to other table + set of strong ref
-001: name= uset=[] uref=[[<0>]]
-002: check simple4: not empty
-003: Query using index with reference
-004: name= uset=[] uref=[[<0>]]
-005: After delete
-007: check simple4: empty
-008: End test
-]])
-
-m4_define([CHECK_STREAM_OPEN_BLOCK],
-  [AT_SETUP([Check Stream open block - C - $1])
-   AT_SKIP_IF([test "$1" = "tcp6" && test "$IS_WIN32" = "yes"])
-   AT_SKIP_IF([test "$1" = "tcp6" && test "$HAVE_IPV6" = "no"])
-   AT_KEYWORDS([Check Stream open block $1])
-   AT_CHECK([ovsdb_start_idltest "ptcp:0:$2"])
-   PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT])
-   WRONG_PORT=$(($TCP_PORT + 101))
-   AT_CHECK([test-stream tcp:$2:$TCP_PORT], [0], [ignore])
-   AT_CHECK([test-stream tcp:$2:$WRONG_PORT], [1], [ignore], [ignore])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CHECK([test-stream tcp:$2:$TCP_PORT], [1], [ignore], [ignore])
-   AT_CLEANUP])
-
-CHECK_STREAM_OPEN_BLOCK([tcp], [127.0.0.1])
-CHECK_STREAM_OPEN_BLOCK([tcp6], [[[::1]]])
-
-m4_define([CHECK_STREAM_OPEN_BLOCK_PY],
-  [AT_SETUP([$1])
-   AT_SKIP_IF([test $2 = no])
-   AT_KEYWORDS([Check PY Stream open block - $3])
-   AT_CHECK([ovsdb_start_idltest "ptcp:0:127.0.0.1"])
-   PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT])
-   WRONG_PORT=$(($TCP_PORT + 101))
-   AT_CHECK([$3 $srcdir/test-stream.py tcp:127.0.0.1:$TCP_PORT], [0], [ignore])
-   AT_CHECK([$3 $srcdir/test-stream.py tcp:127.0.0.1:$WRONG_PORT], [1], [ignore])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CHECK([$3 $srcdir/test-stream.py tcp:127.0.0.1:$TCP_PORT], [1], [ignore])
-   AT_CLEANUP])
-
-CHECK_STREAM_OPEN_BLOCK_PY([Check PY2 Stream open block], [$HAVE_PYTHON2], [$PYTHON2])
-CHECK_STREAM_OPEN_BLOCK_PY([Check PY3 Stream open block], [$HAVE_PYTHON3], [$PYTHON3])
-
-# same as OVSDB_CHECK_IDL but uses Python IDL implementation with tcp
-# with multiple remotes to assert the idl connects to the leader of the Raft cluster
-m4_define([OVSDB_CHECK_IDL_LEADER_ONLY_PYN],
-  [AT_SETUP([$1])
-   AT_SKIP_IF([test $7 = no])
-   AT_KEYWORDS([ovsdb server idl Python leader_only with tcp socket])
-   m4_define([LPBK],[127.0.0.1])
-   AT_CHECK([ovsdb_cluster_start_idltest $2 "ptcp:0:"LPBK])
-   PARSE_LISTENING_PORT([s2.log], [TCP_PORT_1])
-   PARSE_LISTENING_PORT([s3.log], [TCP_PORT_2])
-   PARSE_LISTENING_PORT([s1.log], [TCP_PORT_3])
-   remotes=tcp:LPBK:$TCP_PORT_1,tcp:LPBK:$TCP_PORT_2,tcp:LPBK:$TCP_PORT_3
-   pids=$(cat s2.pid s3.pid s1.pid | tr '\n' ',')
-   echo $pids
-   AT_CHECK([$8 $srcdir/test-ovsdb.py  -t30 idl-cluster $srcdir/idltest.ovsschema $remotes $pids $3],
-        [0], [stdout], [ignore])
-   remote=$(ovsdb_cluster_leader $remotes "idltest")
-   leader=$(echo $remote | cut -d'|' -f 1)
-   AT_CHECK([grep -F -- "${leader}" stdout], [0], [ignore])
-   AT_CLEANUP])
-
-m4_define([OVSDB_CHECK_IDL_LEADER_ONLY_PY],
-   [OVSDB_CHECK_IDL_LEADER_ONLY_PYN([$1 - Python2 (leader only)], [$2], [$3], [$4], [$5], [$6],
-                 [$HAVE_PYTHON], [$PYTHON])
-    OVSDB_CHECK_IDL_LEADER_ONLY_PYN([$1 - Python3 (leader only)], [$2], [$3], [$4], [$5], [$6],
-                 [$HAVE_PYTHON3], [$PYTHON3])])
-
-OVSDB_CHECK_IDL_LEADER_ONLY_PY([Check Python IDL connects to leader], 3, ['remote'])
-OVSDB_CHECK_IDL_LEADER_ONLY_PY([Check Python IDL reconnects to leader], 3, ['remote' '+remotestop' 'remote'])
diff --git a/tests/ovsdb-lock.at b/tests/ovsdb-lock.at
deleted file mode 100644
index a3acd2f27..000000000
--- a/tests/ovsdb-lock.at
+++ /dev/null
@@ -1,73 +0,0 @@
-AT_BANNER([OVSDB -- lock])
-
-# OVSDB_CHECK_LOCK_SETUP(TITILE, KEYWORDS)
-#
-# Starts an OVSDB server and the default lock transaction, acquire "lock0",
-# using the ovsdb-client tool.  Execute additional <LOCK_TRANSACTIONS>,
-# and compare output file catured from ovsdb-client tools to <OUTPUT>.
-
-m4_define([OVSDB_CHECK_LOCK_SETUP],
-   [AT_SETUP([ovsdb lock -- $1])
-    AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-    AT_KEYWORDS([ovsdb lock $2])
-    ordinal_schema > schema
-    AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-    AT_CAPTURE_FILE([ovsdb-server-log])
-    AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1], [0], [], [])])
-
-#
-# Two sessions create two locks. Both sessions should be able to get their
-# own lock immediately.
-OVSDB_CHECK_LOCK_SETUP([lock], [positive])
-AT_CHECK([ovsdb-client --detach --no-chdir lock unix:socket lock0 >c1-output 2>&1],
-      [0], [], [])
-AT_CHECK([ovsdb-client --detach --no-chdir lock unix:socket lock1 >c2-output 2>&1],
-      [0], [], [])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CHECK([cat c1-output], 0, [{"locked":true}
-], [])
-AT_CHECK([cat c2-output], 0, [{"locked":true}
-], [])
-AT_CLEANUP
-
-#
-# Two session wait on the same lock. The first session should be able
-# to get the lock immediately, the second session will get a notification
-# after the first session unlocks.
-OVSDB_CHECK_LOCK_SETUP([unlock], [positive])
-AT_CHECK([ovsdb-client --detach --no-chdir --pidfile lock unix:socket lock0 >c1-output 2>&1],
-      [0], [], [])
-AT_CHECK([ovsdb-client --detach --no-chdir lock unix:socket lock0 >c2-output 2>&1],
-      [0], [], [])
-AT_CHECK([ovs-appctl -t ovsdb-client unlock lock0], [0], [], [])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CHECK([cat c1-output], 0, [{"locked":true}
-{}
-])
-AT_CHECK([cat c2-output], 0, [{"locked":false}
-locked
-[["lock0"]]
-], [])
-AT_CLEANUP
-
-#
-# Two session waits on the same lock. The first session should be able
-# to get the lock immediately. The second session tries to steal the lock, then
-# unlocks the lock.
-OVSDB_CHECK_LOCK_SETUP([steal], [positive])
-AT_CHECK([ovsdb-client --detach --no-chdir lock unix:socket lock0 >c1-output 2>&1],
-      [0], [], [])
-AT_CHECK([ovsdb-client --detach --no-chdir --pidfile steal unix:socket lock0 >c2-output 2>&1],
-      [0], [], [])
-AT_CHECK([ovs-appctl -t ovsdb-client unlock lock0], [0], [], [])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CHECK([cat c1-output], 0, [{"locked":true}
-stolen
-[["lock0"]]
-locked
-[["lock0"]]
-])
-AT_CHECK([cat c2-output], 0, [{"locked":true}
-{}
-], [])
-AT_CLEANUP
diff --git a/tests/ovsdb-log.at b/tests/ovsdb-log.at
deleted file mode 100644
index 00a244ba4..000000000
--- a/tests/ovsdb-log.at
+++ /dev/null
@@ -1,388 +0,0 @@
-AT_BANNER([OVSDB -- logging])
-
-AT_SETUP([create empty, reread])
-AT_KEYWORDS([ovsdb log])
-AT_CAPTURE_FILE([log])
-AT_CHECK(
-  [test-ovsdb log-io file create], [0], 
-  [file: open successful
-], [ignore])
-AT_CHECK(
-  [test-ovsdb log-io file read-only read], [0], 
-  [file: open successful
-file: read: end of log
-], [ignore])
-AT_CHECK([test -f .file.~lock~])
-AT_CLEANUP
-
-AT_SETUP([write one, reread])
-AT_KEYWORDS([ovsdb log])
-AT_CAPTURE_FILE([file])
-AT_CHECK(
-  [[test-ovsdb log-io file create 'write:{"x":0}']], [0],
-  [[file: open successful
-file: write:{"x":0} successful
-]], [ignore])
-AT_CHECK(
-  [test-ovsdb log-io file read-only read read], [0], 
-  [[file: open successful
-file: read: {"x":0}
-file: read: end of log
-]], [ignore])
-AT_CHECK([test -f .file.~lock~])
-AT_CLEANUP
-
-AT_SETUP([check that create fails if file exists])
-AT_KEYWORDS([ovsdb log])
-AT_CAPTURE_FILE([file])
-AT_CHECK(
-  [[test-ovsdb log-io file create 'write:{"x":1}']], [0],
-  [[file: open successful
-file: write:{"x":1} successful
-]], [ignore])
-AT_CHECK(
-  [test-ovsdb log-io file read-only read], [0], 
-  [[file: open successful
-file: read: {"x":1}
-]], [ignore])
-AT_CHECK(
-  [test-ovsdb log-io file create-excl read], [1],
-  [], [test-ovsdb: I/O error: file: create failed (File exists)
-])
-AT_CHECK(
-  [test-ovsdb log-io file create read], [0],
-  [file: open successful
-file: read: {"x":1}
-])
-AT_CHECK([test -f .file.~lock~])
-AT_CLEANUP
-
-AT_SETUP([write one, reread])
-AT_KEYWORDS([ovsdb log])
-AT_CAPTURE_FILE([file])
-AT_CHECK(
-  [[test-ovsdb log-io file create 'write:{"x":0}' 'write:{"x":1}' 'write:{"x":2}']], [0],
-  [[file: open successful
-file: write:{"x":0} successful
-file: write:{"x":1} successful
-file: write:{"x":2} successful
-]], [ignore])
-AT_CHECK(
-  [test-ovsdb log-io file read-only read read read read], [0], 
-  [[file: open successful
-file: read: {"x":0}
-file: read: {"x":1}
-file: read: {"x":2}
-file: read: end of log
-]], [ignore])
-AT_CHECK([test -f .file.~lock~])
-AT_CLEANUP
-
-AT_SETUP([write one, replace, commit])
-AT_KEYWORDS([ovsdb log])
-AT_CAPTURE_FILE([file])
-for option in '' --no-rename-open-files; do
-    rm -f file
-    AT_CHECK(
-      [[test-ovsdb $option log-io file create \
-          'write:{"x":0}' \
-          'replace_start' \
-          'new-write:{"x":1}' \
-          'new-write:{"x":2}' \
-          'old-write:{"x":4}' \
-          'replace_commit' \
-          'read' \
-          'write:{"x":3}']], [0],
-      [[file: open successful
-file: write:{"x":0} successful
-file: replace_start successful
-(temp): write:{"x":1} successful
-(temp): write:{"x":2} successful
-file: write:{"x":4} successful
-file: replace_commit successful
-file: read: end of log
-file: write:{"x":3} successful
-]])
-    AT_CHECK(
-      [test-ovsdb log-io file read-only read read read read], [0],
-      [[file: open successful
-file: read: {"x":1}
-file: read: {"x":2}
-file: read: {"x":3}
-file: read: end of log
-]], [ignore])
-done
-AT_CHECK([test -f .file.~lock~])
-AT_CLEANUP
-
-AT_SETUP([write one, replace, abort])
-AT_KEYWORDS([ovsdb log])
-AT_CAPTURE_FILE([file])
-for option in '' --no-rename-open-files; do
-    rm -f file
-    AT_CHECK(
-      [[test-ovsdb $option log-io file create \
-          'write:{"x":0}' \
-          'replace_start' \
-          'new-write:{"x":1}' \
-          'new-write:{"x":2}' \
-          'old-write:{"x":4}' \
-          'replace_abort' \
-          'read' \
-          'write:{"x":3}']], [0],
-      [[file: open successful
-file: write:{"x":0} successful
-file: replace_start successful
-(temp): write:{"x":1} successful
-(temp): write:{"x":2} successful
-file: write:{"x":4} successful
-file: replace_abort successful
-file: read: end of log
-file: write:{"x":3} successful
-]])
-    AT_CHECK(
-      [test-ovsdb log-io file read-only read read read read], [0],
-      [[file: open successful
-file: read: {"x":0}
-file: read: {"x":4}
-file: read: {"x":3}
-file: read: end of log
-]], [ignore])
-done
-AT_CHECK([test -f .file.~lock~])
-AT_CLEANUP
-
-AT_SETUP([write one, reread - alternative magic])
-AT_KEYWORDS([ovsdb log])
-AT_CAPTURE_FILE([file])
-# Sometimes you just need more magic:
-# http://www.catb.org/jargon/html/magic-story.html
-AT_CHECK(
-  [[test-ovsdb --magic="MORE_MAGIC" log-io file create 'write:{"x":0}' 'write:{"x":1}' 'write:{"x":2}']], [0],
-  [[file: open successful
-file: write:{"x":0} successful
-file: write:{"x":1} successful
-file: write:{"x":2} successful
-]], [ignore])
-AT_CHECK(
-  [test-ovsdb --magic="MORE_MAGIC" log-io file read-only read read read read], [0],
-  [[file: open successful
-file: read: {"x":0}
-file: read: {"x":1}
-file: read: {"x":2}
-file: read: end of log
-]], [ignore])
-AT_CHECK(
-  [test-ovsdb log-io file read-only], [1], [],
-  [test-ovsdb: ovsdb error: file: cannot identify file type
-])
-AT_CHECK([test -f .file.~lock~])
-AT_CLEANUP
-
-AT_SETUP([write one, reread, append])
-AT_KEYWORDS([ovsdb log])
-AT_CAPTURE_FILE([file])
-AT_CHECK(
-  [[test-ovsdb log-io file create 'write:{"x":0}' 'write:{"x":1}' 'write:{"x":2}']], [0],
-  [[file: open successful
-file: write:{"x":0} successful
-file: write:{"x":1} successful
-file: write:{"x":2} successful
-]], [ignore])
-AT_CHECK(
-  [[test-ovsdb log-io file read/write read read read 'write:{"append":0}']], [0],
-  [[file: open successful
-file: read: {"x":0}
-file: read: {"x":1}
-file: read: {"x":2}
-file: write:{"append":0} successful
-]], [ignore])
-AT_CHECK(
-  [test-ovsdb log-io file read-only read read read read read], [0], 
-  [[file: open successful
-file: read: {"x":0}
-file: read: {"x":1}
-file: read: {"x":2}
-file: read: {"append":0}
-file: read: end of log
-]], [ignore])
-AT_CHECK([test -f .file.~lock~])
-AT_CLEANUP
-
-AT_SETUP([write, reread one, overwrite])
-AT_KEYWORDS([ovsdb log])
-AT_CAPTURE_FILE([file])
-AT_CHECK(
-  [[test-ovsdb log-io file create 'write:{"x":0}' 'write:{"x":1}' 'write:{"x":2}']], [0],
-  [[file: open successful
-file: write:{"x":0} successful
-file: write:{"x":1} successful
-file: write:{"x":2} successful
-]], [ignore])
-AT_CHECK(
-  [[test-ovsdb log-io file read/write read 'write:{"more data":0}']], [0],
-  [[file: open successful
-file: read: {"x":0}
-file: write:{"more data":0} successful
-]], [ignore])
-AT_CHECK(
-  [test-ovsdb log-io file read-only read read read], [0], 
-  [[file: open successful
-file: read: {"x":0}
-file: read: {"more data":0}
-file: read: end of log
-]], [ignore])
-AT_CHECK([test -f .file.~lock~])
-AT_CLEANUP
-
-AT_SETUP([write, add corrupted data, read])
-AT_KEYWORDS([ovsdb log])
-AT_CAPTURE_FILE([file])
-AT_CHECK(
-  [[test-ovsdb log-io file create 'write:{"x":0}' 'write:{"x":1}' 'write:{"x":2}']], [0],
-  [[file: open successful
-file: write:{"x":0} successful
-file: write:{"x":1} successful
-file: write:{"x":2} successful
-]], [ignore])
-AT_CHECK([echo 'xxx' >> file])
-AT_CHECK(
-  [test-ovsdb log-io file read-only read read read read], [0], 
-  [[file: open successful
-file: read: {"x":0}
-file: read: {"x":1}
-file: read: {"x":2}
-file: read failed: syntax error: file: parse error at offset 186 in header line "xxx"
-]], [ignore])
-AT_CHECK([test -f .file.~lock~])
-AT_CLEANUP
-
-AT_SETUP([write, add corrupted data, read, overwrite])
-AT_KEYWORDS([ovsdb log])
-AT_CAPTURE_FILE([file])
-AT_CHECK(
-  [[test-ovsdb log-io file create 'write:{"x":0}' 'write:{"x":1}' 'write:{"x":2}']], [0],
-  [[file: open successful
-file: write:{"x":0} successful
-file: write:{"x":1} successful
-file: write:{"x":2} successful
-]], [ignore])
-AT_CHECK([echo 'xxx' >> file])
-AT_CHECK(
-  [[test-ovsdb log-io file read/write read read read read 'write:{"x":3}']], [0],
-  [[file: open successful
-file: read: {"x":0}
-file: read: {"x":1}
-file: read: {"x":2}
-file: read failed: syntax error: file: parse error at offset 186 in header line "xxx"
-file: write:{"x":3} successful
-]], [ignore])
-AT_CHECK(
-  [test-ovsdb log-io file read-only read read read read read], [0], 
-  [[file: open successful
-file: read: {"x":0}
-file: read: {"x":1}
-file: read: {"x":2}
-file: read: {"x":3}
-file: read: end of log
-]], [ignore])
-AT_CHECK([test -f .file.~lock~])
-AT_CLEANUP
-
-AT_SETUP([write, corrupt some data, read, overwrite])
-AT_KEYWORDS([ovsdb log])
-AT_CAPTURE_FILE([file])
-AT_CHECK(
-  [[test-ovsdb log-io file create 'write:{"x":0}' 'write:{"x":1}' 'write:{"x":2}']], [0],
-  [[file: open successful
-file: write:{"x":0} successful
-file: write:{"x":1} successful
-file: write:{"x":2} successful
-]], [ignore])
-AT_CHECK([[sed 's/{"x":2}/{"x":3}/' < file > file.tmp]])
-AT_CHECK([mv file.tmp file])
-AT_CHECK([[grep -c '{"x":3}' file]], [0], [1
-])
-AT_CHECK(
-  [[test-ovsdb log-io file read/write read read read 'write:{"longer data":0}']], [0],
-  [[file: open successful
-file: read: {"x":0}
-file: read: {"x":1}
-file: read failed: syntax error: file: 8 bytes starting at offset 178 have SHA-1 hash 2683fd63b5b9fd49df4f2aa25bf7db5cbbebbe6f but should have hash 3d8ed30f471ad1b7b4b571cb0c7d5ed3e81350aa
-file: write:{"longer data":0} successful
-]], [ignore])
-AT_CHECK(
-  [test-ovsdb log-io file read-only read read read read], [0], 
-  [[file: open successful
-file: read: {"x":0}
-file: read: {"x":1}
-file: read: {"longer data":0}
-file: read: end of log
-]], [ignore])
-AT_CHECK([test -f .file.~lock~])
-AT_CLEANUP
-
-AT_SETUP([write, truncate file, read, overwrite])
-AT_KEYWORDS([ovsdb log])
-AT_CAPTURE_FILE([file])
-AT_CHECK(
-  [[test-ovsdb log-io file create 'write:{"x":0}' 'write:{"x":1}' 'write:{"x":2}']], [0],
-  [[file: open successful
-file: write:{"x":0} successful
-file: write:{"x":1} successful
-file: write:{"x":2} successful
-]], [ignore])
-AT_CHECK([[sed 's/{"x":2}/2/' < file > file.tmp]])
-AT_CHECK([mv file.tmp file])
-AT_CHECK([[grep -c '^2$' file]], [0], [1
-])
-AT_CHECK(
-  [[test-ovsdb log-io file read/write read read read 'write:{"longer data":0}']], [0],
-  [[file: open successful
-file: read: {"x":0}
-file: read: {"x":1}
-file: read failed: I/O error: file: error reading 8 bytes starting at offset 178 (End of file)
-file: write:{"longer data":0} successful
-]], [ignore])
-AT_CHECK(
-  [test-ovsdb log-io file read-only read read read read], [0], 
-  [[file: open successful
-file: read: {"x":0}
-file: read: {"x":1}
-file: read: {"longer data":0}
-file: read: end of log
-]], [ignore])
-AT_CHECK([test -f .file.~lock~])
-AT_CLEANUP
-
-AT_SETUP([write bad JSON, read, overwrite])
-AT_KEYWORDS([ovsdb log])
-AT_CAPTURE_FILE([file])
-AT_CHECK(
-  [[test-ovsdb log-io file create 'write:{"x":0}' 'write:{"x":1}' 'write:{"x":2}']], [0],
-  [[file: open successful
-file: write:{"x":0} successful
-file: write:{"x":1} successful
-file: write:{"x":2} successful
-]], [ignore])
-AT_CHECK([[printf '%s\n%s\n' 'OVSDB JSON 5 d910b02871075d3156ec8675dfc95b7d5d640aa6' 'null' >> file]])
-AT_CHECK(
-  [[test-ovsdb log-io file read/write read read read read 'write:{"replacement data":0}']], [0],
-  [[file: open successful
-file: read: {"x":0}
-file: read: {"x":1}
-file: read: {"x":2}
-file: read failed: syntax error: file: 5 bytes starting at offset 240 are not valid JSON (line 0, column 4, byte 4: syntax error at beginning of input)
-file: write:{"replacement data":0} successful
-]], [ignore])
-AT_CHECK(
-  [test-ovsdb log-io file read-only read read read read read], [0], 
-  [[file: open successful
-file: read: {"x":0}
-file: read: {"x":1}
-file: read: {"x":2}
-file: read: {"replacement data":0}
-file: read: end of log
-]], [ignore])
-AT_CHECK([test -f .file.~lock~])
-AT_CLEANUP
diff --git a/tests/ovsdb-monitor-sort.py b/tests/ovsdb-monitor-sort.py
deleted file mode 100755
index 7d368a7af..000000000
--- a/tests/ovsdb-monitor-sort.py
+++ /dev/null
@@ -1,85 +0,0 @@
-#! /usr/bin/env python
-
-# Breaks lines read from stdin into groups using blank lines as
-# group separators, then sorts lines within the groups for
-# reproducibility.
-
-import re
-import sys
-
-
-# This is copied out of the Python Sorting HOWTO at
-# https://docs.python.org/3/howto/sorting.html#sortinghowto
-def cmp_to_key(mycmp):
-    'Convert a cmp= function into a key= function'
-    class K(object):
-
-        def __init__(self, obj, *args):
-            self.obj = obj
-
-        def __lt__(self, other):
-            return mycmp(self.obj, other.obj) < 0
-
-        def __gt__(self, other):
-            return mycmp(self.obj, other.obj) > 0
-
-        def __eq__(self, other):
-            return mycmp(self.obj, other.obj) == 0
-
-        def __le__(self, other):
-            return mycmp(self.obj, other.obj) <= 0
-
-        def __ge__(self, other):
-            return mycmp(self.obj, other.obj) >= 0
-
-        def __ne__(self, other):
-            return mycmp(self.obj, other.obj) != 0
-
-    return K
-
-
-u = '[0-9a-fA-F]'
-uuid_re = re.compile(r'%s{8}-%s{4}-%s{4}-%s{4}-%s{12}' % ((u,) * 5))
-
-
-def cmp(a, b):
-    return (a > b) - (a < b)
-
-
-def compare_lines(a, b):
-    if uuid_re.match(a):
-        if uuid_re.match(b):
-            return cmp(a[36:], b[36:])
-        else:
-            return 1
-    elif uuid_re.match(b):
-        return -1
-    else:
-        return cmp(a, b)
-
-
-def output_group(group, dst):
-    for x in sorted(group, key=cmp_to_key(compare_lines)):
-        dst.write(x)
-
-
-def ovsdb_monitor_sort(src, dst):
-    group = []
-    while True:
-        line = src.readline()
-        if not line:
-            break
-        if line.rstrip() == '':
-            output_group(group, dst)
-            group = []
-            dst.write(line)
-        elif line.startswith(',') and group:
-            group[len(group) - 1] += line
-        else:
-            group.append(line)
-    if group:
-        output_group(group, dst)
-
-
-if __name__ == '__main__':
-    ovsdb_monitor_sort(sys.stdin, sys.stdout)
diff --git a/tests/ovsdb-monitor.at b/tests/ovsdb-monitor.at
deleted file mode 100644
index 84aa20826..000000000
--- a/tests/ovsdb-monitor.at
+++ /dev/null
@@ -1,958 +0,0 @@
-AT_BANNER([OVSDB -- ovsdb-server monitors])
-
-OVS_START_SHELL_HELPERS
-# ovsdb_check_monitor SCHEMA_FUNC DB TABLE OUTPUT COLUMNS
-#                     PRE-MONITOR-TXN... -- TRANSACTION...
-ovsdb_check_monitor () {
-    local schema_func=$1 db=$2 table=$3 output=$4 columns=$5
-    shift; shift; shift; shift; shift
-    $schema_func > schema
-    AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-    while test "$1" != "--"; do
-        AT_CHECK([ovsdb-tool transact db "$1"], [0], [ignore], [ignore])
-        shift
-    done
-    shift
-    AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket --log-file db > ovsdb-server.stdout 2> ovsdb-server.stderr],
-             [0], [], [])
-    on_exit 'kill `cat ovsdb-server.pid`'
-    if test "$IS_WIN32" = "yes"; then
-      AT_CHECK([ovsdb-client -vjsonrpc --pidfile --log-file -d json monitor --format=csv unix:socket $db $table $columns > output 2> ovsdb-client.stderr &],
-               [0], [ignore], [ignore])
-      sleep 1
-    else
-      AT_CHECK([ovsdb-client -vjsonrpc --detach --no-chdir --pidfile --log-file -d json monitor --format=csv unix:socket $db $table $columns > output 2> ovsdb-client.stderr],
-             [0], [ignore], [ignore])
-    fi
-    on_exit 'kill `cat ovsdb-client.pid`'
-    for txn in ${1+"$@"} '[["'$db'"]]'; do
-      AT_CHECK([ovsdb-client transact unix:socket "$txn"], [0], [ignore], [ignore])
-    done
-    OVS_APP_EXIT_AND_WAIT_BY_TARGET([ovsdb-server], [ovsdb-server.pid])
-    OVS_WAIT_UNTIL([test ! -e ovsdb-client.pid])
-    AT_CHECK_UNQUOTED([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0], [$output], [ignore])
-}
-OVS_END_SHELL_HELPERS
-
-# OVSDB_CHECK_MONITOR(TITLE, SCHEMA, [PRE-MONITOR-TXN], DB, TABLE,
-#                     TRANSACTIONS, OUTPUT, [COLUMNS], [KEYWORDS])
-#
-# Creates a database with the given SCHEMA, starts an ovsdb-server on
-# that database, and runs each of the TRANSACTIONS (which should be a
-# quoted list of quoted strings) against it with ovsdb-client one at a
-# time.  COLUMNS, if specified, is passed to ovsdb-client as the set
-# of columns and operations to select.
-#
-# Checks that the overall output is OUTPUT, but UUIDs in the output
-# are replaced by markers of the form <N> where N is a number.  The
-# first unique UUID is replaced by <0>, the next by <1>, and so on.
-# If a given UUID appears more than once it is always replaced by the
-# same marker.
-#
-# TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
-m4_define([OVSDB_CHECK_MONITOR],
-  [AT_SETUP([$1])
-   AT_KEYWORDS([ovsdb server monitor positive $9])
-   AT_CAPTURE_FILE([ovsdb-server.log])
-   AT_CAPTURE_FILE([ovsdb-server.stdout])
-   AT_CAPTURE_FILE([ovsdb-server.stderr])
-   AT_CAPTURE_FILE([ovsdb-client.log])
-   AT_CAPTURE_FILE([ovsdb-client.stderr])
-   ovsdb_check_monitor '$2' '$4' '$5' '$7' '$8' \
-     m4_foreach([txn], [$3], ['txn' ]) -- \
-     m4_foreach([txn], [$6], ['txn' ])
-   AT_CLEANUP])
-
-# OVSDB_CHECK_MONITOR_COND(TITLE, SCHEMA, [PRE-MONITOR-TXN], DB, TABLE,
-#                     TRANSACTIONS, OUTPUT, CONDITIONS, [COLUMNS], [KEYWORDS],
-#                     [CONDITIONS_CHANGE])
-#
-# Creates a database with the given SCHEMA, starts an ovsdb-server on
-# that database, and runs each of the TRANSACTIONS (which should be a
-# quoted list of quoted strings) against it with ovsdb-client one at a
-# time.  COLUMNS, if specified, is passed to ovsdb-client as the set
-# of columns and operations to select.
-#
-# Checks that the overall output is OUTPUT, but UUIDs in the output
-# are replaced by markers of the form <N> where N is a number.  The
-# first unique UUID is replaced by <0>, the next by <1>, and so on.
-# If a given UUID appears more than once it is always replaced by the
-# same marker.
-#
-# TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
-m4_define([OVSDB_CHECK_MONITOR_COND],
-  [AT_SETUP([$1])
-   AT_KEYWORDS([ovsdb server monitor monitor-cond positive $10])
-   $2 > schema
-   AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-   for txn in m4_foreach([txn], [$3], ['txn' ]); do
-     AT_CHECK([ovsdb-tool transact db "$txn"], [0], [ignore], [ignore])
-   done
-   AT_CAPTURE_FILE([ovsdb-server-log])
-   AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1])
-   on_exit 'kill `cat ovsdb-server.pid`'
-   AT_CHECK([ovsdb-client -vjsonrpc --pidfile --detach --no-chdir -d json monitor-cond --format=csv unix:socket $4 '[$8]' $5 $9 > output],
-          [0], [ignore], [ignore])
-   on_exit 'kill `cat ovsdb-client.pid`'
-   for txn in m4_foreach([txn], [$6], ['txn' ]); do
-     AT_CHECK([ovsdb-client transact unix:socket "$txn"], [0],
-              [ignore], [ignore], [kill `cat server-pid client-pid`])
-   done
-   for cond in m4_foreach([cond], [$10], ['cond' ]); do
-     AT_CHECK([ovs-appctl -t ovsdb-client ovsdb-client/cond_change $5 "$cond"], [0], [ignore], [ignore])
-   done
-   AT_CHECK([ovsdb-client transact unix:socket '[["$4"]]'], [0],
-            [ignore], [ignore])
-   AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
-   OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-   AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0], [$7], [ignore])
-   AT_CLEANUP])
-
-OVSDB_CHECK_MONITOR([monitor insert into empty table],
-  [ordinal_schema],
-  [],
-  [ordinals], [ordinals],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}}]]]],
-  [[row,action,name,number,_version
-<0>,insert,"""zero""",0,"[""uuid"",""<1>""]"
-]])
-
-OVSDB_CHECK_MONITOR([monitor insert into populated table],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}}]]]],
-  [ordinals], [ordinals],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}}]]]],
-  [[row,action,name,number,_version
-<0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
-
-row,action,name,number,_version
-<2>,insert,"""zero""",0,"[""uuid"",""<3>""]"
-]])
-
-OVSDB_CHECK_MONITOR([monitor delete],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}}]]]],
-  [ordinals], [ordinals],
-  [[[["ordinals",
-      {"op": "delete",
-       "table": "ordinals",
-       "where": [["number", "==", 10]]}]]]],
-  [[row,action,name,number,_version
-<0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
-
-row,action,name,number,_version
-<0>,delete,"""ten""",10,"[""uuid"",""<1>""]"
-]])
-
-OVSDB_CHECK_MONITOR([monitor row update],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}}]]]],
-  [ordinals], [ordinals],
-  [[[["ordinals",
-      {"op": "update",
-       "table": "ordinals",
-       "where": [["number", "==", 10]],
-       "row": {"name": "five plus five"}}]]]],
-  [[row,action,name,number,_version
-<0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
-
-row,action,name,number,_version
-<0>,old,"""ten""",,"[""uuid"",""<1>""]"
-,new,"""five plus five""",10,"[""uuid"",""<2>""]"
-]])
-
-OVSDB_CHECK_MONITOR([monitor no-op row updates],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}}]]]],
-  [ordinals], [ordinals],
-  [[[["ordinals",
-      {"op": "update",
-       "table": "ordinals",
-       "where": [["number", "==", 10]],
-       "row": {"number": 10, "name": "ten"}}]]],
-   [[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 9, "name": "nine"}}]]]],
-  [[row,action,name,number,_version
-<0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
-
-row,action,name,number,_version
-<2>,insert,"""nine""",9,"[""uuid"",""<3>""]"
-]])
-
-OVSDB_CHECK_MONITOR([monitor insert-and-update transaction],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}}]]]],
-  [ordinals], [ordinals],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 9, "name": "nine"},
-       "uuid-name": "nine"},
-      {"op": "update",
-       "table": "ordinals",
-       "where": [["_uuid", "==", ["named-uuid", "nine"]]],
-       "row": {"name": "three squared"}}]]]],
-  [[row,action,name,number,_version
-<0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
-
-row,action,name,number,_version
-<2>,insert,"""three squared""",9,"[""uuid"",""<3>""]"
-]])
-
-OVSDB_CHECK_MONITOR([monitor insert-update-and-delete transaction],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}}]]]],
-  [ordinals], [ordinals],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 9, "name": "nine"},
-       "uuid-name": "nine"},
-      {"op": "update",
-       "table": "ordinals",
-       "where": [["_uuid", "==", ["named-uuid", "nine"]]],
-       "row": {"name": "three squared"}},
-      {"op": "delete",
-       "table": "ordinals",
-       "where": [["_uuid", "==", ["named-uuid", "nine"]]]},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 7, "name": "seven"}}]]]],
-  [[row,action,name,number,_version
-<0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
-
-row,action,name,number,_version
-<2>,insert,"""seven""",7,"[""uuid"",""<3>""]"
-]])
-
-OVSDB_CHECK_MONITOR([monitor weak reference change],
-  [weak_schema],
-  [[[["weak",
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 0,
-               "a2a1": ["named-uuid", "a0"],
-               "a2b": ["named-uuid", "b2"]},
-       "uuid-name": "a0"},
-      {"op": "insert",
-       "table": "a",
-       "row": {"a": 1,
-               "a2a": ["named-uuid", "a0"],
-               "a2a1": ["named-uuid", "a1"],
-               "a2b": ["named-uuid", "b2"]},
-       "uuid-name": "a1"},
-      {"op": "insert",
-       "table": "b",
-       "row": {"b": 2},
-       "uuid-name": "b2"}]]]],
-  [weak], [a],
-  [[[["weak",
-      {"op": "delete",
-       "table": "a",
-       "where": [["a", "==", 0]]}]]]],
-  [[row,action,a,a2a,a2a1,a2b,_version
-<0>,initial,0,"[""set"",[]]","[""uuid"",""<0>""]","[""uuid"",""<1>""]","[""uuid"",""<2>""]"
-<3>,initial,1,"[""uuid"",""<0>""]","[""uuid"",""<3>""]","[""uuid"",""<1>""]","[""uuid"",""<4>""]"
-
-row,action,a,a2a,a2a1,a2b,_version
-<0>,delete,0,"[""set"",[]]","[""uuid"",""<0>""]","[""uuid"",""<1>""]","[""uuid"",""<2>""]"
-<3>,old,,"[""uuid"",""<0>""]",,,"[""uuid"",""<4>""]"
-,new,1,"[""set"",[]]","[""uuid"",""<3>""]","[""uuid"",""<1>""]","[""uuid"",""<5>""]"
-]])
-
-OVSDB_CHECK_MONITOR([monitor insert-update-and-delete transaction],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}}]]]],
-  [ordinals], [ordinals],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 9, "name": "nine"},
-       "uuid-name": "nine"},
-      {"op": "update",
-       "table": "ordinals",
-       "where": [["_uuid", "==", ["named-uuid", "nine"]]],
-       "row": {"name": "three squared"}},
-      {"op": "delete",
-       "table": "ordinals",
-       "where": [["_uuid", "==", ["named-uuid", "nine"]]]},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 7, "name": "seven"}}]]]],
-  [[row,action,name,number,_version
-<0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
-
-row,action,name,number,_version
-<2>,insert,"""seven""",7,"[""uuid"",""<3>""]"
-]])
-
-AT_BANNER([ovsdb -- ovsdb-monitor monitor only some operations])
-
-m4_define([OVSDB_MONITOR_INITIAL],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}}]]]])
-m4_define([OVSDB_MONITOR_TXNS],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 5, "name": "five"}}]]],
-   [[["ordinals",
-      {"op": "update",
-       "table": "ordinals",
-       "where": [["name", "==", "five"]],
-       "row": {"name": "FIVE"}}]]],
-   [[["ordinals",
-      {"op": "delete",
-       "table": "ordinals",
-       "where": []}]]]])
-
-OVSDB_CHECK_MONITOR([monitor all operations],
-  [ordinal_schema], [OVSDB_MONITOR_INITIAL],
-  [ordinals], [ordinals], [OVSDB_MONITOR_TXNS],
-  [[row,action,name,number,_version
-<0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
-
-row,action,name,number,_version
-<2>,insert,"""five""",5,"[""uuid"",""<3>""]"
-
-row,action,name,number,_version
-<2>,old,"""five""",,"[""uuid"",""<3>""]"
-,new,"""FIVE""",5,"[""uuid"",""<4>""]"
-
-row,action,name,number,_version
-<2>,delete,"""FIVE""",5,"[""uuid"",""<4>""]"
-<0>,delete,"""ten""",10,"[""uuid"",""<1>""]"
-]])
-
-dnl A monitor with "initial" only doesn't really make sense,
-dnl but it's still allowed and should work.
-OVSDB_CHECK_MONITOR([monitor initial only],
-  [ordinal_schema], [OVSDB_MONITOR_INITIAL],
-  [ordinals], [ordinals], [OVSDB_MONITOR_TXNS],
-  [[row,action,name,number,_version
-<0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
-]], [!insert,!delete,!modify])
-
-OVSDB_CHECK_MONITOR([monitor insert only],
-  [ordinal_schema], [OVSDB_MONITOR_INITIAL],
-  [ordinals], [ordinals], [OVSDB_MONITOR_TXNS],
-  [[row,action,name,number,_version
-<0>,insert,"""five""",5,"[""uuid"",""<1>""]"
-]], [!initial,!delete,!modify])
-
-OVSDB_CHECK_MONITOR([monitor delete only],
-  [ordinal_schema], [OVSDB_MONITOR_INITIAL],
-  [ordinals], [ordinals], [OVSDB_MONITOR_TXNS],
-  [[row,action,name,number,_version
-<0>,delete,"""FIVE""",5,"[""uuid"",""<1>""]"
-<2>,delete,"""ten""",10,"[""uuid"",""<3>""]"
-]], [!initial,!insert,!modify])
-
-OVSDB_CHECK_MONITOR([monitor modify only],
-  [ordinal_schema], [OVSDB_MONITOR_INITIAL],
-  [ordinals], [ordinals], [OVSDB_MONITOR_TXNS],
-  [[row,action,name,number,_version
-<0>,old,"""five""",,"[""uuid"",""<1>""]"
-,new,"""FIVE""",5,"[""uuid"",""<2>""]"
-]], [!initial,!insert,!delete])
-
-AT_BANNER([ovsdb -- ovsdb-monitor-cond conditional monitor only some operations])
-
-OVSDB_CHECK_MONITOR_COND([monitor-cond empty condition],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]]]],
-  [ordinals], [ordinals],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 11, "name": "eleven"}}]]]],
-  [[row,action,name,number,_version
-<0>,initial,"""one""",1,"[""uuid"",""<1>""]"
-<2>,initial,"""two""",2,"[""uuid"",""<3>""]"
-<4>,initial,"""zero""",,"[""uuid"",""<5>""]"
-
-row,action,name,number,_version
-<6>,insert,"""eleven""",11,"[""uuid"",""<7>""]"
-<8>,insert,"""ten""",10,"[""uuid"",""<9>""]"
-]],
-  [[]])
-
-OVSDB_CHECK_MONITOR_COND([monitor-cond multiple conditions],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]]]],
-  [ordinals], [ordinals],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 11, "name": "eleven"}}]]]],
-  [[row,action,name,number,_version
-<0>,initial,"""one""",1,"[""uuid"",""<1>""]"
-
-row,action,name,number,_version
-<2>,insert,"""ten""",10,"[""uuid"",""<3>""]"
-]],
-  [[["name","==","one"],["name","==","ten"]]])
-
-OVSDB_CHECK_MONITOR_COND([monitor-cond delete from populated table],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]]]],
-  [ordinals], [ordinals],
-  [[[["ordinals",
-      {"op": "delete",
-       "table": "ordinals",
-       "where": []}]]]],
-  [[row,action,name,number,_version
-<0>,initial,"""one""",1,"[""uuid"",""<1>""]"
-
-row,action,name,number,_version
-<0>,delete,,,
-]],
-  [[["name","==","one"],["name","==","ten"]]])
-
-OVSDB_CHECK_MONITOR_COND([monitor-cond insert due to modify],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]]]],
-  [ordinals], [ordinals],
-  [[[["ordinals",
-      {"op": "update",
-       "table": "ordinals",
-       "where": [["name", "==", "one"]],
-       "row": {"name": "ONE"}}]]]],
-  [[row,action,name,number,_version
-<0>,insert,"""ONE""",1,"[""uuid"",""<1>""]"
-]],
-  [[["name","==","ONE"]]],
-  [!initial,!delete,!modify])
-
-OVSDB_CHECK_MONITOR_COND([monitor-cond delete due to modify],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]]]],
-  [ordinals], [ordinals],
-  [[[["ordinals",
-      {"op": "update",
-       "table": "ordinals",
-       "where": [["name", "==", "one"]],
-       "row": {"name": "ONE"}}]]]],
-  [[row,action,name,number,_version
-<0>,delete,,,
-]],
-  [[["name","==","one"]]],
-  [!initial,!insert,!modify])
-
-OVSDB_CHECK_MONITOR_COND([monitor-cond condition non-monitored columns],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]]]],
-  [ordinals], [ordinals],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 11, "name": "eleven"}}]]]],
-  [[row,action,number
-<0>,initial,1
-
-row,action,number
-<1>,insert,10
-]],
-  [[["name","==","one"],["name","==","ten"]]],
-  ["number"])
-
-OVSDB_CHECK_MONITOR_COND([monitor-cond-change],
-  [ordinal_schema],
-  [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]]]],
-  [ordinals], [ordinals],
-  [],
-  [[row,action,name,number,_version
-<0>,initial,"""one""",1,"[""uuid"",""<1>""]"
-<2>,initial,"""two""",2,"[""uuid"",""<3>""]"
-<4>,initial,"""zero""",,"[""uuid"",""<5>""]"
-
-row,action,name,number,_version
-<4>,delete,,,
-
-row,action,name,number,_version
-<2>,delete,,,
-
-row,action,name,number,_version
-<0>,delete,,,
-
-row,action,name,number,_version
-<0>,insert,"""one""",1,"[""uuid"",""<1>""]"
-<2>,insert,"""two""",2,"[""uuid"",""<3>""]"
-<4>,insert,"""zero""",,"[""uuid"",""<5>""]"
-]],
-  [[]],
-  [],
-  [[[[["name","==","one"],["name","==","two"]]]],
-   [[[["name","==","one"]]]],
-    [[[false]]],
-    [[[true]]]])
-
-
-AT_SETUP(monitor-cond-change with many sessions pending)
-AT_KEYWORDS([ovsdb server monitor monitor-cond negative])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-AT_CAPTURE_FILE([ovsdb-server-log])
-
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1])
-on_exit 'kill `cat ovsdb-server.pid`'
-for txn in m4_foreach([txn], [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]]]], ['txn' ]); do
-  AT_CHECK([ovsdb-client transact unix:socket "$txn"], [0], [ignore], [ignore])
-done
-
-# 1001 clients monitoring column "name" and with condition for "name" only.
-# The clients are created in a way that the 991th client will request condition
-# change, so that the chance is high that the condition change will be handled
-# before some pending changes are freed.
-
-cond='[[["name","==","ten"]]]'
-for i in `seq 1 990`; do
-    AT_CHECK([ovsdb-client -vjsonrpc --pidfile=ovsdb-client$i.pid --detach --no-chdir -d json monitor-cond --format=csv unix:socket ordinals $cond ordinals ["name"]], [0], [ignore], [ignore])
-done
-
-AT_CHECK([ovsdb-client -vjsonrpc --pidfile --detach --no-chdir -d json monitor-cond --format=csv unix:socket ordinals $cond ordinals ["name"] > output],
-       [0], [ignore], [ignore])
-
-for i in `seq 991 1000`; do
-    AT_CHECK([ovsdb-client -vjsonrpc --pidfile=ovsdb-client$i.pid --detach --no-chdir -d json monitor-cond --format=csv unix:socket ordinals $cond ordinals ["name"]], [0], [ignore], [ignore])
-done
-
-for txn in m4_foreach([txn], [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}}]]]], ['txn' ]); do
-  AT_CHECK([ovsdb-client transact unix:socket "$txn"], [0],
-           [ignore], [ignore], [kill `cat server-pid client-pid`])
-done
-
-# Change the condition so that a new column "number" is added to monitor table.
-cond='[[["number","==",1]]]'
-AT_CHECK([ovs-appctl -t ovsdb-client ovsdb-client/cond_change ordinals $cond], [0], [ignore], [ignore])
-
-# Give some time for the server to flush and free pending changes
-# (to crash, when n_columns is not handled properly)
-sleep 1
-
-AT_CHECK([ovsdb-client transact unix:socket '[["ordinals"]]'], [0],
-         [ignore], [ignore])
-AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
-OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0], [[row,action,name
-<0>,insert,"""ten"""
-
-row,action,name
-<0>,delete,
-<1>,insert,"""one"""
-]], [ignore])
-AT_CLEANUP
-
-
-# Test monitor-cond-since with zero uuid, which shouldn't
-# be found in server and server should send all rows
-# as initial.
-AT_SETUP([monitor-cond-since not found])
-AT_KEYWORDS([ovsdb server monitor monitor-cond-since positive])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create-cluster db schema unix:db.raft], [0], [stdout], [ignore])
-AT_CAPTURE_FILE([ovsdb-server-log])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1])
-on_exit 'kill `cat ovsdb-server.pid`'
-for txn in m4_foreach([txn], [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]]]], ['txn' ]); do
-  AT_CHECK([ovsdb-client transact unix:socket "$txn"], [0], [ignore], [ignore])
-done
-
-# Omitting the last_id parameter in ovsdb-client monitor-cond-since command
-# will by default using all zero uuid, which doesn't exist in any history txn.
-AT_CHECK([ovsdb-client -vjsonrpc --pidfile --detach --no-chdir -d json monitor-cond-since --format=csv unix:socket ordinals '[[["name","==","one"],["name","==","ten"]]]' ordinals > output],
-       [0], [ignore], [ignore])
-on_exit 'kill `cat ovsdb-client.pid`'
-for txn in m4_foreach([txn], [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 11, "name": "eleven"}}]]]], ['txn' ]); do
-  AT_CHECK([ovsdb-client transact unix:socket "$txn"], [0],
-           [ignore], [ignore], [kill `cat server-pid client-pid`])
-done
-AT_CHECK([ovsdb-client transact unix:socket '[["ordinals"]]'], [0],
-         [ignore], [ignore])
-AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
-OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
-         [[found: false, last_id: <0>
-row,action,name,number,_version
-<1>,initial,"""one""",1,"[""uuid"",""<2>""]"
-
-last_id: <3>
-row,action,name,number,_version
-<4>,insert,"""ten""",10,"[""uuid"",""<5>""]"
-]], [ignore])
-AT_CLEANUP
-
-
-# Test monitor-cond-since in ovsdb server restart scenario.
-# ovsdb-client should receive only new changes after the
-# specific transaction id.
-AT_SETUP([monitor-cond-since db restart])
-AT_KEYWORDS([ovsdb server monitor monitor-cond-since positive])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create-cluster db schema unix:db.raft], [0], [stdout], [ignore])
-AT_CAPTURE_FILE([ovsdb-server-log])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1])
-on_exit 'kill `cat ovsdb-server.pid`'
-for txn in m4_foreach([txn], [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]]]], ['txn' ]); do
-  AT_CHECK([ovsdb-client transact unix:socket "$txn"], [0], [ignore], [ignore])
-done
-
-AT_CHECK([ovsdb-client -vjsonrpc --pidfile --detach --no-chdir -d json monitor-cond-since --format=csv unix:socket ordinals '[[["name","==","one"],["name","==","ten"]]]' ordinals > output],
-       [0], [ignore], [ignore])
-on_exit 'kill `cat ovsdb-client.pid`'
-OVS_WAIT_UNTIL([grep last_id output])
-
-kill `cat ovsdb-client.pid`
-kill `cat ovsdb-server.pid`
-OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-
-# Remember the last_id, which will be used for monitor-cond-since later.
-last_id=`grep last_id output | awk '{print $4}'`
-
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1])
-
-# Some new changes made to db after restarting the server.
-for txn in m4_foreach([txn], [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 11, "name": "eleven"}}]]]], ['txn' ]); do
-  AT_CHECK([ovsdb-client transact unix:socket "$txn"], [0],
-           [ignore], [ignore], [kill `cat server-pid client-pid`])
-done
-
-# Use last_id to monitor and get only the new changes.
-AT_CHECK([ovsdb-client -vjsonrpc --pidfile --detach --no-chdir -d json monitor-cond-since --format=csv unix:socket ordinals $last_id '[[["name","==","one"],["name","==","ten"]]]' ordinals > output],
-       [0], [ignore], [ignore])
-
-AT_CHECK([ovsdb-client transact unix:socket '[["ordinals"]]'], [0],
-         [ignore], [ignore])
-AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
-OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
-         [[found: true, last_id: <0>
-row,action,name,number,_version
-<1>,insert,"""ten""",10,"[""uuid"",""<2>""]"
-]], [ignore])
-AT_CLEANUP
-
-
-# Test monitor-cond-since with last_id found in server
-# but there is no new change after that transaction.
-AT_SETUP([monitor-cond-since found but no new rows])
-AT_KEYWORDS([ovsdb server monitor monitor-cond-since positive])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create-cluster db schema unix:db.raft], [0], [stdout], [ignore])
-AT_CAPTURE_FILE([ovsdb-server-log])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1])
-on_exit 'kill `cat ovsdb-server.pid`'
-for txn in m4_foreach([txn], [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]]]], ['txn' ]); do
-  AT_CHECK([ovsdb-client transact unix:socket "$txn"], [0], [ignore], [ignore])
-done
-AT_CHECK([ovsdb-client -vjsonrpc --pidfile --detach --no-chdir -d json monitor-cond-since --format=csv unix:socket ordinals '[[["name","==","one"],["name","==","ten"]]]' ordinals > output],
-       [0], [ignore], [ignore])
-on_exit 'kill `cat ovsdb-client.pid`'
-OVS_WAIT_UNTIL([grep last_id output])
-
-kill `cat ovsdb-client.pid`
-OVS_WAIT_UNTIL([test ! -e ovsdb-client.pid])
-last_id=`grep last_id output | awk '{print $4}'`
-AT_CHECK([ovsdb-client -vjsonrpc --pidfile --detach --no-chdir -d json monitor-cond-since --format=csv unix:socket ordinals $last_id '[[["name","==","one"],["name","==","ten"]]]' ordinals > output],
-       [0], [ignore], [ignore])
-
-AT_CHECK([ovsdb-client transact unix:socket '[["ordinals"]]'], [0],
-         [ignore], [ignore])
-AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
-OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
-         [[found: true, last_id: <0>
-]], [ignore])
-AT_CLEANUP
-
-
-# Test monitor-cond-since against empty DB
-AT_SETUP([monitor-cond-since empty db])
-AT_KEYWORDS([ovsdb server monitor monitor-cond-since positive])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create-cluster db schema unix:db.raft], [0], [stdout], [ignore])
-AT_CAPTURE_FILE([ovsdb-server-log])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1])
-on_exit 'kill `cat ovsdb-server.pid`'
-AT_CHECK([ovsdb-client -vjsonrpc --pidfile --detach --no-chdir -d json monitor-cond-since --format=csv unix:socket ordinals '[[["name","==","one"],["name","==","ten"]]]' ordinals > output],
-       [0], [ignore], [ignore])
-on_exit 'kill `cat ovsdb-client.pid`'
-OVS_WAIT_UNTIL([grep last_id output])
-
-AT_CHECK([ovsdb-client transact unix:socket '[["ordinals"]]'], [0],
-         [ignore], [ignore])
-AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
-OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
-         [[found: false, last_id: <0>
-]], [ignore])
-AT_CLEANUP
-
-
-# Test monitor-cond-since with cond-change followed.
-AT_SETUP([monitor-cond-since condition change])
-AT_KEYWORDS([ovsdb server monitor monitor-cond-since positive])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create-cluster db schema unix:db.raft], [0], [stdout], [ignore])
-AT_CAPTURE_FILE([ovsdb-server-log])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1])
-on_exit 'kill `cat ovsdb-server.pid`'
-for txn in m4_foreach([txn], [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]]]], ['txn' ]); do
-  AT_CHECK([ovsdb-client transact unix:socket "$txn"], [0], [ignore], [ignore])
-done
-AT_CHECK([ovsdb-client -vjsonrpc --pidfile --detach --no-chdir -d json monitor-cond-since --format=csv unix:socket ordinals '[[]]' ordinals > output], [0], [ignore], [ignore])
-on_exit 'kill `cat ovsdb-client.pid`'
-for cond in m4_foreach([cond],
-                       [[[[["name","==","one"],["name","==","two"]]]],
-                        [[[["name","==","one"]]]],
-                        [[[false]]],
-                        [[[true]]]], ['cond' ]); do
-  AT_CHECK([ovs-appctl -t ovsdb-client ovsdb-client/cond_change ordinals "$cond"], [0], [ignore], [ignore])
-done
-AT_CHECK([ovsdb-client transact unix:socket '[["ordinals"]]'], [0],
-         [ignore], [ignore])
-AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
-OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
-         [[found: false, last_id: <0>
-row,action,name,number,_version
-<1>,initial,"""one""",1,"[""uuid"",""<2>""]"
-<3>,initial,"""two""",2,"[""uuid"",""<4>""]"
-<5>,initial,"""zero""",,"[""uuid"",""<6>""]"
-
-last_id: <0>
-row,action,name,number,_version
-<5>,delete,,,
-
-last_id: <0>
-row,action,name,number,_version
-<3>,delete,,,
-
-last_id: <0>
-row,action,name,number,_version
-<1>,delete,,,
-
-last_id: <0>
-row,action,name,number,_version
-<1>,insert,"""one""",1,"[""uuid"",""<2>""]"
-<3>,insert,"""two""",2,"[""uuid"",""<4>""]"
-<5>,insert,"""zero""",,"[""uuid"",""<6>""]"
-]], [ignore])
-AT_CLEANUP
-
-
-# Test monitor-cond-since with non-cluster mode server
-AT_SETUP([monitor-cond-since non-cluster])
-AT_KEYWORDS([ovsdb server monitor monitor-cond-since positive])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-AT_CAPTURE_FILE([ovsdb-server-log])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1])
-on_exit 'kill `cat ovsdb-server.pid`'
-for txn in m4_foreach([txn], [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]]]], ['txn' ]); do
-  AT_CHECK([ovsdb-client transact unix:socket "$txn"], [0], [ignore], [ignore])
-done
-
-AT_CHECK([ovsdb-client -vjsonrpc --pidfile --detach --no-chdir -d json monitor-cond-since --format=csv unix:socket ordinals '[[["name","==","one"],["name","==","ten"]]]' ordinals > output],
-       [0], [ignore], [ignore])
-on_exit 'kill `cat ovsdb-client.pid`'
-for txn in m4_foreach([txn], [[[["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 10, "name": "ten"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 11, "name": "eleven"}}]]]], ['txn' ]); do
-  AT_CHECK([ovsdb-client transact unix:socket "$txn"], [0],
-           [ignore], [ignore], [kill `cat server-pid client-pid`])
-done
-AT_CHECK([ovsdb-client transact unix:socket '[["ordinals"]]'], [0],
-         [ignore], [ignore])
-AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
-OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-
-# Transaction shouldn't be found, and last_id returned should always
-# be the same (all zero uuid)
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
-         [[found: false, last_id: <0>
-row,action,name,number,_version
-<1>,initial,"""one""",1,"[""uuid"",""<2>""]"
-
-last_id: <0>
-row,action,name,number,_version
-<3>,insert,"""ten""",10,"[""uuid"",""<4>""]"
-]], [ignore])
-AT_CLEANUP
-
diff --git a/tests/ovsdb-mutation.at b/tests/ovsdb-mutation.at
deleted file mode 100644
index 2981c5393..000000000
--- a/tests/ovsdb-mutation.at
+++ /dev/null
@@ -1,827 +0,0 @@
-AT_BANNER([OVSDB -- mutations])
-
-OVSDB_CHECK_POSITIVE([null mutation],
-  [[parse-mutations \
-    '{"columns": {"name": {"type": "string"}}}' \
-    '[]']],
-  [[[]]])
-
-OVSDB_CHECK_POSITIVE([mutations on scalars],
-  [[parse-mutations \
-    '{"columns":
-        {"i": {"type": "integer"},
-         "r": {"type": "real"},
-         "b": {"type": "boolean"},
-         "s": {"type": "string"},
-         "u": {"type": "uuid"}}}' \
-    '[["i", "+=", 0]]' \
-    '[["i", "-=", 1]]' \
-    '[["i", "*=", 2]]' \
-    '[["i", "/=", 3]]' \
-    '[["i", "%=", 4]]' \
-    '[["r", "+=", 0.5]]' \
-    '[["r", "-=", 1.5]]' \
-    '[["r", "*=", 2.5]]' \
-    '[["r", "/=", 3.5]]']],
-  [[[["i","+=",0]]
-[["i","-=",1]]
-[["i","*=",2]]
-[["i","/=",3]]
-[["i","%=",4]]
-[["r","+=",0.5]]
-[["r","-=",1.5]]
-[["r","*=",2.5]]
-[["r","/=",3.5]]]],
-  [mutation])
-
-AT_SETUP([disallowed mutations on scalars])
-AT_KEYWORDS([ovsdb negative mutation])
-AT_CHECK([[test-ovsdb parse-mutations \
-    '{"columns":
-        {"i": {"type": "integer"},
-         "r": {"type": "real"},
-         "b": {"type": "boolean"},
-         "s": {"type": "string"},
-         "u": {"type": "uuid"}}}' \
-    '[["i", "xxx", 1]]' \
-    '[["i", "insert", 1]]' \
-    '[["i", "delete", 2]]' \
-    '[["r", "%=", 0.5]]' \
-    '[["r", "insert", 1.5]]' \
-    '[["r", "delete", 2.5]]' \
-    '[["b", "+=", true]]' \
-    '[["b", "-=", false]]' \
-    '[["b", "*=", true]]' \
-    '[["b", "/=", false]]' \
-    '[["b", "%=", true]]' \
-    '[["b", "insert", false]]' \
-    '[["b", "delete", true]]' \
-    '[["s", "+=", "a"]]' \
-    '[["s", "-=", "b"]]' \
-    '[["s", "*=", "c"]]' \
-    '[["s", "/=", "d"]]' \
-    '[["s", "%=", "e"]]' \
-    '[["s", "insert", "f"]]' \
-    '[["s", "delete", "g"]]' \
-    '[["u", "+=", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]' \
-    '[["u", "-=", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]' \
-    '[["u", "*=", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]' \
-    '[["u", "/=", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]' \
-    '[["u", "insert", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]' \
-    '[["u", "delete", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]']],
-  [1], [],
-  [[test-ovsdb: unknown mutator: No mutator named xxx.
-test-ovsdb: syntax "["i","insert",1]": syntax error: Type mismatch: "insert" operator may not be applied to column i of type integer.
-test-ovsdb: syntax "["i","delete",2]": syntax error: Type mismatch: "delete" operator may not be applied to column i of type integer.
-test-ovsdb: syntax "["r","%=",0.5]": syntax error: Type mismatch: "%=" operator may not be applied to column r of type real.
-test-ovsdb: syntax "["r","insert",1.5]": syntax error: Type mismatch: "insert" operator may not be applied to column r of type real.
-test-ovsdb: syntax "["r","delete",2.5]": syntax error: Type mismatch: "delete" operator may not be applied to column r of type real.
-test-ovsdb: syntax "["b","+=",true]": syntax error: Type mismatch: "+=" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["b","-=",false]": syntax error: Type mismatch: "-=" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["b","*=",true]": syntax error: Type mismatch: "*=" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["b","/=",false]": syntax error: Type mismatch: "/=" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["b","%=",true]": syntax error: Type mismatch: "%=" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["b","insert",false]": syntax error: Type mismatch: "insert" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["b","delete",true]": syntax error: Type mismatch: "delete" operator may not be applied to column b of type boolean.
-test-ovsdb: syntax "["s","+=","a"]": syntax error: Type mismatch: "+=" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["s","-=","b"]": syntax error: Type mismatch: "-=" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["s","*=","c"]": syntax error: Type mismatch: "*=" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["s","/=","d"]": syntax error: Type mismatch: "/=" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["s","%=","e"]": syntax error: Type mismatch: "%=" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["s","insert","f"]": syntax error: Type mismatch: "insert" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["s","delete","g"]": syntax error: Type mismatch: "delete" operator may not be applied to column s of type string.
-test-ovsdb: syntax "["u","+=",["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"]]": syntax error: Type mismatch: "+=" operator may not be applied to column u of type uuid.
-test-ovsdb: syntax "["u","-=",["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"]]": syntax error: Type mismatch: "-=" operator may not be applied to column u of type uuid.
-test-ovsdb: syntax "["u","*=",["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"]]": syntax error: Type mismatch: "*=" operator may not be applied to column u of type uuid.
-test-ovsdb: syntax "["u","/=",["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"]]": syntax error: Type mismatch: "/=" operator may not be applied to column u of type uuid.
-test-ovsdb: syntax "["u","insert",["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"]]": syntax error: Type mismatch: "insert" operator may not be applied to column u of type uuid.
-test-ovsdb: syntax "["u","delete",["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"]]": syntax error: Type mismatch: "delete" operator may not be applied to column u of type uuid.
-]])
-AT_CLEANUP
-
-AT_SETUP([disallowed mutations on immutable columns])
-AT_KEYWORDS([ovsdb negative mutation])
-AT_CHECK([[test-ovsdb parse-mutations \
-    '{"columns":
-        {"i": {"type": "integer", "mutable": false}}}' \
-    '[["i", "+=", 1]]'
-]],
-  [1], [],
-  [[test-ovsdb: syntax "["i","+=",1]": constraint violation: Cannot mutate immutable column i in table mytable.
-]])
-AT_CLEANUP
-
-OVSDB_CHECK_POSITIVE([mutations on sets],
-  [[parse-mutations \
-    '{"columns":
-        {"i": {"type": {"key": "integer", "min": 0, "max": "unlimited"}},
-         "r": {"type": {"key": "real", "min": 0, "max": "unlimited"}},
-         "b": {"type": {"key": "boolean", "min": 0, "max": "unlimited"}},
-         "s": {"type": {"key": "string", "min": 0, "max": "unlimited"}},
-         "u": {"type": {"key": "uuid", "min": 0, "max": "unlimited"}}}}' \
-    '[["i", "+=", 1]]' \
-    '[["i", "-=", 2]]' \
-    '[["i", "*=", 3]]' \
-    '[["i", "/=", 4]]' \
-    '[["i", "%=", 5]]' \
-    '[["i", "insert", ["set", [1, 2]]]]' \
-    '[["i", "delete", ["set", [1, 2, 3]]]]' \
-    '[["r", "+=", 1]]' \
-    '[["r", "-=", 2]]' \
-    '[["r", "*=", 3]]' \
-    '[["r", "/=", 4]]' \
-    '[["r", "insert", ["set", [1, 2]]]]' \
-    '[["r", "delete", ["set", [1, 2, 3]]]]' \
-    '[["b", "insert", ["set", [true]]]]' \
-    '[["b", "delete", ["set", [false]]]]' \
-    '[["s", "insert", ["set", ["a"]]]]' \
-    '[["s", "delete", ["set", ["a", "b"]]]]' \
-    '[["u", "insert", 
-       ["set", [["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]]]]]' \
-    '[["u", "delete", 
-       ["set", [["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"],
-                ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]]]]' \
-]],
-  [[[["i","+=",1]]
-[["i","-=",2]]
-[["i","*=",3]]
-[["i","/=",4]]
-[["i","%=",5]]
-[["i","insert",["set",[1,2]]]]
-[["i","delete",["set",[1,2,3]]]]
-[["r","+=",1]]
-[["r","-=",2]]
-[["r","*=",3]]
-[["r","/=",4]]
-[["r","insert",["set",[1,2]]]]
-[["r","delete",["set",[1,2,3]]]]
-[["b","insert",true]]
-[["b","delete",false]]
-[["s","insert","a"]]
-[["s","delete",["set",["a","b"]]]]
-[["u","insert",["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]
-[["u","delete",["set",[["uuid","9179ca6d-6d65-400a-b455-3ad92783a099"],["uuid","b10d28f7-af18-4a67-9e78-2a6394516c59"]]]]]]],
-  [mutation])
-
-OVSDB_CHECK_POSITIVE([executing null mutation],
-  [[execute-mutations \
-    '{"columns": {"i": {"type": "integer"}}}' \
-    '[[]]' \
-    '[{"i": 0},
-      {"i": 1},
-      {"i": 2}']]],
-  [mutation  0:
-row 0: no change
-row 1: no change
-row 2: no change
-])
-
-OVSDB_CHECK_POSITIVE([executing mutations on integers],
-  [[execute-mutations \
-    '{"columns": {"i": {"type": "integer"}}}' \
-    '[[["i", "+=", 1]],
-      [["i", "-=", 2]],
-      [["i", "*=", 3]],
-      [["i", "/=", 4]],
-      [["i", "%=", 2]]]' \
-    '[{"i": 0},
-      {"i": 1},
-      {"i": 2}']]],
-  [mutation  0:
-row 0: {"i":1}
-row 1: {"i":2}
-row 2: {"i":3}
-
-mutation  1:
-row 0: {"i":-2}
-row 1: {"i":-1}
-row 2: {"i":0}
-
-mutation  2:
-row 0: no change
-row 1: {"i":3}
-row 2: {"i":6}
-
-mutation  3:
-row 0: no change
-row 1: {"i":0}
-row 2: {"i":0}
-
-mutation  4:
-row 0: no change
-row 1: no change
-row 2: {"i":0}
-], [mutation])
-
-OVSDB_CHECK_POSITIVE([integer overflow detection],
-  [[execute-mutations \
-    '{"columns": {"i": {"type": "integer"}}}' \
-    '[[["i", "+=", 9223372036854775807]],
-      [["i", "+=", -9223372036854775808]],
-      [["i", "-=", -9223372036854775808]],
-      [["i", "-=", 9223372036854775807]],
-      [["i", "*=", 3037000500]],
-      [["i", "/=", -1]],
-      [["i", "/=", 0]]]' \
-    '[{"i": 0},
-      {"i": 1},
-      {"i": -1},
-      {"i": 9223372036854775807},
-      {"i": -9223372036854775808},
-      {"i": 3037000500},
-      {"i": -3037000500}']]],
-  [mutation  0:
-row 0: {"i":9223372036854775807}
-row 1: range error: Result of "+=" operation is out of range.
-row 2: {"i":9223372036854775806}
-row 3: range error: Result of "+=" operation is out of range.
-row 4: {"i":-1}
-row 5: range error: Result of "+=" operation is out of range.
-row 6: {"i":9223372033817775307}
-
-mutation  1:
-row 0: {"i":-9223372036854775808}
-row 1: {"i":-9223372036854775807}
-row 2: range error: Result of "+=" operation is out of range.
-row 3: {"i":-1}
-row 4: range error: Result of "+=" operation is out of range.
-row 5: {"i":-9223372033817775308}
-row 6: range error: Result of "+=" operation is out of range.
-
-mutation  2:
-row 0: range error: Result of "-=" operation is out of range.
-row 1: range error: Result of "-=" operation is out of range.
-row 2: {"i":9223372036854775807}
-row 3: range error: Result of "-=" operation is out of range.
-row 4: {"i":0}
-row 5: range error: Result of "-=" operation is out of range.
-row 6: {"i":9223372033817775308}
-
-mutation  3:
-row 0: {"i":-9223372036854775807}
-row 1: {"i":-9223372036854775806}
-row 2: {"i":-9223372036854775808}
-row 3: {"i":0}
-row 4: range error: Result of "-=" operation is out of range.
-row 5: {"i":-9223372033817775307}
-row 6: range error: Result of "-=" operation is out of range.
-
-mutation  4:
-row 0: no change
-row 1: {"i":3037000500}
-row 2: {"i":-3037000500}
-row 3: range error: Result of "*=" operation is out of range.
-row 4: range error: Result of "*=" operation is out of range.
-row 5: range error: Result of "*=" operation is out of range.
-row 6: range error: Result of "*=" operation is out of range.
-
-mutation  5:
-row 0: no change
-row 1: {"i":-1}
-row 2: {"i":1}
-row 3: {"i":-9223372036854775807}
-row 4: range error: Result of "/=" operation is out of range.
-row 5: {"i":-3037000500}
-row 6: {"i":3037000500}
-
-mutation  6:
-row 0: domain error: Division by zero.
-row 1: domain error: Division by zero.
-row 2: domain error: Division by zero.
-row 3: domain error: Division by zero.
-row 4: domain error: Division by zero.
-row 5: domain error: Division by zero.
-row 6: domain error: Division by zero.
-], [mutation])
-
-OVSDB_CHECK_POSITIVE([executing mutations on integers with constraints],
-  [[execute-mutations \
-    '{"columns": {"i": {"type": {"key": {"type": "integer",
-                                         "minInteger": 0,
-                                         "maxInteger": 2}}}}}' \
-    '[[["i", "+=", 1]],
-      [["i", "-=", 2]],
-      [["i", "*=", 3]],
-      [["i", "/=", 4]],
-      [["i", "%=", 2]]]' \
-    '[{"i": 0},
-      {"i": 1},
-      {"i": 2}']]],
-  [mutation  0:
-row 0: {"i":1}
-row 1: {"i":2}
-row 2: constraint violation: 3 is not in the valid range 0 to 2 (inclusive)
-
-mutation  1:
-row 0: constraint violation: -2 is not in the valid range 0 to 2 (inclusive)
-row 1: constraint violation: -1 is not in the valid range 0 to 2 (inclusive)
-row 2: {"i":0}
-
-mutation  2:
-row 0: no change
-row 1: constraint violation: 3 is not in the valid range 0 to 2 (inclusive)
-row 2: constraint violation: 6 is not in the valid range 0 to 2 (inclusive)
-
-mutation  3:
-row 0: no change
-row 1: {"i":0}
-row 2: {"i":0}
-
-mutation  4:
-row 0: no change
-row 1: no change
-row 2: {"i":0}
-], [mutation])
-
-OVSDB_CHECK_POSITIVE([executing mutations on reals],
-  [[execute-mutations \
-    '{"columns": {"r": {"type": "real"}}}' \
-    '[[["r", "+=", 0.5]],
-      [["r", "-=", 1.5]],
-      [["r", "*=", 2.5]],
-      [["r", "/=", 4]]]' \
-    '[{"r": 0},
-      {"r": -2.5},
-      {"r": 1.25}']]],
-  [mutation  0:
-row 0: {"r":0.5}
-row 1: {"r":-2}
-row 2: {"r":1.75}
-
-mutation  1:
-row 0: {"r":-1.5}
-row 1: {"r":-4}
-row 2: {"r":-0.25}
-
-mutation  2:
-row 0: no change
-row 1: {"r":-6.25}
-row 2: {"r":3.125}
-
-mutation  3:
-row 0: no change
-row 1: {"r":-0.625}
-row 2: {"r":0.3125}
-], [mutation])
-
-OVSDB_CHECK_POSITIVE([real overflow detection],
-  [[execute-mutations \
-    '{"columns": {"r": {"type": "real"}}}' \
-    '[[["r", "+=", 1.7976931348623157e+308]],
-      [["r", "-=", 1.7976931348623157e+308]],
-      [["r", "*=", 2]],
-      [["r", "/=", 4]],
-      [["r", "/=", 0.5]],
-      [["r", "/=", 0]]]' \
-    '[{"r": 0},
-      {"r": 1.7976931348623157e+308},
-      {"r": -1.7976931348623157e+308}']]],
-  [mutation  0:
-row 0: {"r":1.79769313486232e+308}
-row 1: range error: Result of "+=" operation is out of range.
-row 2: {"r":0}
-
-mutation  1:
-row 0: {"r":-1.79769313486232e+308}
-row 1: {"r":0}
-row 2: range error: Result of "-=" operation is out of range.
-
-mutation  2:
-row 0: no change
-row 1: range error: Result of "*=" operation is out of range.
-row 2: range error: Result of "*=" operation is out of range.
-
-mutation  3:
-row 0: no change
-row 1: {"r":4.49423283715579e+307}
-row 2: {"r":-4.49423283715579e+307}
-
-mutation  4:
-row 0: no change
-row 1: range error: Result of "/=" operation is out of range.
-row 2: range error: Result of "/=" operation is out of range.
-
-mutation  5:
-row 0: domain error: Division by zero.
-row 1: domain error: Division by zero.
-row 2: domain error: Division by zero.
-], [mutation])
-
-OVSDB_CHECK_POSITIVE([executing mutations on reals with constraints],
-  [[execute-mutations \
-    '{"columns": {"r": {"type": {"key": {"type": "real",
-                                         "minReal": -2.5,
-                                         "maxReal": 1.75}}}}}' \
-    '[[["r", "+=", 0.5]],
-      [["r", "-=", 1.5]],
-      [["r", "*=", 2.5]],
-      [["r", "/=", 4]]]' \
-    '[{"r": 0},
-      {"r": -2.5},
-      {"r": 1.25}']]],
-  [mutation  0:
-row 0: {"r":0.5}
-row 1: {"r":-2}
-row 2: {"r":1.75}
-
-mutation  1:
-row 0: {"r":-1.5}
-row 1: constraint violation: -4 is not in the valid range -2.5 to 1.75 (inclusive)
-row 2: {"r":-0.25}
-
-mutation  2:
-row 0: no change
-row 1: constraint violation: -6.25 is not in the valid range -2.5 to 1.75 (inclusive)
-row 2: constraint violation: 3.125 is not in the valid range -2.5 to 1.75 (inclusive)
-
-mutation  3:
-row 0: no change
-row 1: {"r":-0.625}
-row 2: {"r":0.3125}
-], [mutation])
-
-OVSDB_CHECK_POSITIVE([executing mutations on integer sets],
-  [[execute-mutations \
-    '{"columns": {"i": {"type": {"key": {"type": "integer", 
-                                         "maxInteger": 5},
-                                 "min": 0, 
-                                 "max": "unlimited"}}}}' \
-    '[[["i", "+=", 1]],
-      [["i", "-=", 2]],
-      [["i", "*=", 3]],
-      [["i", "/=", 4]],
-      [["i", "%=", 2]],
-      [["i", "insert", ["set", [1]]]],
-      [["i", "insert", ["set", [2, 3]]]],
-      [["i", "delete", ["set", [1]]]],
-      [["i", "delete", ["set", [2, 3]]]]]' \
-    '[{"i": ["set", []]},
-      {"i": ["set", [0]]},
-      {"i": ["set", [0, 1]]},
-      {"i": ["set", [0, 1, 2]]}']]],
-  [[mutation  0:
-row 0: no change
-row 1: {"i":1}
-row 2: {"i":["set",[1,2]]}
-row 3: {"i":["set",[1,2,3]]}
-
-mutation  1:
-row 0: no change
-row 1: {"i":-2}
-row 2: {"i":["set",[-2,-1]]}
-row 3: {"i":["set",[-2,-1,0]]}
-
-mutation  2:
-row 0: no change
-row 1: no change
-row 2: {"i":["set",[0,3]]}
-row 3: constraint violation: 6 is greater than maximum allowed value 5
-
-mutation  3:
-row 0: no change
-row 1: no change
-row 2: constraint violation: Result of "/=" operation contains duplicates.
-row 3: constraint violation: Result of "/=" operation contains duplicates.
-
-mutation  4:
-row 0: no change
-row 1: no change
-row 2: no change
-row 3: constraint violation: Result of "%=" operation contains duplicates.
-
-mutation  5:
-row 0: {"i":1}
-row 1: {"i":["set",[0,1]]}
-row 2: no change
-row 3: no change
-
-mutation  6:
-row 0: {"i":["set",[2,3]]}
-row 1: {"i":["set",[0,2,3]]}
-row 2: {"i":["set",[0,1,2,3]]}
-row 3: {"i":["set",[0,1,2,3]]}
-
-mutation  7:
-row 0: no change
-row 1: no change
-row 2: {"i":0}
-row 3: {"i":["set",[0,2]]}
-
-mutation  8:
-row 0: no change
-row 1: no change
-row 2: no change
-row 3: {"i":["set",[0,1]]}
-]], [mutation])
-
-OVSDB_CHECK_POSITIVE([executing mutations on integer sets with constraints],
-  [[execute-mutations \
-    '{"columns": {"i": {"type": {"key": "integer",
-                                 "min": 1,
-                                 "max": 2}}}}' \
-    '[[["i", "insert", ["set", [1]]]],
-      [["i", "insert", ["set", [2]]]],
-      [["i", "delete", ["set", [1]]]],
-      [["i", "delete", ["set", [2]]]],
-      [["i", "delete", ["set", [0, 1]]]]]' \
-    '[{"i": ["set", [0]]},
-      {"i": ["set", [2]]},
-      {"i": ["set", [0, 1]]}']]],
-  [[mutation  0:
-row 0: {"i":["set",[0,1]]}
-row 1: {"i":["set",[1,2]]}
-row 2: no change
-
-mutation  1:
-row 0: {"i":["set",[0,2]]}
-row 1: no change
-row 2: constraint violation: Attempted to store 3 elements in set of 1 to 2 integers.
-
-mutation  2:
-row 0: no change
-row 1: no change
-row 2: {"i":0}
-
-mutation  3:
-row 0: no change
-row 1: constraint violation: Attempted to store 0 elements in set of 1 to 2 integers.
-row 2: no change
-
-mutation  4:
-row 0: constraint violation: Attempted to store 0 elements in set of 1 to 2 integers.
-row 1: no change
-row 2: constraint violation: Attempted to store 0 elements in set of 1 to 2 integers.
-]], [mutation])
-
-OVSDB_CHECK_POSITIVE([executing mutations on real sets],
-  [[execute-mutations \
-    '{"columns": {"r": {"type": {"key": {"type": "real",
-                                         "maxReal": 6},
-                                 "min": 0, "max": "unlimited"}}}}' \
-    '[[["r", "+=", 0.5]],
-      [["r", "-=", 1.5]],
-      [["r", "*=", 2.5]],
-      [["r", "/=", 4]],
-      [["r", "*=", 0]],
-      [["r", "insert", 1.5]],
-      [["r", "insert", 3]],
-      [["r", "delete", ["set", [1.5, 3.5]]]],
-      [["r", "delete", ["set", [0.5, 1.5, 2.5]]]]]' \
-    '[{"r": ["set", []]},
-      {"r": 0.5},
-      {"r": ["set", [0.5, 1.5]]},
-      {"r": ["set", [0.5, 1.5, 2.5]]}']]],
-  [[mutation  0:
-row 0: no change
-row 1: {"r":1}
-row 2: {"r":["set",[1,2]]}
-row 3: {"r":["set",[1,2,3]]}
-
-mutation  1:
-row 0: no change
-row 1: {"r":-1}
-row 2: {"r":["set",[-1,0]]}
-row 3: {"r":["set",[-1,0,1]]}
-
-mutation  2:
-row 0: no change
-row 1: {"r":1.25}
-row 2: {"r":["set",[1.25,3.75]]}
-row 3: constraint violation: 6.25 is greater than maximum allowed value 6
-
-mutation  3:
-row 0: no change
-row 1: {"r":0.125}
-row 2: {"r":["set",[0.125,0.375]]}
-row 3: {"r":["set",[0.125,0.375,0.625]]}
-
-mutation  4:
-row 0: no change
-row 1: {"r":0}
-row 2: constraint violation: Result of "*=" operation contains duplicates.
-row 3: constraint violation: Result of "*=" operation contains duplicates.
-
-mutation  5:
-row 0: {"r":1.5}
-row 1: {"r":["set",[0.5,1.5]]}
-row 2: no change
-row 3: no change
-
-mutation  6:
-row 0: {"r":3}
-row 1: {"r":["set",[0.5,3]]}
-row 2: {"r":["set",[0.5,1.5,3]]}
-row 3: {"r":["set",[0.5,1.5,2.5,3]]}
-
-mutation  7:
-row 0: no change
-row 1: no change
-row 2: {"r":0.5}
-row 3: {"r":["set",[0.5,2.5]]}
-
-mutation  8:
-row 0: no change
-row 1: {"r":["set",[]]}
-row 2: {"r":["set",[]]}
-row 3: {"r":["set",[]]}
-]], [mutation])
-
-OVSDB_CHECK_POSITIVE([executing mutations on boolean sets],
-  [[execute-mutations \
-    '{"columns": {"b": {"type": {"key": "boolean", "min": 0, "max": "unlimited"}}}}' \
-    '[[["b", "insert", ["set", [false]]]],
-      [["b", "insert", ["set", [true]]]],
-      [["b", "insert", ["set", [false, true]]]],
-      [["b", "delete", ["set", [false]]]],
-      [["b", "delete", ["set", [true]]]],
-      [["b", "delete", ["set", [true, false]]]]]' \
-    '[{"b": ["set", []]},
-      {"b": ["set", [false]]},
-      {"b": ["set", [true]]},
-      {"b": ["set", [false, true]]}']]],
-  [[mutation  0:
-row 0: {"b":false}
-row 1: no change
-row 2: {"b":["set",[false,true]]}
-row 3: no change
-
-mutation  1:
-row 0: {"b":true}
-row 1: {"b":["set",[false,true]]}
-row 2: no change
-row 3: no change
-
-mutation  2:
-row 0: {"b":["set",[false,true]]}
-row 1: {"b":["set",[false,true]]}
-row 2: {"b":["set",[false,true]]}
-row 3: no change
-
-mutation  3:
-row 0: no change
-row 1: {"b":["set",[]]}
-row 2: no change
-row 3: {"b":true}
-
-mutation  4:
-row 0: no change
-row 1: no change
-row 2: {"b":["set",[]]}
-row 3: {"b":false}
-
-mutation  5:
-row 0: no change
-row 1: {"b":["set",[]]}
-row 2: {"b":["set",[]]}
-row 3: {"b":["set",[]]}
-]], [mutation])
-
-OVSDB_CHECK_POSITIVE([executing mutations on string sets],
-  [[execute-mutations \
-    '{"columns": {"s": {"type": {"key": "string", "min": 0, "max": "unlimited"}}}}' \
-    '[[["s", "insert", ["set", ["a"]]]],
-      [["s", "insert", ["set", ["b"]]]],
-      [["s", "insert", ["set", ["c", "d"]]]],
-      [["s", "delete", ["set", ["a"]]]],
-      [["s", "delete", ["set", ["b"]]]],
-      [["s", "delete", ["set", ["c", "d"]]]]]' \
-    '[{"s": ["set", []]},
-      {"s": ["set", ["a"]]},
-      {"s": ["set", ["a", "b"]]},
-      {"s": ["set", ["a", "b", "c", "d"]]}']]],
-  [[mutation  0:
-row 0: {"s":"a"}
-row 1: no change
-row 2: no change
-row 3: no change
-
-mutation  1:
-row 0: {"s":"b"}
-row 1: {"s":["set",["a","b"]]}
-row 2: no change
-row 3: no change
-
-mutation  2:
-row 0: {"s":["set",["c","d"]]}
-row 1: {"s":["set",["a","c","d"]]}
-row 2: {"s":["set",["a","b","c","d"]]}
-row 3: no change
-
-mutation  3:
-row 0: no change
-row 1: {"s":["set",[]]}
-row 2: {"s":"b"}
-row 3: {"s":["set",["b","c","d"]]}
-
-mutation  4:
-row 0: no change
-row 1: no change
-row 2: {"s":"a"}
-row 3: {"s":["set",["a","c","d"]]}
-
-mutation  5:
-row 0: no change
-row 1: no change
-row 2: no change
-row 3: {"s":["set",["a","b"]]}
-]], [mutation])
-
-OVSDB_CHECK_POSITIVE([executing mutations on uuid sets],
-  [[execute-mutations \
-    '{"columns": {"u": {"type": {"key": "uuid", "min": 0, "max": "unlimited"}}}}' \
-    '[[["u", "insert", ["set", [["uuid", "ddd9e79d-7782-414c-8b22-1046c60b6ec2"]]]]],
-      [["u", "insert", ["set", [["uuid", "a60fe7ff-317b-4568-9106-892b37445313"]]]]],
-      [["u", "insert", ["set", [["uuid", "2607d30e-e652-4927-9fec-8bbf1b60c7e9"]]]]],
-      [["u", "delete", ["set", [["uuid", "ddd9e79d-7782-414c-8b22-1046c60b6ec2"]]]]],
-      [["u", "delete", ["set", [["uuid", "a60fe7ff-317b-4568-9106-892b37445313"]]]]],
-      [["u", "delete", ["set", [["uuid", "2607d30e-e652-4927-9fec-8bbf1b60c7e9"]]]]]]' \
-    '[{"u": ["set", []]},
-      {"u": ["set", [["uuid", "ddd9e79d-7782-414c-8b22-1046c60b6ec2"]]]},
-      {"u": ["set", [["uuid", "a60fe7ff-317b-4568-9106-892b37445313"]]]},
-      {"u": ["set", [["uuid", "2607d30e-e652-4927-9fec-8bbf1b60c7e9"]]]}']]],
-  [[mutation  0:
-row 0: {"u":["uuid","ddd9e79d-7782-414c-8b22-1046c60b6ec2"]}
-row 1: no change
-row 2: {"u":["set",[["uuid","a60fe7ff-317b-4568-9106-892b37445313"],["uuid","ddd9e79d-7782-414c-8b22-1046c60b6ec2"]]]}
-row 3: {"u":["set",[["uuid","2607d30e-e652-4927-9fec-8bbf1b60c7e9"],["uuid","ddd9e79d-7782-414c-8b22-1046c60b6ec2"]]]}
-
-mutation  1:
-row 0: {"u":["uuid","a60fe7ff-317b-4568-9106-892b37445313"]}
-row 1: {"u":["set",[["uuid","a60fe7ff-317b-4568-9106-892b37445313"],["uuid","ddd9e79d-7782-414c-8b22-1046c60b6ec2"]]]}
-row 2: no change
-row 3: {"u":["set",[["uuid","2607d30e-e652-4927-9fec-8bbf1b60c7e9"],["uuid","a60fe7ff-317b-4568-9106-892b37445313"]]]}
-
-mutation  2:
-row 0: {"u":["uuid","2607d30e-e652-4927-9fec-8bbf1b60c7e9"]}
-row 1: {"u":["set",[["uuid","2607d30e-e652-4927-9fec-8bbf1b60c7e9"],["uuid","ddd9e79d-7782-414c-8b22-1046c60b6ec2"]]]}
-row 2: {"u":["set",[["uuid","2607d30e-e652-4927-9fec-8bbf1b60c7e9"],["uuid","a60fe7ff-317b-4568-9106-892b37445313"]]]}
-row 3: no change
-
-mutation  3:
-row 0: no change
-row 1: {"u":["set",[]]}
-row 2: no change
-row 3: no change
-
-mutation  4:
-row 0: no change
-row 1: no change
-row 2: {"u":["set",[]]}
-row 3: no change
-
-mutation  5:
-row 0: no change
-row 1: no change
-row 2: no change
-row 3: {"u":["set",[]]}
-]], [mutation])
-
-OVSDB_CHECK_POSITIVE([executing mutations on integer maps],
-  [[execute-mutations \
-    '{"columns": {"i": {"type": {"key": "integer", "value": "integer", "min": 0, "max": "unlimited"}}}}' \
-    '[[["i", "insert", ["map", [[1, 2]]]]],
-      [["i", "insert", ["map", [[2, 4], [3, 5]]]]],
-      [["i", "delete", ["map", [[1, 2]]]]],
-      [["i", "delete", ["map", [[2, 3]]]]],
-      [["i", "delete", ["set", [1]]]],
-      [["i", "delete", ["set", [2, 3]]]]]' \
-    '[{"i": ["map", []]},
-      {"i": ["map", [[1, 2]]]},
-      {"i": ["map", [[1, 3], [2, 3]]]},
-      {"i": ["map", [[3, 5]]]}']]],
-  [[mutation  0:
-row 0: {"i":["map",[[1,2]]]}
-row 1: no change
-row 2: no change
-row 3: {"i":["map",[[1,2],[3,5]]]}
-
-mutation  1:
-row 0: {"i":["map",[[2,4],[3,5]]]}
-row 1: {"i":["map",[[1,2],[2,4],[3,5]]]}
-row 2: {"i":["map",[[1,3],[2,3],[3,5]]]}
-row 3: {"i":["map",[[2,4],[3,5]]]}
-
-mutation  2:
-row 0: no change
-row 1: {"i":["map",[]]}
-row 2: no change
-row 3: no change
-
-mutation  3:
-row 0: no change
-row 1: no change
-row 2: {"i":["map",[[1,3]]]}
-row 3: no change
-
-mutation  4:
-row 0: no change
-row 1: {"i":["map",[]]}
-row 2: {"i":["map",[[2,3]]]}
-row 3: no change
-
-mutation  5:
-row 0: no change
-row 1: no change
-row 2: {"i":["map",[[1,3]]]}
-row 3: {"i":["map",[]]}
-]], [mutation])
diff --git a/tests/ovsdb-query.at b/tests/ovsdb-query.at
deleted file mode 100644
index 0814fda2a..000000000
--- a/tests/ovsdb-query.at
+++ /dev/null
@@ -1,543 +0,0 @@
-AT_BANNER([OVSDB -- queries])
-
-OVSDB_CHECK_POSITIVE([queries on scalars],
-  [[query \
-    '{"columns":
-        {"i": {"type": "integer"},
-         "r": {"type": "real"},
-         "b": {"type": "boolean"},
-         "s": {"type": "string"},
-         "u": {"type": "uuid"}}}' \
-    '[{"i": 0,
-       "r": 0.5,
-       "b": true,
-       "s": "a",
-       "u": ["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]},
-      {"i": 1,
-       "r": 1.5,
-       "b": false,
-       "s": "b",
-       "u": ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]},
-      {"i": 2,
-       "r": 2.5,
-       "b": true,
-       "s": "c",
-       "u": ["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]},
-      {"i": 3,
-       "r": 3.5,
-       "b": false,
-       "s": "d",
-       "u": ["uuid", "62315898-64e0-40b9-b26f-ff74225303e6"]},
-      {"i": 4,
-       "r": 4.5,
-       "b": true,
-       "s": "e",
-       "u": ["uuid", "4a5127e2-0256-4a72-a7dc-6246213967c7"]}]' \
-    '[[],
-      [["i", "==", 0]],
-      [["i", "!=", 1]],
-      [["i", "<", 2]],
-      [["i", "<=", 3]],
-      [["i", ">", 2]],
-      [["i", ">=", 4]],
-      [["i", "includes", 3]],
-      [["i", "excludes", 2]],
-      [["r", "==", 0.5]],
-      [["r", "!=", 1.5]],
-      [["r", "<", 2.5]],
-      [["r", "<=", 3.5]],
-      [["r", ">", 4.5]],
-      [["r", ">=", 5.5]],
-      [["r", "includes", 1]],
-      [["r", "excludes", 3]],
-      [["b", "==", true]],
-      [["b", "!=", true]],
-      [["b", "includes", false]],
-      [["b", "excludes", true]],
-      [["s", "==", "a"]],
-      [["s", "!=", "b"]],
-      [["s", "includes", "c"]],
-      [["s", "excludes", "d"]],
-      [["u", "==", ["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]]],
-      [["u", "!=", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]],
-      [["u", "includes",["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]]]']],
-  [dnl
-query  0: 11111
-query  1: 1----
-query  2: 1-111
-query  3: 11---
-query  4: 1111-
-query  5: ---11
-query  6: ----1
-query  7: ---1-
-query  8: 11-11
-query  9: 1----
-query 10: 1-111
-query 11: 11---
-query 12: 1111-
-query 13: -----
-query 14: -----
-query 15: -----
-query 16: 11111
-query 17: 1-1-1
-query 18: -1-1-
-query 19: -1-1-
-query 20: -1-1-
-query 21: 1----
-query 22: 1-111
-query 23: --1--
-query 24: 111-1
-query 25: 1----
-query 26: 1-111
-query 27: --1--],
-  [query])
-
-OVSDB_CHECK_POSITIVE([queries on sets],
-  [[query \
-    '{"columns": {"i": {"type": {"key": "integer", "min": 0, "max": "unlimited"}}}}' \
-    '[{"i": ["set", []]},
-      {"i": ["set", [0]]},
-      {"i": ["set", [1]]},
-      {"i": ["set", [0, 1]]},
-      {"i": ["set", [2]]},
-      {"i": ["set", [2, 0]]},
-      {"i": ["set", [2, 1]]},
-      {"i": ["set", [2, 1, 0]]}]' \
-    '[[],
-      [["i", "==", ["set", []]]],
-      [["i", "==", ["set", [0]]]],
-      [["i", "==", ["set", [1]]]],
-      [["i", "==", ["set", [0, 1]]]],
-      [["i", "==", ["set", [2]]]],
-      [["i", "==", ["set", [2, 0]]]],
-      [["i", "==", ["set", [2, 1]]]],
-      [["i", "==", ["set", [2, 1, 0]]]],
-      [["i", "!=", ["set", []]]],
-      [["i", "!=", ["set", [0]]]],
-      [["i", "!=", ["set", [1]]]],
-      [["i", "!=", ["set", [0, 1]]]],
-      [["i", "!=", ["set", [2]]]],
-      [["i", "!=", ["set", [2, 0]]]],
-      [["i", "!=", ["set", [2, 1]]]],
-      [["i", "!=", ["set", [2, 1, 0]]]],
-      [["i", "includes", ["set", []]]],
-      [["i", "includes", ["set", [0]]]],
-      [["i", "includes", ["set", [1]]]],
-      [["i", "includes", ["set", [0, 1]]]],
-      [["i", "includes", ["set", [2]]]],
-      [["i", "includes", ["set", [2, 0]]]],
-      [["i", "includes", ["set", [2, 1]]]],
-      [["i", "includes", ["set", [2, 1, 0]]]],
-      [["i", "excludes", ["set", []]]],
-      [["i", "excludes", ["set", [0]]]],
-      [["i", "excludes", ["set", [1]]]],
-      [["i", "excludes", ["set", [0, 1]]]],
-      [["i", "excludes", ["set", [2]]]],
-      [["i", "excludes", ["set", [2, 0]]]],
-      [["i", "excludes", ["set", [2, 1]]]],
-      [["i", "excludes", ["set", [2, 1, 0]]]]]']],
-  [dnl
-query  0: 11111 111
-query  1: 1---- ---
-query  2: -1--- ---
-query  3: --1-- ---
-query  4: ---1- ---
-query  5: ----1 ---
-query  6: ----- 1--
-query  7: ----- -1-
-query  8: ----- --1
-query  9: -1111 111
-query 10: 1-111 111
-query 11: 11-11 111
-query 12: 111-1 111
-query 13: 1111- 111
-query 14: 11111 -11
-query 15: 11111 1-1
-query 16: 11111 11-
-query 17: 11111 111
-query 18: -1-1- 1-1
-query 19: --11- -11
-query 20: ---1- --1
-query 21: ----1 111
-query 22: ----- 1-1
-query 23: ----- -11
-query 24: ----- --1
-query 25: 11111 111
-query 26: 1-1-1 -1-
-query 27: 11--1 1--
-query 28: 1---1 ---
-query 29: 1111- ---
-query 30: 1-1-- ---
-query 31: 11--- ---
-query 32: 1---- ---], [query])
-
-# This is the same as the "set" test except that it adds values,
-# all of which always match.
-OVSDB_CHECK_POSITIVE([queries on maps (1)],
-  [[query \
-    '{"columns": {"i": {"type": {"key": "integer",
-                                 "value": "boolean",
-                                 "min": 0,
-                                 "max": "unlimited"}}}}' \
-    '[{"i": ["map", []]},
-      {"i": ["map", [[0, true]]]},
-      {"i": ["map", [[1, false]]]},
-      {"i": ["map", [[0, true], [1, false]]]},
-      {"i": ["map", [[2, true]]]},
-      {"i": ["map", [[2, true], [0, true]]]},
-      {"i": ["map", [[2, true], [1, false]]]},
-      {"i": ["map", [[2, true], [1, false], [0, true]]]}]' \
-    '[[],
-      [["i", "==", ["map", []]]],
-      [["i", "==", ["map", [[0, true]]]]],
-      [["i", "==", ["map", [[1, false]]]]],
-      [["i", "==", ["map", [[0, true], [1, false]]]]],
-      [["i", "==", ["map", [[2, true]]]]],
-      [["i", "==", ["map", [[2, true], [0, true]]]]],
-      [["i", "==", ["map", [[2, true], [1, false]]]]],
-      [["i", "==", ["map", [[2, true], [1, false], [0, true]]]]],
-      [["i", "!=", ["map", []]]],
-      [["i", "!=", ["map", [[0, true]]]]],
-      [["i", "!=", ["map", [[1, false]]]]],
-      [["i", "!=", ["map", [[0, true], [1, false]]]]],
-      [["i", "!=", ["map", [[2, true]]]]],
-      [["i", "!=", ["map", [[2, true], [0, true]]]]],
-      [["i", "!=", ["map", [[2, true], [1, false]]]]],
-      [["i", "!=", ["map", [[2, true], [1, false], [0, true]]]]],
-      [["i", "includes", ["map", []]]],
-      [["i", "includes", ["map", [[0, true]]]]],
-      [["i", "includes", ["map", [[1, false]]]]],
-      [["i", "includes", ["map", [[0, true], [1, false]]]]],
-      [["i", "includes", ["map", [[2, true]]]]],
-      [["i", "includes", ["map", [[2, true], [0, true]]]]],
-      [["i", "includes", ["map", [[2, true], [1, false]]]]],
-      [["i", "includes", ["map", [[2, true], [1, false], [0, true]]]]],
-      [["i", "excludes", ["map", []]]],
-      [["i", "excludes", ["map", [[0, true]]]]],
-      [["i", "excludes", ["map", [[1, false]]]]],
-      [["i", "excludes", ["map", [[0, true], [1, false]]]]],
-      [["i", "excludes", ["map", [[2, true]]]]],
-      [["i", "excludes", ["map", [[2, true], [0, true]]]]],
-      [["i", "excludes", ["map", [[2, true], [1, false]]]]],
-      [["i", "excludes", ["map", [[2, true], [1, false], [0, true]]]]]]']],
-  [dnl
-query  0: 11111 111
-query  1: 1---- ---
-query  2: -1--- ---
-query  3: --1-- ---
-query  4: ---1- ---
-query  5: ----1 ---
-query  6: ----- 1--
-query  7: ----- -1-
-query  8: ----- --1
-query  9: -1111 111
-query 10: 1-111 111
-query 11: 11-11 111
-query 12: 111-1 111
-query 13: 1111- 111
-query 14: 11111 -11
-query 15: 11111 1-1
-query 16: 11111 11-
-query 17: 11111 111
-query 18: -1-1- 1-1
-query 19: --11- -11
-query 20: ---1- --1
-query 21: ----1 111
-query 22: ----- 1-1
-query 23: ----- -11
-query 24: ----- --1
-query 25: 11111 111
-query 26: 1-1-1 -1-
-query 27: 11--1 1--
-query 28: 1---1 ---
-query 29: 1111- ---
-query 30: 1-1-- ---
-query 31: 11--- ---
-query 32: 1---- ---], [query])
-
-# This is the same as the "set" test except that it adds values,
-# and those values don't always match.
-OVSDB_CHECK_POSITIVE([queries on maps (2)],
-  [[query \
-    '{"columns": {"i": {"type": {"key": "integer",
-                                 "value": "boolean",
-                                 "min": 0,
-                                 "max": "unlimited"}}}}' \
-    '[{"i": ["map", []]},
-      {"i": ["map", [[0, true]]]},
-      {"i": ["map", [[0, false]]]},
-      {"i": ["map", [[1, false]]]},
-      {"i": ["map", [[1, true]]]},
-
-      {"i": ["map", [[0, true], [1, false]]]},
-      {"i": ["map", [[0, true], [1, true]]]},
-      {"i": ["map", [[2, true]]]},
-      {"i": ["map", [[2, false]]]},
-      {"i": ["map", [[2, true], [0, true]]]},
-
-      {"i": ["map", [[2, false], [0, true]]]},
-      {"i": ["map", [[2, true], [1, false]]]},
-      {"i": ["map", [[2, true], [1, true]]]},
-      {"i": ["map", [[2, true], [1, false], [0, true]]]},
-      {"i": ["map", [[2, true], [1, false], [0, false]]]}]' \
-    '[[],
-      [["i", "==", ["map", []]]],
-      [["i", "==", ["map", [[0, true]]]]],
-      [["i", "==", ["map", [[1, false]]]]],
-      [["i", "==", ["map", [[0, true], [1, false]]]]],
-      [["i", "==", ["map", [[2, true]]]]],
-      [["i", "==", ["map", [[2, true], [0, true]]]]],
-      [["i", "==", ["map", [[2, true], [1, false]]]]],
-      [["i", "==", ["map", [[2, true], [1, false], [0, true]]]]],
-      [["i", "!=", ["map", []]]],
-      [["i", "!=", ["map", [[0, true]]]]],
-      [["i", "!=", ["map", [[1, false]]]]],
-      [["i", "!=", ["map", [[0, true], [1, false]]]]],
-      [["i", "!=", ["map", [[2, true]]]]],
-      [["i", "!=", ["map", [[2, true], [0, true]]]]],
-      [["i", "!=", ["map", [[2, true], [1, false]]]]],
-      [["i", "!=", ["map", [[2, true], [1, false], [0, true]]]]],
-      [["i", "includes", ["map", []]]],
-      [["i", "includes", ["map", [[0, true]]]]],
-      [["i", "includes", ["map", [[1, false]]]]],
-      [["i", "includes", ["map", [[0, true], [1, false]]]]],
-      [["i", "includes", ["map", [[2, true]]]]],
-      [["i", "includes", ["map", [[2, true], [0, true]]]]],
-      [["i", "includes", ["map", [[2, true], [1, false]]]]],
-      [["i", "includes", ["map", [[2, true], [1, false], [0, true]]]]],
-      [["i", "excludes", ["map", []]]],
-      [["i", "excludes", ["map", [[0, true]]]]],
-      [["i", "excludes", ["map", [[1, false]]]]],
-      [["i", "excludes", ["map", [[0, true], [1, false]]]]],
-      [["i", "excludes", ["map", [[2, true]]]]],
-      [["i", "excludes", ["map", [[2, true], [0, true]]]]],
-      [["i", "excludes", ["map", [[2, true], [1, false]]]]],
-      [["i", "excludes", ["map", [[2, true], [1, false], [0, true]]]]]]']],
-  [dnl
-query  0: 11111 11111 11111
-query  1: 1---- ----- -----
-query  2: -1--- ----- -----
-query  3: ---1- ----- -----
-query  4: ----- 1---- -----
-query  5: ----- --1-- -----
-query  6: ----- ----1 -----
-query  7: ----- ----- -1---
-query  8: ----- ----- ---1-
-query  9: -1111 11111 11111
-query 10: 1-111 11111 11111
-query 11: 111-1 11111 11111
-query 12: 11111 -1111 11111
-query 13: 11111 11-11 11111
-query 14: 11111 1111- 11111
-query 15: 11111 11111 1-111
-query 16: 11111 11111 111-1
-query 17: 11111 11111 11111
-query 18: -1--- 11--1 1--1-
-query 19: ---1- 1---- -1-11
-query 20: ----- 1---- ---1-
-query 21: ----- --1-1 -1111
-query 22: ----- ----1 ---1-
-query 23: ----- ----- -1-11
-query 24: ----- ----- ---1-
-query 25: 11111 11111 11111
-query 26: 1-111 --11- -11-1
-query 27: 111-1 -1111 1-1--
-query 28: 1-1-1 --11- --1--
-query 29: 11111 11-1- 1----
-query 30: 1-111 ---1- -----
-query 31: 111-1 -1-1- 1----
-query 32: 1-1-1 ---1- -----], [query])
-
-OVSDB_CHECK_POSITIVE([UUID-distinct queries on scalars],
-  [[query-distinct \
-    '{"columns":
-        {"i": {"type": "integer"},
-         "r": {"type": "real"},
-         "b": {"type": "boolean"},
-         "s": {"type": "string"},
-         "u": {"type": "uuid"}}}' \
-    '[{"i": 0,
-       "r": 0.5,
-       "b": true,
-       "s": "a",
-       "u": ["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]},
-      {"i": 1,
-       "r": 1.5,
-       "b": false,
-       "s": "b",
-       "u": ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]},
-      {"i": 2,
-       "r": 2.5,
-       "b": true,
-       "s": "c",
-       "u": ["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]},
-      {"i": 3,
-       "r": 3.5,
-       "b": false,
-       "s": "d",
-       "u": ["uuid", "62315898-64e0-40b9-b26f-ff74225303e6"]},
-      {"i": 4,
-       "r": 4.5,
-       "b": true,
-       "s": "e",
-       "u": ["uuid", "4a5127e2-0256-4a72-a7dc-6246213967c7"]}]' \
-    '[[],
-      [["i", "==", 0]],
-      [["i", "!=", 1]],
-      [["i", "<", 2]],
-      [["i", "<=", 3]],
-      [["i", ">", 2]],
-      [["i", ">=", 4]],
-      [["i", "includes", 3]],
-      [["i", "excludes", 2]],
-      [["r", "==", 0.5]],
-      [["r", "!=", 1.5]],
-      [["r", "<", 2.5]],
-      [["r", "<=", 3.5]],
-      [["r", ">", 4.5]],
-      [["r", ">=", 5.5]],
-      [["r", "includes", 1]],
-      [["r", "excludes", 3]],
-      [["b", "==", true]],
-      [["b", "!=", true]],
-      [["b", "includes", false]],
-      [["b", "excludes", true]],
-      [["s", "==", "a"]],
-      [["s", "!=", "b"]],
-      [["s", "includes", "c"]],
-      [["s", "excludes", "d"]],
-      [["u", "==", ["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]]],
-      [["u", "!=", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]],
-      [["u", "includes",["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]]]' \
-    '["_uuid"]']],
-  [dnl
-query  0: abcde
-query  1: a----
-query  2: a-cde
-query  3: ab---
-query  4: abcd-
-query  5: ---de
-query  6: ----e
-query  7: ---d-
-query  8: ab-de
-query  9: a----
-query 10: a-cde
-query 11: ab---
-query 12: abcd-
-query 13: -----
-query 14: -----
-query 15: -----
-query 16: abcde
-query 17: a-c-e
-query 18: -b-d-
-query 19: -b-d-
-query 20: -b-d-
-query 21: a----
-query 22: a-cde
-query 23: --c--
-query 24: abc-e
-query 25: a----
-query 26: a-cde
-query 27: --c--],
-  [query])
-
-OVSDB_CHECK_POSITIVE([Boolean-distinct queries on scalars],
-  [[query-distinct \
-    '{"columns":
-        {"i": {"type": "integer"},
-         "r": {"type": "real"},
-         "b": {"type": "boolean"},
-         "s": {"type": "string"},
-         "u": {"type": "uuid"}}}' \
-    '[{"i": 0,
-       "r": 0.5,
-       "b": true,
-       "s": "a",
-       "u": ["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]},
-      {"i": 1,
-       "r": 1.5,
-       "b": false,
-       "s": "b",
-       "u": ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]},
-      {"i": 2,
-       "r": 2.5,
-       "b": true,
-       "s": "c",
-       "u": ["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]},
-      {"i": 3,
-       "r": 3.5,
-       "b": false,
-       "s": "d",
-       "u": ["uuid", "62315898-64e0-40b9-b26f-ff74225303e6"]},
-      {"i": 4,
-       "r": 4.5,
-       "b": true,
-       "s": "e",
-       "u": ["uuid", "4a5127e2-0256-4a72-a7dc-6246213967c7"]}]' \
-    '[[],
-      [["i", "==", 0]],
-      [["i", "!=", 1]],
-      [["i", "<", 2]],
-      [["i", "<=", 3]],
-      [["i", ">", 2]],
-      [["i", ">=", 4]],
-      [["i", "includes", 3]],
-      [["i", "excludes", 2]],
-      [["r", "==", 0.5]],
-      [["r", "!=", 1.5]],
-      [["r", "<", 2.5]],
-      [["r", "<=", 3.5]],
-      [["r", ">", 4.5]],
-      [["r", ">=", 5.5]],
-      [["r", "includes", 1]],
-      [["r", "excludes", 3]],
-      [["b", "==", true]],
-      [["b", "!=", true]],
-      [["b", "includes", false]],
-      [["b", "excludes", true]],
-      [["s", "==", "a"]],
-      [["s", "!=", "b"]],
-      [["s", "includes", "c"]],
-      [["s", "excludes", "d"]],
-      [["u", "==", ["uuid", "b10d28f7-af18-4a67-9e78-2a6394516c59"]]],
-      [["u", "!=", ["uuid", "9179ca6d-6d65-400a-b455-3ad92783a099"]]],
-      [["u", "includes",["uuid", "ad0fa355-8b84-4a36-a4b5-b2c1bfd91758"]]]]' \
-    '["b"]']],
-  [dnl
-query  0: ababa
-query  1: a-a-a
-query  2: ababa
-query  3: ababa
-query  4: ababa
-query  5: ababa
-query  6: a-a-a
-query  7: -b-b-
-query  8: ababa
-query  9: a-a-a
-query 10: ababa
-query 11: ababa
-query 12: ababa
-query 13: -----
-query 14: -----
-query 15: -----
-query 16: ababa
-query 17: a-a-a
-query 18: -b-b-
-query 19: -b-b-
-query 20: -b-b-
-query 21: a-a-a
-query 22: ababa
-query 23: a-a-a
-query 24: ababa
-query 25: a-a-a
-query 26: ababa
-query 27: a-a-a],
-  [query])
-
-OVSDB_CHECK_NEGATIVE([parse colunn set containing bad name],
-  [[query-distinct \
-    '{"columns": {"i": {"type": "integer"}}}' \
-    '[{"i": 0}]' \
-    '[[]]' \
-    '["i", "bad"]']],
-  [bad is not a valid column name])
diff --git a/tests/ovsdb-rbac.at b/tests/ovsdb-rbac.at
deleted file mode 100644
index 7de3711fb..000000000
--- a/tests/ovsdb-rbac.at
+++ /dev/null
@@ -1,375 +0,0 @@
-AT_BANNER([OVSDB -- ovsdb-server rbac])
-
-AT_SETUP([ovsdb-server/rbac 2])
-AT_KEYWORDS([ovsdb server rbac])
-AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
-
-RBAC_PKIDIR="$(pwd)"
-RBAC_PKI="sh $abs_top_srcdir/utilities/ovs-pki.in --dir=$RBAC_PKIDIR/pki --log=$RBAC_PKIDIR/rbac-pki.log"
-$RBAC_PKI init
-$RBAC_PKI req+sign ovsdb-server switch
-$RBAC_PKI -u req+sign client-1 switch
-$RBAC_PKI -u req+sign client-2 switch
-
-AT_DATA([schema],
-  [[{"name": "mydb",
-     "tables": {
-       "Root": {
-         "columns": {
-           "connections": {
-             "type": {
-               "key": {"type": "uuid", "refTable": "Connection"},
-               "min": 0,
-               "max": "unlimited"}}},
-          "isRoot": true},
-       "Connection": {
-         "columns": {
-           "target": {
-             "type": "string"},
-           "role": {
-             "type": "string"}}},
-        "RBAC_Role": {
-            "columns": {
-                "name": {"type": "string"},
-                "permissions": {
-                    "type": {"key": {"type": "string"},
-                             "value": {"type": "uuid",
-                                       "refTable": "RBAC_Permission",
-                                       "refType": "weak"},
-                                     "min": 0, "max": "unlimited"}}},
-            "isRoot": true},
-        "RBAC_Permission": {
-            "columns": {
-                "table": {"type": "string"},
-                "authorization": {"type": {"key": "string",
-                                           "min": 0,
-                                           "max": "unlimited"}},
-                "insert_delete": {"type": "boolean"},
-                "update" : {"type": {"key": "string",
-                                     "min": 0,
-                                     "max": "unlimited"}}},
-            "isRoot": true},
-       "fixed_colors": {
-         "columns": {
-           "name": {"type": "string"}, "value": {"type": "integer"}},
-         "indexes": [["name"]],
-         "isRoot": true},
-       "user_colors": {
-         "columns": {
-           "creator": {"type": "string"},
-           "name": {"type": "string"},
-           "value": {"type": "integer"}},
-         "indexes": [["name"]],
-         "isRoot": true},
-       "other_colors": {
-         "columns": {
-           "creator": {
-             "type": {"key": {"type": "string"},
-                      "value": {"type": "string"},
-                      "min": 0, "max": "unlimited"}},
-           "name": {"type": "string"},
-           "value": {"type": "integer"}},
-         "indexes": [["name"]],
-         "isRoot": true}
-    },
-     "version": "5.1.3",
-     "cksum": "12345678 9"
-}
-]])
-
-AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
-AT_CHECK(
-  [[ovsdb-tool transact db \
-     '["mydb",
-       {"op": "insert",
-        "table": "Root",
-        "row": {
-          "connections": ["set", [["named-uuid", "x"]]]}},
-       {"op": "insert",
-        "table": "Connection",
-        "uuid-name": "x",
-        "row": {"target": "pssl:0:127.0.0.1",
-                "role": "testrole"}},
-       {"op": "insert",
-        "table": "fixed_colors",
-        "row": {"name": "red",
-                "value": '16711680'}},
-       {"op": "insert",
-        "table": "RBAC_Role",
-        "row": {"name": "testrole",
-                "permissions": ["map", [["user_colors", ["named-uuid", "y"]],
-                                        ["other_colors", ["named-uuid", "z"]]]]}},
-       {"op": "insert",
-        "table": "RBAC_Permission",
-        "uuid-name": "y",
-        "row": {"authorization": "creator",
-                "insert_delete": true,
-                "table": "user_colors",
-                "update": ["set", ["name", "value"]]}},
-       {"op": "insert",
-        "table": "RBAC_Permission",
-        "uuid-name": "z",
-        "row": {"authorization": "creator:chassis",
-                "insert_delete": true,
-                "table": "user_colors",
-                "update": ["set", ["name", "value"]]}}
-]']], [0], [ignore], [ignore])
-
-AT_CHECK([ovsdb-server --log-file --detach --no-chdir --pidfile --remote=db:mydb,Root,connections \
-        --private-key=$RBAC_PKIDIR/ovsdb-server-privkey.pem \
-        --certificate=$RBAC_PKIDIR/ovsdb-server-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        db], [0], [ignore], [ignore])
-PARSE_LISTENING_PORT([ovsdb-server.log], [SSL_PORT])
-
-# Test 1:
-# Attempt to insert a row into the "fixed_colors" table.  This should
-# fail as there are no permissions for role "testrole" for this table.
-AT_CHECK([ovsdb-client transact ssl:127.0.0.1:$SSL_PORT \
-        --private-key=$RBAC_PKIDIR/client-1-privkey.pem \
-        --certificate=$RBAC_PKIDIR/client-1-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        ['["mydb",
-         {"op": "insert",
-          "table": "fixed_colors",
-          "row": {"name": "chartreuse", "value": '8388352'}}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt stdout], [0], [[[{"details":"RBAC rules for client \"client-1\" role \"testrole\" prohibit row insertion into table \"fixed_colors\".","error":"permission error"}]]
-], [ignore])
-
-# Test 2:
-# Attempt to insert a row into the "user_colors" table with a client ID that
-# does not match the value in the column used for authorization.  This should
-# fail the authorization check for insertion.
-AT_CHECK([ovsdb-client transact ssl:127.0.0.1:$SSL_PORT \
-        --private-key=$RBAC_PKIDIR/client-1-privkey.pem \
-        --certificate=$RBAC_PKIDIR/client-1-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        ['["mydb",
-         {"op": "insert",
-          "table": "user_colors",
-          "row": {"creator": "client-2", "name": "chartreuse", "value": '8388352'}}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt stdout], [0], [[[{"details":"RBAC rules for client \"client-1\" role \"testrole\" prohibit row insertion into table \"user_colors\".","error":"permission error"}]]
-], [ignore])
-
-# Test 3:
-# Attempt to insert a row into the "user_colors" table.  This should
-# succeed since role "testrole" has permissions for this table that
-# allow row insertion.
-AT_CHECK([ovsdb-client transact ssl:127.0.0.1:$SSL_PORT \
-        --private-key=$RBAC_PKIDIR/client-1-privkey.pem \
-        --certificate=$RBAC_PKIDIR/client-1-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        ['["mydb",
-         {"op": "insert",
-          "table": "user_colors",
-          "row": {"creator": "client-1", "name": "chartreuse", "value": '8388352'}}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt stdout], [0], [[[{"uuid":["uuid","<0>"]}]]
-], [ignore])
-
-# Test 4:
-# Attempt to update a column in the "user_colors" table.  This should
-# succeed since role "testrole" has permissions for this table that
-# allow update of the "value" column when ID is equal to the value in
-# the "creator" column.
-AT_CHECK([ovsdb-client transact ssl:127.0.0.1:$SSL_PORT \
-        --private-key=$RBAC_PKIDIR/client-1-privkey.pem \
-        --certificate=$RBAC_PKIDIR/client-1-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        ['["mydb",
-         {"op": "update",
-          "table": "user_colors",
-          "where": [["name", "==", "chartreuse"]],
-          "row": {"value": '8388353'}}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt stdout], [0], [[[{"count":1}]]
-], [ignore])
-
-# Test 5:
-# Attempt to update a column in the "user_colors" table.  Same as
-# previous test, but with a different client ID. This should fail
-# the RBAC authorization test because "client-2" does not match the
-# "creator" column for this row.
-AT_CHECK([ovsdb-client transact ssl:127.0.0.1:$SSL_PORT \
-        --private-key=$RBAC_PKIDIR/client-2-privkey.pem \
-        --certificate=$RBAC_PKIDIR/client-2-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        ['["mydb",
-         {"op": "update",
-          "table": "user_colors",
-          "where": [["name", "==", "chartreuse"]],
-          "row": {"value": '8388354'}}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt stdout], [0], [[[{"details":"RBAC rules for client \"client-2\" role \"testrole\" prohibit modification of table \"user_colors\".","error":"permission error"}]]
-], [ignore])
-
-# Test 6:
-# Attempt to mutate a column in the "user_colors" table.  This should
-# succeed since role "testrole" has permissions for this table that
-# allow update of the "value" column when ID is equal to the value in
-# the "creator" column.
-AT_CHECK([ovsdb-client transact ssl:127.0.0.1:$SSL_PORT \
-        --private-key=$RBAC_PKIDIR/client-1-privkey.pem \
-        --certificate=$RBAC_PKIDIR/client-1-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        ['["mydb",
-         {"op": "mutate",
-          "table": "user_colors",
-          "where": [["name", "==", "chartreuse"]],
-          "mutations": [["value", "+=", '10']]}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt stdout], [0], [[[{"count":1}]]
-], [ignore])
-
-# Test 7:
-# Attempt to mutate a column in the "user_colors" table.  Same as
-# previous test, but with a different client ID. This should fail
-# the RBAC authorization test because "client-2" does not match the
-# "creator" column for this row.
-AT_CHECK([ovsdb-client transact ssl:127.0.0.1:$SSL_PORT \
-        --private-key=$RBAC_PKIDIR/client-2-privkey.pem \
-        --certificate=$RBAC_PKIDIR/client-2-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        ['["mydb",
-         {"op": "mutate",
-          "table": "user_colors",
-          "where": [["name", "==", "chartreuse"]],
-          "mutations": [["value", "+=", '10']]}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt stdout], [0], [[[{"details":"RBAC rules for client \"client-2\" role \"testrole\" prohibit mutate operation on table \"user_colors\".","error":"permission error"}]]
-], [ignore])
-
-# Test 8:
-# Attempt to delete a row from the "user_colors" table. This should fail
-# the RBAC authorization test because "client-2" does not match the
-# "creator" column for this row.
-AT_CHECK([ovsdb-client transact ssl:127.0.0.1:$SSL_PORT \
-        --private-key=$RBAC_PKIDIR/client-2-privkey.pem \
-        --certificate=$RBAC_PKIDIR/client-2-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        ['["mydb",
-         {"op": "delete",
-          "table": "user_colors",
-          "where": [["name", "==", "chartreuse"]]}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt stdout], [0], [[[{"details":"RBAC rules for client \"client-2\" role \"testrole\" prohibit row deletion from table \"user_colors\".","error":"permission error"}]]
-], [ignore])
-
-# Test 9:
-# Attempt to delete a row from the "user_colors" table. This should pass
-# the RBAC authorization test because "client-1" does matches the
-# "creator" column for this row.
-AT_CHECK([ovsdb-client transact ssl:127.0.0.1:$SSL_PORT \
-        --private-key=$RBAC_PKIDIR/client-1-privkey.pem \
-        --certificate=$RBAC_PKIDIR/client-1-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        ['["mydb",
-         {"op": "delete",
-          "table": "user_colors",
-          "where": [["name", "==", "chartreuse"]]}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt stdout], [0], [[[{"count":1}]]
-], [ignore])
-
-# Test 10:
-# Attempt to insert a row into the "other_colors" table.  This should
-# succeed since role "testrole" has permissions for this table that
-# allow row insertion.
-AT_CHECK([ovsdb-client transact ssl:127.0.0.1:$SSL_PORT \
-        --private-key=$RBAC_PKIDIR/client-1-privkey.pem \
-        --certificate=$RBAC_PKIDIR/client-1-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        ['["mydb",
-         {"op": "insert",
-          "table": "other_colors",
-          "row": {"creator": ["map",[["chassis", "client-1"]]], "name": "seafoam", "value": '7466680'}}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt stdout], [0], [[[{"uuid":["uuid","<0>"]}]]
-], [ignore])
-
-# Test 11:
-# Attempt to update a column in the "user_colors" table.  This should
-# succeed since role "testrole" has permissions for this table that
-# allow update of the "value" column when ID is equal to the value in
-# the "creator" column.
-AT_CHECK([ovsdb-client transact ssl:127.0.0.1:$SSL_PORT \
-        --private-key=$RBAC_PKIDIR/client-1-privkey.pem \
-        --certificate=$RBAC_PKIDIR/client-1-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        ['["mydb",
-         {"op": "update",
-          "table": "other_colors",
-          "where": [["name", "==", "seafoam"]],
-          "row": {"value": '8388353'}}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt stdout], [0], [[[{"count":1}]]
-], [ignore])
-
-# Test 12:
-# Attempt to update a column in the "other_colors" table.  Same as
-# previous test, but with a different client ID. This should fail
-# the RBAC authorization test because "client-2" does not match the
-# "creator" column for this row.
-AT_CHECK([ovsdb-client transact ssl:127.0.0.1:$SSL_PORT \
-        --private-key=$RBAC_PKIDIR/client-2-privkey.pem \
-        --certificate=$RBAC_PKIDIR/client-2-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        ['["mydb",
-         {"op": "update",
-          "table": "other_colors",
-          "where": [["name", "==", "seafoam"]],
-          "row": {"value": '8388354'}}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt stdout], [0], [[[{"details":"RBAC rules for client \"client-2\" role \"testrole\" prohibit modification of table \"other_colors\".","error":"permission error"}]]
-], [ignore])
-
-# Test 13:
-# Attempt to delete a row from the "other_colors" table. This should fail
-# the RBAC authorization test because "client-2" does not match the
-# "creator" column for this row.
-AT_CHECK([ovsdb-client transact ssl:127.0.0.1:$SSL_PORT \
-        --private-key=$RBAC_PKIDIR/client-2-privkey.pem \
-        --certificate=$RBAC_PKIDIR/client-2-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        ['["mydb",
-         {"op": "delete",
-          "table": "other_colors",
-          "where": [["name", "==", "seafoam"]]}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt stdout], [0], [[[{"details":"RBAC rules for client \"client-2\" role \"testrole\" prohibit row deletion from table \"other_colors\".","error":"permission error"}]]
-], [ignore])
-
-# Test 14:
-# Attempt to delete a row from the "other_colors" table. This should pass
-# the RBAC authorization test because "client-1" does matches the
-# "creator" column for this row.
-AT_CHECK([ovsdb-client transact ssl:127.0.0.1:$SSL_PORT \
-        --private-key=$RBAC_PKIDIR/client-1-privkey.pem \
-        --certificate=$RBAC_PKIDIR/client-1-cert.pem \
-        --ca-cert=$RBAC_PKIDIR/pki/switchca/cacert.pem \
-        ['["mydb",
-         {"op": "delete",
-          "table": "other_colors",
-          "where": [["name", "==", "seafoam"]]}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt stdout], [0], [[[{"count":1}]]
-], [ignore])
-
-OVSDB_SERVER_SHUTDOWN
-AT_CLEANUP
diff --git a/tests/ovsdb-replication.at b/tests/ovsdb-replication.at
deleted file mode 100644
index f81381bdb..000000000
--- a/tests/ovsdb-replication.at
+++ /dev/null
@@ -1,190 +0,0 @@
-AT_BANNER([OVSDB -- replication])
-
-m4_divert_push([PREPARE_TESTS])
-[
-replication_schema () {
-    cat <<'EOF'
-    {"name": "mydb",
-     "tables": {
-       "a": {
-         "columns": {
-           "number": {"type": "integer"},
-           "name": {"type": "string"}},
-         "indexes": [["number"]]},
-       "b": {
-         "columns": {
-           "number": {"type": "integer"},
-           "name": {"type": "string"}},
-         "indexes": [["number"]]}}
-    }
-EOF
-}
-]
-m4_divert_pop([PREPARE_TESTS])
-
-m4_define([REPLICATION_EXAMPLES], [
-
-OVSDB_CHECK_REPLICATION([insert monitored table, insert excluded table],
-  [replication_schema],
-  [[[["mydb",
-      {"op": "insert",
-       "table": "a",
-       "row": {"number": 0, "name": "zero"}}]]],
-  [[["mydb",
-      {"op": "insert",
-       "table": "b",
-       "row": {"number": 1, "name": "one"}}]]],
-  [[["mydb",
-      {"op": "insert",
-       "table": "a",
-       "row": {"number": 1, "name": "one"}}]]]],
-  [[8,10c8,9
-< _uuid                                name number
-< ------------------------------------ ---- ------
-< <0> one  1
----
-> _uuid name number
-> ----- ---- ------]]
-)
-
-OVSDB_CHECK_REPLICATION([insert monitored table, update excluded table],
-  [replication_schema],
-  [[[["mydb",
-      {"op": "insert",
-       "table": "a",
-       "row": {"number": 0, "name": "zero"}}]]],
-  [[["mydb",
-      {"op": "insert",
-       "table": "b",
-       "row": {"number": 1, "name": "one"}}]]],
-  [[["mydb",
-      {"op": "update",
-       "table": "b",
-       "where":[["name","==","one"]],
-       "row": {"number": 2, "name": "two"}}]]],
-  [[["mydb",
-      {"op": "insert",
-       "table": "a",
-       "row": {"number": 1, "name": "one"}}]]]],
-  [[8,10c8,9
-< _uuid                                name number
-< ------------------------------------ ---- ------
-< <0> two  2
----
-> _uuid name number
-> ----- ---- ------]]
-)
-
-OVSDB_CHECK_REPLICATION([update monitored table, insert excluded table],
-  [replication_schema],
-  [[[["mydb",
-      {"op": "insert",
-       "table": "a",
-       "row": {"number": 0, "name": "zero"}}]]],
-  [[["mydb",
-      {"op": "update",
-       "table": "a",
-       "where":[["name","==","zero"]],
-       "row": {"number": 1, "name": "one"}}]]],
-  [[["mydb",
-      {"op": "insert",
-       "table": "b",
-       "row": {"number": 2, "name": "two"}}]]]],
-  [[7,9c7,8
-< _uuid                                name number
-< ------------------------------------ ---- ------
-< <0> two  2
----
-> _uuid name number
-> ----- ---- ------]]
-)
-
-OVSDB_CHECK_REPLICATION([update monitored table, update excluded table],
-  [replication_schema],
-  [[[["mydb",
-      {"op": "insert",
-       "table": "a",
-       "row": {"number": 0, "name": "zero"}}]]],
-  [[["mydb",
-      {"op": "update",
-       "table": "a",
-       "where":[["name","==","zero"]],
-       "row": {"number": 1, "name": "one"}}]]],
-  [[["mydb",
-      {"op": "insert",
-       "table": "b",
-       "row": {"number": 2, "name": "two"}}]]],
-  [[["mydb",
-      {"op": "update",
-       "table": "b",
-       "where":[["name","==","two"]],
-       "row": {"number": 3, "name": "three"}}]]]],
-  [[7,9c7,8
-< _uuid                                name  number
-< ------------------------------------ ----- ------
-< <0> three 3
----
-> _uuid name number
-> ----- ---- ------]]
-)
-
-OVSDB_CHECK_REPLICATION([delete monitored table, insert excluded table],
-  [replication_schema],
-  [[[["mydb",
-      {"op": "insert",
-       "table": "a",
-       "row": {"number": 0, "name": "zero"}}]]],
-  [[["mydb",
-      {"op": "delete",
-       "table": "a",
-       "where":[["name","==","zero"]]}]]],
-  [[["mydb",
-      {"op": "insert",
-       "table": "b",
-       "row": {"number": 1, "name": "one"}}]]],
-  [[["mydb",
-      {"op": "insert",
-       "table": "a",
-       "row": {"number": 1, "name": "one"}}]]]],
-  [[7,9c7,8
-< _uuid                                name number
-< ------------------------------------ ---- ------
-< <0> one  1
----
-> _uuid name number
-> ----- ---- ------]]
-)
-
-OVSDB_CHECK_REPLICATION([delete monitored table, update excluded table],
-  [replication_schema],
-  [[[["mydb",
-      {"op": "insert",
-       "table": "a",
-       "row": {"number": 0, "name": "zero"}}]]],
-  [[["mydb",
-      {"op": "delete",
-       "table": "a",
-       "where":[["name","==","zero"]]}]]],
-  [[["mydb",
-      {"op": "insert",
-       "table": "b",
-       "row": {"number": 1, "name": "one"}}]]],
-  [[["mydb",
-      {"op": "update",
-       "table": "b",
-       "where":[["name","==","one"]],
-       "row": {"number": 2, "name": "two"}}]]],
-  [[["mydb",
-      {"op": "insert",
-       "table": "a",
-       "row": {"number": 1, "name": "one"}}]]]],
-  [[7,9c7,8
-< _uuid                                name number
-< ------------------------------------ ---- ------
-< <0> two  2
----
-> _uuid name number
-> ----- ---- ------]]
-)
-
-])
diff --git a/tests/ovsdb-row.at b/tests/ovsdb-row.at
deleted file mode 100644
index 891f95329..000000000
--- a/tests/ovsdb-row.at
+++ /dev/null
@@ -1,271 +0,0 @@
-AT_BANNER([OVSDB -- rows])
-
-OVSDB_CHECK_POSITIVE([row with one string column],
-  [[parse-rows \
-    '{"columns": {"name": {"type": "string"}}}' \
-    '{"name": "value"}' \
-    '{"name": ""}' \
-    '{"name": "longer string with spaces"}' \
-    '{}']],
-  [[{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"name":"value"}
-name
-{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"name":""}
-name
-{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"name":"longer string with spaces"}
-name
-{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"name":""}
-<none>]], [])
-
-OVSDB_CHECK_POSITIVE([row with one integer column],
-  [[parse-rows \
-    '{"columns": {"count": {"type": "integer"}}}' \
-    '{"count": 1}' \
-    '{"count": -1}' \
-    '{"count": 2e10}' \
-    '{}']],
-  [[{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"count":1}
-count
-{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"count":-1}
-count
-{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"count":20000000000}
-count
-{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"count":0}
-<none>]], [])
-
-OVSDB_CHECK_POSITIVE([row with one real column],
-  [[parse-rows \
-    '{"columns": {"cost": {"type": "real"}}}' \
-    '{"cost": 1.0}' \
-    '{"cost": -2.0}' \
-    '{"cost": 123000}' \
-    '{}']],
-  [[{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"cost":1}
-cost
-{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"cost":-2}
-cost
-{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"cost":123000}
-cost
-{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"cost":0}
-<none>]], [])
-
-OVSDB_CHECK_POSITIVE([row with one boolean column],
-  [[parse-rows \
-    '{"columns": {"feasible": {"type": "boolean"}}}' \
-    '{"feasible": true}' \
-    '{"feasible": false}' \
-    '{}']],
-  [[{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"feasible":true}
-feasible
-{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"feasible":false}
-feasible
-{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"feasible":false}
-<none>]], [])
-
-OVSDB_CHECK_POSITIVE([row with one uuid column],
-  [[parse-rows \
-    '{"columns": {"ref": {"type": "uuid"}}}' \
-    '{"ref": ["uuid", "f707423d-bf5b-48b5-b6c0-797c900ba4b6"]}' \
-    '{"ref": ["uuid", "33583cc5-d2f4-43de-b1ca-8aac14071b51"]}' \
-    '{}']],
-  [[{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"ref":["uuid","f707423d-bf5b-48b5-b6c0-797c900ba4b6"]}
-ref
-{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"ref":["uuid","33583cc5-d2f4-43de-b1ca-8aac14071b51"]}
-ref
-{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"ref":["uuid","00000000-0000-0000-0000-000000000000"]}
-<none>]], [])
-
-OVSDB_CHECK_POSITIVE([row with set of 1 to 2 elements],
-  [[parse-rows \
-    '{"columns": {"myset": {"type": {"key": "integer", "min": 1, "max": 2}}}}' \
-    '{}']],
-  [[{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"myset":0}
-<none>]])
-
-OVSDB_CHECK_POSITIVE([row with map of 1 to 2 elements],
-  [[parse-rows \
-    '{"columns": {"mymap": {"type": {"key": "integer", "value": "uuid", "min": 1, "max": 2}}}}' \
-    '{}']],
-  [[{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"mymap":["map",[[0,["uuid","00000000-0000-0000-0000-000000000000"]]]]}
-<none>]], [])
-
-OVSDB_CHECK_POSITIVE([row with several columns],
-  [[parse-rows \
-    '{"columns":
-        {"vswitch": {"type": "uuid"},
-         "name": {"type": "string"},
-         "datapath_id": {"type": {"key": "string", "min": 0}},
-         "hwaddr": {"type": "string"},
-         "mirrors": {"type": {"key": "uuid", "min": 0, "max": "unlimited"}},
-         "netflows": {"type": {"key": "uuid", "min": 0, "max": "unlimited"}},
-         "controller": {"type": {"key": "uuid", "min": 0}},
-         "listeners": {"type": {"key": "uuid", "min": 0, "max": "unlimited"}},
-         "snoops": {"type": {"key": "uuid", "min": 0, "max": "unlimited"}}}}' \
-    '{"vswitch": ["uuid", "1a5c7280-0d4c-4e34-9ec7-c772339f7774"],
-      "name": "br0",
-      "datapath_id": "000ae4256bb0",
-      "hwaddr": "00:0a:e4:25:6b:b0"}' \
-    '{}']],
- [[{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"controller":["set",[]],"datapath_id":"000ae4256bb0","hwaddr":"00:0a:e4:25:6b:b0","listeners":["set",[]],"mirrors":["set",[]],"name":"br0","netflows":["set",[]],"snoops":["set",[]],"vswitch":["uuid","1a5c7280-0d4c-4e34-9ec7-c772339f7774"]}
-datapath_id, hwaddr, name, vswitch
-{"_uuid":["uuid","00000000-0000-0000-0000-000000000000"],"_version":["uuid","00000000-0000-0000-0000-000000000000"],"controller":["set",[]],"datapath_id":["set",[]],"hwaddr":"","listeners":["set",[]],"mirrors":["set",[]],"name":"","netflows":["set",[]],"snoops":["set",[]],"vswitch":["uuid","00000000-0000-0000-0000-000000000000"]}
-<none>]], [])
-
-OVSDB_CHECK_POSITIVE([row hashing (scalars)],
-  [[compare-rows \
-    '{"columns":
-        {"i": {"type": "integer"},
-         "r": {"type": "real"},
-         "b": {"type": "boolean"},
-         "s": {"type": "string"},
-         "u": {"type": "uuid"}}}' \
-     '["null", {}]' \
-     '["i1", {"i": 1}]' \
-     '["i2", {"i": 2}]' \
-     '["i4", {"i": 4}]' \
-     '["i8", {"i": 8}]' \
-     '["i16", {"i": 16}]' \
-     '["i32", {"i": 32}]' \
-     '["i64", {"i": 64}]' \
-     '["i128", {"i": 128}]' \
-     '["i256", {"i": 256}]' \
-     '["null2", {"r": -0}]' \
-     '["r123", {"r": 123}]' \
-     '["r0.0625", {"r": 0.0625}]' \
-     '["r0.125", {"r": 0.125}]' \
-     '["r0.25", {"r": 0.25}]' \
-     '["r0.5", {"r": 0.5}]' \
-     '["r1", {"r": 1}]' \
-     '["r2", {"r": 2}]' \
-     '["r4", {"r": 4}]' \
-     '["r8", {"r": 8}]' \
-     '["r16", {"r": 16}]' \
-     '["r32", {"r": 32}]' \
-     '["null3", {"b": false}]' \
-     '["b1", {"b": true}]' \
-     '["null4", {"s": ""}]' \
-     '["s0", {"s": "a"}]' \
-     '["s1", {"s": "b"}]' \
-     '["s2", {"s": "c"}]' \
-     '["s3", {"s": "d"}]' \
-     '["s4", {"s": "e"}]' \
-     '["s5", {"s": "f"}]' \
-     '["s6", {"s": "g"}]' \
-     '["s7", {"s": "h"}]' \
-     '["s8", {"s": "i"}]' \
-     '["s9", {"s": "j"}]' \
-     '["null5", {"u": ["uuid","00000000-0000-0000-0000-000000000000"]}]' \
-     '["u1", {"u": ["uuid","10000000-0000-0000-0000-000000000000"]}]' \
-     '["u2", {"u": ["uuid","01000000-0000-0000-0000-000000000000"]}]' \
-     '["u3", {"u": ["uuid","00100000-0000-0000-0000-000000000000"]}]' \
-     '["u4", {"u": ["uuid","00010000-0000-0000-0000-000000000000"]}]' \
-     '["u5", {"u": ["uuid","00001000-0000-0000-0000-000000000000"]}]' \
-     '["u6", {"u": ["uuid","00000100-0000-0000-0000-000000000000"]}]' \
-     '["u7", {"u": ["uuid","00000010-0000-0000-0000-000000000000"]}]' \
-     '["u8", {"u": ["uuid","00000001-0000-0000-0000-000000000000"]}]' \
-     '["null6", {"u": ["uuid","00000000-c6db-4d22-970f-b41fabd20c4b"]}]']],
-  [[null == null2
-null == null3
-null == null4
-null == null5
-hash(null) == hash(null6)
-null2 == null3
-null2 == null4
-null2 == null5
-hash(null2) == hash(null6)
-null3 == null4
-null3 == null5
-hash(null3) == hash(null6)
-null4 == null5
-hash(null4) == hash(null6)
-hash(null5) == hash(null6)]])
-
-OVSDB_CHECK_POSITIVE([row hashing (sets)],
-  [[compare-rows \
-    '{"columns":
-        {"i": {"type": {"key": "integer", "min": 0, "max": "unlimited"}},
-         "r": {"type": {"key": "real", "min": 0, "max": "unlimited"}},
-         "b": {"type": {"key": "boolean", "min": 0, "max": "unlimited"}},
-         "s": {"type": {"key": "string", "min": 0, "max": "unlimited"}},
-         "u": {"type": {"key": "uuid", "min": 0, "max": "unlimited"}}}}' \
-    '["null0", {"i": ["set", []]}]' \
-    '["i0", {"i": ["set", [0]]}]' \
-    '["i01", {"i": ["set", [0, 1]]}]' \
-    '["i012", {"i": ["set", [0, 1, 2]]}]' \
-    '["i021", {"i": ["set", [0, 2, 1]]}]' \
-    '["i201", {"i": ["set", [2, 0, 1]]}]' \
-    '["i102", {"i": ["set", [1, 0, 2]]}]' \
-    '["i120", {"i": ["set", [1, 2, 0]]}]' \
-    '["i210", {"i": ["set", [2, 1, 0]]}]' \
-    '["r0", {"r": ["set", [0]]}]' \
-    '["r01", {"r": ["set", [0, 1]]}]' \
-    '["r012", {"r": ["set", [0, 1, 2]]}]' \
-    '["r201", {"r": ["set", [2, 0, 1]]}]' \
-    '["null1", {"b": ["set", []]}]' \
-    '["b0", {"b": ["set", [false]]}]' \
-    '["b1", {"b": ["set", [true]]}]' \
-    '["b01", {"b": ["set", [false, true]]}]' \
-    '["b10", {"b": ["set", [true, false]]}]' \
-    '["null2", {"s": ["set", []]}]' \
-    '["sa", {"s": ["set", ["a"]]}]' \
-    '["sb", {"s": ["set", ["b"]]}]' \
-    '["sab", {"s": ["set", ["a", "b"]]}]' \
-    '["sba", {"s": ["set", ["b", "a"]]}]']],
-  [[null0 == null1
-null0 == null2
-i012 == i021
-i012 == i201
-i012 == i102
-i012 == i120
-i012 == i210
-i021 == i201
-i021 == i102
-i021 == i120
-i021 == i210
-i201 == i102
-i201 == i120
-i201 == i210
-i102 == i120
-i102 == i210
-i120 == i210
-r012 == r201
-null1 == null2
-b01 == b10
-sab == sba]])
-
-OVSDB_CHECK_POSITIVE([row hashing (maps)],
-  [[compare-rows \
-    '{"columns":
-        {"ii": {"type": {"key": "integer", "value": "integer", 
-                         "min": 0, "max": "unlimited"}},
-         "rr": {"type": {"key": "real", "value": "real",
-                         "min": 0, "max": "unlimited"}},
-         "bb": {"type": {"key": "boolean", "value": "boolean",
-                         "min": 0, "max": "unlimited"}},
-         "ss": {"type": {"key": "string", "value": "string",
-                         "min": 0, "max": "unlimited"}}}}' \
-    '["null", {}]' \
-    '["ii0", {"ii": ["map", [[0, 0]]]}]' \
-    '["ii1", {"ii": ["map", [[0, 1]]]}]' \
-    '["ii00", {"ii": ["map", [[0, 0], [1, 0]]]}]' \
-    '["ii01", {"ii": ["map", [[0, 0], [1, 1]]]}]' \
-    '["ii10", {"ii": ["map", [[0, 1], [1, 0]]]}]' \
-    '["ii11", {"ii": ["map", [[0, 1], [1, 1]]]}]' \
-    '["rr0", {"rr": ["map", [[0, 0]]]}]' \
-    '["rr0", {"rr": ["map", [[0, 1]]]}]' \
-    '["rr00", {"rr": ["map", [[0, 0], [1, 0]]]}]' \
-    '["rr01", {"rr": ["map", [[0, 0], [1, 1]]]}]' \
-    '["rr10", {"rr": ["map", [[0, 1], [1, 0]]]}]' \
-    '["rr11", {"rr": ["map", [[0, 1], [1, 1]]]}]' \
-    '["bb0", {"bb": ["map", [[false, false]]]}]' \
-    '["bb1", {"bb": ["map", [[false, true]]]}]' \
-    '["bb00", {"bb": ["map", [[false, false], [true, false]]]}]' \
-    '["bb01", {"bb": ["map", [[false, false], [true, true]]]}]' \
-    '["bb10", {"bb": ["map", [[false, true], [true, false]]]}]' \
-    '["bb11", {"bb": ["map", [[false, true], [true, true]]]}]' \
-    '["ss0", {"ss": ["map", [["a", "a"]]]}]' \
-    '["ss1", {"ss": ["map", [["a", "b"]]]}]' \
-    '["ss00", {"ss": ["map", [["a", "a"], ["b", "a"]]]}]' \
-    '["ss01", {"ss": ["map", [["a", "a"], ["b", "b"]]]}]' \
-    '["ss10", {"ss": ["map", [["a", "b"], ["b", "a"]]]}]' \
-    '["ss11", {"ss": ["map", [["a", "b"], ["b", "b"]]]}]'; echo
-]], [[]])
diff --git a/tests/ovsdb-schema.at b/tests/ovsdb-schema.at
deleted file mode 100644
index d606d718d..000000000
--- a/tests/ovsdb-schema.at
+++ /dev/null
@@ -1,120 +0,0 @@
-AT_BANNER([OVSDB -- schemas])
-
-OVSDB_CHECK_POSITIVE_CPY([schema with valid refTables],
-  [[parse-schema \
-      '{"name": "mydb",
-        "version": "4.2.1",
-        "tables": {
-          "a": {
-            "columns": {
-              "map": {
-                "type": {
-                  "key": {
-                    "type": "uuid",
-                    "refTable": "b"},
-                  "value": {
-                    "type": "uuid",
-                    "refTable": "a"}}}}},
-          "b": {
-            "columns": {
-              "aRef": {
-                "type": {
-                  "key": {
-                    "type": "uuid",
-                    "refTable": "a"}}}}}}}']],
-  [[{"name":"mydb","tables":{"a":{"columns":{"map":{"type":{"key":{"refTable":"b","type":"uuid"},"value":{"refTable":"a","type":"uuid"}}}}},"b":{"columns":{"aRef":{"type":{"key":{"refTable":"a","type":"uuid"}}}}}},"version":"4.2.1"}]])
-
-dnl Ephemeral strong references to root set tables are OK.
-dnl Ephemeral strong references to non-root set tables are forced to be
-dnl persistent.
-OVSDB_CHECK_POSITIVE_CPY([schema with ephemeral strong references],
-  [[parse-schema \
-      '{"name": "mydb",
-        "version": "4.2.1",
-        "tables": {
-          "a": {
-            "columns": {
-              "x": {
-                "type": {
-                  "key": {
-                    "type": "uuid",
-                    "refTable": "b"}},
-                "ephemeral": true},
-              "y": {
-                "type": {
-                  "key": {
-                    "type": "uuid",
-                    "refTable": "a"}},
-                "ephemeral": true}}},
-          "b": {
-            "columns": {
-              "aRef": {
-                "type": {
-                  "key": {
-                    "type": "uuid",
-                    "refTable": "a"}}}},
-              "isRoot": true}}}']],
-  [[{"name":"mydb","tables":{"a":{"columns":{"x":{"ephemeral":true,"type":{"key":{"refTable":"b","type":"uuid"}}},"y":{"type":{"key":{"refTable":"a","type":"uuid"}}}}},"b":{"columns":{"aRef":{"type":{"key":{"refTable":"a","type":"uuid"}}}},"isRoot":true}},"version":"4.2.1"}]])
-
-dnl Immutable weak references are forced to be mutable.
-OVSDB_CHECK_POSITIVE_CPY([schema with immutable weak references],
-  [[parse-schema \
-      '{"name": "mydb",
-        "version": "4.2.1",
-        "tables": {
-          "a": {
-            "columns": {
-              "x": {
-                "type": {
-                  "key": {
-                    "type": "uuid",
-                    "refTable": "a",
-                    "refType": "weak"}},
-                "mutable": false}}}}}']],
-  [[{"name":"mydb","tables":{"a":{"columns":{"x":{"type":{"key":{"refTable":"a","refType":"weak","type":"uuid"}}}}}},"version":"4.2.1"}]])
-
-dnl Schemas without version numbers are accepted for backward
-dnl compatibility, but this is a deprecated feature.
-OVSDB_CHECK_POSITIVE_CPY([schema without version number],
-  [[parse-schema \
-      '{"name": "mydb",
-        "tables": {
-          "x": {
-            "columns": {
-              "y": {
-                "type": "integer"}}}}}']],
-  [{"name":"mydb","tables":{"x":{"columns":{"y":{"type":"integer"}}}}}])
-     
-OVSDB_CHECK_NEGATIVE_CPY([schema with invalid refTables],
-  [[parse-schema \
-      '{"name": "mydb",
-        "tables": {
-          "a": {
-            "columns": {
-              "map": {
-                "type": {
-                  "key": {
-                    "type": "uuid",
-                    "refTable": "c"},
-                  "value": {
-                    "type": "uuid",
-                    "refTable": "a"}}}}},
-          "b": {
-            "columns": {
-              "aRef": {
-                "type": {
-                  "key": {
-                    "type": "uuid",
-                    "refTable": "a"}}}}}}}']],
-  [[syntax error: column map key refers to undefined table c]])
-     
-OVSDB_CHECK_NEGATIVE_CPY([schema with invalid version number],
-  [[parse-schema \
-      '{"name": "mydb",
-        "tables": {
-          "x": {
-            "columns": {
-              "y": {
-                "type": "integer"}}}},
-        "version": "xxx"}']],
-  [[schema version "xxx" not in format x.y.z]])
diff --git a/tests/ovsdb-server.at b/tests/ovsdb-server.at
deleted file mode 100644
index 81f03d28b..000000000
--- a/tests/ovsdb-server.at
+++ /dev/null
@@ -1,1905 +0,0 @@
-AT_BANNER([OVSDB -- ovsdb-server transactions (Unix sockets)])
-
-m4_define([OVSDB_SERVER_SHUTDOWN],
-  [OVS_APP_EXIT_AND_WAIT_BY_TARGET([ovsdb-server], [ovsdb-server.pid])])
-
-m4_define([OVSDB_SERVER_SHUTDOWN2],
-  [cp pid2 savepid2
-   AT_CHECK([ovs-appctl -t "`pwd`"/unixctl2 -e exit], [0], [ignore], [ignore])
-   OVS_WAIT_WHILE([kill -0 `cat savepid2`], [kill `cat savepid2`])])
-
-# OVSDB_CHECK_EXECUTION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
-#
-# Creates a database with the given SCHEMA, starts an ovsdb-server on
-# that database, and runs each of the TRANSACTIONS (which should be a
-# quoted list of quoted strings) against it with ovsdb-client one at a
-# time.
-#
-# Checks that the overall output is OUTPUT, but UUIDs in the output
-# are replaced by markers of the form <N> where N is a number.  The
-# first unique UUID is replaced by <0>, the next by <1>, and so on.
-# If a given UUID appears more than once it is always replaced by the
-# same marker.
-#
-# TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
-m4_define([OVSDB_CHECK_EXECUTION], 
-  [AT_SETUP([$1])
-   AT_KEYWORDS([ovsdb server positive unix $5])
-   $2 > schema
-   AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-   AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket db], [0], [ignore], [ignore])
-   m4_foreach([txn], [$3], 
-     [AT_CHECK([ovsdb-client transact unix:socket 'txn'], [0], [stdout], [ignore],
-     [test ! -e pid || kill `cat pid`])
-cat stdout >> output
-])
-   AT_CHECK([uuidfilt output], [0], [$4], [ignore],
-            [test ! -e pid || kill `cat pid`])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-EXECUTION_EXAMPLES
-
-AT_BANNER([ovsdb-server miscellaneous features])
-
-AT_SETUP([truncating corrupted database log])
-AT_KEYWORDS([ovsdb server positive unix])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-dnl Do one transaction and save the output.
-AT_DATA([txnfile], [[ovsdb-client transact unix:socket \
-'["ordinals",
-  {"op": "insert",
-   "table": "ordinals",
-   "row": {"number": 0, "name": "zero"}}]'
-]])
-AT_CHECK([ovsdb-server --remote=punix:socket db --run="sh txnfile"], [0], [stdout], [])
-cat stdout >> output
-dnl Add some crap to the database log and run another transaction, which should
-dnl ignore the crap and truncate it out of the log.
-echo 'xxx' >> db
-AT_DATA([txnfile], [[ovsdb-client transact unix:socket \
-'["ordinals",
-  {"op": "insert",
-   "table": "ordinals",
-   "row": {"number": 1, "name": "one"}}]'
-]])
-AT_CHECK([ovsdb-server --remote=punix:socket db --run="sh txnfile"], [0], [stdout], [stderr])
-AT_CHECK([grep 'syntax error: db: parse error.* in header line "xxx"' stderr],
-  [0], [ignore])
-cat stdout >> output
-dnl Run a final transaction to verify that both transactions succeeeded.
-dnl The crap that we added should have been truncated by the previous run,
-dnl so ovsdb-server shouldn't log a warning this time.
-AT_DATA([txnfile], [[ovsdb-client transact unix:socket \
-'["ordinals",
-  {"op": "select",
-   "table": "ordinals",
-   "where": [],
-   "sort": ["number"]}]'
-]])
-AT_CHECK([ovsdb-server --remote=punix:socket db --run="sh txnfile"], [0], [stdout], [])
-cat stdout >> output
-AT_CHECK([uuidfilt output], [0],
-  [[[{"uuid":["uuid","<0>"]}]
-[{"uuid":["uuid","<1>"]}]
-[{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<2>"],"name":"zero","number":0},{"_uuid":["uuid","<1>"],"_version":["uuid","<3>"],"name":"one","number":1}]}]
-]], [],
-         [test ! -e pid || kill `cat pid`])
-AT_CLEANUP
-
-AT_SETUP([truncating database log with bad transaction])
-AT_KEYWORDS([ovsdb server positive unix])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-dnl Do one transaction and save the output.
-AT_DATA([txnfile], [[ovsdb-client transact unix:socket \
-'["ordinals",
-  {"op": "insert",
-   "table": "ordinals",
-   "row": {"number": 0, "name": "zero"}}]'
-]])
-AT_CHECK([ovsdb-server --remote=punix:socket db --run="sh txnfile"], [0], [stdout], [])
-cat stdout >> output
-dnl Add some crap to the database log and run another transaction, which should
-dnl ignore the crap and truncate it out of the log.
-echo 'OVSDB JSON 15 ffbcdae4b0386265f9ea3280dd7c8f0b72a20e56
-{"invalid":{}}' >> db
-AT_DATA([txnfile], [[ovsdb-client transact unix:socket \
-'["ordinals",
-  {"op": "insert",
-   "table": "ordinals",
-   "row": {"number": 1, "name": "one"}}]'
-]])
-AT_CHECK([ovsdb-server --remote=punix:socket db --run="sh txnfile"], [0], [stdout], [stderr])
-AT_CHECK([grep 'syntax "{"invalid":{}}": unknown table: No table named invalid.' stderr],
-  [0], [ignore])
-cat stdout >> output
-dnl Run a final transaction to verify that both transactions succeeeded.
-dnl The crap that we added should have been truncated by the previous run,
-dnl so ovsdb-server shouldn't log a warning this time.
-AT_DATA([txnfile], [[ovsdb-client transact unix:socket \
-'["ordinals",
-  {"op": "select",
-   "table": "ordinals",
-   "where": [],
-   "sort": ["number"]}]'
-]])
-AT_CHECK([ovsdb-server --remote=punix:socket db --run="sh txnfile"], [0], [stdout], [])
-cat stdout >> output
-AT_CHECK([uuidfilt output], [0],
-  [[[{"uuid":["uuid","<0>"]}]
-[{"uuid":["uuid","<1>"]}]
-[{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<2>"],"name":"zero","number":0},{"_uuid":["uuid","<1>"],"_version":["uuid","<3>"],"name":"one","number":1}]}]
-]], [],
-         [test ! -e pid || kill `cat pid`])
-AT_CLEANUP
-
-dnl CHECK_DBS([databases])
-dnl
-dnl Checks that ovsdb-server hosts the given 'databases', each of which
-dnl needs to be followed by a newline.
-m4_define([CHECK_DBS],
-  [AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-dbs],
-  [0], [_Server
-$1])
-AT_CHECK([ovsdb-client --no-headings dump _Server Database name | sort], [0], [dnl
-Database table
-_Server
-$1])])
-
-AT_SETUP([database multiplexing implementation])
-AT_KEYWORDS([ovsdb server positive])
-ordinal_schema > schema1
-constraint_schema > schema2
-AT_CHECK([ovsdb-tool create db1 schema1], [0], [ignore], [ignore])
-AT_CHECK([ovsdb-tool create db2 schema2], [0], [ignore], [ignore])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:db.sock db1 db2], [0], [ignore], [ignore])
-CHECK_DBS([constraints
-ordinals
-])
-AT_CHECK(
-  [[ovstest test-jsonrpc request unix:db.sock get_schema [\"nonexistent\"]]], [0],
-  [[{"error":{"details":"get_schema request specifies unknown database nonexistent","error":"unknown database","syntax":"[\"nonexistent\"]"},"id":0,"result":null}
-]], [], [test ! -e pid || kill `cat pid`])
-OVSDB_SERVER_SHUTDOWN
-AT_CLEANUP
-
-AT_SETUP([ovsdb-server/add-db and remove-db])
-AT_KEYWORDS([ovsdb server positive])
-on_exit 'kill `cat *.pid`'
-ordinal_schema > schema1
-constraint_schema > schema2
-AT_CHECK([ovsdb-tool create db1 schema1], [0], [ignore], [ignore])
-AT_CHECK([ovsdb-tool create db2 schema2], [0], [ignore], [ignore])
-
-# Start ovsdb-server with just a single database - db1.
-AT_CHECK([ovsdb-server -vfile -vvlog:off --log-file --detach --no-chdir --pidfile --remote=punix:db.sock db1], [0])
-CHECK_DBS([ordinals
-])
-
-# Remove the database.
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/remove-db ordinals], [0])
-CHECK_DBS([])
-
-# Start monitoring processes.
-AT_CHECK([ovsdb-client --detach --no-chdir --pidfile=ovsdb-client-1.pid --no-db-change-aware --no-headings monitor _Server Database name > db-change-unaware.stdout 2> db-change-unaware.stderr])
-AT_CHECK([ovsdb-client --detach --no-chdir --pidfile=ovsdb-client-2.pid --db-change-aware --no-headings monitor _Server Database name > db-change-aware.stdout 2> db-change-aware.stderr])
-AT_CAPTURE_FILE([db-change-unaware.stdout])
-AT_CAPTURE_FILE([db-change-unaware.stderr])
-AT_CAPTURE_FILE([db-change-aware.stdout])
-AT_CAPTURE_FILE([db-change-aware.stderr])
-
-# Add the first database back.
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-db db1], [0])
-CHECK_DBS([ordinals
-])
-
-# Add the second database.
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-db db2], [0])
-CHECK_DBS([constraints
-ordinals
-])
-
-# The databases are responsive.
-AT_CHECK([ovsdb-client list-tables unix:db.sock constraints], [0], [ignore], [ignore])
-AT_CHECK([ovsdb-client list-tables unix:db.sock ordinals], [0], [ignore], [ignore])
-
-# Add an already added database.
-if test $IS_WIN32 = "yes"; then
-  AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-db db2], 2, [],
-  [I/O error: db2: failed to lock lockfile (Resource deadlock avoided)
-ovs-appctl: ovsdb-server: server returned an error
-])
-else
-  AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-db db2], 2, [],
-  [ovsdb error: db2: already open
-ovs-appctl: ovsdb-server: server returned an error
-])
-fi
-
-# Add a non-existing database.
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-db db3], 2, [], [stderr])
-AT_CHECK([sed 's/(.*)/(...)/' stderr], [0],
-  [I/O error: db3: open failed (...)
-ovs-appctl: ovsdb-server: server returned an error
-])
-
-# Add a remote through a db path in db1.
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-remote db:ordinals,ordinals,name], [0])
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],
-  [0], [db:ordinals,ordinals,name
-punix:db.sock
-])
-
-# Removing db1 has no effect on its remote.
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/remove-db ordinals], [0])
-CHECK_DBS([constraints
-])
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],
-  [0], [db:ordinals,ordinals,name
-punix:db.sock
-])
-AT_CHECK([ovsdb-client list-tables unix:db.sock ordinals], [1], [ignore], [ignore])
-
-# Remove db2.
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/remove-db constraints], [0])
-CHECK_DBS()
-AT_CHECK([ovsdb-client list-tables unix:db.sock constraints], [1], [ignore], [ignore])
-
-# Remove a non-existent database.
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/remove-db ordinals], [2],
-  [], [Failed to find the database.
-ovs-appctl: ovsdb-server: server returned an error
-])
-
-# Add a removed database.
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-db db2], [0])
-CHECK_DBS([constraints
-])
-AT_CHECK([ovsdb-client list-tables unix:db.sock constraints], [0], [ignore], [ignore])
-
-# Check the monitoring results.
-AT_CHECK([uuidfilt db-change-aware.stdout], [0], [dnl
-<0> initial _Server
-
-<1> insert ordinals
-
-<2> insert constraints
-
-<1> delete ordinals
-
-<2> delete constraints
-
-<3> insert constraints
-])
-AT_CHECK([uuidfilt db-change-unaware.stdout], [0], [dnl
-<0> initial _Server
-])
-
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-server/add-db with --monitor])
-AT_KEYWORDS([ovsdb server positive])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-
-# This test intentionally causes SIGSEGV, so make Address Sanitizer ignore it.
-ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS
-
-# Start ovsdb-server, initially with one db.
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create db1 schema], [0], [ignore], [ignore])
-on_exit 'kill `cat *.pid`'
-AT_CHECK([ovsdb-server -vfile -vvlog:off --monitor --detach --no-chdir --pidfile --log-file --remote=punix:db.sock db1])
-
-# Add the second database.
-constraint_schema > schema2
-AT_CHECK([ovsdb-tool create db2 schema2], [0], [ignore], [ignore])
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-db db2], [0])
-CHECK_DBS([constraints
-ordinals
-])
-
-# Kill the daemon process, making it look like a segfault,
-# and wait for a new daemon process to get spawned.
-cp ovsdb-server.pid old.pid
-AT_CHECK([kill -SEGV `cat ovsdb-server.pid`])
-OVS_WAIT_WHILE([kill -0 `cat old.pid`])
-OVS_WAIT_UNTIL(
-  [test -s ovsdb-server.pid && test `cat ovsdb-server.pid` != `cat old.pid`])
-OVS_WAIT_UNTIL([ovs-appctl -t ovsdb-server version])
-CHECK_DBS([constraints
-ordinals
-])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-server/add-db and remove-db with --monitor])
-AT_KEYWORDS([ovsdb server positive])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-
-# This test intentionally causes SIGSEGV, so make Address Sanitizer ignore it.
-ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS
-
-# Start ovsdb-server, initially with one db.
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create db1 schema], [0], [ignore], [ignore])
-constraint_schema > schema2
-AT_CHECK([ovsdb-tool create db2 schema2], [0], [ignore], [ignore])
-on_exit 'kill `cat *.pid`'
-AT_CHECK([ovsdb-server -vfile -vvlog:off --monitor --detach --no-chdir --pidfile --log-file --remote=punix:db.sock db1 db2])
-
-# Remove the second database.
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/remove-db constraints])
-CHECK_DBS([ordinals
-])
-
-# Kill the daemon process, making it look like a segfault,
-# and wait for a new daemon process to get spawned.
-cp ovsdb-server.pid old.pid
-AT_CHECK([kill -SEGV `cat ovsdb-server.pid`])
-OVS_WAIT_WHILE([kill -0 `cat old.pid`])
-OVS_WAIT_UNTIL(
-  [test -s ovsdb-server.pid && test `cat ovsdb-server.pid` != `cat old.pid`])
-OVS_WAIT_UNTIL([ovs-appctl -t ovsdb-server version])
-CHECK_DBS([ordinals
-])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
-
-AT_SETUP([--remote=db: implementation])
-AT_KEYWORDS([ovsdb server positive])
-AT_DATA([schema],
-  [[{"name": "mydb",
-     "tables": {
-       "Root": {
-         "columns": {
-           "managers": {
-             "type": {
-               "key": "string",
-               "min": 0,
-               "max": "unlimited"}},
-           "manager_options": {
-             "type": {
-               "key": {"type": "uuid", "refTable": "Manager"},
-               "min": 0,
-               "max": "unlimited"}}}},
-       "Manager": {
-         "columns": {
-           "target": {
-             "type": "string"},
-           "is_connected": {
-             "type": {
-               "key": "boolean",
-               "min": 0,
-               "max": 1}}}}}}
-]])
-AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
-AT_CHECK(
-  [[ovsdb-tool transact db \
-     '["mydb",
-       {"op": "insert",
-        "table": "Root",
-        "row": {
-          "managers": "punix:socket1",
-          "manager_options": ["set", [["named-uuid", "x"]]]}},
-       {"op": "insert",
-        "table": "Manager",
-        "uuid-name": "x",
-        "row": {"target": "punix:socket2"}}]']], [0], [ignore], [ignore])
-on_exit 'kill `cat ovsdb-server.pid`'
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=db:mydb,Root,managers --remote=db:mydb,Root,manager_options --log-file db], [0], [ignore], [ignore])
-ovs-appctl -t ovsdb-server time/warp 6000 1000
-AT_CHECK(
-  [[ovsdb-client transact unix:socket1 \
-     '["mydb",
-       {"op": "select",
-        "table": "Root",
-        "where": [],
-        "columns": ["managers"]},
-       {"op": "select",
-        "table": "Manager",
-        "where": [],
-        "columns": ["target", "is_connected"]}]']],
-  [0], [stdout], [ignore])
-AT_CHECK(
-  [uuidfilt stdout],
-  [0], 
-  [[[{"rows":[{"managers":"punix:socket1"}]},{"rows":[{"is_connected":false,"target":"punix:socket2"}]}]
-]], 
-  [ignore])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-server/add-remote and remove-remote])
-AT_KEYWORDS([ovsdb server positive])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
-on_exit 'kill `cat *.pid`'
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile db])
-
-AT_CHECK([test ! -e socket1])
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-remote punix:socket1])
-if test "$IS_WIN32" = "yes"; then
-  OVS_WAIT_UNTIL([test -e socket1])
-else
-  OVS_WAIT_UNTIL([test -S socket1])
-fi
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],
-  [0], [punix:socket1
-])
-
-AT_CHECK([test ! -e socket2])
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-remote punix:socket2])
-if test "$IS_WIN32" = "yes"; then
-  OVS_WAIT_UNTIL([test -e socket2])
-else
-  OVS_WAIT_UNTIL([test -S socket2])
-fi
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],
-  [0], [punix:socket1
-punix:socket2
-])
-
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-remote db:x,y,z], [2],
-  [], ["db:x,y,z": no database named x
-ovs-appctl: ovsdb-server: server returned an error
-])
-
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/remove-remote punix:socket1])
-OVS_WAIT_UNTIL([test ! -e socket1])
-if test "$IS_WIN32" = "yes"; then
-  AT_CHECK([test -e socket2])
-else
-  AT_CHECK([test -S socket2])
-fi
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],
-  [0], [punix:socket2
-])
-
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/remove-remote punix:socket2])
-OVS_WAIT_UNTIL([test ! -e socket2])
-AT_CHECK([test ! -e socket1])
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-server/add-remote with --monitor])
-AT_KEYWORDS([ovsdb server positive])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-
-# This test intentionally causes SIGSEGV, so make Address Sanitizer ignore it.
-ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS
-
-# Start ovsdb-server, initially with no remotes.
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
-on_exit 'kill `cat *.pid`'
-AT_CHECK([ovsdb-server -vfile -vvlog:off --monitor --detach --no-chdir --pidfile --log-file db])
-
-# Add a remote.
-AT_CHECK([test ! -e socket1])
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-remote punix:socket1])
-OVS_WAIT_UNTIL([test -S socket1])
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],
-  [0], [punix:socket1
-])
-
-# Kill the daemon process, making it look like a segfault,
-# and wait for a new daemon process to get spawned and for it to
-# start listening on 'socket1'.
-cp ovsdb-server.pid old.pid
-rm socket1
-AT_CHECK([kill -SEGV `cat ovsdb-server.pid`])
-OVS_WAIT_WHILE([kill -0 `cat old.pid`])
-OVS_WAIT_UNTIL(
-  [test -s ovsdb-server.pid && test `cat ovsdb-server.pid` != `cat old.pid`])
-OVS_WAIT_UNTIL([ovs-appctl -t ovsdb-server version])
-OVS_WAIT_UNTIL([test -S socket1])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-server/add-remote and remove-remote with --monitor])
-AT_KEYWORDS([ovsdb server positive])
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-
-# This test intentionally causes SIGSEGV, so make Address Sanitizer ignore it.
-ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS
-
-# Start ovsdb-server, initially with no remotes.
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
-on_exit 'kill `cat *.pid`'
-AT_CHECK([ovsdb-server -vfile -vvlog:off --monitor --detach --no-chdir --pidfile --log-file db])
-
-# Add a remote.
-AT_CHECK([test ! -e socket1])
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-remote punix:socket1])
-OVS_WAIT_UNTIL([test -S socket1])
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],
-  [0], [punix:socket1
-])
-
-# Remove the remote.
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/remove-remote punix:socket1])
-OVS_WAIT_UNTIL([test ! -e socket1])
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes])
-
-# Kill the daemon process, making it look like a segfault,
-# and wait for a new daemon process to get spawned and make sure that it
-# does not listen on 'socket1'.
-cp ovsdb-server.pid old.pid
-AT_CHECK([kill -SEGV `cat ovsdb-server.pid`])
-OVS_WAIT_WHILE([kill -0 `cat old.pid`])
-OVS_WAIT_UNTIL(
-  [test -s ovsdb-server.pid && test `cat ovsdb-server.pid` != `cat old.pid`])
-OVS_WAIT_UNTIL([ovs-appctl -t ovsdb-server version])
-AT_CHECK([test ! -e socket1])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
-
-AT_SETUP([SSL db: implementation])
-AT_KEYWORDS([ovsdb server positive ssl $5])
-AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
-# For this test, we pass PKIDIR through a ovsdb-tool transact and
-# msys on Windows does not convert the path style automatically.
-# So, do that forcefully with a 'pwd -W' (called through pwd() function).
-PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
-AT_SKIP_IF([expr "$PKIDIR" : ".*[       '\"
-\\]"])
-AT_DATA([schema],
-  [[{"name": "mydb",
-     "tables": {
-       "SSL": {
-         "columns": {
-           "private_key": {"type": "string"},
-           "certificate": {"type": "string"},
-           "ca_cert": {"type": "string"},
-           "ssl_protocols" : {"type": "string"},
-           "ssl_ciphers" : {"type" : "string"}}}}}
-]])
-AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-# The !ECDHE-ECDSA-AES256-GCM-SHA384 in the ssl_ciphers is so that
-# a cipher negotiation failure can be tested for later.
-AT_CHECK(
-  [[ovsdb-tool transact db \
-     '["mydb",
-       {"op": "insert",
-        "table": "SSL",
-        "row": {"private_key": "'"$PKIDIR/testpki-privkey2.pem"'",
-                "certificate": "'"$PKIDIR/testpki-cert2.pem"'",
-                "ca_cert": "'"$PKIDIR/testpki-cacert.pem"'",
-                "ssl_protocols": "'"TLSv1.2,TLSv1.1"'",
-                "ssl_ciphers": "'"HIGH:!aNULL:!MD5:!ECDHE-ECDSA-AES256-GCM-SHA384"'"}}]']],
-  [0], [ignore], [ignore])
-on_exit 'kill `cat *.pid`'
-AT_CHECK(
-  [ovsdb-server --log-file --detach --no-chdir --pidfile \
-        --private-key=db:mydb,SSL,private_key \
-        --certificate=db:mydb,SSL,certificate \
-        --ca-cert=db:mydb,SSL,ca_cert \
-        --ssl-protocols=db:mydb,SSL,ssl_protocols \
-        --ssl-ciphers=db:mydb,SSL,ssl_ciphers \
-        --remote=pssl:0:127.0.0.1 db],
-  [0], [ignore], [ignore])
-PARSE_LISTENING_PORT([ovsdb-server.log], [SSL_PORT])
-AT_CHECK(
-  [[ovsdb-client \
-        --private-key=$PKIDIR/testpki-privkey.pem \
-        --certificate=$PKIDIR/testpki-cert.pem \
-        --ca-cert=$PKIDIR/testpki-cacert.pem \
-        --ssl-protocols=TLSv1.2,TLSv1.1 \
-        --ssl-ciphers=HIGH:!aNULL:!MD5 \
-        transact ssl:127.0.0.1:$SSL_PORT \
-        '["mydb",
-          {"op": "select",
-           "table": "SSL",
-           "where": [],
-           "columns": ["private_key"]}]']],
-  [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK_UNQUOTED(
-  [cat output], [0],
-  [[@<:@{"rows":@<:@{"private_key":"$PKIDIR/testpki-privkey2.pem"}@:>@}@:>@
-]], [ignore])
-# Check that when the server has TLSv1.1+ and the client has
-# TLSv1 that the connection fails.
-AT_CHECK(
-  [[ovsdb-client \
-        --private-key=$PKIDIR/testpki-privkey.pem \
-        --certificate=$PKIDIR/testpki-cert.pem \
-        --ca-cert=$PKIDIR/testpki-cacert.pem \
-        --ssl-protocols=TLSv1 \
-        --ssl-ciphers=HIGH:!aNULL:!MD5 \
-        transact ssl:127.0.0.1:$SSL_PORT \
-        '["mydb",
-          {"op": "select",
-           "table": "SSL",
-           "where": [],
-           "columns": ["private_key"]}]']], 
-  [1], [stdout], 
-  [stderr])
-cat stderr > output
-AT_CHECK_UNQUOTED(
-  [sed -n "/failed to connect/s/ (.*)//p" output], [0],
-  [ovsdb-client: failed to connect to "ssl:127.0.0.1:$SSL_PORT"
-], 
-  [ignore])
-# Check that when ciphers are not compatible, that a negotiation
-# failure occurs.
-AT_CHECK(
-  [[ovsdb-client \
-        --private-key=$PKIDIR/testpki-privkey.pem \
-        --certificate=$PKIDIR/testpki-cert.pem \
-        --ca-cert=$PKIDIR/testpki-cacert.pem \
-        --ssl-protocols=TLSv1.2,TLSv1.1 \
-        --ssl-ciphers=ECDHE-ECDSA-AES256-GCM-SHA384 \
-        transact ssl:127.0.0.1:$SSL_PORT \
-        '["mydb",
-          {"op": "select",
-           "table": "SSL",
-           "where": [],
-           "columns": ["private_key"]}]']], 
-  [1], [stdout], 
-  [stderr])
-cat stderr > output
-AT_CHECK_UNQUOTED(
-  [sed -n "/failed to connect/s/ (.*)//p" output], [0],
-  [ovsdb-client: failed to connect to "ssl:127.0.0.1:$SSL_PORT"
-], 
-  [ignore])
-# The error message for being unable to negotiate a shared ciphersuite
-# is 'sslv3 alert handshake failure'. This is not the clearest message.
-AT_CHECK_UNQUOTED(
-  [grep "sslv3 alert handshake failure" output], [0],
-  [stdout],
-  [ignore])
-OVSDB_SERVER_SHUTDOWN
-AT_CLEANUP
-
-OVS_START_SHELL_HELPERS
-# ovsdb_check_online_compaction MODEL
-#
-# where MODEL is "standalone" or "cluster"
-ovsdb_check_online_compaction() {
-    local model=$1
-
-    ordinal_schema > schema
-    dnl Make sure that "ovsdb-tool create" works with a dangling symlink for
-    dnl the database and the lockfile, creating the target of each symlink rather
-    dnl than replacing the symlinks with regular files.
-    mkdir dir
-    if test "$IS_WIN32" = "no"; then
-        ln -s dir/db db
-        ln -s dir/.db.~lock~ .db.~lock~
-        AT_SKIP_IF([test ! -h db || test ! -h .db.~lock~])
-    fi
-    AT_CHECK([if test $model = standalone; then
-                  ovsdb-tool create db schema
-              else
-                  ovsdb-tool create-cluster db schema unix:s1.raft
-              fi])
-    dnl Start ovsdb-server.
-    AT_CHECK([ovsdb-server -vvlog:off -vconsole:off --detach --no-chdir --pidfile --remote=punix:socket --log-file db], [0])
-    AT_CHECK([ovsdb_client_wait unix:socket ordinals connected])
-    AT_CAPTURE_FILE([ovsdb-server.log])
-    dnl Do a bunch of random transactions that put crap in the database log.
-    AT_CHECK(
-      [[for pair in 'zero 0' 'one 1' 'two 2' 'three 3' 'four 4' 'five 5'; do
-          set -- $pair
-          ovsdb-client transact unix:socket '
-            ["ordinals",
-             {"op": "insert",
-              "table": "ordinals",
-              "row": {"name": "'$1'", "number": '$2'}},
-             {"op": "comment",
-              "comment": "add row for '"$pair"'"}]'
-          ovsdb-client transact unix:socket '
-            ["ordinals",
-             {"op": "delete",
-              "table": "ordinals",
-              "where": [["number", "==", '$2']]},
-             {"op": "comment",
-              "comment": "delete row for '"$2"'"}]'
-          ovsdb-client transact unix:socket '
-            ["ordinals",
-             {"op": "insert",
-              "table": "ordinals",
-              "row": {"name": "'$1'", "number": '$2'}},
-             {"op": "comment",
-              "comment": "add back row for '"$pair"'"}]'
-        done]],
-      [0], [stdout])
-    if test $model = standalone; then
-        dnl Check that all the crap is in fact in the database log.
-        AT_CHECK([[uuidfilt db | grep -v ^OVSDB | sed 's/"_date":[0-9]*/"_date":0/' | ovstest test-json --multiple -]], [0],
-[[{"cksum":"12345678 9","name":"ordinals","tables":{"ordinals":{"columns":{"name":{"type":"string"},"number":{"type":"integer"}},"indexes":[["number"]]}},"version":"5.1.3"}
-{"_comment":"add row for zero 0","_date":0,"ordinals":{"<0>":{"name":"zero"}}}
-{"_comment":"delete row for 0","_date":0,"ordinals":{"<0>":null}}
-{"_comment":"add back row for zero 0","_date":0,"ordinals":{"<1>":{"name":"zero"}}}
-{"_comment":"add row for one 1","_date":0,"ordinals":{"<2>":{"name":"one","number":1}}}
-{"_comment":"delete row for 1","_date":0,"ordinals":{"<2>":null}}
-{"_comment":"add back row for one 1","_date":0,"ordinals":{"<3>":{"name":"one","number":1}}}
-{"_comment":"add row for two 2","_date":0,"ordinals":{"<4>":{"name":"two","number":2}}}
-{"_comment":"delete row for 2","_date":0,"ordinals":{"<4>":null}}
-{"_comment":"add back row for two 2","_date":0,"ordinals":{"<5>":{"name":"two","number":2}}}
-{"_comment":"add row for three 3","_date":0,"ordinals":{"<6>":{"name":"three","number":3}}}
-{"_comment":"delete row for 3","_date":0,"ordinals":{"<6>":null}}
-{"_comment":"add back row for three 3","_date":0,"ordinals":{"<7>":{"name":"three","number":3}}}
-{"_comment":"add row for four 4","_date":0,"ordinals":{"<8>":{"name":"four","number":4}}}
-{"_comment":"delete row for 4","_date":0,"ordinals":{"<8>":null}}
-{"_comment":"add back row for four 4","_date":0,"ordinals":{"<9>":{"name":"four","number":4}}}
-{"_comment":"add row for five 5","_date":0,"ordinals":{"<10>":{"name":"five","number":5}}}
-{"_comment":"delete row for 5","_date":0,"ordinals":{"<10>":null}}
-{"_comment":"add back row for five 5","_date":0,"ordinals":{"<11>":{"name":"five","number":5}}}
-]])
-    else
-        dnl Check that at least there's a lot of transactions.
-        AT_CHECK([test `wc -l < db` -gt 50])
-    fi
-    dnl Dump out and check the actual database contents.
-    AT_CHECK([ovsdb-client dump unix:socket ordinals], [0], [stdout])
-    AT_CHECK([uuidfilt stdout], [0], [dnl
-ordinals table
-_uuid                                name  number
------------------------------------- ----- ------
-<0> five  5
-<1> four  4
-<2> one   1
-<3> three 3
-<4> two   2
-<5> zero  0
-])
-    cp db db.pre-compaction
-    dnl Now compact the database in-place.
-    AT_CHECK([[ovs-appctl -t ovsdb-server ovsdb-server/compact]],
-      [0], [], [ignore])
-    dnl Negative test.
-    AT_CHECK([[ovs-appctl -t ovsdb-server ovsdb-server/compact _Server]],
-      [2], [], [cannot compact built-in databases
-ovs-appctl: ovsdb-server: server returned an error
-])
-    dnl Make sure that "db" is still a symlink to dir/db instead of getting
-    dnl replaced by a regular file, ditto for .db.~lock~.
-    if test "$IS_WIN32" = "no"; then
-        AT_CHECK([test -h db])
-        AT_CHECK([test -h .db.~lock~])
-        AT_CHECK([test -f dir/db])
-        AT_CHECK([test -f dir/.db.~lock~])
-    fi
-
-    # We can't fully re-check the contents of the database log, because the
-    # order of the records is not predictable, but there should only be 4 lines
-    # in it now in the standalone case
-    AT_CAPTURE_FILE([db])
-    compacted_lines=`wc -l < db`
-    echo compacted_lines=$compacted_lines
-    if test $model = standalone; then
-        AT_CHECK([test $compacted_lines -eq 4])
-    fi
-
-    dnl And check that the dumped data is the same too:
-    AT_CHECK([ovsdb-client dump unix:socket ordinals], [0], [stdout])
-    AT_CHECK([uuidfilt stdout], [0], [dnl
-ordinals table
-_uuid                                name  number
------------------------------------- ----- ------
-<0> five  5
-<1> four  4
-<2> one   1
-<3> three 3
-<4> two   2
-<5> zero  0
-])
-    dnl Now do some more transactions.
-    AT_CHECK(
-      [[ovsdb-client transact unix:socket '
-         ["ordinals",
-          {"op": "delete",
-           "table": "ordinals",
-           "where": [["number", "<", 3]]}]']],
-      [0], [[[{"count":3}]
-]], [ignore])
-
-    dnl There should be 6 lines in the log now, for the standalone case,
-    dnl and for the clustered case the file should at least have grown.
-    updated_lines=`wc -l < db`
-    echo compacted_lines=$compacted_lines updated_lines=$updated_lines
-    if test $model = standalone; then
-        AT_CHECK([test $updated_lines -eq 6])
-    else
-        AT_CHECK([test $updated_lines -gt $compacted_lines])
-    fi
-
-    dnl Then check that the dumped data is correct.  This time first kill
-    dnl and restart the database server to ensure that the data is correct on
-    dnl disk as well as in memory.
-    OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-    AT_CHECK([ovsdb-server -vvlog:off -vconsole:off --detach --no-chdir --pidfile --remote=punix:socket --log-file db])
-    AT_CHECK([ovsdb-client dump unix:socket ordinals], [0], [stdout])
-    AT_CHECK([uuidfilt stdout], [0], [dnl
-ordinals table
-_uuid                                name  number
------------------------------------- ----- ------
-<0> five  5
-<1> four  4
-<2> three 3
-], [], [test ! -e pid || kill `cat pid`])
-    OVSDB_SERVER_SHUTDOWN
-}
-OVS_END_SHELL_HELPERS
-
-AT_SETUP([compacting online - standalone])
-AT_KEYWORDS([ovsdb server compact])
-ovsdb_check_online_compaction standalone
-AT_CLEANUP
-
-AT_SETUP([compacting online - cluster])
-AT_KEYWORDS([ovsdb server compact])
-ovsdb_check_online_compaction cluster
-AT_CLEANUP
-
-OVS_START_SHELL_HELPERS
-# ovsdb_check_online_conversion MODEL
-#
-# where MODEL is "standalone" or "cluster"
-ovsdb_check_online_conversion() {
-    local model=$1
-    on_exit 'kill `cat *.pid`'
-    ordinal_schema > schema
-    AT_DATA([new-schema],
-      [[{"name": "ordinals",
-     "tables": {
-       "ordinals": {
-         "columns": {
-           "number": {"type": "integer"}}}}}
-]])
-    dnl Make sure that "ovsdb-tool create" works with a dangling symlink for
-    dnl the database and the lockfile, creating the target of each symlink
-    dnl rather than replacing the symlinks with regular files.
-    mkdir dir
-    if test "$IS_WIN32" = "no"; then
-        ln -s dir/db db
-        ln -s dir/.db.~lock~ .db.~lock~
-        AT_SKIP_IF([test ! -h db || test ! -h .db.~lock~])
-    fi
-    AT_CHECK([if test $model = standalone; then
-                  ovsdb-tool create db schema
-              else
-                  ovsdb-tool create-cluster db schema unix:s1.raft
-              fi])
-
-    dnl Start the database server.
-    AT_CHECK([ovsdb-server -vfile -vvlog:off -vconsole:off --detach --no-chdir --pidfile --log-file --remote=punix:db.sock db], [0])
-    AT_CAPTURE_FILE([ovsdb-server.log])
-
-    dnl Put some data in the database.
-    AT_CHECK(
-      [[for pair in 'zero 0' 'one 1' 'two 2' 'three 3' 'four 4' 'five 5'; do
-          set -- $pair
-          ovsdb-client transact '
-            ["ordinals",
-             {"op": "insert",
-              "table": "ordinals",
-              "row": {"name": "'$1'", "number": '$2'}},
-             {"op": "comment",
-              "comment": "add row for '"$pair"'"}]'
-        done | uuidfilt]], [0],
-    [[[{"uuid":["uuid","<0>"]},{}]
-[{"uuid":["uuid","<1>"]},{}]
-[{"uuid":["uuid","<2>"]},{}]
-[{"uuid":["uuid","<3>"]},{}]
-[{"uuid":["uuid","<4>"]},{}]
-[{"uuid":["uuid","<5>"]},{}]
-]], [ignore])
-
-    dnl Try "needs-conversion".
-    AT_CHECK([ovsdb-client needs-conversion schema], [0], [no
-])
-    AT_CHECK([ovsdb-client needs-conversion new-schema], [0], [yes
-])
-
-    dnl Start two monitors on the 'ordinals' db, one that is database
-    dnl change aware and one that is not.
-    AT_CHECK([ovsdb-client -vfile -vvlog:off --detach --no-chdir --pidfile=monitor-ordinals-aware.pid --log-file=monitor-ordinals-aware.log --db-change-aware --no-headings monitor ordinals ordinals number name > monitor-ordinals-aware.stdout 2> monitor-ordinals-aware.stderr])
-    AT_CAPTURE_FILE([monitor-ordinals-aware.stdout])
-    AT_CAPTURE_FILE([monitor-ordinals-aware.log])
-    AT_CAPTURE_FILE([monitor-ordinals-aware.stderr])
-
-    AT_CHECK([ovsdb-client -vfile -vvlog:off --detach --no-chdir --pidfile=monitor-ordinals-unaware.pid --log-file=monitor-ordinals-unaware.log --no-db-change-aware --no-headings monitor ordinals ordinals number name > monitor-ordinals-unaware.stdout 2> monitor-ordinals-unaware.stderr])
-    AT_CAPTURE_FILE([monitor-ordinals-unaware.stdout])
-    AT_CAPTURE_FILE([monitor-ordinals-unaware.log])
-    AT_CAPTURE_FILE([monitor-ordinals-unaware.stderr])
-
-    dnl Start two monitors on the '_Server' db, one that is database
-    dnl change aware and one that is not.
-    AT_CHECK([ovsdb-client -vfile -vvlog:off --detach --no-chdir --pidfile=monitor-server-aware.pid --log-file=monitor-server-aware.log --db-change-aware --no-headings monitor _Server Database name > monitor-server-aware.stdout 2> monitor-server-aware.stderr])
-    AT_CAPTURE_FILE([monitor-server-aware.stdout])
-    AT_CAPTURE_FILE([monitor-server-aware.log])
-    AT_CAPTURE_FILE([monitor-server-aware.stderr])
-
-    AT_CHECK([ovsdb-client -vfile -vvlog:off --detach --no-chdir --pidfile=monitor-server-unaware.pid --log-file=monitor-server-unaware.log --no-db-change-aware --no-headings monitor _Server Database name > monitor-server-unaware.stdout 2> monitor-server-unaware.stderr])
-    AT_CAPTURE_FILE([monitor-server-unaware.stdout])
-    AT_CAPTURE_FILE([monitor-server-unaware.log])
-    AT_CAPTURE_FILE([monitor-server-unaware.stderr])
-
-    dnl Start two long-running transactions (triggers) on the 'ordinals' db,
-    dnl one that is database change aware and one that is not.
-    ordinals_txn='[["ordinals",
-                    {"op": "wait",
-                     "table": "ordinals",
-                     "where": [["name", "==", "seven"]],
-                     "columns": ["name", "number"],
-                     "rows": [],
-                     "until": "!="}]]'
-    AT_CHECK([ovsdb-client -vfile -vvlog:off --detach --no-chdir --pidfile=trigger-ordinals-aware.pid --log-file=trigger-ordinals-aware.log --db-change-aware transact "$ordinals_txn"  > trigger-ordinals-aware.stdout 2> trigger-ordinals-aware.stderr])
-    AT_CAPTURE_FILE([trigger-ordinals-aware.stdout])
-    AT_CAPTURE_FILE([trigger-ordinals-aware.log])
-    AT_CAPTURE_FILE([trigger-ordinals-aware.stderr])
-
-    AT_CHECK([ovsdb-client -vfile -vvlog:off --detach --no-chdir --pidfile=trigger-ordinals-unaware.pid --log-file=trigger-ordinals-unaware.log --no-db-change-aware transact  "$ordinals_txn" > trigger-ordinals-unaware.stdout 2> trigger-ordinals-unaware.stderr])
-    AT_CAPTURE_FILE([trigger-ordinals-unaware.stdout])
-    AT_CAPTURE_FILE([trigger-ordinals-unaware.log])
-    AT_CAPTURE_FILE([trigger-ordinals-unaware.stderr])
-
-    dnl Start two long-running transactions (triggers) on the _Server db,
-    dnl one that is database change aware and one that is not.
-    server_txn='[["_Server",
-                  {"op": "wait",
-                   "table": "Database",
-                   "where": [["name", "==", "xyzzy"]],
-                   "columns": ["name"],
-                   "rows": [],
-                   "until": "!="}]]'
-    AT_CHECK([ovsdb-client -vfile -vvlog:off --detach --no-chdir --pidfile=trigger-server-aware.pid --log-file=trigger-server-aware.log --db-change-aware transact "$server_txn"  > trigger-server-aware.stdout 2> trigger-server-aware.stderr])
-    AT_CAPTURE_FILE([trigger-server-aware.stdout])
-    AT_CAPTURE_FILE([trigger-server-aware.log])
-    AT_CAPTURE_FILE([trigger-server-aware.stderr])
-
-    AT_CHECK([ovsdb-client -vfile -vvlog:off --detach --no-chdir --pidfile=trigger-server-unaware.pid --log-file=trigger-server-unaware.log --no-db-change-aware transact  "$server_txn" > trigger-server-unaware.stdout 2> trigger-server-unaware.stderr])
-    AT_CAPTURE_FILE([trigger-server-unaware.stdout])
-    AT_CAPTURE_FILE([trigger-server-unaware.log])
-    AT_CAPTURE_FILE([trigger-server-unaware.stderr])
-
-    dnl Dump out and check the actual database contents.
-    AT_CHECK([ovsdb-client dump unix:db.sock ordinals], [0], [stdout])
-    AT_CHECK([uuidfilt stdout], [0], [dnl
-ordinals table
-_uuid                                name  number
------------------------------------- ----- ------
-<0> five  5
-<1> four  4
-<2> one   1
-<3> three 3
-<4> two   2
-<5> zero  0
-])
-
-    dnl Convert the database.
-    AT_CHECK([ovsdb-client convert new-schema])
-
-    dnl Try "needs-conversion".
-    AT_CHECK([ovsdb-client needs-conversion schema], [0], [yes
-])
-    AT_CHECK([ovsdb-client needs-conversion new-schema], [0], [no
-])
-
-    dnl Verify that the "ordinals" monitors behaved as they should have.
-    dnl Both should have exited, for different reasons.
-    for x in aware unaware; do
-        echo $x
-        OVS_WAIT_WHILE([test -e monitor-ordinals-$x.pid])
-        AT_CHECK([sort -k 3 monitor-ordinals-$x.stdout | uuidfilt], [0],
-    [<0> initial 0 zero
-<1> initial 1 one
-<2> initial 2 two
-<3> initial 3 three
-<4> initial 4 four
-<5> initial 5 five
-])
-    done
-    AT_CHECK([sed 's/.*: //' monitor-ordinals-unaware.stderr], [0], [receive failed (End of file)
-])
-    AT_CHECK([sed 's/.*: //' monitor-ordinals-aware.stderr], [0], [ordinals database was removed
-])
-
-    dnl Verify that the _Server monitors behaved as they should have.
-    dnl The db-aware monitor should still be running, but not the unaware one.
-    for x in aware unaware; do
-        AT_CHECK([sort -k 3 monitor-server-$x.stdout | uuidfilt], [0],
-    [<0> initial _Server
-<1> initial ordinals
-])
-    done
-    OVS_WAIT_WHILE([test -e monitor-server-unaware.pid])
-    AT_CHECK([sed 's/.*: //' monitor-ordinals-unaware.stderr], [0], [receive failed (End of file)
-])
-    AT_CHECK([test -e monitor-server-aware.pid])
-
-    dnl Verify that the "ordinals" triggers behaved as they should have:
-    dnl Both should have exited, for different reasons.
-    for x in unaware aware; do
-        OVS_WAIT_WHILE([test -e trigger-ordinals-$x.pid])
-        AT_CHECK([cat trigger-ordinals-$x.stdout])
-    done
-    AT_CHECK([cat trigger-ordinals-unaware.stderr], [0], [ovsdb-client: transaction failed (End of file)
-])
-    AT_CHECK([cat trigger-ordinals-aware.stderr], [0], [ovsdb-client: transaction returned error: "canceled"
-])
-
-    dnl Verify that the _Server triggers behaved as they should have:
-    dnl The db-aware trigger should still be waiting, but not the unaware one.
-    for x in aware unaware; do
-        AT_CHECK([cat trigger-server-$x.stdout])
-    done
-    OVS_WAIT_WHILE([test -e trigger-server-unaware.pid])
-    AT_CHECK([sed 's/.*: //' trigger-ordinals-unaware.stderr], [0], [transaction failed (End of file)
-])
-    AT_CHECK([test -e trigger-server-aware.pid])
-
-    AT_CAPTURE_FILE([db])
-    if test $model = standalone; then
-        dnl We can't fully re-check the contents of the database log, because the
-        dnl order of the records is not predictable, but there should only be 4 lines
-        dnl in it now.
-        AT_CHECK([test `wc -l < db` -eq 4])
-    fi
-    dnl Check that the dumped data is the same except for the removed column:
-    AT_CHECK([ovsdb-client dump unix:db.sock ordinals | uuidfilt], [0], [dnl
-ordinals table
-_uuid                                number
------------------------------------- ------
-<0> 0
-<1> 1
-<2> 2
-<3> 3
-<4> 4
-<5> 5
-])
-    dnl Now check that the converted database is still online and can be modified,
-    dnl then check that the database log has one more record and that the data
-    dnl is as expected.
-    AT_CHECK(
-      [[ovsdb-client transact '
-         ["ordinals",
-          {"op": "insert",
-           "table": "ordinals",
-           "row": {"number": 6}},
-          {"op": "comment",
-           "comment": "add row for 6"}]' | uuidfilt]], [0],
-      [[[{"uuid":["uuid","<0>"]},{}]
-]])
-    if test $model = standalone; then
-        AT_CHECK([test `wc -l < db` -eq 6])
-    fi
-    AT_CHECK([ovsdb-client dump unix:db.sock ordinals | uuidfilt], [0], [dnl
-ordinals table
-_uuid                                number
------------------------------------- ------
-<0> 0
-<1> 1
-<2> 2
-<3> 3
-<4> 4
-<5> 5
-<6> 6
-])
-    dnl Now kill and restart the database server to ensure that the data is
-    dnl correct on disk as well as in memory.
-    OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-    AT_CHECK([[ovsdb-server -vfile -vvlog:off -vconsole:off --detach --no-chdir --pidfile --log-file --remote=punix:db.sock db]],
-      [0])
-    AT_CHECK([ovsdb-client dump unix:db.sock ordinals | uuidfilt], [0], [dnl
-ordinals table
-_uuid                                number
------------------------------------- ------
-<0> 0
-<1> 1
-<2> 2
-<3> 3
-<4> 4
-<5> 5
-<6> 6
-])
-
-    dnl Make sure that "db" is still a symlink to dir/db instead of getting
-    dnl replaced by a regular file, ditto for .db.~lock~.
-    if test "$IS_WIN32" = "no"; then
-        AT_CHECK([test -h db])
-        AT_CHECK([test -h .db.~lock~])
-        AT_CHECK([test -f dir/db])
-        AT_CHECK([test -f dir/.db.~lock~])
-    fi
-
-    OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-}
-OVS_END_SHELL_HELPERS
-
-AT_SETUP([schema conversion online - standalone])
-AT_KEYWORDS([ovsdb server convert needs-conversion standalone])
-ovsdb_check_online_conversion standalone
-AT_CLEANUP
-
-AT_SETUP([schema conversion online - clustered])
-AT_KEYWORDS([ovsdb server convert needs-conversion cluster])
-ovsdb_check_online_conversion cluster
-AT_CLEANUP
-
-AT_SETUP([ovsdb-server combines updates on backlogged connections])
-on_exit 'kill `cat *.pid`'
-
-# The maximum socket receive buffer size is important for this test, which
-# tests behavior when the receive buffer overflows.
-if test -e /proc/sys/net/core/rmem_max; then
-    # Linux
-    rmem_max=`cat /proc/sys/net/core/rmem_max`
-elif rmem_max=`sysctl -n net.inet.tcp.recvbuf_max 2>/dev/null`; then
-    : # FreeBSD, NetBSD
-else
-    # Don't know how to get maximum socket receive buffer on this OS
-    AT_SKIP_IF([:])
-fi
-
-# Calculate the number of iterations we need to queue.  Each of the
-# iterations we execute, by itself, yields a monitor update of about
-# 25 kB, so fill up that much space plus a few for luck.
-n_iterations=`expr $rmem_max / 25000 + 5`
-echo rmem_max=$rmem_max n_iterations=$n_iterations
-
-# If there's too much queuing skip the test to avoid timing out.
-AT_SKIP_IF([test $rmem_max -gt 1048576])
-
-# Calculate the exact number of monitor updates expected for $n_iterations,
-# assuming no updates are combined.  The "extra" update is for the initial
-# contents of the database.
-n_updates=`expr $n_iterations \* 3 + 1`
-
-# Start an ovsdb-server with the vswitchd schema.
-OVSDB_INIT([db])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --log-file --remote=punix:db.sock db],
-  [0], [ignore], [ignore])
-
-# Executes a set of transactions that add a bridge with 100 ports, and
-# then deletes that bridge.  This yields three monitor updates that
-# add up to about 25 kB in size.
-#
-# The update also increments a counter held in the database so that we can
-# verify that the overall effect of the transactions took effect (e.g.
-# monitor updates at the end weren't just dropped).  We add an arbitrary
-# string to the counter to make grepping for it more reliable.
-counter=0
-trigger_big_update () {
-    counter=`expr $counter + 1`
-    ovs-vsctl --no-wait -- set open_vswitch . system_version=xyzzy$counter
-    ovs-vsctl --no-wait -- add-br br0 $add
-    ovs-vsctl --no-wait -- del-br br0
-}
-add_ports () {
-    for j in `seq 1 100`; do
-        printf " -- add-port br0 p%d" $j
-    done
-}
-add=`add_ports`
-
-AT_CAPTURE_FILE([ovsdb-client.err])
-AT_CAPTURE_FILE([ovsdb-client-nonblock.err])
-
-
-# Start an ovsdb-client monitoring all changes to the database,
-# By default, it is non-blocking, and will get update message
-# for each ovsdb-server transaactions.
-AT_CHECK([ovsdb-client --detach --no-chdir --pidfile=nonblock.pid monitor ALL >ovsdb-client-nonblock.out 2>ovsdb-client-nonblock.err])
-
-# Start an ovsdb-client monitoring all changes to the database,
-# make it block to force the buffers to fill up, and then execute
-# enough iterations that ovsdb-server starts combining updates.
-AT_CHECK([ovsdb-client --detach --no-chdir --pidfile monitor ALL >ovsdb-client.out 2>ovsdb-client.err])
-AT_CHECK([ovs-appctl -t ovsdb-client ovsdb-client/block])
-for i in `seq 1 $n_iterations`; do
-    echo "blocked update ($i of $n_iterations)"
-    trigger_big_update $i
-done
-AT_CHECK([ovs-appctl -t ovsdb-client ovsdb-client/unblock])
-OVS_WAIT_UNTIL([grep "\"xyzzy$counter\"" ovsdb-client.out])
-OVS_WAIT_UNTIL([grep "\"xyzzy$counter\"" ovsdb-client-nonblock.out])
-OVS_APP_EXIT_AND_WAIT([ovsdb-client])
-AT_CHECK([kill `cat nonblock.pid`])
-
-# Count the number of updates in the ovsdb-client output, by counting
-# the number of changes to the Open_vSwitch table.  (All of our
-# transactions modify the Open_vSwitch table.)  It should be less than
-# $n_updates updates.
-#
-# Check that the counter is what we expect.
-logged_updates=`grep -c '^Open_vSwitch' ovsdb-client.out`
-logged_nonblock_updates=`grep -c '^Open_vSwitch' ovsdb-client-nonblock.out`
-echo "logged_nonblock_updates=$logged_nonblock_updates (expected less or equal to $n_updates)"
-echo "logged_updates=$logged_updates (expected less than $logged_nonblock_updates)"
-AT_CHECK([test $logged_nonblock_updates -le $n_updates])
-AT_CHECK([test $logged_updates -lt $logged_nonblock_updates])
-AT_CHECK_UNQUOTED([ovs-vsctl get open_vswitch . system_version], [0],
-  ["xyzzy$counter"
-])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
-
-AT_BANNER([OVSDB -- ovsdb-server transactions (SSL IPv4 sockets)])
-
-# OVSDB_CHECK_EXECUTION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
-#
-# Creates a database with the given SCHEMA, starts an ovsdb-server on
-# that database, and runs each of the TRANSACTIONS (which should be a
-# quoted list of quoted strings) against it with ovsdb-client one at a
-# time.
-#
-# Checks that the overall output is OUTPUT, but UUIDs in the output
-# are replaced by markers of the form <N> where N is a number.  The
-# first unique UUID is replaced by <0>, the next by <1>, and so on.
-# If a given UUID appears more than once it is always replaced by the
-# same marker.
-#
-# TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
-m4_define([OVSDB_CHECK_EXECUTION], 
-  [AT_SETUP([$1])
-   AT_KEYWORDS([ovsdb server positive ssl $5])
-   AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
-   $2 > schema
-   PKIDIR=$abs_top_builddir/tests
-   AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-   AT_CHECK([ovsdb-server --log-file --detach --no-chdir --pidfile --private-key=$PKIDIR/testpki-privkey2.pem --certificate=$PKIDIR/testpki-cert2.pem --ca-cert=$PKIDIR/testpki-cacert.pem --remote=pssl:0:127.0.0.1 db], [0], [ignore], [ignore])
-   PARSE_LISTENING_PORT([ovsdb-server.log], [SSL_PORT])
-   m4_foreach([txn], [$3], 
-     [AT_CHECK([ovsdb-client --private-key=$PKIDIR/testpki-privkey.pem --certificate=$PKIDIR/testpki-cert.pem --ca-cert=$PKIDIR/testpki-cacert.pem transact ssl:127.0.0.1:$SSL_PORT 'txn'], [0], [stdout], [ignore],
-     [test ! -e pid || kill `cat pid`])
-cat stdout >> output
-])
-   AT_CHECK([uuidfilt output], [0], [$4], [ignore],
-            [test ! -e pid || kill `cat pid`])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-EXECUTION_EXAMPLES
-
-AT_BANNER([OVSDB -- ovsdb-server transactions (SSL IPv6 sockets)])
-
-# OVSDB_CHECK_EXECUTION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
-#
-# Creates a database with the given SCHEMA, starts an ovsdb-server on
-# that database, and runs each of the TRANSACTIONS (which should be a
-# quoted list of quoted strings) against it with ovsdb-client one at a
-# time.
-#
-# Checks that the overall output is OUTPUT, but UUIDs in the output
-# are replaced by markers of the form <N> where N is a number.  The
-# first unique UUID is replaced by <0>, the next by <1>, and so on.
-# If a given UUID appears more than once it is always replaced by the
-# same marker.
-#
-# TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
-m4_define([OVSDB_CHECK_EXECUTION],
-  [AT_SETUP([$1])
-   AT_KEYWORDS([ovsdb server positive ssl6 $5])
-   AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
-   AT_SKIP_IF([test $HAVE_IPV6 = no])
-   $2 > schema
-   PKIDIR=$abs_top_builddir/tests
-   AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-   AT_CHECK([ovsdb-server --log-file --detach --no-chdir --pidfile --private-key=$PKIDIR/testpki-privkey2.pem --certificate=$PKIDIR/testpki-cert2.pem --ca-cert=$PKIDIR/testpki-cacert.pem --remote=pssl:0:[[::1]] db], [0], [ignore], [ignore])
-   PARSE_LISTENING_PORT([ovsdb-server.log], [SSL_PORT])
-   m4_foreach([txn], [$3],
-     [AT_CHECK([ovsdb-client --private-key=$PKIDIR/testpki-privkey.pem --certificate=$PKIDIR/testpki-cert.pem --ca-cert=$PKIDIR/testpki-cacert.pem transact ssl:[[::1]]:$SSL_PORT 'txn'], [0], [stdout], [ignore],
-     [test ! -e pid || kill `cat pid`])
-cat stdout >> output
-])
-   AT_CHECK([uuidfilt output], [0], [$4], [ignore],
-            [test ! -e pid || kill `cat pid`])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-ONE_EXECUTION_EXAMPLE
-
-AT_BANNER([OVSDB -- ovsdb-server transactions (TCP IPv4 sockets)])
-
-# OVSDB_CHECK_EXECUTION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
-#
-# Creates a database with the given SCHEMA, starts an ovsdb-server on
-# that database, and runs each of the TRANSACTIONS (which should be a
-# quoted list of quoted strings) against it with ovsdb-client one at a
-# time.
-#
-# Checks that the overall output is OUTPUT, but UUIDs in the output
-# are replaced by markers of the form <N> where N is a number.  The
-# first unique UUID is replaced by <0>, the next by <1>, and so on.
-# If a given UUID appears more than once it is always replaced by the
-# same marker.
-#
-# TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
-m4_define([OVSDB_CHECK_EXECUTION],
-  [AT_SETUP([$1])
-   AT_KEYWORDS([ovsdb server positive tcp $5])
-   $2 > schema
-   PKIDIR=$abs_top_builddir/tests
-   AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-   AT_CHECK([ovsdb-server --log-file --detach --no-chdir --pidfile --remote=ptcp:0:127.0.0.1 db], [0], [ignore], [ignore])
-   PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT])
-   m4_foreach([txn], [$3],
-     [AT_CHECK([ovsdb-client transact tcp:127.0.0.1:$TCP_PORT 'txn'], [0], [stdout], [ignore],
-     [test ! -e pid || kill `cat pid`])
-cat stdout >> output
-])
-   AT_CHECK([uuidfilt output], [0], [$4], [ignore],
-            [test ! -e pid || kill `cat pid`])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-EXECUTION_EXAMPLES
-
-AT_BANNER([OVSDB -- ovsdb-server transactions (TCP IPv6 sockets)])
-
-# OVSDB_CHECK_EXECUTION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
-#
-# Creates a database with the given SCHEMA, starts an ovsdb-server on
-# that database, and runs each of the TRANSACTIONS (which should be a
-# quoted list of quoted strings) against it with ovsdb-client one at a
-# time.
-#
-# Checks that the overall output is OUTPUT, but UUIDs in the output
-# are replaced by markers of the form <N> where N is a number.  The
-# first unique UUID is replaced by <0>, the next by <1>, and so on.
-# If a given UUID appears more than once it is always replaced by the
-# same marker.
-#
-# TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
-m4_define([OVSDB_CHECK_EXECUTION],
-  [AT_SETUP([$1])
-   AT_KEYWORDS([ovsdb server positive tcp6 $5])
-   AT_SKIP_IF([test $HAVE_IPV6 = no])
-   $2 > schema
-   PKIDIR=$abs_top_builddir/tests
-   AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-   AT_CHECK([ovsdb-server --log-file --detach --no-chdir --pidfile --remote=ptcp:0:[[::1]] db], [0], [ignore], [ignore])
-   PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT])
-   m4_foreach([txn], [$3],
-     [AT_CHECK([ovsdb-client transact tcp:[[::1]]:$TCP_PORT 'txn'], [0], [stdout], [ignore],
-     [test ! -e pid || kill `cat pid`])
-cat stdout >> output
-])
-   AT_CHECK([uuidfilt output], [0], [$4], [ignore],
-            [test ! -e pid || kill `cat pid`])
-   OVSDB_SERVER_SHUTDOWN
-   AT_CLEANUP])
-
-ONE_EXECUTION_EXAMPLE
-
-AT_BANNER([OVSDB -- transactions on transient ovsdb-server])
-
-# OVSDB_CHECK_EXECUTION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
-#
-# Creates a database with the given SCHEMA and runs each of the
-# TRANSACTIONS (which should be a quoted list of quoted strings)
-# against it with ovsdb-client one at a time.  Each ovsdb-client
-# is run against a separately started ovsdb-server that executes
-# only that single transaction.  (The idea is that this should
-# help to ferret out any differences between what ovsdb-server has
-# in memory and what actually gets committed to disk.)
-#
-# Checks that the overall output is OUTPUT, but UUIDs in the output
-# are replaced by markers of the form <N> where N is a number.  The
-# first unique UUID is replaced by <0>, the next by <1>, and so on.
-# If a given UUID appears more than once it is always replaced by the
-# same marker.
-#
-# TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
-m4_define([OVSDB_CHECK_EXECUTION], 
-  [AT_SETUP([$1])
-   AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-   AT_KEYWORDS([ovsdb server positive transient $5])
-   $2 > schema
-   AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-   m4_foreach([txn], [$3], 
-     [AT_DATA([txnfile], [ovsdb-client transact unix:socket 'txn'
-])
-      AT_CHECK([ovsdb-server --remote=punix:socket db --run="sh txnfile"], [0], [stdout], [ignore])
-      cat stdout >> output
-])
-   AT_CHECK([uuidfilt output], [0], [$4], [ignore])
-   AT_CLEANUP])
-
-EXECUTION_EXAMPLES
-
-AT_BANNER([OVSDB -- ovsdb-server replication])
-
-# OVSDB_CHECK_EXECUTION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
-#
-# Creates two databases with the given SCHEMA, and starts an ovsdb-server on
-# each database.
-# Runs each of the TRANSACTIONS (which should be a quoted list of
-# quoted strings) against one of the servers with ovsdb-client one at a
-# time. The server replicates its database to the other ovsdb-server.
-#
-# Checks that the dump of both databases are the same.
-#
-# TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
-m4_define([OVSDB_CHECK_EXECUTION],
-  [AT_SETUP([$1])
-   AT_KEYWORDS([ovsdb server tcp replication $5])
-   $2 > schema
-   AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore])
-   AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore])
-
-   AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile --remote=punix:db.sock db1], [0], [ignore], [ignore])
-   i
-   on_exit 'test ! -e pid || kill `cat pid`'
-
-   AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=pid2 --remote=punix:db2.sock --unixctl=unixctl2 --sync-from=unix:db.sock db2], [0], [ignore], [ignore])
-   on_exit 'test ! -e pid2 || kill `cat pid2`'
-
-   m4_foreach([txn], [$3],
-     [AT_CHECK([ovsdb-client transact 'txn'], [0], [stdout], [ignore])
-   ])
-
-   AT_CHECK([ovsdb-client dump], [0], [stdout], [ignore])
-   OVS_WAIT_UNTIL([ ovsdb-client dump unix:db2.sock > dump2; diff stdout dump2])
-
-   OVSDB_SERVER_SHUTDOWN
-   OVSDB_SERVER_SHUTDOWN2
-   AT_CLEANUP])
-
-EXECUTION_EXAMPLES
-
-AT_BANNER([OVSDB -- ovsdb-server replication table-exclusion])
-
-# OVSDB_CHECK_REPLICATION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
-#
-# Creates two databases with the given SCHEMA, and starts an
-# ovsdb-server on each database.
-# Runs each of the TRANSACTIONS (which should be a quoted list of
-# quoted strings) against one of the servers with ovsdb-client one at a
-# time. The server replicates its database to the other ovsdb-server.
-#
-# Checks that the difference between the dump of the databases is
-# OUTPUT, but UUIDs in the output are replaced by markers of the form
-# <N> where N is a number.  The first unique UUID is replaced by <0>,
-# the next by <1>, and so on.
-# If a given UUID appears more than once it is always replaced by the
-# same marker.
-#
-# TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
-m4_define([OVSDB_CHECK_REPLICATION],
-   [AT_SETUP([$1])
-   AT_KEYWORDS([ovsdb server tcp replication table-exclusion])
-   AT_SKIP_IF([test $DIFF_SUPPORTS_NORMAL_FORMAT = no])
-   $2 > schema
-   AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore])
-   AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore])
-
-   AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile --remote=punix:db.sock db1], [0], [ignore], [ignore])
-   on_exit 'test ! -e pid || kill `cat pid`'
-
-   AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=pid2 --remote=punix:db2.sock --unixctl=unixctl2 --sync-from=unix:db.sock --sync-exclude-tables=mydb:b db2], [0], [ignore], [ignore])
-   on_exit 'test ! -e pid2 || kill `cat pid2`'
-
-   m4_foreach([txn], [$3],
-     [AT_CHECK([ ovsdb-client transact 'txn' ], [0], [stdout], [ignore])
-   ])
-
-   AT_CHECK([ovsdb-client dump], [0], [stdout], [ignore])
-   cat stdout > dump1
-
-   OVS_WAIT_UNTIL([ ovsdb-client dump unix:db2.sock | grep one ])
-   AT_CHECK([ovsdb-client dump unix:db2.sock], [0], [stdout], [ignore])
-   cat stdout > dump2
-
-   AT_CHECK([diff dump1 dump2], [1], [stdout], [ignore])
-   cat stdout > output
-
-   AT_CHECK([uuidfilt output], [0], [$4], [ignore])
-
-   OVSDB_SERVER_SHUTDOWN
-   OVSDB_SERVER_SHUTDOWN2
-   AT_CLEANUP])
-
-REPLICATION_EXAMPLES
-
-AT_BANNER([OVSDB -- ovsdb-server replication runtime management commands])
-
-#ovsdb-server/get-active-ovsdb-server command
-AT_SETUP([ovsdb-server/get-active-ovsdb-server])
-AT_KEYWORDS([ovsdb server replication get-active])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
-on_exit 'kill `cat *.pid`'
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --sync-from=tcp:127.0.0.1:9999 db])
-
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/get-active-ovsdb-server],
-  [0], [tcp:127.0.0.1:9999
-])
-AT_CLEANUP
-
-#*ovsdb-server/set-active-ovsdb-server command
-AT_SETUP([ovsdb-server/set-active-ovsdb-server])
-AT_KEYWORDS([ovsdb server replication set-active])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
-on_exit 'kill `cat *.pid`'
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile db])
-
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/set-active-ovsdb-server tcp:127.0.0.1:9999])
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/get-active-ovsdb-server],
-  [0], [tcp:127.0.0.1:9999
-])
-AT_CLEANUP
-
-#ovsdb-server/get-sync-exclude-tables command
-AT_SETUP([ovsdb-server/get-sync-exclude-tables])
-AT_KEYWORDS([ovsdb server replication get-exclude-tables])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
-on_exit 'kill `cat *.pid`'
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --sync-exclude-tables=mydb:db1,mydb:db2 db])
-
-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/get-sync-exclude-tables],
-  [0], [mydb:db1,mydb:db2
-])
-AT_CLEANUP
-
-#ovsdb-server/set-sync-exclude-tables command
-AT_SETUP([ovsdb-server/set-sync-exclude-tables])
-AT_KEYWORDS([ovsdb server replication set-exclude-tables])
-AT_SKIP_IF([test $DIFF_SUPPORTS_NORMAL_FORMAT = no])
-
-replication_schema > schema
-AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore])
-AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore])
-
-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile --remote=punix:db.sock db1], [0], [ignore], [ignore])
-on_exit 'test ! -e pid || kill `cat pid`'
-
-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=pid2 --remote=punix:db2.sock --unixctl=unixctl2 --sync-from=unix:db.sock db2], [0], [ignore], [ignore])
-on_exit 'test ! -e pid2 || kill `cat pid2`'
-
-AT_CHECK([ovs-appctl -t "`pwd`"/unixctl2 ovsdb-server/set-sync-exclude-tables mydb:b], [0], [ignore], [ignore], [test ! -e pid || kill `cat pid`; test ! -e pid2 || kill `cat pid2`])
-
-AT_CHECK([ovsdb-client transact unix:db.sock \
- '[["mydb",
-    {"op": "insert",
-      "table": "a",
-      "row": {"number": 0, "name": "zero"}},
-    {"op": "insert",
-      "table": "b",
-      "row": {"number": 1, "name": "one"}}]]'], [0], [stdout], [ignore],
- [test ! -e pid || kill `cat pid`; test ! -e pid2 || kill `cat pid2`])
-
-AT_CHECK([ovsdb-client dump unix:db.sock], [0], [stdout], [ignore],
- [test ! -e pid || kill `cat pid`; test ! -e pid2 || kill `cat pid2`])
-cat stdout > dump1
-OVS_WAIT_UNTIL([ ovsdb-client dump unix:db2.sock | grep zero ])
-AT_CHECK([ovsdb-client dump unix:db2.sock], [0], [stdout], [ignore])
-cat stdout > dump2
-
-AT_CHECK([diff dump1 dump2], [1], [stdout], [ignore])
-cat stdout > output
-
-AT_CHECK([uuidfilt output], [0], [7,9c7,8
-< _uuid                                name number
-< ------------------------------------ ---- ------
-< <0> one  1
----
-> _uuid name number
-> ----- ---- ------
-])
-
-OVSDB_SERVER_SHUTDOWN
-OVSDB_SERVER_SHUTDOWN2
-AT_CLEANUP
-
-#ovsdb-server/connect-active-ovsdb-server
-AT_SETUP([ovsdb-server/connect-active-server])
-AT_KEYWORDS([ovsdb server replication connect-active-server])
-replication_schema > schema
-AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore])
-AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore])
-
-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile --remote=punix:db.sock db1], [0], [ignore], [ignore])
-on_exit 'test ! -e pid || kill `cat pid`'
-
-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=pid2 --remote=punix:db2.sock --unixctl=unixctl2 db2], [0], [ignore], [ignore])
-on_exit 'test ! -e pid2 || kill `cat pid2`'
-
-dnl Try to connect without specifying the active server.
-AT_CHECK([ovs-appctl -t "`pwd`"/unixctl2 ovsdb-server/connect-active-ovsdb-server], [0],
-[Unable to connect: active server is not specified.
-], [ignore])
-
-AT_CHECK([ovs-appctl -t "`pwd`"/unixctl2 ovsdb-server/set-active-ovsdb-server unix:db.sock], [0], [stdout], [ignore])
-
-AT_CHECK([ovs-appctl -t "`pwd`"/unixctl2 ovsdb-server/connect-active-ovsdb-server], [0], [stdout], [ignore])
-
-AT_CHECK([ovsdb-client transact unix:db.sock \
- '[["mydb",
-  {"op": "insert",
-   "table": "a",
-   "row": {"number": 0, "name": "zero"}}]]'], [0], [stdout], [ignore])
-
-AT_CHECK([ovsdb-client dump unix:db.sock], [0], [stdout], [ignore])
-cat stdout > dump1
-OVS_WAIT_UNTIL([ ovsdb-client dump unix:db2.sock | grep zero ])
-AT_CHECK([ovsdb-client dump unix:db2.sock], [0], [stdout], [ignore])
-cat stdout > dump2
-
-AT_CHECK([diff dump1 dump2], [0], [], [ignore])
-OVSDB_SERVER_SHUTDOWN
-OVSDB_SERVER_SHUTDOWN2
-AT_CLEANUP
-
-#ovsdb-server/disconnect-active-server command
-AT_SETUP([ovsdb-server/disconnect-active-server])
-AT_KEYWORDS([ovsdb server replication disconnect-active-server])
-AT_SKIP_IF([test $DIFF_SUPPORTS_NORMAL_FORMAT = no])
-
-replication_schema > schema
-AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore])
-AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore])
-
-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile --remote=punix:db.sock db1], [0], [ignore], [ignore])
-on_exit 'test ! -e pid || kill `cat pid`'
-
-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile=pid2 --remote=punix:db2.sock --unixctl=unixctl2 --sync-from=unix:db.sock db2], [0], [ignore], [ignore])
-on_exit 'test ! -e pid2 || kill `cat pid2`'
-
-AT_CHECK([ovsdb-client transact unix:db.sock \
-'[["mydb",
-  {"op": "insert",
-   "table": "a",
-   "row": {"number": 0, "name": "zero"}}]]'], [0], [stdout], [ignore])
-
-dnl Make sure the transaction shows up in db2. This also tests the back up server
-dnl can be read.
-OVS_WAIT_UNTIL([ovsdb-client dump unix:db2.sock | grep zero])
-
-dnl The backup server does not accept any write transaction
-AT_CHECK([ovsdb-client transact unix:db2.sock \
-'[["mydb",
-  {"op": "insert",
-   "table": "b",
-   "row": {"number": 1, "name": "one"}}]]'], [0],
-   [[[{"details":"insert operation not allowed when database server is in read only mode","error":"not allowed"}]]
-])
-
-AT_CHECK([ovs-appctl -t "`pwd`"/unixctl2 ovsdb-server/disconnect-active-ovsdb-server], [0], [ignore], [ignore])
-
-AT_CHECK([ovsdb-client transact unix:db.sock \
-'[["mydb",
-  {"op": "insert",
-   "table": "b",
-   "row": {"number": 1, "name": "one"}}]]'], [0], [stdout], [ignore])
-
-AT_CHECK([ovsdb-client dump unix:db.sock], [0], [stdout], [ignore])
-cat stdout > dump1
-
-sleep 1
-AT_CHECK([ovsdb-client dump unix:db2.sock], [0], [stdout], [ignore])
-cat stdout > dump2
-
-AT_CHECK([diff dump1 dump2], [1], [stdout], [ignore])
-cat stdout > output
-
-AT_CHECK([uuidfilt output], [0], [7,9c7,8
-< _uuid                                name number
-< ------------------------------------ ---- ------
-< <0> one  1
----
-> _uuid name number
-> ----- ---- ------
-], [ignore], [test ! -e pid || kill `cat pid`; test ! -e pid2 || kill `cat pid2`])
-
-dnl The backup server now become active, and can accept write transactions.
-AT_CHECK([ovsdb-client transact unix:db2.sock \
-'[["mydb",
-  {"op": "insert",
-   "table": "b",
-   "row": {"number": 1, "name": "one"}}]]'], [0], [stdout], [ignore])
-
-AT_CHECK([ovsdb-client dump unix:db2.sock], [0], [stdout])
-cat stdout > output
-
-AT_CHECK([uuidfilt output], [0], [a table
-_uuid                                name number
------------------------------------- ---- ------
-<0> zero 0
-
-b table
-_uuid                                name number
------------------------------------- ---- ------
-<1> one  1
-])
-
-OVSDB_SERVER_SHUTDOWN
-OVSDB_SERVER_SHUTDOWN2
-AT_CLEANUP
-
-#ovsdb-server/active-backup-role-switching
-AT_SETUP([ovsdb-server/active-backup-role-switching])
-AT_KEYWORDS([ovsdb server replication active-backup-switching])
-replication_schema > schema
-AT_CHECK([ovsdb-tool create db1 schema], [0], [stdout], [ignore])
-AT_CHECK([ovsdb-tool create db2 schema], [0], [stdout], [ignore])
-
-dnl Add some data to both DBs
-AT_CHECK([ovsdb-tool transact db1 \
-'[["mydb",
-  {"op": "insert",
-   "table": "a",
-   "row": {"number": 9, "name": "nine"}}]]'], [0], [ignore], [ignore])
-
-AT_CHECK([ovsdb-tool transact db2 \
-'[["mydb",
-  {"op": "insert",
-   "table": "a",
-   "row": {"number": 9, "name": "nine"}}]]'], [0], [ignore], [ignore])
-
-dnl Start both 'db1' and 'db2' in backup mode. Let them backup from each
-dnl other. This is not an supported operation state, but to simulate a start
-dnl up condition where an HA manger can select which one to be an active
-dnl server soon after.
-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server1.log --pidfile="`pwd`"/pid --remote=punix:db.sock --unixctl="`pwd`"/unixctl db1 --sync-from=unix:db2.sock --active ], [0], [ignore], [ignore])
-on_exit 'test ! -e pid || kill `cat pid`'
-
-AT_CHECK([ovs-appctl -t "`pwd`"/unixctl ovsdb-server/connect-active-ovsdb-server])
-
-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server2.log --pidfile="`pwd`"/pid2 --remote=punix:db2.sock --unixctl="`pwd`"/unixctl2 --sync-from=unix:db.sock db2], [0], [ignore], [ignore])
-on_exit 'test ! -e pid2 || kill `cat pid2`'
-
-dnl
-dnl make sure both servers reached the replication state
-OVS_WAIT_UNTIL([ovs-appctl -t "`pwd`"/unixctl ovsdb-server/sync-status |grep replicating])
-OVS_WAIT_UNTIL([ovs-appctl -t "`pwd`"/unixctl2 ovsdb-server/sync-status |grep replicating])
-
-dnl Switch the 'db1' to active
-AT_CHECK([ovs-appctl -t "`pwd`"/unixctl ovsdb-server/disconnect-active-ovsdb-server])
-AT_CHECK([ovs-appctl -t "`pwd`"/unixctl ovsdb-server/sync-status], [0], [state: active
-])
-
-dnl Issue a transaction to 'db1'
-AT_CHECK([ovsdb-client transact unix:db.sock \
-'[["mydb",
-  {"op": "insert",
-   "table": "a",
-   "row": {"number": 0, "name": "zero"}}]]'], [0], [ignore])
-
-dnl It should be replicated to 'db2'
-OVS_WAIT_UNTIL([ovsdb-client dump unix:db2.sock | grep zero])
-
-dnl Flip the role of 'db1' and 'db2'.  'db1' becomes backup, and db2 becomes active
-AT_CHECK([ovs-appctl -t "`pwd`"/unixctl2 ovsdb-server/disconnect-active-ovsdb-server])
-AT_CHECK([ovs-appctl -t "`pwd`"/unixctl ovsdb-server/connect-active-ovsdb-server])
-
-dnl Verify the change happend
-OVS_WAIT_UNTIL([ovs-appctl -t "`pwd`"/unixctl ovsdb-server/sync-status |grep replicating])
-AT_CHECK([ovs-appctl -t "`pwd`"/unixctl2 ovsdb-server/sync-status], [0], [state: active
-])
-
-dnl Issue an transaction to 'db2' which is now active.
-AT_CHECK([ovsdb-client transact unix:db2.sock \
-'[["mydb",
-  {"op": "insert",
-   "table": "b",
-   "row": {"number": 1, "name": "one"}}]]'], [0], [ignore])
-
-dnl The transaction should be replicated to 'db1'
-OVS_WAIT_UNTIL([ovsdb-client dump unix:db.sock | grep one])
-
-dnl Both servers should have the same content.
-AT_CHECK([ovsdb-client dump unix:db.sock], [0], [stdout])
-cat stdout > dump1
-
-AT_CHECK([ovsdb-client dump unix:db2.sock], [0], [stdout])
-cat stdout > dump2
-
-AT_CHECK([diff dump1 dump2])
-
-dnl OVSDB_SERVER_SHUTDOWN
-dnl OVSDB_SERVER_SHUTDOWN2
-AT_CLEANUP
-
-#ovsdb-server prevent self replicating
-AT_SETUP([ovsdb-server prevent self replicating])
-AT_KEYWORDS([ovsdb server replication])
-replication_schema > schema
-AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-
-dnl Add some data to both DBs
-AT_CHECK([ovsdb-tool transact db \
-'[["mydb",
-  {"op": "insert",
-   "table": "a",
-   "row": {"number": 9, "name": "nine"}}]]'], [0], [ignore], [ignore])
-
-dnl Start 'db', then try to be a back up server of itself.
-AT_CHECK([ovsdb-server --detach --no-chdir --log-file=ovsdb-server.log --pidfile="`pwd`"/pid --remote=punix:db.sock --unixctl="`pwd`"/unixctl db --sync-from=unix:db.sock --active ], [0], [ignore], [ignore])
-on_exit 'test ! -e pid || kill `cat pid`'
-
-dnl Save the current content
-AT_CHECK([ovsdb-client dump unix:db.sock], [0], [stdout])
-cp stdout dump1
-
-AT_CHECK([ovs-appctl -t "`pwd`"/unixctl ovsdb-server/connect-active-ovsdb-server])
-dnl Check that self replicating is blocked.
-AT_CHECK([grep "Self replicating is not allowed" ovsdb-server.log], [0], [stdout])
-
-dnl Check current DB content is preserved.
-AT_CHECK([ovsdb-client dump unix:db.sock], [0], [stdout])
-cat stdout > dump2
-
-AT_CHECK([diff dump1 dump2])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-server/read-only db:ptcp connection])
-AT_KEYWORDS([ovsdb server read-only])
-AT_DATA([schema],
-  [[{"name": "mydb",
-     "tables": {
-       "Root": {
-         "columns": {
-           "managers": {
-             "type": {
-               "key": {"type": "uuid", "refTable": "Manager"},
-               "min": 0,
-               "max": "unlimited"}}}},
-       "Manager": {
-         "columns": {
-           "target": {
-             "type": "string"},
-           "read_only": {
-             "type": {
-               "key": "boolean",
-               "min": 0,
-               "max": 1}},
-           "is_connected": {
-             "type": {
-               "key": "boolean",
-               "min": 0,
-               "max": 1}}}},
-       "ordinals": {
-         "columns": {
-           "number": {"type": "integer"},
-           "name": {"type": "string"}},
-         "indexes": [["number"]]}
-    },
-     "version": "5.1.3",
-     "cksum": "12345678 9"
-}
-]])
-AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
-AT_CHECK(
-  [[ovsdb-tool transact db \
-     '["mydb",
-       {"op": "insert",
-        "table": "Root",
-        "row": {
-          "managers": ["set", [["named-uuid", "x"]]]}},
-       {"op": "insert",
-        "table": "Manager",
-        "uuid-name": "x",
-        "row": {"target": "ptcp:0:127.0.0.1",
-               "read_only": true}}]']], [0], [ignore], [ignore])
-
-AT_CHECK([ovsdb-server --log-file --detach --no-chdir --pidfile --remote=db:mydb,Root,managers db], [0], [ignore], [ignore])
-PARSE_LISTENING_PORT([ovsdb-server.log], [TCP_PORT])
-AT_CHECK([ovsdb-client get-schema-version tcp:127.0.0.1:$TCP_PORT mydb], [0], [5.1.3
-])
-
-AT_CHECK([ovsdb-client transact tcp:127.0.0.1:$TCP_PORT \
-        ['["mydb",
-         {"op": "insert",
-          "table": "ordinals",
-          "row": {"name": "two", "number": '2'}}
-         ]']], [0], [stdout], [ignore])
-cat stdout >> output
-AT_CHECK([uuidfilt output], [0], [[[{"details":"insert operation not allowed when database server is in read only mode","error":"not allowed"}]]
-], [ignore])
-OVSDB_SERVER_SHUTDOWN
-AT_CLEANUP
diff --git a/tests/ovsdb-table.at b/tests/ovsdb-table.at
deleted file mode 100644
index 26ff90e7a..000000000
--- a/tests/ovsdb-table.at
+++ /dev/null
@@ -1,76 +0,0 @@
-AT_BANNER([OVSDB -- tables])
-
-OVSDB_CHECK_POSITIVE_CPY([non-root table with one column],
-  [[parse-table mytable '{"columns": {"name": {"type": "string"}}}']],
-  [[{"columns":{"name":{"type":"string"}}}]])
-
-OVSDB_CHECK_POSITIVE_CPY([immutable table with one column],
-  [[parse-table mytable \
-    '{"columns": {"name": {"type": "string"}},
-      "mutable": false}']],
-  [[{"columns":{"name":{"type":"string"}},"mutable":false}]])
-
-OVSDB_CHECK_POSITIVE_CPY([root table with one column],
-  [[parse-table mytable \
-    '{"columns": {"name": {"type": "string"}},
-      "isRoot": true}']],
-  [[{"columns":{"name":{"type":"string"}},"isRoot":true}]])
-
-OVSDB_CHECK_POSITIVE_CPY([non-root table with default_is_root=true],
-  [[parse-table mytable '{"columns": {"name": {"type": "string"}}}' true]],
-  [[{"columns":{"name":{"type":"string"}},"isRoot":false}]])
-
-OVSDB_CHECK_POSITIVE_CPY([root table with default_is_root=true],
-  [[parse-table mytable \
-    '{"columns": {"name": {"type": "string"}},
-      "isRoot": true}' true]],
-  [[{"columns":{"name":{"type":"string"}}}]])
-
-OVSDB_CHECK_POSITIVE_CPY([table with maxRows of 2],
-  [[parse-table mytable '{"columns": {"name": {"type": "string"}}, 
-                          "maxRows": 2}']],
-  [[{"columns":{"name":{"type":"string"}},"maxRows":2}]])
-
-OVSDB_CHECK_POSITIVE_CPY([table with index],
-  [[parse-table mytable '{"columns": {"a": {"type": "integer"},
-                                      "b": {"type": "string"}},
-                          "indexes": [["b", "a"]]}']],
-  [[{"columns":{"a":{"type":"integer"},"b":{"type":"string"}},"indexes":[["b","a"]]}]])
-
-OVSDB_CHECK_NEGATIVE_CPY([table with syntax error in index],
-  [[parse-table mytable '{"columns": {"a": {"type": "integer"},
-                                      "b": {"type": "string"}},
-                          "indexes": [["b", "a"], [0]]}']],
-  [[array of distinct column names expected]])
-
-OVSDB_CHECK_NEGATIVE_CPY([table with empty index],
-  [[parse-table mytable '{"columns": {"a": {"type": "integer"},
-                                      "b": {"type": "string"}},
-                          "indexes": [[]]}']],
-  [[index must have at least one column]])
-
-OVSDB_CHECK_NEGATIVE_CPY([table with index of ephemeral column],
-  [[parse-table mytable '{"columns": {"a": {"type": "integer",
-                                            "ephemeral": true},
-                                      "b": {"type": "string"}},
-                          "indexes": [["b", "a"]]}']],
-  [[ephemeral columns (such as a) may not be indexed]])
-
-OVSDB_CHECK_NEGATIVE_CPY([column names may not begin with _],
-  [[parse-table mytable \
-    '{"columns": {"_column": {"type": "integer"}}}']],
-  [[names beginning with "_" are reserved]],
-  [table])
-
-OVSDB_CHECK_NEGATIVE_CPY([table must have at least one column (1)],
-  [[parse-table mytable '{}']],
-  [[Parsing table schema for table mytable failed: Required 'columns' member is missing.]])
-
-OVSDB_CHECK_NEGATIVE_CPY([table must have at least one column (2)],
-  [[parse-table mytable '{"columns": {}}']],
-  [[table must have at least one column]])
-
-OVSDB_CHECK_NEGATIVE_CPY([table maxRows must be positive],
-  [[parse-table mytable '{"columns": {"name": {"type": "string"}}, 
-                          "maxRows": 0}']],
-  [[syntax "{"columns":{"name":{"type":"string"}},"maxRows":0}": syntax error: maxRows must be at least 1]])
diff --git a/tests/ovsdb-tool.at b/tests/ovsdb-tool.at
deleted file mode 100644
index 69c5d6afa..000000000
--- a/tests/ovsdb-tool.at
+++ /dev/null
@@ -1,461 +0,0 @@
-AT_BANNER([OVSDB -- ovsdb-tool])
-
-# OVSDB_CHECK_EXECUTION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
-#
-# Creates a database with the given SCHEMA and runs each of the
-# TRANSACTIONS (which should be a quoted list of quoted strings)
-# against it with ovsdb-tool one at a time.  
-#
-# Checks that the overall output is OUTPUT, but UUIDs in the output
-# are replaced by markers of the form <N> where N is a number.  The
-# first unique UUID is replaced by <0>, the next by <1>, and so on.
-# If a given UUID appears more than once it is always replaced by the
-# same marker.
-#
-# TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
-m4_define([OVSDB_CHECK_EXECUTION], 
-  [AT_SETUP([$1])
-   AT_KEYWORDS([ovsdb file positive $5])
-   $2 > schema
-   touch .db.~lock~
-   AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-   m4_foreach([txn], [$3], 
-     [AT_CHECK([ovsdb-tool transact db 'txn'], [0], [stdout], [ignore])
-cat stdout >> output
-])
-   AT_CHECK([uuidfilt output], [0], [$4])
-   AT_CLEANUP])
-
-EXECUTION_EXAMPLES
-
-AT_SETUP([transaction comments])
-AT_KEYWORDS([ovsdb file positive])
-ordinal_schema > schema
-touch .db.~lock~
-AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore])
-AT_CHECK([[ovsdb-tool transact db '
-    ["ordinals",
-     {"op": "insert",
-      "table": "ordinals",
-      "row": {"name": "five", "number": 5}},
-     {"op": "comment",
-      "comment": "add row for 5"}]']], [0], [stdout], [ignore])
-AT_CHECK([uuidfilt stdout], [0],
- [[[{"uuid":["uuid","<0>"]},{}]
-]])
-AT_CHECK([grep "add row for 5" db], [0], [ignore])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-tool compact])
-AT_KEYWORDS([ovsdb file positive])
-ordinal_schema > schema
-dnl Make sure that "ovsdb-tool create" works with a dangling symlink,
-dnl creating the target of the symlink rather than replacing the symlink
-dnl with a regular file, and that the lockfile gets created relative to
-dnl the symlink's target.
-mkdir dir
-: > dir/.db.~lock~
-if test "$IS_WIN32" = "no"; then
-    ln -s dir/db db
-    AT_SKIP_IF([test ! -h db])
-fi
-AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore])
-if test "$IS_WIN32" = "no"; then
-    AT_CHECK([test ! -e .db.~lock])
-    AT_CHECK([test -h db])
-    AT_CHECK([test -f dir/db])
-fi
-dnl Do a bunch of random transactions that put crap in the database log.
-AT_CHECK(
-  [[for pair in 'zero 0' 'one 1' 'two 2' 'three 3' 'four 4' 'five 5'; do
-      set -- $pair
-      ovsdb-tool transact db '
-        ["ordinals",
-         {"op": "insert",
-          "table": "ordinals",
-          "row": {"name": "'$1'", "number": '$2'}},
-         {"op": "comment",
-          "comment": "add row for '"$pair"'"}]'
-      ovsdb-tool transact db '
-        ["ordinals",
-         {"op": "delete",
-          "table": "ordinals",
-          "where": [["number", "==", '$2']]},
-         {"op": "comment",
-          "comment": "delete row for '"$2"'"}]'
-      ovsdb-tool transact db '
-        ["ordinals",
-         {"op": "insert",
-          "table": "ordinals",
-          "row": {"name": "'$1'", "number": '$2'}},
-         {"op": "comment",
-          "comment": "add back row for '"$pair"'"}]'
-    done]],
-  [0], [stdout], [ignore])
-dnl Check that all the crap is in fact in the database log.
-AT_CHECK([[uuidfilt db | grep -v ^OVSDB | sed 's/"_date":[0-9]*/"_date":0/' | ovstest test-json --multiple -]], [0],
-  [[{"cksum":"12345678 9","name":"ordinals","tables":{"ordinals":{"columns":{"name":{"type":"string"},"number":{"type":"integer"}},"indexes":[["number"]]}},"version":"5.1.3"}
-{"_comment":"add row for zero 0","_date":0,"ordinals":{"<0>":{"name":"zero"}}}
-{"_comment":"delete row for 0","_date":0,"ordinals":{"<0>":null}}
-{"_comment":"add back row for zero 0","_date":0,"ordinals":{"<1>":{"name":"zero"}}}
-{"_comment":"add row for one 1","_date":0,"ordinals":{"<2>":{"name":"one","number":1}}}
-{"_comment":"delete row for 1","_date":0,"ordinals":{"<2>":null}}
-{"_comment":"add back row for one 1","_date":0,"ordinals":{"<3>":{"name":"one","number":1}}}
-{"_comment":"add row for two 2","_date":0,"ordinals":{"<4>":{"name":"two","number":2}}}
-{"_comment":"delete row for 2","_date":0,"ordinals":{"<4>":null}}
-{"_comment":"add back row for two 2","_date":0,"ordinals":{"<5>":{"name":"two","number":2}}}
-{"_comment":"add row for three 3","_date":0,"ordinals":{"<6>":{"name":"three","number":3}}}
-{"_comment":"delete row for 3","_date":0,"ordinals":{"<6>":null}}
-{"_comment":"add back row for three 3","_date":0,"ordinals":{"<7>":{"name":"three","number":3}}}
-{"_comment":"add row for four 4","_date":0,"ordinals":{"<8>":{"name":"four","number":4}}}
-{"_comment":"delete row for 4","_date":0,"ordinals":{"<8>":null}}
-{"_comment":"add back row for four 4","_date":0,"ordinals":{"<9>":{"name":"four","number":4}}}
-{"_comment":"add row for five 5","_date":0,"ordinals":{"<10>":{"name":"five","number":5}}}
-{"_comment":"delete row for 5","_date":0,"ordinals":{"<10>":null}}
-{"_comment":"add back row for five 5","_date":0,"ordinals":{"<11>":{"name":"five","number":5}}}
-]])
-
-dnl Dump out and check the actual database contents.
-on_exit 'kill `cat ovsdb-server.pid`'
-AT_CHECK([[ovsdb-server --detach --pidfile --no-chdir --remote=punix:socket db]],
-         [0], [stdout], [ignore])
-AT_CHECK([[ovsdb-client dump unix:socket ordinals]],
-         [0], [stdout], [ignore])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-
-AT_CHECK([uuidfilt stdout], [0], [dnl
-ordinals table
-_uuid                                name  number
------------------------------------- ----- ------
-<0> five  5
-<1> four  4
-<2> one   1
-<3> three 3
-<4> two   2
-<5> zero  0
-])
-dnl Now compact the database in-place.
-touch .db.tmp.~lock~
-AT_CHECK([[ovsdb-tool compact db]], [0], [], [ignore])
-dnl Make sure that "db" is still a symlink to dir/db instead of getting
-dnl replaced by a regular file.
-if test "$IS_WIN32" = "no"; then
-    AT_CHECK([test ! -e .db.~lock])
-    AT_CHECK([test -h db])
-    AT_CHECK([test -f dir/db])
-fi
-dnl We can't fully re-check the contents of the database log, because the
-dnl order of the records is not predictable, but there should only be 4 lines
-dnl in it now.
-AT_CAPTURE_FILE([db])
-AT_CHECK([test `wc -l < db` -eq 4])
-dnl And check that the dumped data is the same too:
-AT_CHECK([[ovsdb-server --detach --pidfile --no-chdir --remote=punix:socket db]],
-         [0], [stdout], [ignore])
-AT_CHECK([[ovsdb-client dump unix:socket ordinals]],
-         [0], [stdout], [ignore])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-
-AT_CHECK([uuidfilt stdout], [0], [dnl
-ordinals table
-_uuid                                name  number
------------------------------------- ----- ------
-<0> five  5
-<1> four  4
-<2> one   1
-<3> three 3
-<4> two   2
-<5> zero  0
-])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-tool convert -- removing a column])
-AT_KEYWORDS([ovsdb file positive])
-ordinal_schema > schema
-AT_DATA([new-schema], 
-  [[{"name": "ordinals",
-     "tables": {
-       "ordinals": {
-         "columns": {
-           "number": {"type": "integer"}}}}}
-]])
-touch .db.~lock~
-AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore])
-dnl Put some data in the database.
-AT_CHECK(
-  [[for pair in 'zero 0' 'one 1' 'two 2' 'three 3' 'four 4' 'five 5'; do
-      set -- $pair
-      ovsdb-tool transact db '
-        ["ordinals",
-         {"op": "insert",
-          "table": "ordinals",
-          "row": {"name": "'$1'", "number": '$2'}},
-         {"op": "comment",
-          "comment": "add row for '"$pair"'"}]'
-    done]],
-  [0], [stdout], [ignore])
-dnl Dump out and check the actual database contents.
-AT_CHECK([[ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket db]],
-  [0])
-AT_CHECK([ovsdb-client dump unix:socket ordinals], [0], [stdout], [ignore])
-AT_CHECK([uuidfilt stdout], [0], [dnl
-ordinals table
-_uuid                                name  number
------------------------------------- ----- ------
-<0> five  5
-<1> four  4
-<2> one   1
-<3> three 3
-<4> two   2
-<5> zero  0
-])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-dnl Now convert the database in-place.
-touch .db.tmp.~lock~
-AT_CHECK([[ovsdb-tool convert db new-schema]], [0], [], [ignore])
-dnl We can't fully re-check the contents of the database log, because the
-dnl order of the records is not predictable, but there should only be 4 lines
-dnl in it now.
-AT_CAPTURE_FILE([db])
-AT_CHECK([test `wc -l < db` -eq 4])
-dnl And check that the dumped data is the same except for the removed column:
-AT_CHECK([[ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket db]],
-  [0])
-AT_CHECK([ovsdb-client dump unix:socket ordinals], [0], [stdout], [ignore])
-AT_CHECK([uuidfilt stdout], [0], [dnl
-ordinals table
-_uuid                                number
------------------------------------- ------
-<0> 0
-<1> 1
-<2> 2
-<3> 3
-<4> 4
-<5> 5
-])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-tool convert -- adding a column])
-AT_KEYWORDS([ovsdb file positive])
-AT_DATA([schema], 
-  [[{"name": "ordinals",
-     "tables": {
-       "ordinals": {
-         "columns": {
-           "number": {"type": "integer"}}}}}
-]])
-ordinal_schema > new-schema
-touch .db.~lock~
-AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore])
-dnl Put some data in the database.
-AT_CHECK(
-  [[for number in 0 1 2 3 4 5; do
-      ovsdb-tool transact db '
-        ["ordinals",
-         {"op": "insert",
-          "table": "ordinals",
-          "row": {"number": '$number'}},
-         {"op": "comment",
-          "comment": "add row for '"$number"'"}]'
-    done]],
-  [0], [stdout], [ignore])
-dnl Dump out and check the actual database contents.
-AT_CHECK([[ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket db]],
-  [0])
-AT_CHECK([ovsdb-client dump unix:socket ordinals], [0], [stdout], [ignore])
-AT_CHECK([uuidfilt stdout], [0], [dnl
-ordinals table
-_uuid                                number
------------------------------------- ------
-<0> 0
-<1> 1
-<2> 2
-<3> 3
-<4> 4
-<5> 5
-])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-dnl Now convert the database in-place.
-touch .db.tmp.~lock~
-AT_CHECK([[ovsdb-tool convert db new-schema]], [0], [], [ignore])
-dnl We can't fully re-check the contents of the database log, because the
-dnl order of the records is not predictable, but there should only be 4 lines
-dnl in it now.
-AT_CAPTURE_FILE([db])
-AT_CHECK([test `wc -l < db` -eq 4])
-dnl And check that the dumped data is the same except for the added column:
-AT_CHECK([[ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket db]],
-  [0])
-AT_CHECK([ovsdb-client dump unix:socket ordinals], [0], [stdout], [ignore])
-AT_CHECK([uuidfilt stdout], [0], [dnl
-ordinals table
-_uuid                                name number
------------------------------------- ---- ------
-<0> ""   0
-<1> ""   1
-<2> ""   2
-<3> ""   3
-<4> ""   4
-<5> ""   5
-])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-tool unsupported cluster operations])
-AT_KEYWORDS([ovsdb file negative compact query transact convert])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool create-cluster db schema unix:s1.raft])
-AT_CHECK([ovsdb-tool compact db], [1], [], [ovsdb-tool: ovsdb error: db: cannot apply this operation to clustered database file
-])
-AT_CHECK([ovsdb-tool convert db schema], [1], [], [ovsdb-tool: ovsdb error: db: cannot apply this operation to clustered database file
-])
-AT_CHECK([ovsdb-tool needs-conversion db schema], [1], [], [ovsdb-tool: ovsdb error: db: cannot apply this operation to clustered database file
-])
-AT_CHECK([ovsdb-tool query db '[[]]'], [1], [], [ovsdb-tool: ovsdb error: db: cannot apply this operation to clustered database file
-])
-AT_CHECK([ovsdb-tool transact db '[[]]'], [1], [], [ovsdb-tool: ovsdb error: db: cannot apply this operation to clustered database file
-])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-tool schema-version, schema-cksum, schema-name])
-AT_KEYWORDS([ovsdb file positive schema-version schema-cksum])
-ordinal_schema > schema
-AT_CHECK([ovsdb-tool schema-version schema], [0], [5.1.3
-])
-AT_CHECK([ovsdb-tool schema-cksum schema], [0], [12345678 9
-])
-AT_CHECK([ovsdb-tool schema-name schema], [0], [ordinals
-])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-tool database inspection commands - standalone])
-AT_KEYWORDS([ovsdb file positive db-version db-cksum db-name db-cid db-sid db-local-address])
-ordinal_schema > schema
-touch .db.~lock~
-AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore])
-AT_CHECK([ovsdb-tool db-version db], [0], [5.1.3
-])
-AT_CHECK([ovsdb-tool db-cksum db], [0], [12345678 9
-])
-AT_CHECK([ovsdb-tool db-name db], [0], [ordinals
-])
-AT_CHECK([ovsdb-tool db-cid db], [1], [], [ovsdb-tool: db: not a clustered database
-])
-AT_CHECK([ovsdb-tool db-sid db], [1], [], [ovsdb-tool: db: not a clustered database
-])
-AT_CHECK([ovsdb-tool db-local-address db], [1], [], [ovsdb-tool: db: not a clustered database
-])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-tool database inspection commands - clustered])
-AT_KEYWORDS([ovsdb file negative db-version db-cksum db-name db-cid db-sid db-local-address cluster])
-ordinal_schema > schema
-touch .db.~lock~
-AT_CHECK([ovsdb-tool create-cluster db schema tcp:1.2.3.4:1234])
-AT_CHECK([ovsdb-tool db-version db], [1], [], [ovsdb-tool: ovsdb error: db: cannot apply this operation to clustered database file
-])
-AT_CHECK([ovsdb-tool db-cksum db], [1], [], [ovsdb-tool: ovsdb error: db: cannot apply this operation to clustered database file
-])
-AT_CHECK([ovsdb-tool db-name db], [0], [ordinals
-])
-AT_CHECK([(ovsdb-tool db-cid db; ovsdb-tool db-sid db) | uuidfilt], [0], [<0>
-<1>
-])
-AT_CHECK([ovsdb-tool db-local-address db], [0], [tcp:1.2.3.4:1234
-])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-tool database inspection commands - joining a cluster])
-AT_KEYWORDS([ovsdb file positive db-version db-cksum db-name db-cid db-sid db-local-address cluster join joining])
-ordinal_schema > schema
-touch .db.~lock~
-for cid in '' 520cf525-3772-43cc-8268-23bf5b548cf4; do
-    if test -z "$cid"; then
-        cid_option=
-    else
-        cid_option=--cid=$cid
-    fi
-    AT_CHECK([rm -f db && ovsdb-tool $cid_option join-cluster db ordinals tcp:1.2.3.4:1234 tcp:2.3.4.5:1234], [0], [], [ignore])
-    AT_CHECK([ovsdb-tool db-version db], [1], [], [ovsdb-tool: ovsdb error: db: cannot apply this operation to clustered database file
-])
-    AT_CHECK([ovsdb-tool db-cksum db], [1], [], [ovsdb-tool: ovsdb error: db: cannot apply this operation to clustered database file
-])
-    AT_CHECK([ovsdb-tool db-name db], [0], [ordinals
-])
-    if test -z "$cid"; then
-        AT_CHECK([ovsdb-tool db-cid db], [2], [], [db: cluster ID not yet known
-])
-    else
-        AT_CHECK_UNQUOTED([ovsdb-tool db-cid db], [0], [$cid
-])
-    fi
-    AT_CHECK([ovsdb-tool db-sid db | uuidfilt], [0], [<0>
-])
-    AT_CHECK([ovsdb-tool db-local-address db], [0], [tcp:1.2.3.4:1234
-])
-done
-AT_CLEANUP
-
-AT_SETUP([ovsdb-tool needs-conversion (no conversion needed)])
-AT_KEYWORDS([ovsdb file positive])
-ordinal_schema > schema
-touch .db.~lock~
-AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore])
-AT_CHECK([ovsdb-tool needs-conversion db schema], [0], [no
-])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-tool needs-conversion (conversion needed)])
-AT_KEYWORDS([ovsdb file positive])
-ordinal_schema > schema
-touch .db.~lock~
-AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore])
-sed 's/5\.1\.3/5.1.4/' < schema > schema2
-AT_CHECK([diff schema schema2], [1], [ignore])
-AT_CHECK([ovsdb-tool needs-conversion db schema2], [0], [yes
-])
-AT_CLEANUP
-
-AT_SETUP([ovsdb-tool create-cluster with initial data])
-AT_KEYWORDS([ovsdb file positive])
-
-# Create a standalone database and put some data in it.
-ordinal_schema > schema
-ovsdb-tool create db1 schema
-AT_CHECK(
-  [[for pair in 'zero 0' 'one 1' 'two 2' 'three 3' 'four 4' 'five 5'; do
-      set -- $pair
-      ovsdb-tool transact db1 '
-        ["ordinals",
-         {"op": "insert",
-          "table": "ordinals",
-          "row": {"name": "'$1'", "number": '$2'}},
-         {"op": "comment",
-          "comment": "add row for '"$pair"'"}]'
-    done | uuidfilt]], [0],
-[[[{"uuid":["uuid","<0>"]},{}]
-[{"uuid":["uuid","<1>"]},{}]
-[{"uuid":["uuid","<2>"]},{}]
-[{"uuid":["uuid","<3>"]},{}]
-[{"uuid":["uuid","<4>"]},{}]
-[{"uuid":["uuid","<5>"]},{}]
-]], [ignore])
-
-# Dump the data.
-AT_CHECK([ovsdb-server -vfile -vvlog:off --detach --no-chdir --pidfile --log-file --remote=punix:db.sock db1])
-AT_CHECK([ovsdb-client dump > expout])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-
-# Create a clustered database from the standalone one.
-ovsdb-tool create-cluster db2 db1 unix:s1.raft
-
-# Dump the data.
-AT_CHECK([ovsdb-server -vconsole:off -vfile -vvlog:off --detach --no-chdir --pidfile --log-file --remote=punix:db.sock db2])
-AT_CHECK([ovsdb_client_wait ordinals connected])
-AT_CHECK([ovsdb-client dump > dump2])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-
-# Make sure that the clustered data matched the standalone data.
-AT_CHECK([cat dump2], [0], [expout])
-AT_CLEANUP
diff --git a/tests/ovsdb-transaction.at b/tests/ovsdb-transaction.at
deleted file mode 100644
index 8abc5d3fe..000000000
--- a/tests/ovsdb-transaction.at
+++ /dev/null
@@ -1,410 +0,0 @@
-AT_BANNER([OVSDB -- transactions])
-
-OVSDB_CHECK_POSITIVE([empty table, empty transaction],
-  [[transact \
-    '["print"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["abort"]' \
-    '["print"]']],
-  [dnl
-print:
-commit:
-print:
-abort:
-print:])
-
-OVSDB_CHECK_POSITIVE([nonempty table, empty transaction],
-  [[transact \
-    '["insert", "1", "2", "3"]' \
-    '["insert", "2", "2", "3"]' \
-    '["print"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["abort"]' \
-    '["print"]']],
-  [dnl
-insert 1 2 3:
-insert 2 2 3:
-print:
-1: i=2, j=3
-2: i=2, j=3
-commit:
-print:
-1: i=2, j=3
-2: i=2, j=3
-abort:
-print:
-1: i=2, j=3
-2: i=2, j=3])
-
-OVSDB_CHECK_POSITIVE([insert, commit],
-  [[transact \
-    '["insert", "1", "2", "3"]' \
-    '["insert", "2", "2", "3"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["insert", "3", "1", "2"]' \
-    '["print"]' \
-    '["commit"]' \
-    '["print"]']],
-  [dnl
-insert 1 2 3:
-insert 2 2 3:
-commit:
-print:
-1: i=2, j=3
-2: i=2, j=3
-insert 3 1 2:
-print:
-1: i=2, j=3
-2: i=2, j=3
-3: i=1, j=2
-commit:
-print:
-1: i=2, j=3
-2: i=2, j=3
-3: i=1, j=2],
-  [transaction])
-
-OVSDB_CHECK_POSITIVE([insert, abort],
-  [[transact \
-    '["insert", "1", "2", "3"]' \
-    '["insert", "2", "2", "3"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["insert", "3", "1", "2"]' \
-    '["print"]' \
-    '["abort"]' \
-    '["print"]']],
-  [dnl
-insert 1 2 3:
-insert 2 2 3:
-commit:
-print:
-1: i=2, j=3
-2: i=2, j=3
-insert 3 1 2:
-print:
-1: i=2, j=3
-2: i=2, j=3
-3: i=1, j=2
-abort:
-print:
-1: i=2, j=3
-2: i=2, j=3],
-  [transaction])
-
-OVSDB_CHECK_POSITIVE([modify, commit],
-  [[transact \
-    '["insert", "1", "2", "3"]' \
-    '["insert", "2", "2", "3"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["modify", "2", "5", "-1"]' \
-    '["modify", "1", "-1", "4"]' \
-    '["print"]' \
-    '["commit"]' \
-    '["print"]']],
-  [dnl
-insert 1 2 3:
-insert 2 2 3:
-commit:
-print:
-1: i=2, j=3
-2: i=2, j=3
-modify 2 5 -1:
-modify 1 -1 4:
-print:
-1: i=2, j=4
-2: i=5, j=3
-commit:
-print:
-1: i=2, j=4
-2: i=5, j=3],
-  [transaction])
-
-OVSDB_CHECK_POSITIVE([modify, abort],
-  [[transact \
-    '["insert", "1", "2", "3"]' \
-    '["insert", "2", "2", "3"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["modify", "2", "5", "-1"]' \
-    '["modify", "1", "-1", "4"]' \
-    '["print"]' \
-    '["abort"]' \
-    '["print"]']],
-  [dnl
-insert 1 2 3:
-insert 2 2 3:
-commit:
-print:
-1: i=2, j=3
-2: i=2, j=3
-modify 2 5 -1:
-modify 1 -1 4:
-print:
-1: i=2, j=4
-2: i=5, j=3
-abort:
-print:
-1: i=2, j=3
-2: i=2, j=3],
-  [transaction])
-
-OVSDB_CHECK_POSITIVE([delete, commit],
-  [[transact \
-    '["insert", "1", "2", "3"]' \
-    '["insert", "2", "2", "3"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["delete", "1"]' \
-    '["print"]' \
-    '["commit"]' \
-    '["print"]']],
-  [dnl
-insert 1 2 3:
-insert 2 2 3:
-commit:
-print:
-1: i=2, j=3
-2: i=2, j=3
-delete 1:
-print:
-2: i=2, j=3
-commit:
-print:
-2: i=2, j=3],
-  [transaction])
-
-OVSDB_CHECK_POSITIVE([delete, abort],
-  [[transact \
-    '["insert", "1", "2", "3"]' \
-    '["insert", "2", "2", "3"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["delete", "1"]' \
-    '["print"]' \
-    '["abort"]' \
-    '["print"]']],
-  [dnl
-insert 1 2 3:
-insert 2 2 3:
-commit:
-print:
-1: i=2, j=3
-2: i=2, j=3
-delete 1:
-print:
-2: i=2, j=3
-abort:
-print:
-1: i=2, j=3
-2: i=2, j=3],
-  [transaction])
-
-OVSDB_CHECK_POSITIVE([modify, delete, commit],
-  [[transact \
-    '["insert", "1", "2", "3"]' \
-    '["insert", "2", "2", "3"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["modify", "1", "5", "6"]' \
-    '["delete", "1"]' \
-    '["print"]' \
-    '["commit"]' \
-    '["print"]']],
-  [dnl
-insert 1 2 3:
-insert 2 2 3:
-commit:
-print:
-1: i=2, j=3
-2: i=2, j=3
-modify 1 5 6:
-delete 1:
-print:
-2: i=2, j=3
-commit:
-print:
-2: i=2, j=3],
-  [transaction])
-
-OVSDB_CHECK_POSITIVE([modify, delete, abort],
-  [[transact \
-    '["insert", "1", "2", "3"]' \
-    '["insert", "2", "2", "3"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["modify", "1", "5", "6"]' \
-    '["delete", "1"]' \
-    '["print"]' \
-    '["abort"]' \
-    '["print"]']],
-  [dnl
-insert 1 2 3:
-insert 2 2 3:
-commit:
-print:
-1: i=2, j=3
-2: i=2, j=3
-modify 1 5 6:
-delete 1:
-print:
-2: i=2, j=3
-abort:
-print:
-1: i=2, j=3
-2: i=2, j=3],
-  [transaction])
-
-OVSDB_CHECK_POSITIVE([insert, delete, commit],
-  [[transact \
-    '["insert", "1", "2", "3"]' \
-    '["insert", "2", "2", "3"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["insert", "3", "5", "6"]' \
-    '["delete", "1"]' \
-    '["delete", "3"]' \
-    '["print"]' \
-    '["commit"]' \
-    '["print"]']],
-  [dnl
-insert 1 2 3:
-insert 2 2 3:
-commit:
-print:
-1: i=2, j=3
-2: i=2, j=3
-insert 3 5 6:
-delete 1:
-delete 3:
-print:
-2: i=2, j=3
-commit:
-print:
-2: i=2, j=3],
-  [transaction])
-
-OVSDB_CHECK_POSITIVE([insert, delete, abort],
-  [[transact \
-    '["insert", "1", "2", "3"]' \
-    '["insert", "2", "2", "3"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["insert", "3", "5", "6"]' \
-    '["delete", "1"]' \
-    '["delete", "3"]' \
-    '["print"]' \
-    '["abort"]' \
-    '["print"]']],
-  [dnl
-insert 1 2 3:
-insert 2 2 3:
-commit:
-print:
-1: i=2, j=3
-2: i=2, j=3
-insert 3 5 6:
-delete 1:
-delete 3:
-print:
-2: i=2, j=3
-abort:
-print:
-1: i=2, j=3
-2: i=2, j=3],
-  [transaction])
-
-
-OVSDB_CHECK_POSITIVE([insert, modify, delete, commit],
-  [[transact \
-    '["insert", "1", "2", "3"]' \
-    '["insert", "2", "2", "3"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["insert", "3", "5", "6"]' \
-    '["delete", "1"]' \
-    '["modify", "3", "7", "8"]' \
-    '["delete", "3"]' \
-    '["print"]' \
-    '["commit"]' \
-    '["print"]']],
-  [dnl
-insert 1 2 3:
-insert 2 2 3:
-commit:
-print:
-1: i=2, j=3
-2: i=2, j=3
-insert 3 5 6:
-delete 1:
-modify 3 7 8:
-delete 3:
-print:
-2: i=2, j=3
-commit:
-print:
-2: i=2, j=3],
-  [transaction])
-
-OVSDB_CHECK_POSITIVE([insert, modify, delete, abort],
-  [[transact \
-    '["insert", "1", "2", "3"]' \
-    '["insert", "2", "2", "3"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["insert", "3", "5", "6"]' \
-    '["delete", "1"]' \
-    '["modify", "3", "7", "8"]' \
-    '["delete", "3"]' \
-    '["print"]' \
-    '["abort"]' \
-    '["print"]']],
-  [dnl
-insert 1 2 3:
-insert 2 2 3:
-commit:
-print:
-1: i=2, j=3
-2: i=2, j=3
-insert 3 5 6:
-delete 1:
-modify 3 7 8:
-delete 3:
-print:
-2: i=2, j=3
-abort:
-print:
-1: i=2, j=3
-2: i=2, j=3],
-  [transaction])
-
-OVSDB_CHECK_POSITIVE([deletes are aborted cleanly],
-  [[transact \
-    '["insert", "1", "2", "3"]' \
-    '["commit"]' \
-    '["print"]' \
-    '["delete", "1"]' \
-    '["abort"]' \
-    '["print"]' \
-    '["delete", "1"]' \
-    '["abort"]' \
-    '["print"]']],
-  [dnl
-insert 1 2 3:
-commit:
-print:
-1: i=2, j=3
-delete 1:
-abort:
-print:
-1: i=2, j=3
-delete 1:
-abort:
-print:
-1: i=2, j=3],
-  [transaction])
-
diff --git a/tests/ovsdb-trigger.at b/tests/ovsdb-trigger.at
deleted file mode 100644
index 1fb19fe08..000000000
--- a/tests/ovsdb-trigger.at
+++ /dev/null
@@ -1,187 +0,0 @@
-AT_BANNER([OVSDB -- triggers])
-
-# This is like OVSDB_CHECK_POSITIVE, except that UUIDs in the output
-# are replaced by markers of the form <N> where N is a number.  The
-# first unique UUID is replaced by <0>, the next by <1>, and so on.
-# If a given UUID appears more than once it is always replaced by the
-# same marker.
-m4_define([OVSDB_CHECK_TRIGGER], 
-  [AT_SETUP([$1])
-   AT_KEYWORDS([ovsdb execute execution trigger positive $4])
-   AT_CHECK([test-ovsdb trigger $2], [0], [stdout], [])
-   AT_CHECK([uuidfilt stdout], [0], [$3])
-   AT_CLEANUP])
-
-OVSDB_CHECK_TRIGGER([trigger fires immediately],
-  ["`ordinal_schema`" [\
-    '["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "wait",
-       "timeout": 10,
-       "table": "ordinals",
-       "where": [],
-       "columns": ["name", "number"],
-       "until": "==",
-       "rows": [{"name": "zero", "number": 0},
-                {"name": "one", "number": 1}]},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]']],
-  [[t=0: trigger 0 (immediate): [{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{},{"uuid":["uuid","<2>"]}]
-]])
-
-OVSDB_CHECK_TRIGGER([trigger times out],
-  ["`ordinal_schema`" [\
-    '["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}},
-      {"op": "wait",
-       "timeout": 10,
-       "table": "ordinals",
-       "where": [],
-       "columns": ["name", "number"],
-       "until": "==",
-       "rows": [{"name": "zero", "number": 0},
-                {"name": "one", "number": 1},
-                {"name": "two", "number": 2}]}]' \
-    '["advance", 10]']],
-  [[t=0: new trigger 0
-t=10: trigger 0 (delayed): [{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"details":"\"wait\" timed out after 10 ms","error":"timed out"}]
-]])
-
-OVSDB_CHECK_TRIGGER([trigger fires after delay],
-  ["`ordinal_schema`" [\
-    '["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}}]' \
-    '["advance", 5]' \
-    '["ordinals",
-      {"op": "wait",
-       "timeout": 10,
-       "table": "ordinals",
-       "where": [],
-       "columns": ["name", "number"],
-       "until": "==",
-       "rows": [{"name": "zero", "number": 0},
-                {"name": "one", "number": 1},
-                {"name": "two", "number": 2}]}]' \
-    '["advance", 5]' \
-    '["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]']],
-  [[t=0: trigger 0 (immediate): [{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]
-t=5: new trigger 1
-t=10: trigger 2 (immediate): [{"uuid":["uuid","<2>"]}]
-t=10: trigger 1 (delayed): [{}]
-]])
-
-OVSDB_CHECK_TRIGGER([delayed trigger modifies database],
-  ["`ordinal_schema`" [\
-    '["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}}]' \
-    '["advance", 5]' \
-    '["ordinals",
-      {"op": "wait",
-       "timeout": 10,
-       "table": "ordinals",
-       "where": [],
-       "columns": ["name", "number"],
-       "until": "==",
-       "rows": [{"name": "zero", "number": 0},
-                {"name": "one", "number": 1},
-                {"name": "two", "number": 2}]},
-      {"op": "delete",
-       "table": "ordinals",
-       "where": [["number", "<", 2]]}]' \
-    '["advance", 5]' \
-    '["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]' \
-    '["advance", 5]' \
-    '["ordinals",
-      {"op": "select",
-       "table": "ordinals",
-       "where": []}]']],
-  [[t=0: trigger 0 (immediate): [{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]
-t=5: new trigger 1
-t=10: trigger 2 (immediate): [{"uuid":["uuid","<2>"]}]
-t=10: trigger 1 (delayed): [{},{"count":2}]
-t=15: trigger 3 (immediate): [{"rows":[{"_uuid":["uuid","<2>"],"_version":["uuid","<3>"],"name":"two","number":2}]}]
-]])
-
-OVSDB_CHECK_TRIGGER([one delayed trigger wakes up another],
-  ["`ordinal_schema`" [\
-    '["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 0, "name": "zero"}},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 1, "name": "one"}}]' \
-    '["advance", 5]' \
-    '["ordinals",
-      {"op": "wait",
-       "timeout": 10,
-       "table": "ordinals",
-       "where": [],
-       "columns": ["name", "number"],
-       "until": "==",
-       "rows": [{"name": "two", "number": 2}]},
-      {"op": "delete",
-       "table": "ordinals",
-       "where": [["number", "==", 2]]},
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 3, "name": "three"}}]' \
-    '["ordinals",
-      {"op": "wait",
-       "timeout": 10,
-       "table": "ordinals",
-       "where": [],
-       "columns": ["name", "number"],
-       "until": "==",
-       "rows": [{"name": "zero", "number": 0},
-                {"name": "one", "number": 1},
-                {"name": "two", "number": 2}]},
-      {"op": "delete",
-       "table": "ordinals",
-       "where": [["number", "<", 2]]}]' \
-    '["advance", 5]' \
-    '["ordinals",
-      {"op": "insert",
-       "table": "ordinals",
-       "row": {"number": 2, "name": "two"}}]' \
-    '["advance", 5]' \
-    '["ordinals",
-      {"op": "select",
-       "table": "ordinals",
-       "where": []}]']],
-  [[t=0: trigger 0 (immediate): [{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]
-t=5: new trigger 1
-t=5: new trigger 2
-t=10: trigger 3 (immediate): [{"uuid":["uuid","<2>"]}]
-t=10: trigger 2 (delayed): [{},{"count":2}]
-t=10: trigger 1 (delayed): [{},{"count":1},{"uuid":["uuid","<3>"]}]
-t=15: trigger 4 (immediate): [{"rows":[{"_uuid":["uuid","<3>"],"_version":["uuid","<4>"],"name":"three","number":3}]}]
-]])
-
diff --git a/tests/ovsdb-types.at b/tests/ovsdb-types.at
deleted file mode 100644
index 7bba84601..000000000
--- a/tests/ovsdb-types.at
+++ /dev/null
@@ -1,167 +0,0 @@
-AT_BANNER([OVSDB -- atomic types])
-
-OVSDB_CHECK_POSITIVE_CPY([integer], 
-  [[parse-atomic-type '["integer"]' ]], ["integer"])
-OVSDB_CHECK_POSITIVE_CPY([real], 
-  [[parse-atomic-type '["real"]' ]], ["real"])
-OVSDB_CHECK_POSITIVE_CPY([boolean], 
-  [[parse-atomic-type '["boolean"]' ]], ["boolean"])
-OVSDB_CHECK_POSITIVE_CPY([string], 
-  [[parse-atomic-type '["string"]' ]], ["string"])
-OVSDB_CHECK_POSITIVE_CPY([uuid], 
-  [[parse-atomic-type '["uuid"]' ]], ["uuid"])
-OVSDB_CHECK_NEGATIVE_CPY([void is not a valid atomic-type],
-  [[parse-atomic-type '["void"]' ]], ["void" is not an atomic-type])
-
-AT_BANNER([OVSDB -- base types])
-
-OVSDB_CHECK_POSITIVE_CPY([integer enum],
-  [[parse-base-type '{"type": "integer", "enum": ["set", [-1, 4, 5]]}' ]],
-  [[{"enum":["set",[-1,4,5]],"type":"integer"}]])
-OVSDB_CHECK_POSITIVE_CPY([integer >= 5], 
-  [[parse-base-type '{"type": "integer", "minInteger": 5}' ]],
-  [{"minInteger":5,"type":"integer"}])
-OVSDB_CHECK_POSITIVE_CPY([integer <= 7], 
-  [[parse-base-type '{"type": "integer", "maxInteger": 7}' ]],
-  [{"maxInteger":7,"type":"integer"}])
-OVSDB_CHECK_POSITIVE_CPY([integer between -5 and 10], 
-  [[parse-base-type '{"type": "integer", "minInteger": -5, "maxInteger": 10}']],
-  [{"maxInteger":10,"minInteger":-5,"type":"integer"}])
-OVSDB_CHECK_NEGATIVE_CPY([integer max may not be less than min],
-  [[parse-base-type '{"type": "integer", "minInteger": 5, "maxInteger": 3}']],
-  [minInteger exceeds maxInteger])
-
-OVSDB_CHECK_POSITIVE_CPY([real enum],
-  [[parse-base-type '{"type": "real", "enum": ["set", [1.5, 0, 2.75]]}' ]],
-  [[{"enum":["set",[0,1.5,2.75]],"type":"real"}]])
-OVSDB_CHECK_POSITIVE_CPY([real >= -1.5], 
-  [[parse-base-type '{"type": "real", "minReal": -1.5}']],
-  [{"minReal":-1.5,"type":"real"}])
-OVSDB_CHECK_POSITIVE_CPY([real <= 1e5], 
-  [[parse-base-type '{"type": "real", "maxReal": 1e5}']],
-  [{"maxReal":100000,"type":"real"}])
-OVSDB_CHECK_POSITIVE_CPY([real between -2.5 and 3.75], 
-  [[parse-base-type '{"type": "real", "minReal": -2.5, "maxReal": 3.75}']],
-  [{"maxReal":3.75,"minReal":-2.5,"type":"real"}])
-OVSDB_CHECK_NEGATIVE_CPY([real max may not be less than min], 
-  [[parse-base-type '{"type": "real", "minReal": 555, "maxReal": 444}']],
-  [minReal exceeds maxReal])
-
-OVSDB_CHECK_POSITIVE_CPY([boolean], 
-  [[parse-base-type '[{"type": "boolean"}]' ]], ["boolean"])
-OVSDB_CHECK_POSITIVE_CPY([boolean enum],
-  [[parse-base-type '{"type": "boolean", "enum": true}' ]],
-  [[{"enum":true,"type":"boolean"}]])
-
-OVSDB_CHECK_POSITIVE_CPY([string enum], 
-  [[parse-base-type '{"type": "string", "enum": ["set", ["def", "abc"]]}']],
-  [[{"enum":["set",["abc","def"]],"type":"string"}]])
-OVSDB_CHECK_POSITIVE_CPY([string minLength], 
-  [[parse-base-type '{"type": "string", "minLength": 1}']],
-  [{"minLength":1,"type":"string"}])
-OVSDB_CHECK_POSITIVE_CPY([string maxLength], 
-  [[parse-base-type '{"type": "string", "maxLength": 5}']],
-  [{"maxLength":5,"type":"string"}])
-OVSDB_CHECK_POSITIVE_CPY([string minLength and maxLength], 
-  [[parse-base-type '{"type": "string", "minLength": 1, "maxLength": 5}']],
-  [{"maxLength":5,"minLength":1,"type":"string"}])
-OVSDB_CHECK_NEGATIVE_CPY([maxLength must not be less than minLength], 
-  [[parse-base-type '{"type": "string", "minLength": 5, "maxLength": 3}']],
-  [minLength exceeds maxLength])
-OVSDB_CHECK_NEGATIVE_CPY([maxLength must not be negative], 
-  [[parse-base-type '{"type": "string", "maxLength": -1}']],
-  [maxLength out of valid range 0 to 4294967295])
-
-OVSDB_CHECK_POSITIVE_CPY([uuid enum], 
-  [[parse-base-type '{"type": "uuid", "enum": ["uuid", "36bf19c0-ad9d-4232-bb85-b3d73dfe2123"]}' ]],
-  [[{"enum":["uuid","36bf19c0-ad9d-4232-bb85-b3d73dfe2123"],"type":"uuid"}]])
-OVSDB_CHECK_POSITIVE_CPY([uuid refTable], 
-  [[parse-base-type '{"type": "uuid", "refTable": "myTable"}' ]],
-  [{"refTable":"myTable","type":"uuid"}])
-OVSDB_CHECK_NEGATIVE_CPY([uuid refTable must be valid id], 
-  [[parse-base-type '{"type": "uuid", "refTable": "a-b-c"}' ]],
-  [Type mismatch for member 'refTable'])
-
-OVSDB_CHECK_NEGATIVE_CPY([void is not a valid base-type],
-  [[parse-base-type '["void"]' ]], ["void" is not an atomic-type])
-OVSDB_CHECK_NEGATIVE_CPY(["type" member must be present],
-  [[parse-base-type '{}']], [Parsing ovsdb type failed: Required 'type' member is missing.])
-
-AT_BANNER([OVSDB -- simple types])
-
-OVSDB_CHECK_POSITIVE_CPY([simple integer], 
-  [[parse-type '["integer"]' ]], ["integer"])
-OVSDB_CHECK_POSITIVE_CPY([simple real], 
-  [[parse-type '["real"]' ]], ["real"])
-OVSDB_CHECK_POSITIVE_CPY([simple boolean], 
-  [[parse-type '["boolean"]' ]], ["boolean"])
-OVSDB_CHECK_POSITIVE_CPY([simple string], 
-  [[parse-type '["string"]' ]], ["string"])
-OVSDB_CHECK_POSITIVE_CPY([simple uuid], 
-  [[parse-type '["uuid"]' ]], ["uuid"])
-OVSDB_CHECK_POSITIVE_CPY([integer in object],
-  [[parse-type '{"key": "integer"}' ]], ["integer"])
-OVSDB_CHECK_POSITIVE_CPY([real in object with explicit min and max],
-  [[parse-type '{"key": "real", "min": 1, "max": 1}' ]], ["real"])
-
-OVSDB_CHECK_NEGATIVE_CPY([key type is required],
-  [[parse-type '{}' ]], [Required 'key' member is missing.])
-OVSDB_CHECK_NEGATIVE_CPY([void is not a valid type],
-  [[parse-type '["void"]' ]], ["void" is not an atomic-type])
-
-AT_BANNER([OVSDB -- set types])
-
-OVSDB_CHECK_POSITIVE_CPY([optional boolean],
-  [[parse-type '{"key": "boolean", "min": 0}' ]], 
-  [[{"key":"boolean","min":0}]],
-  [set])
-OVSDB_CHECK_POSITIVE_CPY([set of 1 to 3 uuids],
-  [[parse-type '{"key": "uuid", "min": 1, "max": 3}' ]], 
-  [[{"key":"uuid","max":3}]])
-OVSDB_CHECK_POSITIVE_CPY([set of 0 to 3 strings],
-  [[parse-type '{"key": "string", "min": 0, "max": 3}' ]], 
-  [[{"key":"string","max":3,"min":0}]])
-OVSDB_CHECK_POSITIVE_CPY([set of 0 or more integers],
-  [[parse-type '{"key": "integer", "min": 0, "max": "unlimited"}']],
-  [[{"key":"integer","max":"unlimited","min":0}]])
-OVSDB_CHECK_POSITIVE_CPY([set of 1 or more reals],
-  [[parse-type '{"key": "real", "min": 1, "max": "unlimited"}']],
-  [[{"key":"real","max":"unlimited"}]])
-
-OVSDB_CHECK_NEGATIVE_CPY([set max cannot be less than min],
-  [[parse-type '{"key": "real", "min": 5, "max": 3}' ]],
-  [ovsdb type fails constraint checks])
-OVSDB_CHECK_NEGATIVE_CPY([set max cannot be negative],
-  [[parse-type '{"key": "real", "max": -1}' ]],
-  [bad min or max value])
-OVSDB_CHECK_NEGATIVE_CPY([set min cannot be negative],
-  [[parse-type '{"key": "real", "min": -1}' ]],
-  [bad min or max value])
-OVSDB_CHECK_NEGATIVE_CPY([set min cannot be greater than one],
-  [[parse-type '{"key": "real", "min": 10, "max": "unlimited"}']],
-  [ovsdb type fails constraint checks])
-
-AT_BANNER([OVSDB -- map types])
-
-OVSDB_CHECK_POSITIVE_CPY([map of 1 integer to boolean],
- [[parse-type '{"key": "integer", "value": "boolean"}' ]],
- [[{"key":"integer","value":"boolean"}]])
-OVSDB_CHECK_POSITIVE_CPY([map of 1 boolean to integer, explicit min and max],
- [[parse-type '{"key": "boolean", "value": "integer", "min": 1, "max": 1}' ]],
- [[{"key":"boolean","value":"integer"}]])
-OVSDB_CHECK_POSITIVE_CPY([map of 1 to 5 uuid to real],
- [[parse-type '{"key": "uuid", "value": "real", "min": 1, "max": 5}' ]],
- [[{"key":"uuid","max":5,"value":"real"}]])
-OVSDB_CHECK_POSITIVE_CPY([map of 0 to 10 string to uuid],
- [[parse-type '{"key": "string", "value": "uuid", "min": 0, "max": 10}' ]],
- [[{"key":"string","max":10,"min":0,"value":"uuid"}]])
-OVSDB_CHECK_POSITIVE_CPY([map of 1 to 20 real to string],
- [[parse-type '{"key": "real", "value": "string", "min": 1, "max": 20}' ]],
- [[{"key":"real","max":20,"value":"string"}]])
-OVSDB_CHECK_POSITIVE_CPY([map of 0 or more string to real],
- [[parse-type '{"key": "string", "value": "real", "min": 0, "max": "unlimited"}' ]],
- [[{"key":"string","max":"unlimited","min":0,"value":"real"}]])
-
-OVSDB_CHECK_NEGATIVE_CPY([map key type is required],
- [[parse-type '{"value": "integer"}' ]],
- [Required 'key' member is missing.])
diff --git a/tests/ovsdb.at b/tests/ovsdb.at
deleted file mode 100644
index afefeffd8..000000000
--- a/tests/ovsdb.at
+++ /dev/null
@@ -1,21 +0,0 @@
-m4_include([tests/ovsdb-log.at])
-m4_include([tests/ovsdb-types.at])
-m4_include([tests/ovsdb-data.at])
-m4_include([tests/ovsdb-column.at])
-m4_include([tests/ovsdb-table.at])
-m4_include([tests/ovsdb-row.at])
-m4_include([tests/ovsdb-schema.at])
-m4_include([tests/ovsdb-condition.at])
-m4_include([tests/ovsdb-mutation.at])
-m4_include([tests/ovsdb-query.at])
-m4_include([tests/ovsdb-transaction.at])
-m4_include([tests/ovsdb-execution.at])
-m4_include([tests/ovsdb-trigger.at])
-m4_include([tests/ovsdb-tool.at])
-m4_include([tests/ovsdb-replication.at])
-m4_include([tests/ovsdb-server.at])
-m4_include([tests/ovsdb-client.at])
-m4_include([tests/ovsdb-monitor.at])
-m4_include([tests/ovsdb-idl.at])
-m4_include([tests/ovsdb-lock.at])
-m4_include([tests/ovsdb-rbac.at])
diff --git a/tests/packet-type-aware.at b/tests/packet-type-aware.at
deleted file mode 100644
index e169709a9..000000000
--- a/tests/packet-type-aware.at
+++ /dev/null
@@ -1,1041 +0,0 @@
-AT_BANNER([packet-type-aware pipeline])
-
-AT_SETUP([ptap - legal flow entries in ptap bridge])
-
-OVS_VSWITCHD_START
-
-AT_CHECK([
-    ovs-ofctl del-flows br0
-    ovs-ofctl -Oopenflow13 add-flow br0 priority=1,dl_src=11:22:33:44:55:66,eth_type=0x1234,actions=drop
-    ovs-ofctl -Oopenflow14 add-flow br0 priority=1,ip,nw_dst=10.11.12.13,actions=drop
-    ovs-ofctl -Oopenflow15 add-flow br0 priority=1,ipv6,nw_proto=6,actions=drop
-    ovs-ofctl -Oopenflow14 add-flow br0 priority=2,packet_type=\(0,0x0\),dl_src=11:22:33:44:55:66,dl_type=0x4567,actions=drop
-    ovs-ofctl -Oopenflow15 add-flow br0 priority=2,packet_type=\(0,0x0\),arp,arp_tpa=10.11.12.13,actions=drop
-    ovs-ofctl -Oopenflow15 add-flow br0 priority=3,packet_type=\(1,0x806\),arp_tpa=10.11.12.13,actions=drop
-    ovs-ofctl -Oopenflow13 add-flow br0 priority=3,packet_type=\(1,0x800\),nw_dst=10.11.12.13,actions=drop
-    ovs-ofctl -Oopenflow14 add-flow br0 priority=3,packet_type=\(1,0x86dd\),ipv6_dst=1234:5678::/32,actions=drop
-], [0])
-
-AT_CHECK([ovs-ofctl -Oopenflow15 dump-flows br0 | ofctl_strip | sort | grep actions], [0], [dnl
- priority=1,dl_src=11:22:33:44:55:66,dl_type=0x1234 actions=drop
- priority=1,ip,nw_dst=10.11.12.13 actions=drop
- priority=1,tcp6 actions=drop
- priority=2,arp,arp_tpa=10.11.12.13 actions=drop
- priority=2,dl_src=11:22:33:44:55:66,dl_type=0x4567 actions=drop
- priority=3,packet_type=(1,0x800),nw_dst=10.11.12.13 actions=drop
- priority=3,packet_type=(1,0x806),arp_tpa=10.11.12.13 actions=drop
- priority=3,packet_type=(1,0x86dd),ipv6_dst=1234:5678::/32 actions=drop
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ptap - triangle bridge setup with L2 and L3 GRE tunnels])
-
-########################
-# GRE tunneling test setup for PTAP bridge
-#
-#     192.168.10.10           192.168.10.20             192.168.10.30
-#          n1                       n2                        n3
-#          |                        |                         |
-#   +------o------+          +------o------+           +------o------+
-#   |    br-in1   |          |    br-in2   |           |    br-in3   |
-#   |             |          |   (PTAP)    |           |             |
-#   +------o------+          +------o------+           +------o------+
-#         gre                      gre                       gre
-#   10.0.0.1                (10.0.0.2)                (10.0.0.3)
-#  (20.0.0.1)                20.0.0.2                 (20.0.0.3)
-#  (30.0.0.1) LOCAL         (30.0.0.2) LOCAL           30.0.0.3  LOCAL
-#   +-----------o-+          +-----------o-+           +-----------o-+
-#   |    br-p1    |          |    br-p2    |           |    br-p3    |
-#   +------o------+          +------o------+           +------o------+
-#     p1-0 |                        | p2-0                    | p3-0
-#     p0-1 |                        | p0-2                    | p0-3
-#       +--o------------------------o-------------------------o--+
-#       |                          br0                           |
-#       +--------------------------------------------------------+
-#"
-#   GRE tunnel ports:
-#      No     Bridge      Name        Packet-type Remote bridge & ports
-#     -----------------------------------------------------------------------
-#      1020   br-in1      gre-12      legacy-l2   br-in2 2010 (ptap)
-#      1021   br-in1      gre-12_l3   legacy-l3         same
-#      1030   br-in1      gre-13      legacy-l2   br-in3 3010 (l2)
-#      2010   br-in2      gre-21      ptap        br-in1 1020 (l2), 1021 (l3)
-#      2030   br-in2      gre-23      ptap        br-in3 3020 (l2), 3021 (l3)
-#      3010   br-in3      gre-31      legacy-l2   br-in1 1030 (l2)
-#      3020   br-in3      gre-32      legacy-l2   br-in2 2010 (ptap)
-#      3021   br-in3      gre-32_l3   legacy-l3         same
-
-HWADDR_BRP1=aa:55:00:00:00:01
-HWADDR_BRP2=aa:55:00:00:00:02
-HWADDR_BRP3=aa:55:00:00:00:03
-
-OVS_VSWITCHD_START([dnl
-    -- add-br br-in1 \
-    -- set bridge br-in1 datapath_type=dummy fail-mode=secure \
-    -- add-br br-in2 \
-    -- set bridge br-in2 datapath_type=dummy fail-mode=secure \
-    -- add-br br-in3 \
-    -- set bridge br-in3 datapath_type=dummy fail-mode=secure \
-    -- add-br br-p1 -- \
-    -- set bridge br-p1 datapath_type=dummy fail-mode=secure other-config:hwaddr=\"$HWADDR_BRP1\" \
-    -- add-br br-p2 -- \
-    -- set bridge br-p2 datapath_type=dummy fail-mode=secure other-config:hwaddr=\"$HWADDR_BRP2\" \
-    -- add-br br-p3 -- \
-    -- set bridge br-p3 datapath_type=dummy fail-mode=secure other-config:hwaddr=\"$HWADDR_BRP3\" \
-    -- add-port br-p1 p1-0 \
-    -- set interface p1-0 type=patch options:peer=p0-1 ofport_request=2 \
-    -- add-port br-p2 p2-0 \
-    -- set interface p2-0 type=patch options:peer=p0-2 ofport_request=2 \
-    -- add-port br-p3 p3-0 \
-    -- set interface p3-0 type=patch options:peer=p0-3 ofport_request=2 \
-    -- add-port br0 p0-1 \
-    -- set interface p0-1 type=patch options:peer=p1-0 ofport_request=10 \
-    -- add-port br0 p0-2 \
-    -- set interface p0-2 type=patch options:peer=p2-0 ofport_request=20 \
-    -- add-port br0 p0-3 \
-    -- set interface p0-3 type=patch options:peer=p3-0 ofport_request=30 \
-    -- add-port br-in1 gre12 \
-    -- set interface gre12 type=gre options:remote_ip=10.0.0.2 \
-                           ofport_request=1020 \
-    -- add-port br-in1 gre12_l3 \
-    -- set interface gre12_l3 type=gre options:remote_ip=10.0.0.2 \
-                           ofport_request=1021 options:packet_type=legacy_l3 \
-    -- add-port br-in1 gre13 \
-    -- set interface gre13 type=gre options:remote_ip=10.0.0.3 \
-                           ofport_request=1030 \
-    -- add-port br-in2 gre21 \
-    -- set interface gre21 type=gre options:remote_ip=20.0.0.1 \
-                           ofport_request=2010 options:packet_type=ptap \
-    -- add-port br-in2 gre23 \
-    -- set interface gre23 type=gre options:remote_ip=20.0.0.3 \
-                           ofport_request=2030 options:packet_type=ptap \
-    -- add-port br-in3 gre31 \
-    -- set interface gre31 type=gre options:remote_ip=30.0.0.1 \
-                           ofport_request=3010 \
-    -- add-port br-in3 gre32 \
-    -- set interface gre32 type=gre options:remote_ip=30.0.0.2 \
-                           ofport_request=3020 \
-    -- add-port br-in3 gre32_l3 \
-    -- set interface gre32_l3 type=gre options:remote_ip=30.0.0.2 \
-                           ofport_request=3021 options:packet_type=legacy_l3
-])
-
-# Setup bridge infrastructure
-AT_CHECK([
-    # Populate the MAC table of br0
-    ovs-ofctl del-flows br0 &&
-    ovs-ofctl add-flow br0 dl_dst=$HWADDR_BRP1,actions=10 &&
-    ovs-ofctl add-flow br0 dl_dst=$HWADDR_BRP2,actions=20 &&
-    ovs-ofctl add-flow br0 dl_dst=$HWADDR_BRP3,actions=30 &&
-
-    ovs-ofctl del-flows br-in1 &&
-    ovs-ofctl del-flows br-in2 &&
-    ovs-ofctl del-flows br-in3 &&
-    ovs-ofctl del-flows br-p1 &&
-    ovs-ofctl del-flows br-p2 &&
-    ovs-ofctl del-flows br-p3
-], [0])
-
-### Setup GRE tunnels
-AT_CHECK([
-    ovs-appctl netdev-dummy/ip4addr br-p1 10.0.0.1/24 &&
-    ovs-appctl ovs/route/add 10.0.0.0/24 br-p1 &&
-    ovs-appctl tnl/arp/set br-p1 10.0.0.1 $HWADDR_BRP1 &&
-    ovs-appctl tnl/arp/set br-p1 10.0.0.2 $HWADDR_BRP2 &&
-    ovs-appctl tnl/arp/set br-p1 10.0.0.3 $HWADDR_BRP3 &&
-
-    ovs-appctl netdev-dummy/ip4addr br-p2 20.0.0.2/24 &&
-    ovs-appctl ovs/route/add 20.0.0.0/24 br-p2 &&
-    ovs-appctl tnl/arp/set br-p2 20.0.0.1 $HWADDR_BRP1 &&
-    ovs-appctl tnl/arp/set br-p2 20.0.0.2 $HWADDR_BRP2 &&
-    ovs-appctl tnl/arp/set br-p2 20.0.0.3 $HWADDR_BRP3 &&
-
-    ovs-appctl netdev-dummy/ip4addr br-p3 30.0.0.3/24 &&
-    ovs-appctl ovs/route/add 30.0.0.0/24 br-p3 &&
-    ovs-appctl tnl/arp/set br-p3 30.0.0.1 $HWADDR_BRP1 &&
-    ovs-appctl tnl/arp/set br-p3 30.0.0.2 $HWADDR_BRP2 &&
-    ovs-appctl tnl/arp/set br-p3 30.0.0.3 $HWADDR_BRP3
-], [0], [ignore])
-
-AT_CHECK([
-    ovs-appctl ovs/route/show | grep User:
-], [0], [dnl
-User: 10.0.0.0/24 dev br-p1 SRC 10.0.0.1
-User: 20.0.0.0/24 dev br-p2 SRC 20.0.0.2
-User: 30.0.0.0/24 dev br-p3 SRC 30.0.0.3
-])
-
-AT_CHECK([
-    ovs-appctl tnl/neigh/show | grep br-p | sort
-], [0], [ignore])
-
-### Flows in br-p<x>to twist TEP IP addresses in tunnel IP headers
-AT_CHECK([
-    ovs-ofctl add-flow br-p1 in_port:LOCAL,actions=2
-    ovs-ofctl add-flow br-p1 in_port:2,ip,nw_dst:20.0.0.1,actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.2,LOCAL
-    ovs-ofctl add-flow br-p1 in_port:2,ip,nw_dst:30.0.0.1,actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.3,LOCAL
-
-    ovs-ofctl add-flow br-p2 in_port:LOCAL,actions=2
-    ovs-ofctl add-flow br-p2 in_port:2,ip,nw_dst:10.0.0.2,actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.1,LOCAL
-    ovs-ofctl add-flow br-p2 in_port:2,ip,nw_dst:30.0.0.2,actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.3,LOCAL
-
-    ovs-ofctl add-flow br-p3 in_port:LOCAL,actions=2
-    ovs-ofctl add-flow br-p3 in_port:2,ip,nw_dst:10.0.0.3,actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.1,LOCAL
-    ovs-ofctl add-flow br-p3 in_port:2,ip,nw_dst:20.0.0.3,actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.2,LOCAL
-], [0])
-
-AT_CHECK([
-    ovs-ofctl dump-flows br-p1 | ofctl_strip | sort | grep actions
-    ovs-ofctl dump-flows br-p2 | ofctl_strip | sort | grep actions
-    ovs-ofctl dump-flows br-p3 | ofctl_strip | sort | grep actions
-], [0], [dnl
- in_port=LOCAL actions=output:2
- ip,in_port=2,nw_dst=20.0.0.1 actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.2,LOCAL
- ip,in_port=2,nw_dst=30.0.0.1 actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.3,LOCAL
- in_port=LOCAL actions=output:2
- ip,in_port=2,nw_dst=10.0.0.2 actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.1,LOCAL
- ip,in_port=2,nw_dst=30.0.0.2 actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.3,LOCAL
- in_port=LOCAL actions=output:2
- ip,in_port=2,nw_dst=10.0.0.3 actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.1,LOCAL
- ip,in_port=2,nw_dst=20.0.0.3 actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.2,LOCAL
-])
-
-### Setup test ports for traffic injection
-N1_IP=192.168.10.10
-N2_IP=192.168.10.20
-N3_IP=192.168.10.30
-N1_MAC=aa:55:aa:55:00:01
-N2_MAC=aa:55:aa:55:00:02
-N3_MAC=aa:55:aa:55:00:03
-N1_OFPORT=10
-N2_OFPORT=20
-N3_OFPORT=30
-
-AT_CHECK([
-ovs-vsctl \
-    -- add-port br-in1 n1 \
-    -- set interface n1 type=dummy ofport_request=$N1_OFPORT \
-                                   options:tx_pcap=n1.pcap \
-    -- add-port br-in2 n2 \
-    -- set interface n2 type=dummy ofport_request=$N2_OFPORT \
-                                   options:tx_pcap=n2.pcap \
-    -- add-port br-in3 n3 \
-    -- set interface n3 type=dummy ofport_request=$N3_OFPORT \
-                                   options:tx_pcap=n3.pcap
-], [0])
-
-#N1_DPPORT=$(ovs-appctl dpif/show | grep "n1 10" | sed 's|.*/\([[0-9]]*\):.*|\1|')
-#N2_DPPORT=$(ovs-appctl dpif/show | grep "n2 20" | sed 's|.*/\([[0-9]]*\):.*|\1|')
-#N3_DPPORT=$(ovs-appctl dpif/show | grep "n3 30" | sed 's|.*/\([[0-9]]*\):.*|\1|')
-
-### Verify datapath configuration
-AT_CHECK([
-    ovs-appctl dpif/show | grep -v hit | sed 's./[[0-9]]\{1,\}..'
-], [0], [dnl
-  br-in1:
-    br-in1 65534: (dummy-internal)
-    gre12 1020: (gre: remote_ip=10.0.0.2)
-    gre12_l3 1021: (gre: packet_type=legacy_l3, remote_ip=10.0.0.2)
-    gre13 1030: (gre: remote_ip=10.0.0.3)
-    n1 10: (dummy)
-  br-in2:
-    br-in2 65534: (dummy-internal)
-    gre21 2010: (gre: packet_type=ptap, remote_ip=20.0.0.1)
-    gre23 2030: (gre: packet_type=ptap, remote_ip=20.0.0.3)
-    n2 20: (dummy)
-  br-in3:
-    br-in3 65534: (dummy-internal)
-    gre31 3010: (gre: remote_ip=30.0.0.1)
-    gre32 3020: (gre: remote_ip=30.0.0.2)
-    gre32_l3 3021: (gre: packet_type=legacy_l3, remote_ip=30.0.0.2)
-    n3 30: (dummy)
-  br-p1:
-    br-p1 65534: (dummy-internal)
-    p1-0 2/none: (patch: peer=p0-1)
-  br-p2:
-    br-p2 65534: (dummy-internal)
-    p2-0 2/none: (patch: peer=p0-2)
-  br-p3:
-    br-p3 65534: (dummy-internal)
-    p3-0 2/none: (patch: peer=p0-3)
-  br0:
-    br0 65534: (dummy-internal)
-    p0-1 10/none: (patch: peer=p1-0)
-    p0-2 20/none: (patch: peer=p2-0)
-    p0-3 30/none: (patch: peer=p3-0)
-])
-
-### Test L3 forwarding flows
-AT_CHECK([
-    ovs-ofctl add-flow br-in1 ip,nw_dst=$N1_IP,actions=mod_dl_dst:$N1_MAC,$N1_OFPORT # Local route to N1
-    ovs-ofctl add-flow br-in1 ip,nw_dst=$N2_IP,actions=1020 # Route to N2 via the L2 tunnel to br-in2
-    ovs-ofctl add-flow br-in1 ip,nw_dst=$N3_IP,actions=1030 # Route to N3 direct through L2 tunnel
-
-    ovs-ofctl add-flow br-in2 ip,nw_dst=$N2_IP,actions=mod_dl_dst:$N2_MAC,$N2_OFPORT # Local route to N2 for ethernet packets
-    ovs-ofctl add-flow br-in2 ip,nw_dst=$N1_IP,actions=2010 # Route to N1 for ethernet packet
-    ovs-ofctl add-flow br-in2 packet_type=\(1,0x800\),nw_dst=$N1_IP,actions=2010 # Route to N1 for IP packets
-    ovs-ofctl add-flow br-in2 ip,nw_dst=$N3_IP,actions=2010 # Indirect route to N3 via br-in1 for ethernet packet
-    ovs-ofctl add-flow br-in2 packet_type=\(1,0x800\),nw_dst=$N3_IP,actions=2030 # Direct route to N3 for IP packets
-
-    ovs-ofctl add-flow br-in3 ip,nw_dst=$N3_IP,actions=mod_dl_dst:$N3_MAC,$N3_OFPORT # Local route to N1
-    ovs-ofctl add-flow br-in3 ip,nw_dst=$N2_IP,actions=3020 # Route to N2 via the L2 tunnel
-    ovs-ofctl add-flow br-in3 ip,nw_dst=$N1_IP,actions=3021 # Route to N1 via br-in2 through L3 tunnel
-], [0])
-
-AT_CHECK([
-    ovs-ofctl dump-flows br-in1 | ofctl_strip | sort | grep actions
-], [0], [dnl
- ip,nw_dst=192.168.10.10 actions=mod_dl_dst:aa:55:aa:55:00:01,output:10
- ip,nw_dst=192.168.10.20 actions=output:1020
- ip,nw_dst=192.168.10.30 actions=output:1030
-])
-
-AT_CHECK([
-    ovs-ofctl dump-flows br-in2 | ofctl_strip | sort | grep actions
-], [0], [dnl
- ip,nw_dst=192.168.10.10 actions=output:2010
- ip,nw_dst=192.168.10.20 actions=mod_dl_dst:aa:55:aa:55:00:02,output:20
- ip,nw_dst=192.168.10.30 actions=output:2010
- packet_type=(1,0x800),nw_dst=192.168.10.10 actions=output:2010
- packet_type=(1,0x800),nw_dst=192.168.10.30 actions=output:2030
-])
-
-AT_CHECK([
-    ovs-ofctl dump-flows br-in3 | ofctl_strip | sort | grep actions
-], [0], [dnl
- ip,nw_dst=192.168.10.10 actions=output:3021
- ip,nw_dst=192.168.10.20 actions=output:3020
- ip,nw_dst=192.168.10.30 actions=mod_dl_dst:aa:55:aa:55:00:03,output:30
-])
-
-### Inject ICMP Echo request test packets
-
-ovs-appctl vlog/set any:file:dbg
-
-# N1 to N3, via the L2 GRE tunnel between br-in1 and br-in3
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n1 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n1 1e2ce92a669e3a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows --names dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(n1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.30,tos=0/0x3,frag=no), packets:1, bytes:98, used:0.0s, actions:clone(tnl_push(tnl_port(gre_sys),header(size=38,type=3,eth(dst=aa:55:00:00:00:03,src=aa:55:00:00:00:01,dl_type=0x0800),ipv4(src=10.0.0.1,dst=10.0.0.3,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x6558))),out_port(br-p1)),set(ipv4(src=30.0.0.1,dst=30.0.0.3)),tnl_pop(gre_sys))
-tunnel(src=30.0.0.1,dst=30.0.0.3,flags(-df-csum)),recirc_id(0),in_port(gre_sys),packet_type(ns=0,id=0),eth(dst=1e:2c:e9:2a:66:9e),eth_type(0x0800),ipv4(dst=192.168.10.30,frag=no), packets:1, bytes:98, used:0.0s, actions:set(eth(dst=aa:55:aa:55:00:03)),n3
-])
-
-# Clear up megaflow cache
-ovs-appctl time/warp 11000
-
-# N1 to N2 via the L2 GRE tunnel between br-in1 and br-in2
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n1 461e7d1a95a13a6dd2099cab080045000054500b40004001552fc0a80a0ac0a80a140800531f09a90001e9509a580000000055ba030000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n1 461e7d1a95a13a6dd2099cab08004500005450934000400154a7c0a80a0ac0a80a140800f41d09a90002ea509a5800000000b3ba030000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows --names dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(n1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.20,tos=0/0x3,frag=no), packets:1, bytes:98, used:0.0s, actions:clone(tnl_push(tnl_port(gre_sys),header(size=38,type=3,eth(dst=aa:55:00:00:00:02,src=aa:55:00:00:00:01,dl_type=0x0800),ipv4(src=10.0.0.1,dst=10.0.0.2,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x6558))),out_port(br-p1)),set(ipv4(src=20.0.0.1,dst=20.0.0.2)),tnl_pop(gre_sys))
-tunnel(src=20.0.0.1,dst=20.0.0.2,flags(-df-csum)),recirc_id(0),in_port(gre_sys),packet_type(ns=0,id=0),eth(dst=46:1e:7d:1a:95:a1),eth_type(0x0800),ipv4(dst=192.168.10.20,frag=no), packets:1, bytes:98, used:0.0s, actions:set(eth(dst=aa:55:aa:55:00:02)),n2
-])
-
-# Clear up megaflow cache
-ovs-appctl time/warp 11000
-
-# N2 to N1 via the L2 GRE tunnel between br-in2 and br-in1
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n2 3a6dd2099cab461e7d1a95a10800450000542c1f40004001791bc0a80a14c0a80a0a0800154b0b6800011b519a580000000054cf0e0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n2 3a6dd2099cab461e7d1a95a10800450000542c744000400178c6c0a80a14c0a80a0a08003f420b6800021c519a580000000029d70e0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows --names dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(n2),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.10,tos=0/0x3,frag=no), packets:1, bytes:98, used:0.0s, actions:clone(tnl_push(tnl_port(gre_sys),header(size=38,type=3,eth(dst=aa:55:00:00:00:01,src=aa:55:00:00:00:02,dl_type=0x0800),ipv4(src=20.0.0.2,dst=20.0.0.1,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x6558))),out_port(br-p2)),set(ipv4(src=10.0.0.2,dst=10.0.0.1)),tnl_pop(gre_sys))
-tunnel(src=10.0.0.2,dst=10.0.0.1,flags(-df-csum)),recirc_id(0),in_port(gre_sys),packet_type(ns=0,id=0),eth(dst=3a:6d:d2:09:9c:ab),eth_type(0x0800),ipv4(dst=192.168.10.10,frag=no), packets:1, bytes:98, used:0.0s, actions:set(eth(dst=aa:55:aa:55:00:01)),n1
-])
-
-# Clear up megaflow cache
-ovs-appctl time/warp 11000
-
-# N2 to N3 via br-in1 using the L2 GRE tunnel between br-in2 and br-in1 and the L2 GRE tunnel between br-in1 and br-in3
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n2 1e2ce92a669e461e7d1a95a1080045000054f7d440004001ad51c0a80a14c0a80a1e08000e760c1e000131519a580000000047ee0b0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n2 1e2ce92a669e461e7d1a95a1080045000054f89540004001ac90c0a80a14c0a80a1e0800736f0c1e000232519a5800000000e1f30b0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows --names dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(n2),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.30,tos=0/0x3,frag=no), packets:1, bytes:98, used:0.0s, actions:clone(tnl_push(tnl_port(gre_sys),header(size=38,type=3,eth(dst=aa:55:00:00:00:01,src=aa:55:00:00:00:02,dl_type=0x0800),ipv4(src=20.0.0.2,dst=20.0.0.1,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x6558))),out_port(br-p2)),set(ipv4(src=10.0.0.2,dst=10.0.0.1)),tnl_pop(gre_sys))
-tunnel(src=10.0.0.2,dst=10.0.0.1,flags(-df-csum)),recirc_id(0),in_port(gre_sys),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.30,tos=0/0x3,frag=no), packets:1, bytes:98, used:0.0s, actions:clone(tnl_push(tnl_port(gre_sys),header(size=38,type=3,eth(dst=aa:55:00:00:00:03,src=aa:55:00:00:00:01,dl_type=0x0800),ipv4(src=10.0.0.1,dst=10.0.0.3,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x6558))),out_port(br-p1)),set(ipv4(src=30.0.0.1,dst=30.0.0.3)),tnl_pop(gre_sys))
-tunnel(src=30.0.0.1,dst=30.0.0.3,flags(-df-csum)),recirc_id(0),in_port(gre_sys),packet_type(ns=0,id=0),eth(dst=1e:2c:e9:2a:66:9e),eth_type(0x0800),ipv4(dst=192.168.10.30,frag=no), packets:1, bytes:98, used:0.0s, actions:set(eth(dst=aa:55:aa:55:00:03)),n3
-])
-
-# Clear up megaflow cache
-ovs-appctl time/warp 11000
-
-# N3 to N1 via br-in2 using the L3 GRE tunnel between br-in3 and br-in2 and the L3 GRE tunnel between br-in2 and br-in1
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n3 3a6dd2099cab1e2ce92a669e080045000054b80440004001ed2bc0a80a1ec0a80a0a0800e17a77d5015e64509a5800000000d3d50c0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n3 3a6dd2099cab1e2ce92a669e080045000054b8a240004001ec8dc0a80a1ec0a80a0a0800627177d5015f65509a580000000051de0c0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows --names dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(n3),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.10,tos=0/0x3,frag=no), packets:1, bytes:98, used:0.0s, actions:pop_eth,clone(tnl_push(tnl_port(gre_sys),header(size=38,type=3,eth(dst=aa:55:00:00:00:02,src=aa:55:00:00:00:03,dl_type=0x0800),ipv4(src=30.0.0.3,dst=30.0.0.2,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x800))),out_port(br-p3)),set(ipv4(src=20.0.0.3,dst=20.0.0.2)),tnl_pop(gre_sys))
-tunnel(src=10.0.0.2,dst=10.0.0.1,flags(-df-csum)),recirc_id(0),in_port(gre_sys),packet_type(ns=1,id=0x800),eth_type(0x0800),ipv4(dst=192.168.10.10,frag=no), packets:1, bytes:84, used:0.0s, actions:push_eth(src=00:00:00:00:00:00,dst=aa:55:aa:55:00:01),n1
-tunnel(src=20.0.0.3,dst=20.0.0.2,flags(-df-csum)),recirc_id(0),in_port(gre_sys),packet_type(ns=1,id=0x800),eth_type(0x0800),ipv4(dst=192.168.10.10,tos=0/0x3,frag=no), packets:1, bytes:84, used:0.0s, actions:clone(tnl_push(tnl_port(gre_sys),header(size=38,type=3,eth(dst=aa:55:00:00:00:01,src=aa:55:00:00:00:02,dl_type=0x0800),ipv4(src=20.0.0.2,dst=20.0.0.1,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x800))),out_port(br-p2)),set(ipv4(src=10.0.0.2,dst=10.0.0.1)),tnl_pop(gre_sys))
-])
-
-# Clear up megaflow cache
-ovs-appctl time/warp 11000
-
-# N3 to N2 via L3 GRE tunnel between br-in3 and br-in2
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n3 461e7d1a95a11e2ce92a669e080045000054e5b540004001bf70c0a80a1ec0a80a140800b3f1065b000188509a580000000050360c0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n3 461e7d1a95a11e2ce92a669e080045000054e5cf40004001bf56c0a80a1ec0a80a140800a2ed065b000289509a580000000060390c0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows --names dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(n3),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.20,tos=0/0x3,frag=no), packets:1, bytes:98, used:0.0s, actions:clone(tnl_push(tnl_port(gre_sys),header(size=38,type=3,eth(dst=aa:55:00:00:00:02,src=aa:55:00:00:00:03,dl_type=0x0800),ipv4(src=30.0.0.3,dst=30.0.0.2,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x6558))),out_port(br-p3)),set(ipv4(src=20.0.0.3,dst=20.0.0.2)),tnl_pop(gre_sys))
-tunnel(src=20.0.0.3,dst=20.0.0.2,flags(-df-csum)),recirc_id(0),in_port(gre_sys),packet_type(ns=0,id=0),eth(dst=46:1e:7d:1a:95:a1),eth_type(0x0800),ipv4(dst=192.168.10.20,frag=no), packets:1, bytes:98, used:0.0s, actions:set(eth(dst=aa:55:aa:55:00:02)),n2
-])
-
-### Check the received packets
-
-AT_CHECK([
-    ovs-pcap n1.pcap
-], [0], [dnl
-aa55aa550001461e7d1a95a10800450000542c1f40004001791bc0a80a14c0a80a0a0800154b0b6800011b519a580000000054cf0e0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-aa55aa550001461e7d1a95a10800450000542c744000400178c6c0a80a14c0a80a0a08003f420b6800021c519a580000000029d70e0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-aa55aa550001000000000000080045000054b80440004001ed2bc0a80a1ec0a80a0a0800e17a77d5015e64509a5800000000d3d50c0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-aa55aa550001000000000000080045000054b8a240004001ec8dc0a80a1ec0a80a0a0800627177d5015f65509a580000000051de0c0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-])
-
-AT_CHECK([
-    ovs-pcap n2.pcap
-], [0], [dnl
-aa55aa5500023a6dd2099cab080045000054500b40004001552fc0a80a0ac0a80a140800531f09a90001e9509a580000000055ba030000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-aa55aa5500023a6dd2099cab08004500005450934000400154a7c0a80a0ac0a80a140800f41d09a90002ea509a5800000000b3ba030000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-aa55aa5500021e2ce92a669e080045000054e5b540004001bf70c0a80a1ec0a80a140800b3f1065b000188509a580000000050360c0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-aa55aa5500021e2ce92a669e080045000054e5cf40004001bf56c0a80a1ec0a80a140800a2ed065b000289509a580000000060390c0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-])
-
-AT_CHECK([
-    ovs-pcap n3.pcap
-], [0], [dnl
-aa55aa5500033a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-aa55aa5500033a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-aa55aa550003461e7d1a95a1080045000054f7d440004001ad51c0a80a14c0a80a1e08000e760c1e000131519a580000000047ee0b0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-aa55aa550003461e7d1a95a1080045000054f89540004001ac90c0a80a14c0a80a1e0800736f0c1e000232519a5800000000e1f30b0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-])
-
-
-# N3 to N2, from L3 GRE to PTAP port between br-in3 and br-in2. Dropping L3 packet on L2 dummy port in br-in2.
-
-# Strips 'n_packets=...' from ovs-ofctl output.
-strip_n_packets () {
-    sed 's/n_packets=[[0-9]]*, //'
-}
-
-# Strips 'n_bytes=...' from ovs-ofctl output.
-strip_n_bytes () {
-    sed 's/n_bytes=[[0-9]]*, //'
-}
-
-# Modify flow rules to receive L3 packet in br-in2.
-AT_CHECK([
-    ovs-ofctl add-flow br-in2 packet_type=\(1,0x800\),nw_dst=$N2_IP,actions=$N2_OFPORT # Route L3 packet to N2 in br-in2
-    ovs-ofctl add-flow br-in3 ip,nw_dst=$N2_IP,actions=3021 # Route to N2 via the L3 tunnel
-], [0])
-
-AT_CHECK([
-    ovs-ofctl dump-flows br-in2 | ofctl_strip | strip_n_bytes | strip_n_packets | sort | grep actions
-], [0], [dnl
- ip,nw_dst=192.168.10.10 actions=output:2010
- ip,nw_dst=192.168.10.20 actions=mod_dl_dst:aa:55:aa:55:00:02,output:20
- ip,nw_dst=192.168.10.30 actions=output:2010
- packet_type=(1,0x800),nw_dst=192.168.10.10 actions=output:2010
- packet_type=(1,0x800),nw_dst=192.168.10.20 actions=output:20
- packet_type=(1,0x800),nw_dst=192.168.10.30 actions=output:2030
-])
-
-AT_CHECK([
-    ovs-ofctl dump-flows br-in3 | ofctl_strip | strip_n_bytes | strip_n_packets | sort | grep actions
-], [0], [dnl
- ip,nw_dst=192.168.10.10 actions=output:3021
- ip,nw_dst=192.168.10.20 actions=output:3021
- ip,nw_dst=192.168.10.30 actions=mod_dl_dst:aa:55:aa:55:00:03,output:30
-])
-
-# Clear up megaflow cache
-ovs-appctl time/warp 11000
-
-# N3 to N2 via L3 GRE tunnel between br-in3 and br-in2
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n3 461e7d1a95a11e2ce92a669e080045000054e5b540004001bf70c0a80a1ec0a80a140800b3f1065b000188509a580000000050360c0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n3 461e7d1a95a11e2ce92a669e080045000054e5cf40004001bf56c0a80a1ec0a80a140800a2ed065b000289509a580000000060390c0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows --names dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(n3),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.20,tos=0/0x3,frag=no), packets:1, bytes:98, used:0.0s, actions:pop_eth,clone(tnl_push(tnl_port(gre_sys),header(size=38,type=3,eth(dst=aa:55:00:00:00:02,src=aa:55:00:00:00:03,dl_type=0x0800),ipv4(src=30.0.0.3,dst=30.0.0.2,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x800))),out_port(br-p3)),set(ipv4(src=20.0.0.3,dst=20.0.0.2)),tnl_pop(gre_sys))
-tunnel(src=20.0.0.3,dst=20.0.0.2,flags(-df-csum)),recirc_id(0),in_port(gre_sys),packet_type(ns=1,id=0x800),eth_type(0x0800),ipv4(dst=192.168.10.20,frag=no), packets:1, bytes:84, used:0.0s, actions:drop
-])
-
-OVS_VSWITCHD_STOP(["/The Open vSwitch kernel module is probably not loaded/d"])
-AT_CLEANUP
-
-
-AT_SETUP([ptap - check decap() prerequisits])
-OVS_VSWITCHD_START
-
-# Decap IP header, then set IP destination address. This should fail.
-AT_CHECK([
-    ovs-ofctl add-flow br0 "in_port=1,packet_type=(1,0x800),actions=decap(),set_field:1.1.1.1->nw_dst"
-], [1], [stdout], [stderr])
-
-AT_CHECK([
-    cat stderr | cut -d '|' -f 3-
-], [0], [dnl
-ofp_actions|WARN|set_field ip_dst lacks correct prerequisites
-ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
-])
-
-# Decap Ethernet header, then set IP destination address. This should work.
-AT_CHECK([
-    ovs-ofctl add-flow br0 -OOpenFlow13 "in_port=1,ip,actions=decap(),set_field:1.1.1.1->nw_dst"
-], [0])
-
-# Decap IP header, then set metadata. This should work.
-AT_CHECK([
-    ovs-ofctl add-flow br0 -OOpenFlow13 "in_port=1,packet_type=(1,0x800),actions=decap(),set_field:1234->metadata"
-], [0])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ptap - check encap/decap VLAN tagged Ethernet frame])
-OVS_VSWITCHD_START([dnl
-    -- add-port br0 n1 -- set interface n1 type=dummy ofport_request=1 \
-    -- add-port br0 n2 -- set interface n2 type=dummy ofport_request=2 \
-    -- add-port br0 p1 -- set interface p1 type=patch options:peer=p2 ofport_request=3 \
-    -- add-port br0 p2 -- set interface p2 type=patch options:peer=p1 ofport_request=4
-])
-
-# Decap VLAN tagged Ethernet frames -> should be dropped
-AT_CHECK([
-    ovs-ofctl add-flow br0 -OOpenFlow13 "in_port=1,actions=push_vlan:0x8100,mod_vlan_vid:100,decap(),3"
-    ovs-ofctl add-flow br0 -OOpenFlow13 "in_port=4,actions=encap(ethernet),2"
-], [0])
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n1 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n1 1e2ce92a669e3a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:98, used:0.0s, actions:drop
-])
-
-# Encap(ethernet) on Ethernet frame -> should be droped
-AT_CHECK([
-    ovs-ofctl del-flows br0
-    ovs-ofctl add-flow br0 -OOpenFlow13 "in_port=1,actions=3"
-    ovs-ofctl add-flow br0 -OOpenFlow13 "in_port=4,actions=encap(ethernet),2"
-])
-
-ovs-appctl time/warp 11000
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n1 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n1 1e2ce92a669e3a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:98, used:0.0s, actions:drop
-])
-
-# Encap(ethernet) on VLAN tagged Ethernet frame -> should be droped
-AT_CHECK([
-    ovs-ofctl del-flows br0
-    ovs-ofctl add-flow br0 -OOpenFlow13 "in_port=1,actions=push_vlan:0x8100,mod_vlan_vid:100,encap(ethernet),3"
-    ovs-ofctl add-flow br0 -OOpenFlow13 "in_port=4,actions=2"
-])
-
-ovs-appctl time/warp 11000
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n1 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n1 1e2ce92a669e3a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:98, used:0.0s, actions:drop
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ptap - L3 over patch port])
-
-########################
-# L3 over patch port
-#
-# (192.168.10.10)     (192.168.10.30)
-#    n0                  n1
-#     |                   |
-#  +--o------+         +--o------+
-#  |   br0   |         |   br1   |
-#  +------o--+         +--o---o--+
-#      p0 |            p1 |   gre1 (ptap)
-#         +---------------+   10.0.0.1
-#
-#                             LOCAL
-#                      +------o--+
-#                      |   br2   |
-#                      +------o--+
-#                             |
-#                            n2
-#                         10.0.0.2
-
-HWADDR_BRP2=aa:55:00:00:00:02
-
-OVS_VSWITCHD_START([dnl
-    -- add-br br1 \
-    -- set bridge br1 datapath_type=dummy fail-mode=secure \
-    -- add-br br2 \
-    -- set bridge br2 datapath_type=dummy fail-mode=secure \
-       other_config:hwaddr=\"$HWADDR_BRP2\" \
-    -- add-port br0 p0 \
-    -- set interface p0 type=patch options:peer=p1 ofport_request=10 \
-    -- add-port br1 p1 \
-    -- set interface p1 type=patch options:peer=p0 ofport_request=20 \
-    -- add-port br0 n0 \
-    -- set interface n0 type=dummy ofport_request=30 \
-    -- add-port br1 n1 \
-    -- set interface n1 type=dummy options:tx_pcap=n1.pcap ofport_request=40 \
-    -- add-port br2 n2 \
-    -- set interface n2 type=dummy options:tx_pcap=n2.pcap ofport_request=50 \
-    -- add-port br1 gre1 \
-    -- set interface gre1 type=gre options:remote_ip=10.0.0.2 \
-       options:packet_type=ptap ofport_request=100
-])
-
-### Verify datapath configuration
-AT_CHECK([
-    ovs-appctl dpif/show | grep -v hit | sed 's./[[0-9]]\{1,\}..'
-], [0], [dnl
-  br0:
-    br0 65534: (dummy-internal)
-    n0 30: (dummy)
-    p0 10/none: (patch: peer=p1)
-  br1:
-    br1 65534: (dummy-internal)
-    gre1 100: (gre: packet_type=ptap, remote_ip=10.0.0.2)
-    n1 40: (dummy)
-    p1 20/none: (patch: peer=p0)
-  br2:
-    br2 65534: (dummy-internal)
-    n2 50: (dummy)
-])
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/ip4addr br2 10.0.0.1/24 &&
-    ovs-appctl ovs/route/add 10.0.0.0/24 br2 &&
-    ovs-appctl tnl/arp/set br2 10.0.0.2 de:af:be:ef:ba:be
-], [0], [ignore])
-
-AT_CHECK([
-    ovs-appctl ovs/route/show | grep User:
-], [0], [dnl
-User: 10.0.0.0/24 dev br2 SRC 10.0.0.1
-])
-
-
-AT_CHECK([
-    ovs-ofctl del-flows br0 &&
-    ovs-ofctl del-flows br1 &&
-    ovs-ofctl del-flows br2 &&
-    ovs-ofctl add-flow br0 in_port=n0,actions=decap,output=p0 -OOpenFlow13 &&
-    ovs-ofctl add-flow br1 in_port=p1,actions=output=gre1 &&
-    ovs-ofctl add-flow br2 in_port=LOCAL,actions=output=n2
-], [0])
-
-AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | grep actions],
-[0], [dnl
- in_port=30 actions=decap(),output:10
-])
-
-AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br1 | ofctl_strip | grep actions],
-[0], [dnl
- reset_counts in_port=20 actions=output:100
-])
-
-AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br2 | ofctl_strip | grep actions],
-[0], [dnl
- reset_counts in_port=LOCAL actions=output:50
-])
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n0 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n0 1e2ce92a669e3a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows --names dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(n0),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(tos=0/0x3,frag=no), packets:1, bytes:98, used:0.0s, actions:pop_eth,clone(tnl_push(tnl_port(gre_sys),header(size=38,type=3,eth(dst=de:af:be:ef:ba:be,src=aa:55:00:00:00:02,dl_type=0x0800),ipv4(src=10.0.0.1,dst=10.0.0.2,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x800))),out_port(br2)),n2)
-])
-
-AT_CHECK([
-    ovs-pcap n2.pcap
-], [0], [dnl
-deafbeefbabeaa550000000208004500006c00004000402f26610a0000010a00000200000800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-deafbeefbabeaa550000000208004500006c00004000402f26610a0000010a00000200000800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-])
-
-
-dnl output L3 to ports with different packet_type properties
-ovs-appctl time/warp 11000
-
-## L3 packet over L2 legacy port
-
-AT_CHECK([
-    ovs-ofctl del-flows br0 &&
-    ovs-ofctl del-flows br1 &&
-    ovs-ofctl del-flows br2 &&
-    ovs-ofctl add-flow br0 -OOpenFlow13 in_port=n0,actions=decap,output=p0 &&
-    ovs-ofctl add-flow br1 in_port=p1,actions=output=n1
-], [0])
-
-AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | grep actions | sed 's/reset_counts //'],
-[0], [dnl
- in_port=30 actions=decap(),output:10
-])
-
-AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br1 | ofctl_strip | grep actions | sed 's/reset_counts //'],
-[0], [dnl
- in_port=20 actions=output:40
-])
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n0 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n0 1e2ce92a669e3a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows --names dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(n0),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:1, bytes:98, used:0.0s, actions:drop
-])
-
-AT_CHECK([
-    ovs-pcap n1.pcap
-], [0], [dnl
-])
-
-## L3 packet over ptap and L2 legacy port
-
-AT_CHECK([
-    ovs-ofctl del-flows br0 &&
-    ovs-ofctl del-flows br1 &&
-    ovs-ofctl del-flows br2 &&
-    ovs-ofctl add-flow br0 in_port=n0,actions=decap,output=p0 -OOpenFlow13 &&
-    ovs-ofctl add-flow br1 in_port=p1,actions=output=n1,gre1 &&
-    ovs-ofctl add-flow br2 in_port=LOCAL,actions=output=n2
-], [0])
-
-AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | grep actions | sed 's/reset_counts //'],
-[0], [dnl
- in_port=30 actions=decap(),output:10
-])
-
-AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br1 | ofctl_strip | grep actions | sed 's/reset_counts //'],
-[0], [dnl
- in_port=20 actions=output:40,output:100
-])
-
-AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br2 | ofctl_strip | grep actions | sed 's/reset_counts //'],
-[0], [dnl
- in_port=LOCAL actions=output:50
-])
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n0 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n0 1e2ce92a669e3a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows --names dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(n0),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(tos=0/0x3,frag=no), packets:1, bytes:98, used:0.0s, actions:pop_eth,clone(tnl_push(tnl_port(gre_sys),header(size=38,type=3,eth(dst=de:af:be:ef:ba:be,src=aa:55:00:00:00:02,dl_type=0x0800),ipv4(src=10.0.0.1,dst=10.0.0.2,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x800))),out_port(br2)),n2)
-])
-
-AT_CHECK([
-    ovs-pcap n1.pcap
-], [0], [dnl
-])
-
-AT_CHECK([
-    ovs-pcap n2.pcap
-], [0], [dnl
-deafbeefbabeaa550000000208004500006c00004000402f26610a0000010a00000200000800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-deafbeefbabeaa550000000208004500006c00004000402f26610a0000010a00000200000800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-deafbeefbabeaa550000000208004500006c00004000402f26610a0000010a00000200000800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-deafbeefbabeaa550000000208004500006c00004000402f26610a0000010a00000200000800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-])
-
-
-## L2 packet over L3 legacy port and L2 legacy port
-ovs-appctl time/warp 11000
-
-AT_CHECK([
-    ovs-vsctl set interface gre1 type=gre options:remote_ip=10.0.0.2 \
-              options:packet_type=legacy_l3 ofport_request=100
-], [0])
-
-### Verify datapath configuration
-AT_CHECK([
-    ovs-appctl dpif/show | grep -v hit | sed 's./[[0-9]]\{1,\}..'
-], [0], [dnl
-  br0:
-    br0 65534: (dummy-internal)
-    n0 30: (dummy)
-    p0 10/none: (patch: peer=p1)
-  br1:
-    br1 65534: (dummy-internal)
-    gre1 100: (gre: packet_type=legacy_l3, remote_ip=10.0.0.2)
-    n1 40: (dummy)
-    p1 20/none: (patch: peer=p0)
-  br2:
-    br2 65534: (dummy-internal)
-    n2 50: (dummy)
-])
-
-AT_CHECK([
-    ovs-ofctl del-flows br0 &&
-    ovs-ofctl del-flows br1 &&
-    ovs-ofctl del-flows br2 &&
-    ovs-ofctl add-flow br0 in_port=n0,actions=output=p0 &&
-    ovs-ofctl add-flow br1 in_port=p1,actions=output=n1,gre1 &&
-    ovs-ofctl add-flow br2 in_port=LOCAL,actions=output=n2
-], [0])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | grep actions | sed 's/reset_counts //'],
-[0], [dnl
- in_port=30 actions=output:10
-])
-
-AT_CHECK([ovs-ofctl dump-flows br1 | ofctl_strip | grep actions | sed 's/reset_counts //'],
-[0], [dnl
- in_port=20 actions=output:40,output:100
-])
-
-AT_CHECK([ovs-ofctl dump-flows br2 | ofctl_strip | grep actions | sed 's/reset_counts //'],
-[0], [dnl
- in_port=LOCAL actions=output:50
-])
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive n0 1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive n0 1e2ce92a669e3a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows --names dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(n0),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(tos=0/0x3,frag=no), packets:1, bytes:98, used:0.0s, actions:n1,pop_eth,clone(tnl_push(tnl_port(gre_sys),header(size=38,type=3,eth(dst=de:af:be:ef:ba:be,src=aa:55:00:00:00:02,dl_type=0x0800),ipv4(src=10.0.0.1,dst=10.0.0.2,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x800))),out_port(br2)),n2)
-])
-
-AT_CHECK([
-    ovs-pcap n1.pcap
-], [0], [dnl
-1e2ce92a669e3a6dd2099cab0800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-1e2ce92a669e3a6dd2099cab0800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-])
-
-AT_CHECK([
-    ovs-pcap n2.pcap
-], [0], [dnl
-deafbeefbabeaa550000000208004500006c00004000402f26610a0000010a00000200000800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-deafbeefbabeaa550000000208004500006c00004000402f26610a0000010a00000200000800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-deafbeefbabeaa550000000208004500006c00004000402f26610a0000010a00000200000800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-deafbeefbabeaa550000000208004500006c00004000402f26610a0000010a00000200000800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-deafbeefbabeaa550000000208004500006c00004000402f26610a0000010a00000200000800450000548a53400040011addc0a80a0ac0a80a1e08006f200a4d0001fc509a58000000002715020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-deafbeefbabeaa550000000208004500006c00004000402f26610a0000010a00000200000800450000548a83400040011aadc0a80a0ac0a80a1e0800b7170a4d0002fd509a5800000000de1c020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([ptap - recirculate after packet_type change])
-
-########################
-#      --<--+
-#     LOCAL |
-#        +--o------+
-#        |  int-br |
-#        +------o--+
-#               L3 tunnel (remote : 20.0.0.2/24)
-#        +--o------+
-#        |   br0   |  <- 20.0.0.1/24
-#        +------o--+
-#            p0 |
-#               +--<--
-
-OVS_VSWITCHD_START([dnl
-    -- set bridge br0 other-config:hwaddr=aa:bb:cc:00:00:01 \
-    -- add-port br0 p0 \
-    -- set interface p0 type=dummy other_config:hwaddr=aa:bb:cc:00:00:01 ofport_request=1 \
-    -- add-br int-br -- set bridge int-br datapath_type=dummy \
-    -- add-port int-br tunnel \
-    -- set interface tunnel type=gre options:packet_type=legacy_l3 options:remote_ip=20.0.0.2 ofport_request=2
-])
-
-### Verify datapath configuration
-AT_CHECK([
-    ovs-appctl dpif/show | grep -v hit | sed 's./[[0-9]]\{1,\}..'
-], [0], [dnl
-  br0:
-    br0 65534: (dummy-internal)
-    p0 1: (dummy)
-  int-br:
-    int-br 65534: (dummy-internal)
-    tunnel 2: (gre: packet_type=legacy_l3, remote_ip=20.0.0.2)
-])
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/ip4addr br0 20.0.0.1/24 &&
-    ovs-appctl ovs/route/add 20.0.0.2/24 br0 &&
-    ovs-appctl tnl/neigh/set br0 20.0.0.1 aa:bb:cc:00:00:01 &&
-    ovs-appctl tnl/neigh/set br0 20.0.0.2 aa:bb:cc:00:00:02
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl ovs/route/show | grep User
-],[0], [dnl
-User: 20.0.0.0/24 dev br0 SRC 20.0.0.1
-])
-
-AT_CHECK([
-    ovs-appctl tnl/neigh/show | grep br | tr -s ' ' | sort
-],[0], [dnl
-20.0.0.1 aa:bb:cc:00:00:01 br0
-20.0.0.2 aa:bb:cc:00:00:02 br0
-])
-
-# Goto_table after pop_mpls triggers recirculation.
-AT_CHECK([
-    ovs-ofctl del-flows br0 &&
-    ovs-ofctl del-flows int-br &&
-    ovs-ofctl add-flow br0 "actions=normal"
-    ovs-ofctl add-flow int-br "table=0,in_port=tunnel,actions=pop_mpls:0x800,goto_table:20" &&
-    ovs-ofctl add-flow int-br "table=20,actions=dec_ttl,output:LOCAL"
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-ofctl dump-flows br0 -OOpenFlow13 | ofctl_strip | grep actions | sed 's/reset_counts //'
-], [0], [dnl
- actions=NORMAL
-])
-
-AT_CHECK([
-    ovs-ofctl dump-flows int-br -OOpenFlow13 | ofctl_strip | grep actions | sed 's/reset_counts //'
-], [0], [dnl
- in_port=2 actions=pop_mpls:0x0800,resubmit(,20)
- table=20, actions=dec_ttl,LOCAL
-])
-
-# Receive MPLS over L3 GRE packet in underlay bridge.
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive p0 aabbcc000001aabbcc00000208004500007000004000402f125d140000021400000100008847003e71404500005470f5400040013445c0a80a14c0a80a0a08004e1adbfc0001566b575a00000000604f010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive p0 aabbcc000001aabbcc00000208004500007000004000402f125d140000021400000100008847003e71404500005470f5400040013445c0a80a14c0a80a0a08004e1adbfc0001566b575a00000000604f010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-appctl netdev-dummy/receive p0 aabbcc000001aabbcc00000208004500007000004000402f125d140000021400000100008847003e71404500005470f5400040013445c0a80a14c0a80a0a08004e1adbfc0001566b575a00000000604f010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-    ovs-appctl netdev-dummy/receive p0 aabbcc000001aabbcc00000208004500007000004000402f125d140000021400000100008847003e71404500005470f5400040013445c0a80a14c0a80a0a08004e1adbfc0001566b575a00000000604f010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
-], [0], [ignore])
-
-ovs-appctl time/warp 1000
-
-# After packet has been received on L3 port in overlay bridge, its packet_type changes to Ethernet.
-# Resubmit after pop_mpls recirculates the L2 packet.
-AT_CHECK([
-    ovs-appctl dpctl/dump-flows --names dummy at ovs-dummy | strip_used | grep -v ipv6 | sort
-], [0], [flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(p0),packet_type(ns=0,id=0),eth(src=aa:bb:cc:00:00:02,dst=aa:bb:cc:00:00:01),eth_type(0x0800),ipv4(dst=20.0.0.1,proto=47,frag=no), packets:3, bytes:378, used:0.0s, actions:tnl_pop(gre_sys)
-tunnel(src=20.0.0.2,dst=20.0.0.1,flags(-df-csum)),recirc_id(0),in_port(gre_sys),packet_type(ns=1,id=0x8847),eth_type(0x8847),mpls(label=999/0x0,tc=0/0,ttl=64/0x0,bos=1/1), packets:3, bytes:264, used:0.0s, actions:push_eth(src=00:00:00:00:00:00,dst=00:00:00:00:00:00),pop_mpls(eth_type=0x800),recirc(0x1)
-tunnel(src=20.0.0.2,dst=20.0.0.1,flags(-df-csum)),recirc_id(0x1),in_port(gre_sys),packet_type(ns=0,id=0),eth(dst=00:00:00:00:00:00),eth_type(0x0800),ipv4(ttl=64,frag=no), packets:3, bytes:294, used:0.0s, actions:set(ipv4(ttl=63)),int-br
-])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([
-    ovs-ofctl dump-ports int-br LOCAL
-    ovs-ofctl dump-ports int-br 2
-], [0], [OFPST_PORT reply (xid=0x2): 1 ports
-  port LOCAL: rx pkts=0, bytes=0, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=4, bytes=392, drop=?, errs=?, coll=?
-OFPST_PORT reply (xid=0x2): 1 ports
-  port  2: rx pkts=4, bytes=352, drop=?, errs=?, frame=?, over=?, crc=?
-           tx pkts=0, bytes=0, drop=?, errs=?, coll=?
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/pmd.at b/tests/pmd.at
deleted file mode 100644
index aac91a8ca..000000000
--- a/tests/pmd.at
+++ /dev/null
@@ -1,720 +0,0 @@
-AT_BANNER([PMD])
-
-m4_divert_push([PREPARE_TESTS])
-
-# Given the output of `ovs-appctl dpif-netdev/pmd-rxq-show`, prints a list
-# of every rxq (one per line) in the form:
-# port_name rxq_id numa_id core_id
-parse_pmd_rxq_show () {
-    awk '/pmd thread/ {numa=$4; core=substr($6, 1, length($6) - 1)} /^  port:/ {print  $2, $4, numa, core}' | sort
-}
-
-# Given the output of `ovs-appctl dpif-netdev/pmd-rxq-show`,
-# and with queues for each core on one line, prints the rxqs
-# of the core on one line
-# 'port:' port_name 'queue_id:' rxq_id rxq_id rxq_id rxq_id
-parse_pmd_rxq_show_group () {
-   awk '/port:/ {print  $1, $2, $3, $4, $12, $20, $28}'
-}
-
-# Given the output of `ovs-appctl dpctl/dump-flows`, prints a list of flows
-# (one per line), with the pmd_id at the beginning of the line
-#
-flow_dump_prepend_pmd () {
-    awk '/flow-dump from non-dpdk/ {pmd_id=-1; next} /flow-dump from pmd/ {pmd_id=$7; next} {print pmd_id, $0}' | sort
-}
-
-m4_divert_pop([PREPARE_TESTS])
-
-dnl CHECK_CPU_DISCOVERED([n_cpu])
-dnl
-dnl Waits until CPUs discovered and checks if number of discovered CPUs
-dnl is greater or equal to 'n_cpu'. Without parameters checks that at
-dnl least one CPU discovered.
-m4_define([CHECK_CPU_DISCOVERED], [
-    PATTERN="Discovered [[0-9]]* NUMA nodes and [[0-9]]* CPU cores"
-    OVS_WAIT_UNTIL([grep "$PATTERN" ovs-vswitchd.log])
-    N_CPU=$(grep "$PATTERN" ovs-vswitchd.log | sed -e 's/.* \([[0-9]]*\) CPU cores/\1/')
-    if [[ -z "$1" ]]
-        then AT_CHECK([test "$N_CPU" -gt "0"])
-        else AT_SKIP_IF([test "$N_CPU" -lt "$1"])
-    fi
-])
-
-dnl CHECK_PMD_THREADS_CREATED([n_threads], [numa_id], [+line])
-dnl
-dnl Whaits for creation of 'n_threads' or at least 1 thread if $1 not
-dnl passed. Checking starts from line number 'line' in ovs-vswithd.log .
-m4_define([CHECK_PMD_THREADS_CREATED], [
-    PATTERN="There are [[0-9]]* pmd threads on numa node $2"
-    line_st=$3
-    if [[ -z "$line_st" ]]
-    then
-        line_st="+0"
-    fi
-    OVS_WAIT_UNTIL([tail -n $line_st ovs-vswitchd.log | grep "$PATTERN"])
-    N_THREADS=$(tail -n $line_st ovs-vswitchd.log | grep "$PATTERN" | tail -1 | sed -e 's/.* \([[0-9]]*\) pmd .*/\1/')
-    if [[ -z "$1" ]]
-        then AT_CHECK([test "$N_THREADS" -gt 0])
-        else AT_CHECK([test "$N_THREADS" -eq "$1"])
-    fi
-])
-
-m4_define([SED_NUMA_CORE_PATTERN], ["s/\(numa_id \)[[0-9]]*\( core_id \)[[0-9]]*:/\1<cleared>\2<cleared>:/"])
-m4_define([DUMMY_NUMA], [--dummy-numa="0,0,0,0"])
-
-AT_SETUP([PMD - creating a thread/add-port])
-OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy-pmd], [], [], [DUMMY_NUMA])
-
-CHECK_CPU_DISCOVERED()
-CHECK_PMD_THREADS_CREATED()
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | sed SED_NUMA_CORE_PATTERN], [0], [dnl
-pmd thread numa_id <cleared> core_id <cleared>:
-  isolated : false
-  port: p0                queue-id:  0  pmd usage: NOT AVAIL
-])
-
-AT_CHECK([ovs-appctl dpif/show | sed 's/\(tx_queues=\)[[0-9]]*/\1<cleared>/g'], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p0 1/1: (dummy-pmd: configured_rx_queues=1, configured_tx_queues=<cleared>, requested_rx_queues=1, requested_tx_queues=<cleared>)
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([PMD - multiqueue support])
-OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy-pmd], [], [], [DUMMY_NUMA])
-
-CHECK_CPU_DISCOVERED()
-CHECK_PMD_THREADS_CREATED()
-
-AT_CHECK([ovs-vsctl set interface p0 options:n_rxq=8])
-
-AT_CHECK([ovs-appctl dpif/show | sed 's/\(tx_queues=\)[[0-9]]*/\1<cleared>/g'], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p0 1/1: (dummy-pmd: configured_rx_queues=8, configured_tx_queues=<cleared>, requested_rx_queues=8, requested_tx_queues=<cleared>)
-])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | sed SED_NUMA_CORE_PATTERN], [0], [dnl
-pmd thread numa_id <cleared> core_id <cleared>:
-  isolated : false
-  port: p0                queue-id:  0  pmd usage: NOT AVAIL
-  port: p0                queue-id:  1  pmd usage: NOT AVAIL
-  port: p0                queue-id:  2  pmd usage: NOT AVAIL
-  port: p0                queue-id:  3  pmd usage: NOT AVAIL
-  port: p0                queue-id:  4  pmd usage: NOT AVAIL
-  port: p0                queue-id:  5  pmd usage: NOT AVAIL
-  port: p0                queue-id:  6  pmd usage: NOT AVAIL
-  port: p0                queue-id:  7  pmd usage: NOT AVAIL
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([PMD - pmd-cpu-mask/distribution of rx queues])
-OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy-pmd options:n_rxq=8],
-                   [], [], [DUMMY_NUMA])
-
-CHECK_CPU_DISCOVERED(2)
-CHECK_PMD_THREADS_CREATED()
-
-AT_CHECK([ovs-appctl dpif/show | sed 's/\(tx_queues=\)[[0-9]]*/\1<cleared>/g'], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p0 1/1: (dummy-pmd: configured_rx_queues=8, configured_tx_queues=<cleared>, requested_rx_queues=8, requested_tx_queues=<cleared>)
-])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | sed SED_NUMA_CORE_PATTERN], [0], [dnl
-pmd thread numa_id <cleared> core_id <cleared>:
-  isolated : false
-  port: p0                queue-id:  0  pmd usage: NOT AVAIL
-  port: p0                queue-id:  1  pmd usage: NOT AVAIL
-  port: p0                queue-id:  2  pmd usage: NOT AVAIL
-  port: p0                queue-id:  3  pmd usage: NOT AVAIL
-  port: p0                queue-id:  4  pmd usage: NOT AVAIL
-  port: p0                queue-id:  5  pmd usage: NOT AVAIL
-  port: p0                queue-id:  6  pmd usage: NOT AVAIL
-  port: p0                queue-id:  7  pmd usage: NOT AVAIL
-])
-
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:pmd-rxq-assign=cycles])
-TMP=$(cat ovs-vswitchd.log | wc -l | tr -d [[:blank:]])
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=0x3])
-CHECK_PMD_THREADS_CREATED([2], [], [+$TMP])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | awk '/AVAIL$/ { printf("%s\t", $0); next } 1' | parse_pmd_rxq_show_group | sort], [0], [dnl
-port: p0 queue-id: 0 3 4 7
-port: p0 queue-id: 1 2 5 6
-])
-
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:pmd-rxq-assign=roundrobin])
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | awk '/AVAIL$/ { printf("%s\t", $0); next } 1' | parse_pmd_rxq_show_group | sort], [0], [dnl
-port: p0 queue-id: 0 2 4 6
-port: p0 queue-id: 1 3 5 7
-])
-
-TMP=$(cat ovs-vswitchd.log | wc -l | tr -d [[:blank:]])
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=0x1])
-CHECK_PMD_THREADS_CREATED([1], [], [+$TMP])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | sed SED_NUMA_CORE_PATTERN], [0], [dnl
-pmd thread numa_id <cleared> core_id <cleared>:
-  isolated : false
-  port: p0                queue-id:  0  pmd usage: NOT AVAIL
-  port: p0                queue-id:  1  pmd usage: NOT AVAIL
-  port: p0                queue-id:  2  pmd usage: NOT AVAIL
-  port: p0                queue-id:  3  pmd usage: NOT AVAIL
-  port: p0                queue-id:  4  pmd usage: NOT AVAIL
-  port: p0                queue-id:  5  pmd usage: NOT AVAIL
-  port: p0                queue-id:  6  pmd usage: NOT AVAIL
-  port: p0                queue-id:  7  pmd usage: NOT AVAIL
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([PMD - stats])
-OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 ofport_request=7 type=dummy-pmd options:n_rxq=4],
-                   [], [], [DUMMY_NUMA])
-
-CHECK_CPU_DISCOVERED()
-CHECK_PMD_THREADS_CREATED()
-
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg])
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:emc-insert-inv-prob=1])
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:smc-enable=true])
-
-sleep 1
-
-AT_CHECK([ovs-appctl dpif/show | sed 's/\(tx_queues=\)[[0-9]]*/\1<cleared>/g'], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p0 7/1: (dummy-pmd: configured_rx_queues=4, configured_tx_queues=<cleared>, requested_rx_queues=4, requested_tx_queues=<cleared>)
-])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-stats-show | sed SED_NUMA_CORE_PATTERN | sed '/cycles/d' | grep pmd -A 9], [0], [dnl
-pmd thread numa_id <cleared> core_id <cleared>:
-  packets received: 0
-  packet recirculations: 0
-  avg. datapath passes per packet: 0.00
-  emc hits: 0
-  smc hits: 0
-  megaflow hits: 0
-  avg. subtable lookups per megaflow hit: 0.00
-  miss with success upcall: 0
-  miss with failed upcall: 0
-])
-
-ovs-appctl time/stop
-ovs-appctl time/warp 100
-(
-for i in `seq 0 19`;
-    do
-    pkt="in_port(7),eth(src=50:54:00:00:00:77,dst=50:54:00:00:01:78),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
-    AT_CHECK([ovs-appctl netdev-dummy/receive p0 $pkt])
-    done
-)
-ovs-appctl time/warp 100
-
-AT_CHECK([grep -A 1 'miss upcall' ovs-vswitchd.log | tail -n 1], [0], [dnl
-skb_priority(0),skb_mark(0),ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:77,dst=50:54:00:00:01:78),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)
-])
-AT_CHECK([cat ovs-vswitchd.log | filter_flow_install | strip_xout], [0], [dnl
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:77,dst=50:54:00:00:01:78),eth_type(0x0800),ipv4(frag=no), actions: <del>
-])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-stats-show | sed SED_NUMA_CORE_PATTERN | sed '/cycles/d' | grep pmd -A 9], [0], [dnl
-pmd thread numa_id <cleared> core_id <cleared>:
-  packets received: 20
-  packet recirculations: 0
-  avg. datapath passes per packet: 1.00
-  emc hits: 19
-  smc hits: 0
-  megaflow hits: 0
-  avg. subtable lookups per megaflow hit: 0.00
-  miss with success upcall: 1
-  miss with failed upcall: 0
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Reconfigure the number of rx queues of a port, make sure that all the
-dnl queues are polled by the datapath and try to send a couple of packets.
-AT_SETUP([PMD - reconfigure n_rxq])
-OVS_VSWITCHD_START(
-  [add-port br0 p1 -- set Interface p1 type=dummy-pmd ofport_request=1 options:n_rxq=2 -- \
-   add-port br0 p2 -- set Interface p2 type=dummy-pmd ofport_request=2
-], [], [], [--dummy-numa 0])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=controller])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 0 0
-p1 1 0 0
-p2 0 0 0
-])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 --qid 1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:13fc
-])
-
-AT_CHECK([ovs-vsctl set interface p1 options:n_rxq=4])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 0 0
-p1 1 0 0
-p1 2 0 0
-p1 3 0 0
-p2 0 0 0
-])
-
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 --qid 3 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:13fc
-])
-
-dnl Check resetting to default number of rx queues after removal from the db.
-AT_CHECK([ovs-vsctl remove interface p1 options n_rxq])
-
-AT_CHECK([ovs-appctl dpif/show | grep p1 | sed 's/\(tx_queues=\)[[0-9]]*/\1<cleared>/g'], [0], [dnl
-    p1 1/1: (dummy-pmd: configured_rx_queues=1, configured_tx_queues=<cleared>, requested_rx_queues=1, requested_tx_queues=<cleared>)
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl There was a bug where OVS failed to create a ukey and install a megaflow
-dnl if a packet with the exact same flow was received by two different pmd
-dnl threads.  This is a regression test for that bug.
-AT_SETUP([PMD - same flow multiple threads])
-OVS_VSWITCHD_START(
-  [add-port br0 p1 -- set Interface p1 type=dummy-pmd ofport_request=1 options:n_rxq=2 -- \
-   set Open_vSwitch . other_config:pmd-cpu-mask=3
-], [], [], [--dummy-numa 0,0])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=controller])
-
-dnl Make sure that the queues are on different cores.  There's no way to
-dnl control which queue is on which thread, we just need to make sure that
-dnl two threads (core_id) show up in pmd-rxq-show
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show | cut -f 4 -d ' ' | sort], [0], [dnl
-0
-1
-])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 --qid 0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 --qid 1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 4])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-dnl Make sure that both flows have been installed
-AT_CHECK([ovs-appctl dpctl/dump-flows | flow_dump_prepend_pmd], [0], [dnl
-0 recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:userspace(pid=0,controller(reason=1,dont_send=0,continuation=0,recirc_id=1,rule_cookie=0,controller_id=0,max_len=65535))
-1 recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:userspace(pid=0,controller(reason=1,dont_send=0,continuation=0,recirc_id=1,rule_cookie=0,controller_id=0,max_len=65535))
-])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:13fc
-NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:13fc
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([PMD - change numa node])
-OVS_VSWITCHD_START(
-  [add-port br0 p1 -- set Interface p1 type=dummy-pmd ofport_request=1 options:n_rxq=2 -- \
-   add-port br0 p2 -- set Interface p2 type=dummy-pmd ofport_request=2 options:n_rxq=2 -- \
-   set Open_vSwitch . other_config:pmd-cpu-mask=3
-], [], [], [--dummy-numa 0,1])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=controller])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 0 0
-p1 1 0 0
-p2 0 0 0
-p2 1 0 0
-])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 --qid 0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:13fc
-])
-
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 --qid 1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=106 in_port=2 (via action) data_len=106 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:13fc
-])
-
-AT_CHECK([ovs-vsctl set Interface p2 options:numa_id=1])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 0 0
-p1 1 0 0
-p2 0 1 1
-p2 1 1 1
-])
-
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 --qid 1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:13fc
-])
-
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 --qid 0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=106 in_port=2 (via action) data_len=106 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:13fc
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([PMD - non pmd device])
-OVS_VSWITCHD_START(
-  [add-port br0 p1 -- set Interface p1 type=dummy-pmd ofport_request=1 options:n_rxq=1 -- \
-   add-port br0 p2 -- set Interface p2 type=dummy ofport_request=2 -- \
-   set Interface br0 options:tx_pcap=br0.pcap -- \
-   set Open_vSwitch . other_config:pmd-cpu-mask=1
-], [], [], [--dummy-numa 0,0])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 0 0
-])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 --qid 0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 --qid 0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-
-OVS_WAIT_UNTIL([test `ovs-pcap br0.pcap | wc -l` -ge 2])
-
-AT_CHECK([ovs-pcap br0.pcap], [0], [dnl
-50540000000a50540000000908004500005c000000004001669f0a0000020a000001080013fc00000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f
-50540000000a50540000000908004500005c000000004001669f0a0000020a000001080013fc00000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f
-])
-
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=2])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 0 1
-])
-
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 --qid 0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 --qid 0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-
-OVS_WAIT_UNTIL([test `ovs-pcap br0.pcap | wc -l` -ge 4])
-
-AT_CHECK([ovs-pcap br0.pcap], [0], [dnl
-50540000000a50540000000908004500005c000000004001669f0a0000020a000001080013fc00000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f
-50540000000a50540000000908004500005c000000004001669f0a0000020a000001080013fc00000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f
-50540000000a50540000000908004500005c000000004001669f0a0000020a000001080013fc00000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f
-50540000000a50540000000908004500005c000000004001669f0a0000020a000001080013fc00000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([PMD - add remove ports])
-OVS_VSWITCHD_START(
-  [], [], [], [--dummy-numa 0,0])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl add-flow br0 actions=controller])
-
-AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy-pmd ofport_request=1 options:n_rxq=1])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 0 0
-])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 --qid 0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:13fc
-])
-
-AT_CHECK([ovs-vsctl del-port br0 p1])
-AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy-pmd ofport_request=1 options:n_rxq=1])
-
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 --qid 0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:13fc
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([PMD - rxq affinity])
-OVS_VSWITCHD_START(
-  [], [], [], [--dummy-numa 0,0,0,0,0,0,0,0,0])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl add-flow br0 actions=controller])
-
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=0x1fe])
-
-AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy-pmd ofport_request=1 options:n_rxq=4 other_config:pmd-rxq-affinity="0:3,1:7,2:2,3:8"])
-
-dnl The rxqs should be on the requested cores.
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 0 3
-p1 1 0 7
-p1 2 0 2
-p1 3 0 8
-])
-
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=6])
-
-dnl We removed the cores requested by some queues from pmd-cpu-mask.
-dnl Those queues will not be polled.
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 2 0 2
-])
-
-AT_CHECK([ovs-vsctl remove Interface p1 other_config pmd-rxq-affinity])
-
-dnl We removed the rxq-affinity request.  dpif-netdev should assign queues
-dnl in a round robin fashion.  We just make sure that every rxq is being
-dnl polled again.
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show | cut -f 1,2 -d ' ' | sort], [0], [dnl
-p1 0
-p1 1
-p1 2
-p1 3
-])
-
-AT_CHECK([ovs-vsctl set Interface p1 other_config:pmd-rxq-affinity='0:1'])
-
-dnl We explicitly requested core 1 for queue 0.  Core 1 becomes isolated and
-dnl every other queue goes to core 2.
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 0 1
-p1 1 0 2
-p1 2 0 2
-p1 3 0 2
-])
-
-OVS_VSWITCHD_STOP(["/dpif_netdev|WARN|There is no PMD thread on core/d"])
-AT_CLEANUP
-
-AT_SETUP([PMD - rxq affinity - NUMA])
-OVS_VSWITCHD_START(
-  [], [], [], [--dummy-numa 0,0,0,1,1])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl add-flow br0 actions=controller])
-
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=7e])
-
-AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy-pmd ofport_request=1 options:n_rxq=2 options:numa_id=0 other_config:pmd-rxq-affinity="0:1,1:2"])
-
-dnl The rxqs should be on the requested cores.
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 0 1
-p1 1 0 2
-])
-
-AT_CHECK([ovs-vsctl set Interface p1 other_config:pmd-rxq-affinity="0:3,1:4"])
-
-dnl We moved the queues to different numa node. Expecting threads on
-dnl NUMA node 1 to be created.
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 1 3
-p1 1 1 4
-])
-
-AT_CHECK([ovs-vsctl set Interface p1 other_config:pmd-rxq-affinity="0:3,1:1"])
-
-dnl Queues splitted between NUMA nodes.
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 1 3
-p1 1 0 1
-])
-
-AT_CHECK([ovs-vsctl remove Interface p1 other_config pmd-rxq-affinity])
-
-dnl We removed the rxq-affinity request.  dpif-netdev should assign queues
-dnl in a round robin fashion.  We just make sure that every rxq is being
-dnl polled again.
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show | cut -f 1,2 -d ' ' | sort], [0], [dnl
-p1 0
-p1 1
-])
-
-AT_CHECK([ovs-vsctl set Interface p1 other_config:pmd-rxq-affinity='0:3'])
-
-dnl We explicitly requesting NUMA node 1 for queue 0.
-dnl Queue 1 should be polled by thread from NUMA node 0.
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show | cut -f 1,2,3 -d ' '], [0], [dnl
-p1 0 1
-p1 1 0
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([PMD - monitor threads])
-OVS_VSWITCHD_START(
-  [], [], [], [--dummy-numa 0,0])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-dnl The two devices are connected together externally using net.sock
-AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy-pmd ofport_request=1 options:n_rxq=1 options:pstream=punix:$OVS_RUNDIR/net.sock])
-AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=dummy-pmd ofport_request=2 options:n_rxq=1 options:stream=unix:$OVS_RUNDIR/net.sock])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 0 0
-p2 0 0 0
-])
-
-dnl Enable bfd with a very aggressive interval. This will make the monitor very
-dnl busy, and uncover race conditions with the main thread.
-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true bfd:min_rx=1 bfd:min_tx=1])
-AT_CHECK([ovs-vsctl set Interface p2 bfd:enable=true bfd:min_rx=1 bfd:min_tx=1])
-
-AT_CHECK([ovs-vsctl --timeout=10 wait-until Interface p1 bfd_status:forwarding=true \
-                              -- wait-until Interface p2 bfd_status:forwarding=true])
-
-dnl Trigger reconfiguration of the datapath
-AT_CHECK([ovs-vsctl set Interface p1 options:n_rxq=2])
-AT_CHECK([ovs-vsctl set Interface p2 options:n_rxq=2])
-
-dnl Make sure that reconfiguration succeded
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 0 0
-p1 1 0 0
-p2 0 0 0
-p2 1 0 0
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([PMD - dpctl])
-OVS_VSWITCHD_START(
-  [del-br br0], [], [], [--dummy-numa 0,0])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-appctl dpctl/add-dp dummy at dp0])
-AT_CHECK([ovs-appctl dpctl/add-if dummy at dp0 p1,type=dummy-pmd])
-AT_CHECK([ovs-appctl dpctl/add-if dummy at dp0 p2,type=dummy])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show dp0 | parse_pmd_rxq_show], [0], [dnl
-p1 0 0 0
-])
-
-AT_CHECK([ovs-appctl dpctl/show dummy at dp0], [0], [dnl
-dummy at dp0:
-  lookups: hit:0 missed:0 lost:0
-  flows: 0
-  port 0: dp0 (dummy-internal)
-  port 1: p1 (dummy-pmd: configured_rx_queues=1, configured_tx_queues=1, requested_rx_queues=1, requested_tx_queues=1)
-  port 2: p2 (dummy)
-])
-
-AT_CHECK([ovs-appctl dpctl/add-flow dummy at dp0 'in_port(1),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x1234)' 2], [0], [dnl
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-flows dummy at dp0 | sort], [0], [dnl
-flow-dump from non-dpdk interfaces:
-flow-dump from pmd on cpu core: 0
-recirc_id(0),in_port(1),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x1234), packets:0, bytes:0, used:never, actions:2
-recirc_id(0),in_port(1),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x1234), packets:0, bytes:0, used:never, actions:2
-])
-
-AT_CHECK([ovs-appctl dpctl/del-flow dummy at dp0 'in_port(1),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x1234)'], [0], [dnl
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-flows dummy at dp0], [0], [dnl
-])
-
-AT_CHECK([ovs-appctl dpctl/del-dp dummy at dp0], [0], [dnl
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/reconnect.at b/tests/reconnect.at
deleted file mode 100644
index ecd76cbc5..000000000
--- a/tests/reconnect.at
+++ /dev/null
@@ -1,1283 +0,0 @@
-AT_BANNER([reconnect library])
-
-m4_define([__RECONNECT_CHECK],
-  [AT_SETUP([$1])
-   $2
-   AT_KEYWORDS([reconnect])
-   AT_DATA([input], [$3])
-   AT_CHECK([$4], [0], [$5])
-   AT_CLEANUP])
-
-m4_define([RECONNECT_CHECK],
-  [__RECONNECT_CHECK(
-     [$1 - C],
-     [],
-     [$2],
-     [ovstest test-reconnect < input],
-     [$3])
-   __RECONNECT_CHECK(
-     [$1 - Python2],
-     [AT_SKIP_IF([test $HAVE_PYTHON2 = no])],
-     [$2],
-     [$PYTHON2 $srcdir/test-reconnect.py < input],
-     [$3])
-   __RECONNECT_CHECK(
-     [$1 - Python3],
-     [AT_SKIP_IF([test $HAVE_PYTHON3 = no])],
-     [$2],
-     [$PYTHON3 $srcdir/test-reconnect.py < input],
-     [$3])])
-
-######################################################################
-RECONNECT_CHECK([nothing happens if not enabled],
-  [run
-timeout
-],
-  [### t=1000 ###
-run
-timeout
-  no timeout
-])
-
-######################################################################
-RECONNECT_CHECK([quick connect, idle disconnect],
-  [enable
-
-# Connection succeeds.
-run
-connected
-
-# Send inactivity probe.
-timeout
-run
-
-# Idle timeout kills connection.
-timeout
-run
-disconnected
-],
-  [### t=1000 ###
-enable
-  in BACKOFF for 0 ms (0 ms backoff)
-
-# Connection succeeds.
-run
-  should connect
-connected
-  in ACTIVE for 0 ms (0 ms backoff)
-  created 1000, last activity 1000, last connected 1000
-  1 successful connections out of 1 attempts, seqno 1
-  connected
-  last connected 0 ms ago, connected 0 ms total
-
-# Send inactivity probe.
-timeout
-  advance 5000 ms
-
-### t=6000 ###
-  in ACTIVE for 5000 ms (0 ms backoff)
-run
-  should send probe
-  in IDLE for 0 ms (0 ms backoff)
-
-# Idle timeout kills connection.
-timeout
-  advance 5000 ms
-
-### t=11000 ###
-  in IDLE for 5000 ms (0 ms backoff)
-run
-  should disconnect
-disconnected
-  in BACKOFF for 0 ms (1000 ms backoff)
-  1 successful connections out of 1 attempts, seqno 2
-  disconnected
-  disconnected at 11000 ms (0 ms ago)
-])
-
-######################################################################
-RECONNECT_CHECK([slow connect, idle disconnect],
-  [enable
-
-# Start connecting.
-run
-connecting
-
-# Connect after 500 ms.
-advance 500
-run
-connected
-
-# Send inactivity probe.
-timeout
-run
-
-# Idle timeout kills connection.
-timeout
-run
-disconnected
-],
-  [### t=1000 ###
-enable
-  in BACKOFF for 0 ms (0 ms backoff)
-
-# Start connecting.
-run
-  should connect
-connecting
-  in CONNECTING for 0 ms (0 ms backoff)
-
-# Connect after 500 ms.
-advance 500
-
-### t=1500 ###
-  in CONNECTING for 500 ms (0 ms backoff)
-run
-connected
-  in ACTIVE for 0 ms (0 ms backoff)
-  created 1000, last activity 1000, last connected 1500
-  1 successful connections out of 1 attempts, seqno 1
-  connected
-  last connected 0 ms ago, connected 0 ms total
-
-# Send inactivity probe.
-timeout
-  advance 5000 ms
-
-### t=6500 ###
-  in ACTIVE for 5000 ms (0 ms backoff)
-run
-  should send probe
-  in IDLE for 0 ms (0 ms backoff)
-
-# Idle timeout kills connection.
-timeout
-  advance 5000 ms
-
-### t=11500 ###
-  in IDLE for 5000 ms (0 ms backoff)
-run
-  should disconnect
-disconnected
-  in BACKOFF for 0 ms (1000 ms backoff)
-  1 successful connections out of 1 attempts, seqno 2
-  disconnected
-  disconnected at 11500 ms (0 ms ago)
-])
-
-######################################################################
-RECONNECT_CHECK([connect backs off],
-  [enable
-
-# First connection attempt fails after 1000 ms.
-run
-connecting
-run
-timeout
-run
-connect-failed
-
-# Back off for 1000 ms.
-timeout
-run
-
-# Second connection attempt fails after 1000 ms.
-connecting
-timeout
-run
-connect-failed
-
-# Back off for 2000 ms.
-timeout
-run
-
-# Third connection attempt fails after 2000 ms.
-connecting
-timeout
-run
-connect-failed
-
-# Back off for 4000 ms.
-timeout
-run
-
-# Third connection attempt fails after 4000 ms.
-connecting
-timeout
-run
-connect-failed
-
-# Back off for 8000 ms.
-timeout
-run
-
-# Third connection attempt fails after 8000 ms.
-connecting
-timeout
-run
-connect-failed
-
-# Back off for 8000 ms.
-timeout
-run
-
-# Fourth connection attempt fails after 8000 ms.
-connecting
-timeout
-run
-connect-failed
-],
-  [### t=1000 ###
-enable
-  in BACKOFF for 0 ms (0 ms backoff)
-
-# First connection attempt fails after 1000 ms.
-run
-  should connect
-connecting
-  in CONNECTING for 0 ms (0 ms backoff)
-run
-timeout
-  advance 1000 ms
-
-### t=2000 ###
-  in CONNECTING for 1000 ms (0 ms backoff)
-run
-  should disconnect
-connect-failed
-  in BACKOFF for 0 ms (1000 ms backoff)
-  0 successful connections out of 1 attempts, seqno 0
-
-# Back off for 1000 ms.
-timeout
-  advance 1000 ms
-
-### t=3000 ###
-  in BACKOFF for 1000 ms (1000 ms backoff)
-run
-  should connect
-
-# Second connection attempt fails after 1000 ms.
-connecting
-  in CONNECTING for 0 ms (1000 ms backoff)
-timeout
-  advance 1000 ms
-
-### t=4000 ###
-  in CONNECTING for 1000 ms (1000 ms backoff)
-run
-  should disconnect
-connect-failed
-  in BACKOFF for 0 ms (2000 ms backoff)
-  0 successful connections out of 2 attempts, seqno 0
-
-# Back off for 2000 ms.
-timeout
-  advance 2000 ms
-
-### t=6000 ###
-  in BACKOFF for 2000 ms (2000 ms backoff)
-run
-  should connect
-
-# Third connection attempt fails after 2000 ms.
-connecting
-  in CONNECTING for 0 ms (2000 ms backoff)
-timeout
-  advance 2000 ms
-
-### t=8000 ###
-  in CONNECTING for 2000 ms (2000 ms backoff)
-run
-  should disconnect
-connect-failed
-  in BACKOFF for 0 ms (4000 ms backoff)
-  0 successful connections out of 3 attempts, seqno 0
-
-# Back off for 4000 ms.
-timeout
-  advance 4000 ms
-
-### t=12000 ###
-  in BACKOFF for 4000 ms (4000 ms backoff)
-run
-  should connect
-
-# Third connection attempt fails after 4000 ms.
-connecting
-  in CONNECTING for 0 ms (4000 ms backoff)
-timeout
-  advance 4000 ms
-
-### t=16000 ###
-  in CONNECTING for 4000 ms (4000 ms backoff)
-run
-  should disconnect
-connect-failed
-  in BACKOFF for 0 ms (8000 ms backoff)
-  0 successful connections out of 4 attempts, seqno 0
-
-# Back off for 8000 ms.
-timeout
-  advance 8000 ms
-
-### t=24000 ###
-  in BACKOFF for 8000 ms (8000 ms backoff)
-run
-  should connect
-
-# Third connection attempt fails after 8000 ms.
-connecting
-  in CONNECTING for 0 ms (8000 ms backoff)
-timeout
-  advance 8000 ms
-
-### t=32000 ###
-  in CONNECTING for 8000 ms (8000 ms backoff)
-run
-  should disconnect
-connect-failed
-  in BACKOFF for 0 ms (8000 ms backoff)
-  0 successful connections out of 5 attempts, seqno 0
-
-# Back off for 8000 ms.
-timeout
-  advance 8000 ms
-
-### t=40000 ###
-  in BACKOFF for 8000 ms (8000 ms backoff)
-run
-  should connect
-
-# Fourth connection attempt fails after 8000 ms.
-connecting
-  in CONNECTING for 0 ms (8000 ms backoff)
-timeout
-  advance 8000 ms
-
-### t=48000 ###
-  in CONNECTING for 8000 ms (8000 ms backoff)
-run
-  should disconnect
-connect-failed
-  in BACKOFF for 0 ms (8000 ms backoff)
-  0 successful connections out of 6 attempts, seqno 0
-])
-
-######################################################################
-RECONNECT_CHECK([connections with no data preserve backoff],
-  [enable
-
-# First connect, then idle timeout kills connection.
-run
-connected
-timeout
-run
-timeout
-run
-disconnected
-
-# Back off for 1000 ms.
-timeout
-run
-
-# Second connect, then idle timeout kills connection.
-run
-connected
-timeout
-run
-timeout
-run
-disconnected
-
-# Back off for 2000 ms.
-timeout
-run
-
-# Third connect, then idle timeout kills connection.
-run
-connected
-timeout
-run
-timeout
-run
-disconnected
-
-# Back off for 4000 ms.
-timeout
-], [### t=1000 ###
-enable
-  in BACKOFF for 0 ms (0 ms backoff)
-
-# First connect, then idle timeout kills connection.
-run
-  should connect
-connected
-  in ACTIVE for 0 ms (0 ms backoff)
-  created 1000, last activity 1000, last connected 1000
-  1 successful connections out of 1 attempts, seqno 1
-  connected
-  last connected 0 ms ago, connected 0 ms total
-timeout
-  advance 5000 ms
-
-### t=6000 ###
-  in ACTIVE for 5000 ms (0 ms backoff)
-run
-  should send probe
-  in IDLE for 0 ms (0 ms backoff)
-timeout
-  advance 5000 ms
-
-### t=11000 ###
-  in IDLE for 5000 ms (0 ms backoff)
-run
-  should disconnect
-disconnected
-  in BACKOFF for 0 ms (1000 ms backoff)
-  1 successful connections out of 1 attempts, seqno 2
-  disconnected
-  disconnected at 11000 ms (0 ms ago)
-
-# Back off for 1000 ms.
-timeout
-  advance 1000 ms
-
-### t=12000 ###
-  in BACKOFF for 1000 ms (1000 ms backoff)
-  last connected 11000 ms ago, connected 10000 ms total
-run
-  should connect
-
-# Second connect, then idle timeout kills connection.
-run
-  should connect
-connected
-  in ACTIVE for 0 ms (1000 ms backoff)
-  created 1000, last activity 1000, last connected 12000
-  2 successful connections out of 2 attempts, seqno 3
-  connected
-  last connected 0 ms ago, connected 10000 ms total
-timeout
-  advance 5000 ms
-
-### t=17000 ###
-  in ACTIVE for 5000 ms (1000 ms backoff)
-run
-  should send probe
-  in IDLE for 0 ms (1000 ms backoff)
-timeout
-  advance 5000 ms
-
-### t=22000 ###
-  in IDLE for 5000 ms (1000 ms backoff)
-run
-  should disconnect
-disconnected
-  in BACKOFF for 0 ms (2000 ms backoff)
-  2 successful connections out of 2 attempts, seqno 4
-  disconnected
-  disconnected at 22000 ms (0 ms ago)
-
-# Back off for 2000 ms.
-timeout
-  advance 2000 ms
-
-### t=24000 ###
-  in BACKOFF for 2000 ms (2000 ms backoff)
-  last connected 12000 ms ago, connected 20000 ms total
-run
-  should connect
-
-# Third connect, then idle timeout kills connection.
-run
-  should connect
-connected
-  in ACTIVE for 0 ms (2000 ms backoff)
-  created 1000, last activity 1000, last connected 24000
-  3 successful connections out of 3 attempts, seqno 5
-  connected
-  last connected 0 ms ago, connected 20000 ms total
-timeout
-  advance 5000 ms
-
-### t=29000 ###
-  in ACTIVE for 5000 ms (2000 ms backoff)
-run
-  should send probe
-  in IDLE for 0 ms (2000 ms backoff)
-timeout
-  advance 5000 ms
-
-### t=34000 ###
-  in IDLE for 5000 ms (2000 ms backoff)
-run
-  should disconnect
-disconnected
-  in BACKOFF for 0 ms (4000 ms backoff)
-  3 successful connections out of 3 attempts, seqno 6
-  disconnected
-  disconnected at 34000 ms (0 ms ago)
-
-# Back off for 4000 ms.
-timeout
-  advance 4000 ms
-
-### t=38000 ###
-  in BACKOFF for 4000 ms (4000 ms backoff)
-  last connected 14000 ms ago, connected 30000 ms total
-])
-
-######################################################################
-RECONNECT_CHECK([brief connection preserves backoff],
-  [enable
-
-# First connection attempt fails after 1000 ms.
-run
-connecting
-run
-timeout
-run
-connect-failed
-
-# Back off for 1000 ms.
-timeout
-run
-
-# Second connection attempt fails after 1000 ms.
-connecting
-timeout
-run
-connect-failed
-
-# Back off for 2000 ms.
-timeout
-run
-
-# Third connection attempt succeeds after 500 ms.
-connecting
-advance 500
-run
-connected
-
-# Connection drops after another 250 ms.
-advance 250
-disconnected
-run
-
-# Back off for 4000 ms.
-timeout
-run
-], [### t=1000 ###
-enable
-  in BACKOFF for 0 ms (0 ms backoff)
-
-# First connection attempt fails after 1000 ms.
-run
-  should connect
-connecting
-  in CONNECTING for 0 ms (0 ms backoff)
-run
-timeout
-  advance 1000 ms
-
-### t=2000 ###
-  in CONNECTING for 1000 ms (0 ms backoff)
-run
-  should disconnect
-connect-failed
-  in BACKOFF for 0 ms (1000 ms backoff)
-  0 successful connections out of 1 attempts, seqno 0
-
-# Back off for 1000 ms.
-timeout
-  advance 1000 ms
-
-### t=3000 ###
-  in BACKOFF for 1000 ms (1000 ms backoff)
-run
-  should connect
-
-# Second connection attempt fails after 1000 ms.
-connecting
-  in CONNECTING for 0 ms (1000 ms backoff)
-timeout
-  advance 1000 ms
-
-### t=4000 ###
-  in CONNECTING for 1000 ms (1000 ms backoff)
-run
-  should disconnect
-connect-failed
-  in BACKOFF for 0 ms (2000 ms backoff)
-  0 successful connections out of 2 attempts, seqno 0
-
-# Back off for 2000 ms.
-timeout
-  advance 2000 ms
-
-### t=6000 ###
-  in BACKOFF for 2000 ms (2000 ms backoff)
-run
-  should connect
-
-# Third connection attempt succeeds after 500 ms.
-connecting
-  in CONNECTING for 0 ms (2000 ms backoff)
-advance 500
-
-### t=6500 ###
-  in CONNECTING for 500 ms (2000 ms backoff)
-run
-connected
-  in ACTIVE for 0 ms (2000 ms backoff)
-  created 1000, last activity 1000, last connected 6500
-  1 successful connections out of 3 attempts, seqno 1
-  connected
-  last connected 0 ms ago, connected 0 ms total
-
-# Connection drops after another 250 ms.
-advance 250
-
-### t=6750 ###
-  in ACTIVE for 250 ms (2000 ms backoff)
-disconnected
-  in BACKOFF for 0 ms (4000 ms backoff)
-  1 successful connections out of 3 attempts, seqno 2
-  disconnected
-  disconnected at 6750 ms (0 ms ago)
-run
-
-# Back off for 4000 ms.
-timeout
-  advance 4000 ms
-
-### t=10750 ###
-  in BACKOFF for 4000 ms (4000 ms backoff)
-  last connected 4250 ms ago, connected 250 ms total
-run
-  should connect
-])
-
-######################################################################
-RECONNECT_CHECK([brief connection with data preserves backoff],
-  [enable
-
-# First connection attempt fails after 1000 ms.
-run
-connecting
-run
-timeout
-run
-connect-failed
-
-# Back off for 1000 ms.
-timeout
-run
-
-# Second connection attempt fails after 1000 ms.
-connecting
-timeout
-run
-connect-failed
-
-# Back off for 2000 ms.
-timeout
-run
-
-# Third connection attempt succeeds after 500 ms.
-connecting
-advance 500
-run
-connected
-
-# Connection receives 3 chunks of data spaced 250 ms apart.
-advance 250
-run
-activity
-advance 250
-run
-activity
-advance 250
-run
-activity
-
-# Connection drops.
-disconnected
-run
-
-# Back off for 4000 ms.
-timeout
-run
-],
-  [### t=1000 ###
-enable
-  in BACKOFF for 0 ms (0 ms backoff)
-
-# First connection attempt fails after 1000 ms.
-run
-  should connect
-connecting
-  in CONNECTING for 0 ms (0 ms backoff)
-run
-timeout
-  advance 1000 ms
-
-### t=2000 ###
-  in CONNECTING for 1000 ms (0 ms backoff)
-run
-  should disconnect
-connect-failed
-  in BACKOFF for 0 ms (1000 ms backoff)
-  0 successful connections out of 1 attempts, seqno 0
-
-# Back off for 1000 ms.
-timeout
-  advance 1000 ms
-
-### t=3000 ###
-  in BACKOFF for 1000 ms (1000 ms backoff)
-run
-  should connect
-
-# Second connection attempt fails after 1000 ms.
-connecting
-  in CONNECTING for 0 ms (1000 ms backoff)
-timeout
-  advance 1000 ms
-
-### t=4000 ###
-  in CONNECTING for 1000 ms (1000 ms backoff)
-run
-  should disconnect
-connect-failed
-  in BACKOFF for 0 ms (2000 ms backoff)
-  0 successful connections out of 2 attempts, seqno 0
-
-# Back off for 2000 ms.
-timeout
-  advance 2000 ms
-
-### t=6000 ###
-  in BACKOFF for 2000 ms (2000 ms backoff)
-run
-  should connect
-
-# Third connection attempt succeeds after 500 ms.
-connecting
-  in CONNECTING for 0 ms (2000 ms backoff)
-advance 500
-
-### t=6500 ###
-  in CONNECTING for 500 ms (2000 ms backoff)
-run
-connected
-  in ACTIVE for 0 ms (2000 ms backoff)
-  created 1000, last activity 1000, last connected 6500
-  1 successful connections out of 3 attempts, seqno 1
-  connected
-  last connected 0 ms ago, connected 0 ms total
-
-# Connection receives 3 chunks of data spaced 250 ms apart.
-advance 250
-
-### t=6750 ###
-  in ACTIVE for 250 ms (2000 ms backoff)
-run
-activity
-  created 1000, last activity 6750, last connected 6500
-advance 250
-
-### t=7000 ###
-  in ACTIVE for 500 ms (2000 ms backoff)
-run
-activity
-  created 1000, last activity 7000, last connected 6500
-advance 250
-
-### t=7250 ###
-  in ACTIVE for 750 ms (2000 ms backoff)
-run
-activity
-  created 1000, last activity 7250, last connected 6500
-
-# Connection drops.
-disconnected
-  in BACKOFF for 0 ms (4000 ms backoff)
-  1 successful connections out of 3 attempts, seqno 2
-  disconnected
-  disconnected at 7250 ms (0 ms ago)
-run
-
-# Back off for 4000 ms.
-timeout
-  advance 4000 ms
-
-### t=11250 ###
-  in BACKOFF for 4000 ms (4000 ms backoff)
-  last connected 4750 ms ago, connected 750 ms total
-run
-  should connect
-])
-
-######################################################################
-RECONNECT_CHECK([long connection resets backoff],
-  [enable
-
-# First connection attempt fails after 1000 ms.
-run
-connecting
-run
-timeout
-run
-connect-failed
-
-# Back off for 1000 ms.
-timeout
-run
-
-# Second connection attempt fails after 1000 ms.
-connecting
-timeout
-run
-connect-failed
-
-# Back off for 2000 ms.
-timeout
-run
-
-# Third connection attempt succeeds after 500 ms.
-connecting
-advance 500
-run
-connected
-
-# Connection receives 3 chunks of data spaced 2000 ms apart.
-advance 2000
-run
-activity
-advance 2000
-run
-activity
-advance 2000
-run
-activity
-
-# Connection drops.
-disconnected
-run
-
-# Back off for 1000 ms.
-timeout
-run
-],
-  [### t=1000 ###
-enable
-  in BACKOFF for 0 ms (0 ms backoff)
-
-# First connection attempt fails after 1000 ms.
-run
-  should connect
-connecting
-  in CONNECTING for 0 ms (0 ms backoff)
-run
-timeout
-  advance 1000 ms
-
-### t=2000 ###
-  in CONNECTING for 1000 ms (0 ms backoff)
-run
-  should disconnect
-connect-failed
-  in BACKOFF for 0 ms (1000 ms backoff)
-  0 successful connections out of 1 attempts, seqno 0
-
-# Back off for 1000 ms.
-timeout
-  advance 1000 ms
-
-### t=3000 ###
-  in BACKOFF for 1000 ms (1000 ms backoff)
-run
-  should connect
-
-# Second connection attempt fails after 1000 ms.
-connecting
-  in CONNECTING for 0 ms (1000 ms backoff)
-timeout
-  advance 1000 ms
-
-### t=4000 ###
-  in CONNECTING for 1000 ms (1000 ms backoff)
-run
-  should disconnect
-connect-failed
-  in BACKOFF for 0 ms (2000 ms backoff)
-  0 successful connections out of 2 attempts, seqno 0
-
-# Back off for 2000 ms.
-timeout
-  advance 2000 ms
-
-### t=6000 ###
-  in BACKOFF for 2000 ms (2000 ms backoff)
-run
-  should connect
-
-# Third connection attempt succeeds after 500 ms.
-connecting
-  in CONNECTING for 0 ms (2000 ms backoff)
-advance 500
-
-### t=6500 ###
-  in CONNECTING for 500 ms (2000 ms backoff)
-run
-connected
-  in ACTIVE for 0 ms (2000 ms backoff)
-  created 1000, last activity 1000, last connected 6500
-  1 successful connections out of 3 attempts, seqno 1
-  connected
-  last connected 0 ms ago, connected 0 ms total
-
-# Connection receives 3 chunks of data spaced 2000 ms apart.
-advance 2000
-
-### t=8500 ###
-  in ACTIVE for 2000 ms (2000 ms backoff)
-run
-activity
-  created 1000, last activity 8500, last connected 6500
-advance 2000
-
-### t=10500 ###
-  in ACTIVE for 4000 ms (2000 ms backoff)
-run
-activity
-  created 1000, last activity 10500, last connected 6500
-advance 2000
-
-### t=12500 ###
-  in ACTIVE for 6000 ms (2000 ms backoff)
-run
-activity
-  created 1000, last activity 12500, last connected 6500
-
-# Connection drops.
-disconnected
-  in BACKOFF for 0 ms (1000 ms backoff)
-  1 successful connections out of 3 attempts, seqno 2
-  disconnected
-  disconnected at 12500 ms (0 ms ago)
-run
-
-# Back off for 1000 ms.
-timeout
-  advance 1000 ms
-
-### t=13500 ###
-  in BACKOFF for 1000 ms (1000 ms backoff)
-  last connected 7000 ms ago, connected 6000 ms total
-run
-  should connect
-])
-
-######################################################################
-RECONNECT_CHECK([connection attempt fails quickly],
-  [enable
-
-# Connection fails quickly.
-run
-connect-failed ECONNREFUSED
-
-# Back off for 1000 ms.
-run
-timeout
-
-# Connection fails quickly again.
-run
-connect-failed ECONNREFUSED
-
-# Back off for 2000 ms.
-run
-timeout
-],
-   [### t=1000 ###
-enable
-  in BACKOFF for 0 ms (0 ms backoff)
-
-# Connection fails quickly.
-run
-  should connect
-connect-failed ECONNREFUSED
-  in BACKOFF for 0 ms (1000 ms backoff)
-  0 successful connections out of 1 attempts, seqno 0
-
-# Back off for 1000 ms.
-run
-timeout
-  advance 1000 ms
-
-### t=2000 ###
-  in BACKOFF for 1000 ms (1000 ms backoff)
-
-# Connection fails quickly again.
-run
-  should connect
-connect-failed ECONNREFUSED
-  in BACKOFF for 0 ms (2000 ms backoff)
-  0 successful connections out of 2 attempts, seqno 0
-
-# Back off for 2000 ms.
-run
-timeout
-  advance 2000 ms
-
-### t=4000 ###
-  in BACKOFF for 2000 ms (2000 ms backoff)
-])
-
-######################################################################
-RECONNECT_CHECK([backoff-free tries work],
-  [set-backoff-free-tries 2
-enable
-
-# Connection fails quickly.
-run
-connect-failed ECONNREFUSED
-
-# No backoff.
-run
-timeout
-
-# Connection fails quickly again.
-run
-connect-failed ECONNREFUSED
-
-# Back off for 1000 ms.
-run
-timeout
-],
-   [### t=1000 ###
-set-backoff-free-tries 2
-enable
-  in BACKOFF for 0 ms (0 ms backoff)
-
-# Connection fails quickly.
-run
-  should connect
-connect-failed ECONNREFUSED
-  0 successful connections out of 1 attempts, seqno 0
-
-# No backoff.
-run
-  should connect
-timeout
-  advance 0 ms
-
-# Connection fails quickly again.
-run
-  should connect
-connect-failed ECONNREFUSED
-  in BACKOFF for 0 ms (1000 ms backoff)
-  0 successful connections out of 2 attempts, seqno 0
-
-# Back off for 1000 ms.
-run
-timeout
-  advance 1000 ms
-
-### t=2000 ###
-  in BACKOFF for 1000 ms (1000 ms backoff)
-])
-
-######################################################################
-RECONNECT_CHECK([max-tries of 1 honored],
-  [set-max-tries 1
-enable
-
-# Connection succeeds.
-run
-connected
-
-# Send inactivity probe.
-timeout
-run
-
-# Idle timeout kills connection.
-timeout
-run
-disconnected
-],
-  [### t=1000 ###
-set-max-tries 1
-  1 tries left
-enable
-  in BACKOFF for 0 ms (0 ms backoff)
-  0 tries left
-
-# Connection succeeds.
-run
-  should connect
-connected
-  in ACTIVE for 0 ms (0 ms backoff)
-  created 1000, last activity 1000, last connected 1000
-  1 successful connections out of 1 attempts, seqno 1
-  connected
-  last connected 0 ms ago, connected 0 ms total
-
-# Send inactivity probe.
-timeout
-  advance 5000 ms
-
-### t=6000 ###
-  in ACTIVE for 5000 ms (0 ms backoff)
-run
-  should send probe
-  in IDLE for 0 ms (0 ms backoff)
-
-# Idle timeout kills connection.
-timeout
-  advance 5000 ms
-
-### t=11000 ###
-  in IDLE for 5000 ms (0 ms backoff)
-run
-  should disconnect
-disconnected
-  in VOID for 0 ms (0 ms backoff)
-  1 successful connections out of 1 attempts, seqno 2
-  disconnected
-  disconnected at 11000 ms (0 ms ago)
-])
-
-######################################################################
-RECONNECT_CHECK([max-tries of 0 honored],
-  [set-max-tries 0
-enable
-run
-timeout
-],
-  [### t=1000 ###
-set-max-tries 0
-  0 tries left
-enable
-run
-timeout
-  no timeout
-])
-
-######################################################################
-RECONNECT_CHECK([passive mode],
-  [passive
-enable
-
-# Start listening.
-timeout
-run
-listening
-
-# Listening never times out.
-timeout
-run
-
-# Listening failed (accept() returned funny error?).  Back off and try again.
-listen-error 0
-timeout
-run
-listening
-
-# Connection accepted.
-connected
-activity
-advance 1000
-activity
-
-# Connection times out.
-timeout
-run
-timeout
-run
-disconnected
-
-# Start listening again.
-timeout
-run
-listening
-],
-  [### t=1000 ###
-passive
-enable
-  in BACKOFF for 0 ms (0 ms backoff)
-
-# Start listening.
-timeout
-  advance 0 ms
-run
-  should connect
-listening
-  in LISTENING for 0 ms (0 ms backoff)
-
-# Listening never times out.
-timeout
-  no timeout
-run
-
-# Listening failed (accept() returned funny error?).  Back off and try again.
-listen-error 0
-  in BACKOFF for 0 ms (1000 ms backoff)
-timeout
-  advance 1000 ms
-
-### t=2000 ###
-  in BACKOFF for 1000 ms (1000 ms backoff)
-run
-  should connect
-listening
-  in LISTENING for 0 ms (1000 ms backoff)
-
-# Connection accepted.
-connected
-  in ACTIVE for 0 ms (1000 ms backoff)
-  created 1000, last activity 1000, last connected 2000
-  1 successful connections out of 1 attempts, seqno 1
-  connected
-  last connected 0 ms ago, connected 0 ms total
-activity
-  created 1000, last activity 2000, last connected 2000
-advance 1000
-
-### t=3000 ###
-  in ACTIVE for 1000 ms (1000 ms backoff)
-activity
-  created 1000, last activity 3000, last connected 2000
-
-# Connection times out.
-timeout
-  advance 5000 ms
-
-### t=8000 ###
-  in ACTIVE for 6000 ms (1000 ms backoff)
-run
-  should send probe
-  in IDLE for 0 ms (1000 ms backoff)
-timeout
-  advance 5000 ms
-
-### t=13000 ###
-  in IDLE for 5000 ms (1000 ms backoff)
-run
-  should disconnect
-disconnected
-  in BACKOFF for 0 ms (0 ms backoff)
-  1 successful connections out of 1 attempts, seqno 2
-  disconnected
-  disconnected at 13000 ms (0 ms ago)
-
-# Start listening again.
-timeout
-  advance 0 ms
-run
-  should connect
-listening
-  in LISTENING for 0 ms (0 ms backoff)
-])
diff --git a/tests/rstp.at b/tests/rstp.at
deleted file mode 100644
index 600e85dab..000000000
--- a/tests/rstp.at
+++ /dev/null
@@ -1,255 +0,0 @@
-AT_BANNER([Rapid Spanning Tree Protocol unit tests])
-
-AT_SETUP([RSTP Single bridge])
-AT_KEYWORDS([RSTP])
-AT_DATA([test-rstp-num1],
-[bridge 0 0x111 = a b
-run 1000
-check 0 = root
-])
-AT_CHECK([ovstest test-rstp test-rstp-num1], [0], [])
-AT_CLEANUP
-
-AT_SETUP([RSTP Link failure])
-AT_KEYWORDS([RSTP])
-AT_DATA([test-rstp-num2],
-[bridge 0 0x111 = a b
-bridge 1 0x222 = a c
-bridge 2 0x333 = b c
-run 1000
-check 0 = root
-check 1 = F:200000 F
-check 2 = F:200000 Di
-# Link b goes down
-bridge 2 = X c
-run 1000
-check 1 = F:200000 F
-check 2 = D F:400000
-])
-AT_CHECK([ovstest test-rstp test-rstp-num2], [0], [])
-AT_CLEANUP
-
-AT_SETUP([RSTP Double link Failure])
-AT_KEYWORDS([RSTP])
-AT_DATA([test-rstp-num3],
-[bridge 0 0x111 = a b
-bridge 1 0x222 = a c d
-bridge 2 0x333 = b c e
-bridge 3 0x444 = d f
-bridge 4 0x555 = e f
-run 1000
-check 0 = root
-check 1 = F:200000 F F
-check 2 = F:200000 Di F
-check 3 = F:400000 F
-check 4 = F:400000 Di
-# Link b goes down
-bridge 2 = X c e
-run 1000
-check 0 = root
-check 1 = F:200000 F F
-check 2 = D F:400000 F
-check 3 = F:400000 F
-check 4 = F:600000 Di
-# Link e goes down
-bridge 4 = X f
-run 1000
-check 0 = root
-check 1 = F:200000 F F
-check 2 = D F:400000 F
-check 3 = F:400000 F
-check 4 = D F:600000
-# Link f cost changes
-bridge 4 = X f:100000
-run 1000
-check 4 = D F:500000
-# Bridge 4 becomes root and
-bridge 4 ^ 31000
-run 1000
-check 4 = root
-])
-AT_CHECK([ovstest test-rstp test-rstp-num3], [0], [])
-AT_CLEANUP
-
-AT_SETUP([RSTP example from IEEE 802.1D-2004 figures 17.4 and 17.5])
-AT_KEYWORDS([RSTP])
-AT_DATA([test-rstp-ieee802.1d-2004-fig17.4],
-[bridge 0 0x111 = a b e c
-bridge 1 0x222 = a b d f
-bridge 2 0x333 = c d l j h g
-bridge 3 0x444 = e f n m k i
-bridge 4 0x555 = g i 0 0
-bridge 5 0x666 = h k 0 0
-bridge 6 0x777 = j m 0 0
-bridge 7 0x888 = l n 0 0
-run 1000
-check 0 = root
-check 1 = F:200000 Di F F
-check 2 = F:200000 Di F F F F
-check 3 = F:200000 Di F F F F
-check 4 = F:400000 Di F F
-check 5 = F:400000 Di F F
-check 6 = F:400000 Di F F
-check 7 = F:400000 Di F F
-
-# Now connect two ports of bridge 7 to the same LAN.
-bridge 7 = l n o o
-# Same results except for bridge 7:
-run 1000
-check 0 = root
-check 1 = F:200000 Di F F
-check 2 = F:200000 Di F F F F
-check 3 = F:200000 Di F F F F
-check 4 = F:400000 Di F F
-check 5 = F:400000 Di F F
-check 6 = F:400000 Di F F
-check 7 = F:400000 Di F Di
-])
-AT_CHECK([ovstest test-rstp test-rstp-ieee802.1d-2004-fig17.4], [0], [])
-AT_CLEANUP
-
-AT_SETUP([RSTP example from IEEE 802.1D-2004 figure 17.6])
-AT_KEYWORDS([RSTP])
-AT_DATA([test-rstp-ieee802.1d-2004-fig17.6],
-[bridge 0 0x111 = a b l
-bridge 1 0x222 = b c d
-bridge 2 0x333 = d e f
-bridge 3 0x444 = f g h
-bridge 4 0x555 = j h i
-bridge 5 0x666 = l j k
-run 1000
-check 0 = root
-check 1 = F:200000 F F
-check 2 = F:400000 F F
-check 3 = F:600000 F Di
-check 4 = F:400000 F F
-check 5 = F:200000 F F
-])
-AT_CHECK([ovstest test-rstp test-rstp-ieee802.1d-2004-fig17.6], [0], [])
-AT_CLEANUP
-
-AT_SETUP([RSTP example from IEEE 802.1D-2004 figure 17.7])
-AT_KEYWORDS([RSTP])
-AT_DATA([test-rstp-ieee802.1d-2004-fig17.7],
-[bridge 0 0x000 = b
-bridge 1 0x111 = a b d f h g e c
-bridge 2 0x222 = g h j l n m k i
-run 1000
-check 0 = root
-check 1 = F F:200000 F F F F F F
-check 2 = Di F:400000 F F F F F F
-# Link g priority increment
-bridge 1 = a b d f h g^112 e c
-run 1000
-check 0 = root
-check 1 = F F:200000 F F F F F F
-check 2 = F:400000 Di F F F F F F
-])
-AT_CHECK([ovstest test-rstp test-rstp-ieee802.1d-2004-fig17.7], [0], [])
-AT_CLEANUP
-
-m4_define([FILTER_STP_TOPOLOGY], [[
-grep 'STP state changed' | sed '
-    s/.*ofproto_dpif|.*|//
-']])
-
-AT_SETUP([RSTP - dummy interface])
-# Create br0 with interfaces p1 and p7
-#    and br1 with interfaces p2 and p8
-# with p1 and p2 connected via unix domain socket
-OVS_VSWITCHD_START(
-  [set port br0 other_config:rstp-enable=false -- \
-   set bridge br0 rstp_enable=true -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-                  fail-mode=secure -- \
-   set port br1 other_config:rstp-enable=false -- \
-   set bridge br1 rstp_enable=false -- \
-])
-
-AT_CHECK([ovs-vsctl add-port br0 p1 -- \
-   set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p0.sock ofport_request=1 -- \
-   set port p1 other_config:rstp-enable=true -- \
-])
-AT_CHECK([ovs-vsctl add-port br0 p7 -- \
-   set interface p7 ofport_request=7 type=dummy -- \
-   set port p7 other_config:rstp-enable=false -- \
-])
-AT_CHECK([ovs-vsctl add-port br1 p2 -- \
-   set interface p2 type=dummy options:stream=unix:$OVS_RUNDIR/p0.sock ofport_request=2 -- \
-   set port p2 other_config:rstp-enable=false -- \
-])
-AT_CHECK([ovs-vsctl add-port br1 p8 -- \
-   set interface p8 ofport_request=8 type=dummy -- \
-   set port p8 other_config:rstp-enable=false -- \
-])
-
-#
-# RSTP needs link to be in admin-state up, netdev-dummy is by default down
-#
-AT_CHECK([ovs-appctl netdev-dummy/set-admin-state p1 up], [], [dnl
-OK
-])
-
-#
-# Turn RSTP on in br1 after the ports have been added.
-#
-AT_CHECK([ovs-vsctl set bridge br1 rstp_enable=true])
-
-ovs-appctl time/stop
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=7 icmp actions=1"])
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=1 icmp actions=7"])
-AT_CHECK([ovs-ofctl add-flow br1 "in_port=8 icmp actions=2"])
-AT_CHECK([ovs-ofctl add-flow br1 "in_port=2 icmp actions=8"])
-
-AT_CHECK([ovs-vsctl set port p2 other_config:rstp-enable=true])
-
-OVS_WAIT_UNTIL([test `cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY | wc -l` -ge 2])
-AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl
-port p1: RSTP state changed from Disabled to Discarding
-port p2: RSTP state changed from Disabled to Discarding
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' | grep STP], [0], [dnl
-     >> RSTP not in forwarding state, skipping output
-])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(8),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' | grep STP], [0], [dnl
-     >> RSTP not in forwarding state, skipping output
-])
-
-#
-# RSTP needs link to be in admin-state up, netdev-dummy is by default down
-#
-AT_CHECK([ovs-appctl netdev-dummy/set-admin-state p2 up], [], [dnl
-OK
-])
-
-# give time for RSTP to move initially
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-OVS_WAIT_UNTIL([test `cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY | wc -l` -ge 4])
-AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl
-port p1: RSTP state changed from Disabled to Discarding
-port p2: RSTP state changed from Disabled to Discarding
-port p2: RSTP state changed from Discarding to Forwarding
-port p1: RSTP state changed from Discarding to Forwarding
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' | grep Datapath], [0], [dnl
-Datapath actions: 1
-])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(8),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' | grep Datapath], [0], [dnl
-Datapath actions: 2
-])
-
-AT_CHECK([ovs-vsctl del-br br1])
-
-AT_CHECK([ovs-vsctl del-port br0 p7])
-AT_CHECK([ovs-vsctl del-port br0 p1])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/run-oftest b/tests/run-oftest
deleted file mode 100755
index 63d07c652..000000000
--- a/tests/run-oftest
+++ /dev/null
@@ -1,94 +0,0 @@
-#! /bin/sh
-
-set -e
-
-run () {
-    echo "$@"
-    "$@" || exit 1
-}
-
-# Put built tools early in $PATH.
-builddir=`pwd`
-if test ! -e vswitchd/ovs-vswitchd; then
-    echo >&2 'not in build directory, please change directory or run via \"make check-oftest'
-    exit 1
-fi
-PATH=$builddir/ovsdb:$builddir/vswitchd:$builddir/utilities:$PATH; export PATH
-
-# Find srcdir.
-case $srcdir in
-    '') srcdir=$builddir ;;
-    /*) ;;
-    *) srcdir=`pwd`/$srcdir ;;
-esac
-if test ! -e "$srcdir"/README.rst; then
-    echo >&2 'source directory not found, please set $srcdir or run via \"make check-oftest'
-    exit 1
-fi
-
-# Make sure oftest is available.
-if test X"$OFT" = X; then
-    OFT=oft
-fi
-if ($OFT --version) >/dev/null 2>&1; then
-    :
-else
-    echo >&2 'OFTest "oft" binary not found or cannot be run, please add to $PATH or set $OFT'
-    exit 1
-fi
-
-# Create sandbox.
-rm -rf sandbox
-mkdir sandbox
-cd sandbox
-sandbox=`pwd`
-
-# Set up environment for OVS programs to sandbox themselves.
-OVS_RUNDIR=$sandbox; export OVS_RUNDIR
-OVS_LOGDIR=$sandbox; export OVS_LOGDIR
-OVS_DBDIR=$sandbox; export OVS_DBDIR
-OVS_SYSCONFDIR=$sandbox; export OVS_SYSCONFDIR
-
-trap 'kill `cat *.pid`' 0 1 2 3 13 14 15
-
-# Create database and start ovsdb-server.
-touch .conf.db.~lock~
-rm -f conf.db
-run ovsdb-tool create conf.db "$srcdir"/vswitchd/vswitch.ovsschema
-run ovsdb-server --detach --no-chdir --pidfile -vconsole:off --log-file \
-    --remote=punix:"$sandbox"/db.sock
-
-# Start ovs-vswitchd.
-run ovs-vswitchd --detach --no-chdir --pidfile -vconsole:off --log-file \
-    --enable-dummy --disable-system -vvconn -vnetdev_dummy
-
-# Add a bridge and some ports for OFTest to use,
-# and configure ovs-vswitchd to connect to OFTest.
-run ovs-vsctl --no-wait \
-    -- add-br br0 \
-    -- set bridge br0 datapath-type=dummy fail-mode=secure
-for port in p1 p2 p3 p4; do
-    run ovs-vsctl --no-wait \
-        -- add-port br0 $port \
-        -- set interface $port type=dummy \
-                               options:pstream=punix:$OVS_RUNDIR/$port
-done
-run ovs-vsctl \
-    -- set-controller br0 tcp:127.0.0.1:6653 \
-    -- set controller br0 connection-mode=out-of-band max-backoff=1000
-
-# Run OFTest.
-run $OFT -P ovs-dummy $OFTFLAGS; status=$?
-
-cat <<EOF
-
-----------------------------------------------------------------------
-Logs may be found under $sandbox, e.g.:
-        $sandbox/oft.log
-        $sandbox/ovs-vswitchd.log
-        $sandbox/ovsdb-server.log
-----------------------------------------------------------------------
-EOF
-
-# Propagate OFTest exit status.
-exit $status
diff --git a/tests/run-ryu b/tests/run-ryu
deleted file mode 100755
index fedf73d94..000000000
--- a/tests/run-ryu
+++ /dev/null
@@ -1,150 +0,0 @@
-#! /bin/sh
-
-run () {
-    echo "$@"
-    "$@" || exit 1
-}
-
-# Put built tools early in $PATH.
-builddir=`pwd`
-if test ! -e vswitchd/ovs-vswitchd; then
-    echo >&2 'not in build directory, please change directory or run via \"make check-ryu'
-    exit 1
-fi
-PATH=$builddir/ovsdb:$builddir/vswitchd:$builddir/utilities:$PATH; export PATH
-
-# Find srcdir.
-case $srcdir in
-    '') srcdir=$builddir ;;
-    /*) ;;
-    *) srcdir=`pwd`/$srcdir ;;
-esac
-if test ! -e "$srcdir"/README.rst; then
-    echo >&2 'source directory not found, please set $srcdir or run via \"make check-ryu'
-    exit 1
-fi
-
-# Make sure ryu is available.
-if test X"$RYUDIR" = X; then
-    RYUDIR=$srcdir/../ryu
-fi
-PYTHONPATH=$RYUDIR:$PYTHONPATH; export PYTHONPATH
-PATH=$RYUDIR/bin:$PATH; export PATH
-if (ryu-manager --version) >/dev/null 2>&1; then
-    :
-else
-    echo >&2 '"ryu-manager" binary not found or cannot be run, please set $RYUDIR'
-    exit 1
-fi
-
-# Create sandbox.
-rm -rf sandbox
-mkdir sandbox
-cd sandbox
-sandbox=`pwd`
-
-# Set up environment for OVS programs to sandbox themselves.
-OVS_RUNDIR=$sandbox; export OVS_RUNDIR
-OVS_LOGDIR=$sandbox; export OVS_LOGDIR
-OVS_DBDIR=$sandbox; export OVS_DBDIR
-OVS_SYSCONFDIR=$sandbox; export OVS_SYSCONFDIR
-
-for signal in 0 1 2 3 13 14 15; do
-    trap 'kill `cat $sandbox/*.pid`; trap - $signal; kill -$signal $$' $signal
-done
-
-# Create database and start ovsdb-server.
-touch .conf.db.~lock~
-rm -f conf.db
-run ovsdb-tool create conf.db "$srcdir"/vswitchd/vswitch.ovsschema
-run ovsdb-server --detach --no-chdir --pidfile -vconsole:off --log-file \
-    --remote=punix:"$sandbox"/db.sock
-
-# Start ovs-vswitchd.
-run ovs-vswitchd --detach --no-chdir --pidfile -vconsole:off --log-file \
-    --enable-dummy --disable-system -vvconn -vnetdev_dummy
-
-# Add bridges for Ryu to use, and configure them to connect to Ryu.
-for config in \
-    'br0 0000000000000001 a b pstream=punix' \
-    'br1 0000000000000002 c d stream=unix'
-do
-    set $config
-    bridge=$1 dpid=$2 port1=$3 port2=$4 stream_mode=$5
-    run ovs-vsctl --no-wait \
-        -- add-br $bridge \
-        -- set bridge $bridge \
-               datapath-type=dummy fail-mode=secure \
-               protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' \
-               other-config:datapath-id=$dpid \
-        -- set-controller $bridge tcp:127.0.0.1:6653 \
-        -- set controller $bridge connection-mode=out-of-band \
-                                  max-backoff=1000 \
-        -- add-port $bridge $port1 \
-        -- set interface $port1 ofport_request=1 type=dummy \
-                                options:${stream_mode}:"$sandbox"/p1.sock \
-        -- add-port $bridge $port2 \
-        -- set interface $port2 ofport_request=2 type=dummy \
-                                options:${stream_mode}:"$sandbox"/p2.sock
-done
-
-logs=
-
-run_app() {
-    app=$1
-    cat <<EOF
-
---- Running $app...
-
-EOF
-    logfile=$sandbox/`echo $app | sed 's,/,.,g'`.log
-    logs="$logs
-        $logfile"
-    ryu-manager --ofp-tcp-listen-port=6653 "$app" --log-file="$logfile" & pid=$!
-    echo $pid > "$sandbox/ryu.pid"
-    i=0
-    while sleep 1; do
-        if grep -q -E 'TEST_FINISHED|Test end|uncaught exception' "$logfile" \
-                >/dev/null
-        then
-            break
-        fi
-
-        i=`expr $i + 1`
-        if test $i -ge 600; then
-            echo "--- TIMEOUT after $i seconds"
-            break
-        fi
-    done
-    kill $pid
-    wait
-}
-
-# Run Ryu.
-cd $RYUDIR
-for app in \
-    ryu/tests/switch/tester.py
-do
-    run_app $app
-done
-
-# tweak OVS setup because the following tests assume single bridge.
-run ovs-vsctl -- del-br br1
-
-for app in \
-    ryu/tests/integrated/test_add_flow_v10.py \
-    ryu/tests/integrated/test_request_reply_v12.py \
-    ryu/tests/integrated/test_add_flow_v12_actions.py \
-    ryu/tests/integrated/test_add_flow_v12_matches.py
-do
-    run_app $app
-done
-
-cat <<EOF
-
-----------------------------------------------------------------------
-Logs may be found under $sandbox, e.g.:$logs
-        $sandbox/ovs-vswitchd.log
-        $sandbox/ovsdb-server.log
-----------------------------------------------------------------------
-EOF
diff --git a/tests/sendpkt.py b/tests/sendpkt.py
deleted file mode 100755
index 328ae2bc9..000000000
--- a/tests/sendpkt.py
+++ /dev/null
@@ -1,96 +0,0 @@
-#! /usr/bin/env python
-
-# Copyright (c) 2018 VMware, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-# This program can be used send L2-L7 protocol messages using the hex bytes
-# of the packet, to test simple protocol scenarios. (e.g. generate simple
-# nsh packets to test nsh match fields/actions)
-#
-# Currently, the script supports sending the packets starting from the
-# Ethernet header. As a part of future enchancement, raw ip packet support
-# can also be added, and that's why there is "-t"/"--type" option
-#
-
-
-import socket
-import sys
-from optparse import OptionParser
-
-
-usage = "usage: %prog [OPTIONS] OUT-INTERFACE HEX-BYTES \n \
-         bytes in HEX-BYTES must be separated by space(s)"
-parser = OptionParser(usage=usage)
-parser.add_option("-t", "--type", type="string", dest="packet_type",
-                  help="packet type ('eth' is the default PACKET_TYPE)",
-                  default="eth")
-
-(options, args) = parser.parse_args()
-
-# validate the arguments
-if len(args) < 2:
-    parser.print_help()
-    sys.exit(1)
-
-# validate the "-t" or "--type" option
-if options.packet_type != "eth":
-    parser.error('invalid argument to "-t"/"--type". Allowed value is "eth".')
-
-# store the hex bytes with 0x appended at the beginning
-# if not present in the user input and validate the hex bytes
-hex_list = []
-for a in args[1:]:
-    if a[:2] != "0x":
-        hex_byte = "0x" + a
-    else:
-        hex_byte = a
-    try:
-        temp = int(hex_byte, 0)
-    except:
-        parser.error("invalid hex byte " + a)
-
-    if temp > 0xff:
-        parser.error("hex byte " + a + " cannot be greater than 0xff!")
-
-    hex_list.append(temp)
-
-if sys.version_info < (3, 0):
-    pkt = "".join(map(chr, hex_list))
-else:
-    pkt = bytes(hex_list)
-
-try:
-    sockfd = socket.socket(socket.AF_PACKET, socket.SOCK_RAW)
-except socket.error as msg:
-    print('unable to create socket! error code: ' + str(msg[0]) + ' : '
-                                                                    + msg[1])
-    sys.exit(2)
-
-try:
-    sockfd.bind((args[0], 0))
-except socket.error as msg:
-    print('unable to bind socket! error code: ' + str(msg[0]) + ' : '
-                                                                    + msg[1])
-    sys.exit(2)
-
-try:
-    sockfd.send(pkt)
-except socket.error as msg:
-    print('unable to send packet! error code: ' + str(msg[0]) + ' : '
-                                                                    + msg[1])
-    sys.exit(2)
-
-print('send success!')
-sys.exit(0)
diff --git a/tests/stp.at b/tests/stp.at
deleted file mode 100644
index 7ddacfc3a..000000000
--- a/tests/stp.at
+++ /dev/null
@@ -1,662 +0,0 @@
-AT_BANNER([Spanning Tree Protocol unit tests])
-
-AT_SETUP([STP example from IEEE 802.1D-1998])
-AT_KEYWORDS([STP])
-AT_DATA([test-stp-ieee802.1d-1998],
-[bridge 0 0x42 = a b
-bridge 1 0x97 = c:5 a d:5
-bridge 2 0x45 = b e
-bridge 3 0x57 = b:5 e:5
-bridge 4 0x83 = a:5 e:5
-run 1000
-check 0 = root
-check 1 = F F:10 F
-check 2 = F:10 B
-check 3 = F:5 F
-check 4 = F:5 B
-])
-AT_CHECK([ovstest test-stp test-stp-ieee802.1d-1998], [0], [], [dnl
-stp|INFO|stp42: detected topology change.
-stp|INFO|stp42: detected topology change.
-stp|INFO|stp97: detected topology change.
-stp|INFO|stp97: detected topology change.
-stp|INFO|stp97: detected topology change.
-])
-AT_CLEANUP
-
-AT_SETUP([STP example from IEEE 802.1D-2004 figures 17.4 and 17.5])
-AT_KEYWORDS([STP])
-AT_DATA([test-stp-ieee802.1d-2004-fig17.4],
-[bridge 0 0x111 = a b e c
-bridge 1 0x222 = a b d f
-bridge 2 0x333 = c d l j h g
-bridge 3 0x444 = e f n m k i
-bridge 4 0x555 = g i 0 0
-bridge 5 0x666 = h k 0 0
-bridge 6 0x777 = j m 0 0
-bridge 7 0x888 = l n 0 0
-run 1000
-check 0 = root
-check 1 = F:10 B F F
-check 2 = F:10 B F F F F
-check 3 = F:10 B F F F F
-check 4 = F:20 B F F
-check 5 = F:20 B F F
-check 6 = F:20 B F F
-check 7 = F:20 B F F
-
-# Now connect two ports of bridge 7 to the same LAN.
-bridge 7 = l n o o
-# Same results except for bridge 7:
-run 1000
-check 0 = root
-check 1 = F:10 B F F
-check 2 = F:10 B F F F F
-check 3 = F:10 B F F F F
-check 4 = F:20 B F F
-check 5 = F:20 B F F
-check 6 = F:20 B F F
-check 7 = F:20 B F B
-])
-AT_CHECK([ovstest test-stp test-stp-ieee802.1d-2004-fig17.4], [0], [], [dnl
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp222: detected topology change.
-])
-AT_CLEANUP
-
-AT_SETUP([STP example from IEEE 802.1D-2004 figure 17.6])
-AT_KEYWORDS([STP])
-AT_DATA([test-stp-ieee802.1d-2004-fig17.6],
-[bridge 0 0x111 = a b l
-bridge 1 0x222 = b c d
-bridge 2 0x333 = d e f
-bridge 3 0x444 = f g h
-bridge 4 0x555 = j h i
-bridge 5 0x666 = l j k
-run 1000
-check 0 = root
-check 1 = F:10 F F
-check 2 = F:20 F F
-check 3 = F:30 F B
-check 4 = F:20 F F
-check 5 = F:10 F F
-])
-AT_CHECK([ovstest test-stp test-stp-ieee802.1d-2004-fig17.6], [0], [], [dnl
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp222: detected topology change.
-stp|INFO|stp222: detected topology change.
-])
-AT_CLEANUP
-
-AT_SETUP([STP example from IEEE 802.1D-2004 figure 17.7])
-AT_KEYWORDS([STP])
-AT_DATA([test-stp-ieee802.1d-2004-fig17.7],
-[bridge 0 0xaa = b
-bridge 1 0x111 = a b d f h g e c
-bridge 2 0x222 = g h j l n m k i
-run 1000
-check 0 = root
-check 1 = F F:10 F F F F F F
-check 2 = B F:20 F F F F F F
-
-# This is not the port priority change described in that figure,
-# but I don't understand what port priority change would cause
-# that change.
-bridge 2 = g X j l n m k i
-run 1000
-check 0 = root
-check 1 = F F:10 F F F F F F
-check 2 = F:20 D F F F F F F
-])
-AT_CHECK([ovstest test-stp test-stp-ieee802.1d-2004-fig17.7], [0], [], [dnl
-stp|INFO|stpaa: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-])
-AT_CLEANUP
-
-AT_SETUP([STP.io.1.1: Link Failure])
-AT_KEYWORDS([STP])
-AT_DATA([test-stp-iol-io-1.1],
-[# This test file approximates the following test from "Bridge
-# Functions Consortium Spanning Tree Interoperability Test Suite
-# Version 1.5":
-#
-# STP.io.1.1: Link Failure
-bridge 0 0x111 = a b c
-bridge 1 0x222 = a b c
-run 1000
-check 0 = root
-check 1 = F:10 B B
-bridge 1 = 0 _ _
-run 1000
-check 0 = root
-check 1 = F F:10 B
-bridge 1 = X _ _
-run 1000
-check 0 = root
-check 1 = D F:10 B
-bridge 1 = _ 0 _
-run 1000
-check 0 = root
-check 1 = D F F:10
-bridge 1 = _ X _
-run 1000
-check 0 = root
-check 1 = D D F:10
-])
-AT_CHECK([ovstest test-stp test-stp-iol-io-1.1], [0], [], [dnl
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp222: detected topology change.
-stp|INFO|stp111: detected topology change.
-])
-AT_CLEANUP
-
-AT_SETUP([STP.io.1.2: Repeated Network])
-AT_KEYWORDS([STP])
-AT_DATA([test-stp-iol-io-1.2],
-[# This test file approximates the following test from "Bridge
-# Functions Consortium Spanning Tree Interoperability Test Suite
-# Version 1.5":
-# STP.io.1.2: Repeated Network
-bridge 0 0x111 = a a
-bridge 1 0x222 = a a
-run 1000
-check 0 = rootid:0x111 F B
-check 1 = rootid:0x111 F:10 B
-bridge 1 = a^0x90 _
-run 1000
-check 0 = rootid:0x111 F B
-check 1 = rootid:0x111 B F:10
-])
-AT_CHECK([ovstest test-stp test-stp-iol-io-1.2], [0], [], [dnl
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp222: detected topology change.
-stp|INFO|stp111: detected topology change.
-])
-AT_CLEANUP
-
-AT_SETUP([STP.io.1.4: Network Initialization])
-AT_KEYWORDS([STP])
-AT_DATA([test-stp-iol-io-1.4],
-[# This test file approximates the following test from "Bridge
-# Functions Consortium Spanning Tree Interoperability Test Suite
-# Version 1.5":
-# STP.io.1.4: Network Initialization
-bridge 0 0x111 = a b c
-bridge 1 0x222 = b d e
-bridge 2 0x333 = a d f
-bridge 3 0x444 = c e f
-run 1000
-check 0 = root
-check 1 = F:10 F F
-check 2 = F:10 B F
-check 3 = F:10 B B
-])
-AT_CHECK([ovstest test-stp test-stp-iol-io-1.4], [0], [], [dnl
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp222: detected topology change.
-stp|INFO|stp222: detected topology change.
-])
-AT_CLEANUP
-
-AT_SETUP([STP.io.1.5: Topology Change])
-AT_KEYWORDS([STP])
-AT_DATA([test-stp-iol-io-1.5],
-[# This test file approximates the following test from "Bridge
-# Functions Consortium Spanning Tree Interoperability Test Suite
-# Version 1.5":
-# STP.io.1.5: Topology Change
-bridge 0 0x111 = a b d c
-bridge 1 0x222 = a b f e
-bridge 2 0x333 = c d g h
-bridge 3 0x444 = e f g h
-run 1000
-check 0 = root
-check 1 = F:10 B F F
-check 2 = B F:10 F F
-check 3 = B F:20 B B
-bridge 1^0x7000
-run 1000
-check 0 = F:10 B F F
-check 1 = root
-check 2 = B F:20 B B
-check 3 = B F:10 F F
-bridge 2^0x6000
-run 1000
-check 0 = F F B F:10
-check 1 = F:20 B B B
-check 2 = root
-check 3 = F F F:10 B
-bridge 3^0x5000
-run 1000
-check 0 = B B B F:20
-check 1 = F F B F:10
-check 2 = F F F:10 B
-check 3 = root
-bridge 0^0x4000
-bridge 1^0x4001
-bridge 2^0x4002
-bridge 3^0x4003
-run 1000
-check 0 = root
-check 1 = F:10 B F F
-check 2 = B F:10 F F
-check 3 = B F:20 B B
-])
-AT_CHECK([ovstest test-stp test-stp-iol-io-1.5], [0], [], [dnl
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp222: detected topology change.
-])
-AT_CLEANUP
-
-AT_SETUP([STP.op.1.1 and STP.op.1.2])
-AT_KEYWORDS([STP])
-AT_DATA([test-stp-iol-op-1.1],
-[# This test file approximates the following tests from "Bridge
-# Functions Consortium Spanning Tree Protocol Operations Test Suite
-# Version 2.3":
-# Test STP.op.1.1: Root ID Initialized to Bridge ID
-# Test STP.op.1.2: Root Path Cost Initialized to Zero
-bridge 0 0x123 =
-check 0 = root
-])
-AT_CHECK([ovstest test-stp test-stp-iol-op-1.1])
-AT_CLEANUP
-
-AT_SETUP([STP.op.1.4: All Ports Initialized to Designated Ports])
-AT_KEYWORDS([STP])
-AT_DATA([test-stp-iol-op-1.4],
-[# This test file approximates the following test from "Bridge
-# Functions Consortium Spanning Tree Protocol Operations Test Suite
-# Version 2.3":
-# Test STP.op.1.4: All Ports Initialized to Designated Ports
-bridge 0 0x123 = a b c d e f
-check 0 = Li Li Li Li Li Li
-run 1000
-check 0 = F F F F F F
-])
-AT_CHECK([ovstest test-stp test-stp-iol-op-1.4], [0], [], [dnl
-stp|INFO|stp123: detected topology change.
-stp|INFO|stp123: detected topology change.
-stp|INFO|stp123: detected topology change.
-stp|INFO|stp123: detected topology change.
-stp|INFO|stp123: detected topology change.
-])
-AT_CLEANUP
-
-AT_SETUP([STP.op.3.1: Root Bridge Selection: Root ID Values])
-AT_KEYWORDS([STP])
-AT_DATA([test-stp-iol-op-3.1],
-[# This test file approximates the following test from "Bridge
-# Functions Consortium Spanning Tree Protocol Operations Test Suite
-# Version 2.3":
-# Test STP.op.3.1: Root Bridge Selection: Root ID Values
-bridge 0 0x111 = a
-bridge 1 0x222 = a
-check 0 = rootid:0x111 Li
-check 1 = rootid:0x222 Li
-run 1000
-check 0 = rootid:0x111 root
-check 1 = rootid:0x111 F:10
-])
-AT_CHECK([ovstest test-stp test-stp-iol-op-3.1], [0], [], [dnl
-stp|INFO|stp111: detected topology change.
-])
-AT_CLEANUP
-
-AT_SETUP([STP.op.3.3: Root Bridge Selection: Bridge ID Values])
-AT_KEYWORDS([STP])
-AT_DATA([test-stp-iol-op-3.3],
-[# This test file approximates the following test from "Bridge
-# Functions Consortium Spanning Tree Protocol Operations Test Suite
-# Version 2.3":
-# Test STP.op.3.3: Root Bridge Selection: Bridge ID Values
-bridge 0 0x333^0x6000 = a
-bridge 1 0x222^0x7000 = b
-bridge 2 0x111 = a b
-run 1000
-check 0 = rootid:0x333^0x6000 root
-check 1 = rootid:0x333^0x6000 F:20
-check 2 = rootid:0x333^0x6000 F:10 F
-])
-AT_CHECK([ovstest test-stp test-stp-iol-op-3.3], [0], [], [dnl
-stp|INFO|stp333: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp333: detected topology change.
-])
-AT_CLEANUP
-
-AT_SETUP([STP.op.3.3: Root Bridge Selection: Bridge ID Values])
-AT_KEYWORDS([STP])
-AT_DATA([test-stp-iol-op-3.4],
-[# This test file approximates the following test from "Bridge
-# Functions Consortium Spanning Tree Protocol Operations Test Suite
-# Version 2.3":
-# Test STP.op.3.3: Root Bridge Selection: Bridge ID Values
-bridge 0 0x333^0x6000 = a
-bridge 1 0x222^0x7000 = b
-bridge 2 0x111 = a b
-run 1000
-check 0 = rootid:0x333^0x6000 root
-check 1 = rootid:0x333^0x6000 F:20
-check 2 = rootid:0x333^0x6000 F:10 F
-])
-AT_CHECK([ovstest test-stp test-stp-iol-op-3.4], [0], [], [dnl
-stp|INFO|stp333: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp111: detected topology change.
-stp|INFO|stp333: detected topology change.
-])
-AT_CLEANUP
-
-# Strips out uninteresting parts of flow output, as well as parts
-# that vary from one run to another (e.g., timing and bond actions).
-m4_define([STRIP_USED], [[sed '
-    s/used:[0-9]*\.[0-9]*/used:0.0/
-    s/duration=[0-9.]*s*/duration=Xs/
-    s/idle_age=[0-9]*,/idle_age=X,/
-']])
-m4_define([FILTER_STP_TOPOLOGY], [[
-grep 'STP state change' | sed '
-    s/.*ofproto_dpif|.*|port .*:/port <>:/
-']])
-
-m4_define([FILTER_STP_TOPOLOGY_LISTENING], [[
-grep 'disabled to listening' | sed '
-  s/.*ofproto_dpif|.*|port .*:/port <>:/
-']])
-
-m4_define([FILTER_STP_TOPOLOGY_FORWARDING], [[
-grep 'learning to forwarding' | sed '
-  s/.*ofproto_dpif|.*|port .*:/port <>:/
-']])
-
-AT_SETUP([STP - dummy interface])
-# Create br0 with interfaces p1 and p7
-#    and br1 with interfaces p2 and p8
-# with p1 and p2 connected via unix domain socket
-OVS_VSWITCHD_START(
-  [set port br0 other_config:stp-enable=false -- \
-   set bridge br0 stp_enable=true -- \
-   add-br br1 -- \
-   set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
-   set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
-                  fail-mode=secure -- \
-   set port br1 other_config:stp-enable=false -- \
-   set bridge br1 stp_enable=true --])
-
-AT_CHECK([ovs-appctl vlog/set ofproto_dpif:dbg])
-
-AT_CHECK([ovs-vsctl add-port br0 p1 -- \
-   set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p0.sock ofport_request=1 -- \
-   set port p1 other_config:stp-enable=true -- \
-])
-AT_CHECK([ovs-vsctl add-port br0 p7 -- \
-   set interface p7 ofport_request=7 type=dummy -- \
-   set port p7 other_config:stp-enable=false -- \
-])
-AT_CHECK([ovs-vsctl add-port br1 p2 -- \
-   set interface p2 type=dummy options:stream=unix:$OVS_RUNDIR/p0.sock ofport_request=2 -- \
-   set port p2 other_config:stp-enable=true -- \
-])
-AT_CHECK([ovs-vsctl add-port br1 p8 -- \
-   set interface p8 ofport_request=8 type=dummy -- \
-   set port p8 other_config:stp-enable=false -- \
-])
-
-ovs-appctl netdev-dummy/set-admin-state up
-ovs-appctl time/stop
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=7 icmp actions=1"])
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=1 icmp actions=7"])
-AT_CHECK([ovs-ofctl add-flow br1 "in_port=8 icmp actions=2"])
-AT_CHECK([ovs-ofctl add-flow br1 "in_port=2 icmp actions=8"])
-
-# give time for STP to move initially
-ovs-appctl time/warp 6000 3000
-
-AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY_LISTENING], [0], [dnl
-port <>: STP state changed from disabled to listening
-port <>: STP state changed from disabled to listening
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' | grep STP], [0], [dnl
-     >> STP not in forwarding state, skipping output
-])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(8),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' | grep STP], [0], [dnl
-     >> STP not in forwarding state, skipping output
-])
-
-# give time for STP to synchronize
-ovs-appctl time/warp 30000 3000
-
-AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY], [0], [dnl
-port <>: STP state changed from disabled to listening
-port <>: STP state changed from disabled to listening
-port <>: STP state changed from listening to learning
-port <>: STP state changed from listening to learning
-port <>: STP state changed from learning to forwarding
-port <>: STP state changed from learning to forwarding
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' | grep Datapath], [0], [dnl
-Datapath actions: 1
-])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(8),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' | grep Datapath], [0], [dnl
-Datapath actions: 2
-])
-
-AT_CLEANUP
-
-AT_SETUP([STP - flush the fdb and mdb when topology changed])
-OVS_VSWITCHD_START([])
-
-# setting as below, the br0 will be root bridge and p5 will be blocked.
-AT_CHECK([
-    ovs-vsctl -- \
-    set port br0 other_config:stp-enable=false -- \
-    set bridge br0 datapath-type=dummy -- \
-    set bridge br0 stp_enable=true mcast_snooping_enable=true \
-    other-config:hwaddr=aa:66:aa:66:00:00 -- \
-    add-br br1 -- \
-    set port br1 other_config:stp-enable=false -- \
-    set bridge br1 datapath-type=dummy -- \
-    set bridge br1 stp_enable=true mcast_snooping_enable=true \
-    other-config:hwaddr=aa:66:aa:66:00:01 -- \
-    add-br br2 -- \
-    set port br2 other_config:stp-enable=false -- \
-    set bridge br2 datapath-type=dummy -- \
-    set bridge br2 stp_enable=true mcast_snooping_enable=true \
-    other-config:hwaddr=aa:66:aa:66:00:02
-], [0])
-
-AT_CHECK([ovs-appctl vlog/set ofproto_dpif:dbg])
-AT_CHECK([ovs-appctl vlog/set ofproto_dpif_xlate:dbg])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-AT_CHECK([ovs-ofctl add-flow br1 action=normal])
-AT_CHECK([ovs-ofctl add-flow br2 action=normal])
-
-AT_CHECK([
-    ovs-vsctl add-port br0 p1 -- \
-        set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1
-    ovs-vsctl add-port br0 p2 -- \
-        set interface p2 type=dummy options:stream=unix:$OVS_RUNDIR/p6.sock ofport_request=2
-    ovs-vsctl add-port br1 p3 -- \
-        set interface p3 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=3
-    ovs-vsctl add-port br1 p4 -- \
-        set interface p4 type=dummy options:pstream=punix:$OVS_RUNDIR/p4.sock ofport_request=4
-    ovs-vsctl add-port br2 p5 -- \
-        set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p4.sock ofport_request=5
-    ovs-vsctl add-port br2 p6 -- \
-        set interface p6 type=dummy options:pstream=punix:$OVS_RUNDIR/p6.sock ofport_request=6
-], [0])
-
-ovs-appctl netdev-dummy/set-admin-state up
-ovs-appctl time/stop
-
-# give time for STP to move initially
-ovs-appctl time/warp 6000 3000
-
-AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY_LISTENING], [0], [dnl
-port <>: STP state changed from disabled to listening
-port <>: STP state changed from disabled to listening
-port <>: STP state changed from disabled to listening
-port <>: STP state changed from disabled to listening
-port <>: STP state changed from disabled to listening
-port <>: STP state changed from disabled to listening
-])
-
-# give time for STP to synchronize
-ovs-appctl time/warp 30000 3000
-
-AT_CHECK([cat ovs-vswitchd.log | FILTER_STP_TOPOLOGY_FORWARDING], [0], [dnl
-port <>: STP state changed from learning to forwarding
-port <>: STP state changed from learning to forwarding
-port <>: STP state changed from learning to forwarding
-port <>: STP state changed from learning to forwarding
-port <>: STP state changed from learning to forwarding
-])
-
-# When topology is changed or the root brdige receives the TCN BPDU, the
-# root bridge will start the topology change timer. We should wait the
-# topology change timer to stop after 35s (max age 20 + forward delay 15).
-# After 35s, the root bridge will stop send CONF BPDU with
-# STP_CONFIG_TOPOLOGY_CHANGE flag and the topology will be stable. More
-# importantly, we should make time warp (in a second) because the hold timer
-# of stp ports will stop after 1s. So the root bridge can send quickly
-# topology change ack (other bridges may send TCN BPDU to root bridge) for
-# avoiding root brdige to flush fdb and mdb frequently.
-ovs-appctl time/warp 36000 1000
-
-# root bridge sends query packet
-# we don't want to lose that message, so send it twice
-AT_CHECK([ovs-appctl netdev-dummy/receive br0 \
-        '01005E010101000C29A027D18100000108004500001C000100004002CBCBAC102201E00101011114EEEB00000000'])
-
-ovs-appctl time/warp 1000
-AT_CHECK([ovs-appctl netdev-dummy/receive br0 \
-        '01005E010101000C29A027D18100000108004500001C000100004002CBCBAC102201E00101011114EEEB00000000'])
-
-OVS_WAIT_UNTIL([ovs-appctl fdb/show br0 | grep '00:0c:29:a0:27:d1'])
-OVS_WAIT_UNTIL([ovs-appctl fdb/show br1 | grep '00:0c:29:a0:27:d1'])
-OVS_WAIT_UNTIL([ovs-appctl fdb/show br2 | grep '00:0c:29:a0:27:d1'])
-
-OVS_WAIT_UNTIL([ovs-appctl mdb/show br0 | grep 'querier'])
-OVS_WAIT_UNTIL([ovs-appctl mdb/show br1 | grep 'querier'])
-OVS_WAIT_UNTIL([ovs-appctl mdb/show br2 | grep 'querier'])
-
-# Make sure that  validation of flows was before changing of topology.
-ovs-appctl revalidator/wait
-
-# del p2 on the br0, the topology will be changed
-AT_CHECK([ovs-vsctl del-port br0 p2])
-
-# give time for STP to synchronize
-ovs-appctl time/warp 36000 3000
-
-# check fdb and mdb
-AT_CHECK([ovs-appctl fdb/show br0], [0], [dnl
- port  VLAN  MAC                Age
-])
-AT_CHECK([ovs-appctl fdb/show br1], [0], [dnl
- port  VLAN  MAC                Age
-])
-AT_CHECK([ovs-appctl fdb/show br2], [0], [dnl
- port  VLAN  MAC                Age
-])
-
-AT_CHECK([ovs-appctl mdb/show br0], [0], [dnl
- port  VLAN  GROUP                Age
-])
-AT_CHECK([ovs-appctl mdb/show br1], [0], [dnl
- port  VLAN  GROUP                Age
-])
-AT_CHECK([ovs-appctl mdb/show br2], [0], [dnl
- port  VLAN  GROUP                Age
-])
-
-AT_CLEANUP
-
-AT_SETUP([STP - check link-state when stp is running])
-OVS_VSWITCHD_START([])
-
-AT_CHECK([
-    ovs-vsctl -- \
-    set port br0 other_config:stp-enable=false -- \
-    set bridge br0 datapath-type=dummy stp_enable=true \
-    other-config:hwaddr=aa:66:aa:66:00:00
-], [0])
-
-AT_CHECK([
-    ovs-vsctl add-port br0 p1 -- \
-        set interface p1 type=dummy -- \
-        set port p1 other_config:stp-port-num=1
-    ovs-vsctl add-port br0 p2 -- \
-        set interface p2 type=dummy -- \
-        set port p2 other_config:stp-port-num=2
-], [0])
-
-ovs-appctl netdev-dummy/set-admin-state up
-ovs-appctl time/stop
-
-# give time for STP to move initially
-ovs-appctl time/warp 31000 1000
-
-AT_CHECK([ovs-appctl stp/show br0 | grep p1], [0], [dnl
-  p1         designated forwarding 19    128.1
-])
-AT_CHECK([ovs-appctl stp/show br0 | grep p2], [0], [dnl
-  p2         designated forwarding 19    128.2
-])
-
-# add a stp port
-AT_CHECK([
-    ovs-vsctl add-port br0 p3 -- \
-        set interface p3 type=dummy -- \
-        set port p3 other_config:stp-port-num=3
-], [0])
-
-ovs-appctl netdev-dummy/set-admin-state p3 down
-
-# We should not show the p3 because its link-state is down
-AT_CHECK([ovs-appctl stp/show br0 | grep p1], [0], [dnl
-  p1         designated forwarding 19    128.1
-])
-AT_CHECK([ovs-appctl stp/show br0 | grep p2], [0], [dnl
-  p2         designated forwarding 19    128.2
-])
-AT_CHECK([ovs-appctl stp/show br0 | grep p3], [1], [dnl
-])
-
-ovs-appctl netdev-dummy/set-admin-state p3 up
-
-AT_CHECK([ovs-appctl stp/show br0 | grep p1], [0], [dnl
-  p1         designated forwarding 19    128.1
-])
-AT_CHECK([ovs-appctl stp/show br0 | grep p2], [0], [dnl
-  p2         designated forwarding 19    128.2
-])
-AT_CHECK([ovs-appctl stp/show br0 | grep p3], [0], [dnl
-  p3         designated listening  19    128.3
-])
-
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/system-dpdk-macros.at b/tests/system-dpdk-macros.at
deleted file mode 100644
index c6708caaf..000000000
--- a/tests/system-dpdk-macros.at
+++ /dev/null
@@ -1,65 +0,0 @@
-# OVS_DPDK_PRE_CHECK()
-#
-# Check prerequisites for DPDK tests. Following settings are checked:
-#  - Hugepages
-#
-m4_define([OVS_DPDK_PRE_CHECK],
-  [dnl Check Hugepages
-   AT_CHECK([cat /proc/meminfo], [], [stdout])
-   AT_SKIP_IF([egrep 'HugePages_Free: *0' stdout], [], [stdout])
-   AT_CHECK([mount], [], [stdout])
-   AT_CHECK([grep 'hugetlbfs' stdout], [], [stdout], [])
-
-])
-
-
-# OVS_DPDK_PRE_PHY_SKIP()
-#
-# Skip any phy related tests if the PHY variable is not set.
-# This is done by checking for a bound driver.
-#
-m4_define([OVS_DPDK_PRE_PHY_SKIP],
-  [dnl Perform the precheck
-   OVS_DPDK_PRE_CHECK()
-
-   dnl Check if VFIO or UIO driver is loaded
-   AT_SKIP_IF([ ! (lsmod | grep -E "igb_uio|vfio") ], [], [stdout])
-
-   dnl Find PCI address candidate, skip if there is no DPDK-compatible NIC
-   AT_CHECK([$DPDK_DIR/usertools/dpdk-devbind.py -s | head -n +4 | tail -1], [], [stdout])
-   AT_CHECK([cat stdout | cut -d" " -s -f1 > PCI_ADDR])
-   AT_SKIP_IF([ ! test -s PCI_ADDR ])
-
-])
-
-
-# OVS_DPDK_START()
-#
-# Create an empty database and start ovsdb-server. Add special configuration
-# dpdk-init to enable DPDK functionality. Start ovs-vswitchd connected to that
-# database using system devices (no dummies).
-#
-m4_define([OVS_DPDK_START],
-  [dnl Create database.
-   AT_CHECK([touch .conf.db.~lock~])
-   AT_CHECK([ovsdb-tool create conf.db $abs_top_srcdir/vswitchd/vswitch.ovsschema])
-
-   dnl Start ovsdb-server.
-   AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --log-file --remote=punix:$OVS_RUNDIR/db.sock], [0], [stdout], [stderr])
-   on_exit "kill `cat ovsdb-server.pid`"
-   AT_CHECK([[sed < stderr '
-/vlog|INFO|opened log file/d
-/ovsdb_server|INFO|ovsdb-server (Open vSwitch)/d']])
-   AT_CAPTURE_FILE([ovsdb-server.log])
-
-   dnl Initialize database.
-   AT_CHECK([ovs-vsctl --no-wait init])
-
-   dnl Enable DPDK functionality
-   AT_CHECK([ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true])
-
-   dnl Start ovs-vswitchd.
-   AT_CHECK([ovs-vswitchd --detach --no-chdir --pidfile --log-file -vvconn -vofproto_dpif -vunixctl], [0], [stdout], [stderr])
-   AT_CAPTURE_FILE([ovs-vswitchd.log])
-   on_exit "kill_ovs_vswitchd `cat ovs-vswitchd.pid`"
-])
diff --git a/tests/system-dpdk-testsuite.at b/tests/system-dpdk-testsuite.at
deleted file mode 100644
index 382f09e9f..000000000
--- a/tests/system-dpdk-testsuite.at
+++ /dev/null
@@ -1,25 +0,0 @@
-AT_INIT
-
-AT_COPYRIGHT([Copyright (c) 2017 Intel Corporation
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at:
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.])
-
-m4_ifdef([AT_COLOR_TESTS], [AT_COLOR_TESTS])
-
-m4_include([tests/ovs-macros.at])
-m4_include([tests/ovsdb-macros.at])
-m4_include([tests/ofproto-macros.at])
-m4_include([tests/system-common-macros.at])
-m4_include([tests/system-dpdk-macros.at])
-
-m4_include([tests/system-dpdk.at])
diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at
deleted file mode 100644
index 1da020aba..000000000
--- a/tests/system-dpdk.at
+++ /dev/null
@@ -1,234 +0,0 @@
-m4_define([CONFIGURE_VETH_OFFLOADS],
-   [AT_CHECK([ethtool -K $1 tx off], [0], [ignore], [ignore])])
-
-AT_BANNER([OVS-DPDK unit tests])
-
-dnl --------------------------------------------------------------------------
-dnl Check if EAL init is successful
-AT_SETUP([OVS-DPDK datapath - EAL init])
-AT_KEYWORDS([dpdk])
-OVS_DPDK_PRE_CHECK()
-OVS_DPDK_START()
-AT_CHECK([grep "DPDK Enabled - initializing..." ovs-vswitchd.log], [], [stdout])
-AT_CHECK([grep "EAL" ovs-vswitchd.log], [], [stdout])
-AT_CHECK([grep "DPDK Enabled - initialized" ovs-vswitchd.log], [], [stdout])
-OVS_VSWITCHD_STOP(["/Global register is changed during/d
-/EAL:   Invalid NUMA socket, default to 0/d
-/EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !/d
-/EAL: No free hugepages reported in hugepages-1048576kB/d"])
-AT_CLEANUP
-dnl --------------------------------------------------------------------------
-
-
-
-dnl --------------------------------------------------------------------------
-dnl Add standard DPDK PHY port
-AT_SETUP([OVS-DPDK datapath - add standard DPDK port])
-AT_KEYWORDS([dpdk])
-
-OVS_DPDK_PRE_PHY_SKIP()
-OVS_DPDK_START()
-
-dnl Add userspace bridge and attach it to OVS
-AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev])
-AT_CHECK([ovs-vsctl add-port br10 phy0 -- set Interface phy0 type=dpdk options:dpdk-devargs=$(cat PCI_ADDR)], [], [stdout], [stderr])
-AT_CHECK([ovs-vsctl show], [], [stdout])
-sleep 2
-
-dnl Clean up
-AT_CHECK([ovs-vsctl del-port br10 phy0], [], [stdout], [stderr])
-OVS_VSWITCHD_STOP("/does not exist. The Open vSwitch kernel module is probably not loaded./d
-/Failed to enable flow control/d
-/Global register is changed during/d
-/EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !/d
-/EAL: No free hugepages reported in hugepages-1048576kB/d
-")
-AT_CLEANUP
-dnl --------------------------------------------------------------------------
-
-
-
-dnl --------------------------------------------------------------------------
-dnl Add vhost-user-client port
-AT_SETUP([OVS-DPDK datapath - add vhost-user-client port])
-AT_KEYWORDS([dpdk])
-OVS_DPDK_PRE_CHECK()
-OVS_DPDK_START()
-
-dnl Add userspace bridge and attach it to OVS
-AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev])
-AT_CHECK([ovs-vsctl add-port br10 dpdkvhostuserclient0 -- set Interface dpdkvhostuserclient0 type=dpdkvhostuserclient options:vhost-server-path=$OVS_RUNDIR/dpdkvhostclient0], [], [stdout], [stderr])
-AT_CHECK([ovs-vsctl show], [], [stdout])
-sleep 2
-
-dnl Parse log file
-AT_CHECK([grep "VHOST_CONFIG: vhost-user client: socket created" ovs-vswitchd.log], [], [stdout])
-AT_CHECK([grep "vHost User device 'dpdkvhostuserclient0' created in 'client' mode, using client socket" ovs-vswitchd.log], [], [stdout])
-AT_CHECK([grep "VHOST_CONFIG: $OVS_RUNDIR/dpdkvhostclient0: reconnecting..." ovs-vswitchd.log], [], [stdout])
-
-dnl Clean up
-AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
-OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded. at d
-\@Failed to enable flow control at d
-\@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/dpdkvhostclient0: No such file or directory at d
-\@Global register is changed during at d
-\@EAL:   Invalid NUMA socket, default to 0 at d
-\@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d
-\@EAL: No free hugepages reported in hugepages-1048576kB at d"])
-AT_CLEANUP
-dnl --------------------------------------------------------------------------
-
-
-
-dnl --------------------------------------------------------------------------
-dnl Ping vhost-user port
-AT_SETUP([OVS-DPDK datapath - ping vhost-user ports])
-AT_KEYWORDS([dpdk])
-OVS_DPDK_PRE_CHECK()
-AT_SKIP_IF([! which testpmd >/dev/null 2>/dev/null])
-OVS_DPDK_START()
-
-dnl Find number of sockets
-AT_CHECK([lscpu], [], [stdout])
-AT_CHECK([cat stdout | grep "NUMA node(s)" | awk '{c=1; while (c++<$(3)) {printf "512,"}; print "512"}' > NUMA_NODE])
-
-dnl Add userspace bridge and attach it to OVS
-AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev])
-AT_CHECK([ovs-vsctl add-port br10 dpdkvhostuser0 -- set Interface dpdkvhostuser0 \
-          type=dpdkvhostuser], [],
-         [stdout], [stderr])
-AT_CHECK([ovs-vsctl show], [], [stdout])
-
-dnl Parse log file
-AT_CHECK([grep "VHOST_CONFIG: vhost-user server: socket created" \
-          ovs-vswitchd.log], [], [stdout])
-AT_CHECK([grep "Socket $OVS_RUNDIR/dpdkvhostuser0 created for vhost-user port dpdkvhostuser0" \
-          ovs-vswitchd.log], [], [stdout])
-AT_CHECK([grep "VHOST_CONFIG: bind to $OVS_RUNDIR/dpdkvhostuser0" ovs-vswitchd.log], [],
-         [stdout])
-
-dnl Set up namespaces
-ADD_NAMESPACES(ns1, ns2)
-
-dnl Add veth device
-ADD_VETH(tap1, ns2, br10, "172.31.110.12/24")
-
-dnl Execute testpmd in background
-on_exit "pkill -f -x -9 'tail -f /dev/null'"
-tail -f /dev/null | testpmd --socket-mem="$(cat NUMA_NODE)" --no-pci\
-           --vdev="net_virtio_user,path=$OVS_RUNDIR/dpdkvhostuser0" \
-           --vdev="net_tap0,iface=tap0" --file-prefix page0 \
-           --single-file-segments -- -a >$OVS_RUNDIR/testpmd-dpdkvhostuser0.log 2>&1 &
-
-dnl Give settling time to the testpmd processes - NOTE: this is bad form.
-sleep 10
-
-dnl Move the tap devices to the namespaces
-AT_CHECK([ps aux | grep testpmd], [], [stdout], [stderr])
-AT_CHECK([ip link show], [], [stdout], [stderr])
-AT_CHECK([ip link set tap0 netns ns1], [], [stdout], [stderr])
-
-AT_CHECK([ip netns exec ns1 ip link show], [], [stdout], [stderr])
-AT_CHECK([ip netns exec ns1 ip link show | grep tap0], [], [stdout], [stderr])
-AT_CHECK([ip netns exec ns1 ip link set tap0 up], [], [stdout], [stderr])
-AT_CHECK([ip netns exec ns1 ip addr add 172.31.110.11/24 dev tap0], [],
-         [stdout], [stderr])
-
-AT_CHECK([ip netns exec ns1 ip link show], [], [stdout], [stderr])
-AT_CHECK([ip netns exec ns2 ip link show], [], [stdout], [stderr])
-AT_CHECK([ip netns exec ns1 ping -c 4 -I tap0 172.31.110.12], [], [stdout],
-         [stderr])
-
-dnl Clean up the testpmd now
-pkill -f -x -9 'tail -f /dev/null'
-
-dnl Clean up
-AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuser0], [], [stdout], [stderr])
-OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded. at d
-\@Failed to enable flow control at d
-\@VHOST_CONFIG: recvmsg failed at d
-\@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/dpdkvhostuser0: No such file or directory at d
-\@Global register is changed during at d
-\@dpdkvhostuser ports are considered deprecated;  please migrate to dpdkvhostuserclient ports. at d
-\@failed to enumerate system datapaths: No such file or directory at d
-\@EAL:   Invalid NUMA socket, default to 0 at d
-\@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d
-\@EAL: No free hugepages reported in hugepages-1048576kB at d"])
-AT_CLEANUP
-dnl --------------------------------------------------------------------------
-
-dnl --------------------------------------------------------------------------
-dnl Ping vhost-user-client port
-AT_SETUP([OVS-DPDK datapath - ping vhost-user-client ports])
-AT_KEYWORDS([dpdk])
-OVS_DPDK_PRE_CHECK()
-AT_SKIP_IF([! which testpmd >/dev/null 2>/dev/null])
-OVS_DPDK_START()
-
-dnl Find number of sockets
-AT_CHECK([lscpu], [], [stdout])
-AT_CHECK([cat stdout | grep "NUMA node(s)" | awk '{c=1; while (c++<$(3)) {printf "512,"}; print "512"}' > NUMA_NODE])
-
-dnl Add userspace bridge and attach it to OVS
-AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev])
-AT_CHECK([ovs-vsctl add-port br10 dpdkvhostuserclient0 -- set Interface \
-          dpdkvhostuserclient0 \
-          type=dpdkvhostuserclient \
-          options:vhost-server-path=$OVS_RUNDIR/dpdkvhostclient0], [],
-         [stdout], [stderr])
-AT_CHECK([ovs-vsctl show], [], [stdout])
-
-dnl Parse log file
-AT_CHECK([grep "VHOST_CONFIG: vhost-user client: socket created" ovs-vswitchd.log], [], [stdout])
-AT_CHECK([grep "vHost User device 'dpdkvhostuserclient0' created in 'client' mode, using client socket" ovs-vswitchd.log], [], [stdout])
-AT_CHECK([grep "VHOST_CONFIG: $OVS_RUNDIR/dpdkvhostclient0: reconnecting..." ovs-vswitchd.log], [], [stdout])
-
-dnl Set up namespaces
-ADD_NAMESPACES(ns1, ns2)
-
-dnl Add veth device
-ADD_VETH(tap1, ns2, br10, "172.31.110.12/24")
-
-dnl Execute testpmd in background
-on_exit "pkill -f -x -9 'tail -f /dev/null'"
-tail -f /dev/null | testpmd --socket-mem="$(cat NUMA_NODE)" --no-pci\
-           --vdev="net_virtio_user,path=$OVS_RUNDIR/dpdkvhostclient0,server=1" \
-           --vdev="net_tap0,iface=tap0" --file-prefix page0 \
-           --single-file-segments -- -a >$OVS_RUNDIR/testpmd-dpdkvhostuserclient0.log 2>&1 &
-
-dnl Give settling time to the testpmd processes - NOTE: this is bad form.
-sleep 10
-
-dnl Move the tap devices to the namespaces
-AT_CHECK([ps aux | grep testpmd], [], [stdout], [stderr])
-AT_CHECK([ip link show], [], [stdout], [stderr])
-AT_CHECK([ip link set tap0 netns ns1], [], [stdout], [stderr])
-
-AT_CHECK([ip netns exec ns1 ip link show], [], [stdout], [stderr])
-AT_CHECK([ip netns exec ns1 ip link show | grep tap0], [], [stdout], [stderr])
-AT_CHECK([ip netns exec ns1 ip link set tap0 up], [], [stdout], [stderr])
-AT_CHECK([ip netns exec ns1 ip addr add 172.31.110.11/24 dev tap0], [],
-         [stdout], [stderr])
-
-AT_CHECK([ip netns exec ns1 ip link show], [], [stdout], [stderr])
-AT_CHECK([ip netns exec ns2 ip link show], [], [stdout], [stderr])
-AT_CHECK([ip netns exec ns1 ping -c 4 -I tap0 172.31.110.12], [], [stdout],
-         [stderr])
-
-dnl Clean up the testpmd now
-pkill -f -x -9 'tail -f /dev/null'
-
-dnl Clean up
-AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
-OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded. at d
-\@Failed to enable flow control at d
-\@VHOST_CONFIG: recvmsg failed at d
-\@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/dpdkvhostclient0: No such file or directory at d
-\@Global register is changed during at d
-\@dpdkvhostuser ports are considered deprecated;  please migrate to dpdkvhostuserclient ports. at d
-\@failed to enumerate system datapaths: No such file or directory at d
-\@EAL:   Invalid NUMA socket, default to 0 at d
-\@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d
-\@EAL: No free hugepages reported in hugepages-1048576kB at d"])
-AT_CLEANUP
-dnl --------------------------------------------------------------------------
diff --git a/tests/system-interface.at b/tests/system-interface.at
deleted file mode 100644
index 784bada12..000000000
--- a/tests/system-interface.at
+++ /dev/null
@@ -1,65 +0,0 @@
-AT_BANNER([system-inteface])
-
-dnl add a veth interface to br0, then delete and re-create
-dnl the veth interface with the same name in the system
-AT_SETUP([interface - add delete add same interface])
-
-OVS_TRAFFIC_VSWITCHD_START()
-
-AT_CHECK([ip link add ovs-veth0 type veth peer name ovs-veth1])
-on_exit 'ip link del ovs-veth0'
-
-AT_CHECK([ovs-vsctl add-port br0 ovs-veth0])
-
-AT_CHECK([ip link del ovs-veth0])
-AT_CHECK([ip link add ovs-veth0 type veth peer name ovs-veth1])
-
-AT_CHECK([ovs-vsctl del-port br0 ovs-veth0])
-
-OVS_TRAFFIC_VSWITCHD_STOP(["dnl
-/could not open network device ovs-veth0/d
-/cannot get .*STP status on nonexistent port/d
-/ethtool command .*on network device ovs-veth0 failed/d
-/error receiving .*ovs-veth0/d
-/ovs-veth0: removing policing failed/d"])
-
-AT_CLEANUP
-
-dnl add a p1-0 interface to br-p1, then add a route to br-p1 and stop the OvS
-dnl instance. Confirm br-p1 interface has been deleted from the system.
-AT_SETUP([interface - add route to br and verify clean-up])
-
-OVS_TRAFFIC_VSWITCHD_START()
-
-HWADDR_BRP1=aa:55:00:00:00:01
-
-dnl Create tap port to later add to br-p1
-AT_CHECK([ip tuntap add name p1-0 mode tap])
-AT_CHECK([ip link set p1-0 up])
-on_exit 'ip link del p1-0'
-
-AT_CHECK([
-    ovs-vsctl add-br br-p1 -- \
-        set bridge br-p1 datapath_type=netdev fail-mode=standalone other-config:hwaddr=$HWADDR_BRP1
-
-    ovs-vsctl add-port br-p1 p1-0
-
-    ovs-ofctl del-flows br-p1
-], [0])
-
-AT_CHECK([
-    ip addr add 10.0.0.1/24 dev br-p1
-    ip link set br-p1 up
-], [0], [stdout])
-
-AT_CHECK([
-    ovs-appctl ovs/route/add 10.0.0.0/24 br-p1
-    ovs-appctl tnl/arp/set br-p1 10.0.0.1 $HWADDR_BRP1
-], [0], [stdout])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CHECK([
-    ip link show br-p1], [1],
-    [stdout], [Device "br-p1" does not exist.]
-)
-AT_CLEANUP
diff --git a/tests/system-kmod-testsuite.at b/tests/system-kmod-testsuite.at
index bda314a08..6c8478093 100644
--- a/tests/system-kmod-testsuite.at
+++ b/tests/system-kmod-testsuite.at
@@ -22,7 +22,4 @@ m4_include([tests/ofproto-macros.at])
 m4_include([tests/system-common-macros.at])
 m4_include([tests/system-kmod-macros.at])
 
-m4_include([tests/system-traffic.at])
-m4_include([tests/system-layer3-tunnels.at])
 m4_include([tests/system-ovn.at])
-m4_include([tests/system-interface.at])
diff --git a/tests/system-layer3-tunnels.at b/tests/system-layer3-tunnels.at
deleted file mode 100644
index db64e231d..000000000
--- a/tests/system-layer3-tunnels.at
+++ /dev/null
@@ -1,99 +0,0 @@
-AT_BANNER([layer3-tunnels])
-
-AT_SETUP([layer3 - ping over VXLAN-GPE])
-OVS_TRAFFIC_VSWITCHD_START([set Bridge br0 other-config:hwaddr="00:12:34:56:78:bb"])
-OVS_CHECK_VXLAN_GPE()
-OVS_CHECK_IPROUTE_ENCAP()
-
-ADD_BR([br-underlay])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24")
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL([vxlan], [br0], [at_vxlan0], [172.31.1.1], [10.1.1.2/24],
-               [options:packet_type=legacy_l3 options:exts=gpe])
-AT_CHECK([ip neigh add 10.1.1.1 lladdr 00:12:34:56:78:aa dev br0])
-NS_CHECK_EXEC([at_ns0], [ip link add dev at_vxlan1 type vxlan dstport 4789 external gpe])
-NS_CHECK_EXEC([at_ns0], [ip addr add dev at_vxlan1 10.1.1.1/24])
-NS_CHECK_EXEC([at_ns0], [ip link set dev at_vxlan1 mtu 1450 up])
-NS_CHECK_EXEC([at_ns0], [ip route add 10.1.1.2/32 encap ip id 0 dst 172.31.1.100 dev at_vxlan1])
-
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-dnl Now add rules for OVS to forward to the tunnel and local port
-AT_CHECK([ovs-ofctl add-flow br0 "priority=1 action=drop"])
-AT_CHECK([ovs-ofctl add-flow br0 "priority=100 ip,nw_dst=10.1.1.1 action=output:at_vxlan0"])
-AT_CHECK([ovs-ofctl add-flow br0 "priority=100 ip,nw_dst=10.1.1.2 action=mod_dl_src:00:12:34:56:78:aa,mod_dl_dst:00:12:34:56:78:bb,local"])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.1.1.2])
-
-dnl First, check the underlay
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now check the overlay with different packet sizes
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([layer3 - ping over GRE])
-OVS_TRAFFIC_VSWITCHD_START([set Bridge br0 other-config:hwaddr="00:12:34:56:78:bb"])
-OVS_CHECK_GRE_L3()
-OVS_CHECK_IPROUTE_ENCAP()
-
-ADD_BR([br-underlay])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24")
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL([gre], [br0], [at_gre0], [172.31.1.1], [10.1.1.2/24],
-               [options:packet_type=legacy_l3])
-AT_CHECK([ip neigh add 10.1.1.1 lladdr 00:12:34:56:78:aa dev br0])
-NS_CHECK_EXEC([at_ns0], [ip link add dev at_gre1 type gre remote 172.31.1.100])
-NS_CHECK_EXEC([at_ns0], [ip addr add dev at_gre1 10.1.1.1/24])
-NS_CHECK_EXEC([at_ns0], [ip link set dev at_gre1 mtu 1450 up])
-NS_CHECK_EXEC([at_ns0], [ip route add 10.1.1.2/32 encap ip id 0 dst 172.31.1.100 dev at_gre1])
-
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-dnl Now add rules for OVS to forward to the tunnel and local port
-AT_CHECK([ovs-ofctl add-flow br0 "priority=1 action=drop"])
-AT_CHECK([ovs-ofctl add-flow br0 "priority=100 ip,nw_dst=10.1.1.1 action=output:at_gre0"])
-AT_CHECK([ovs-ofctl add-flow br0 "priority=100 ip,nw_dst=10.1.1.2 action=mod_dl_src:00:12:34:56:78:aa,mod_dl_dst:00:12:34:56:78:bb,local"])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.1.1.2])
-
-dnl First, check the underlay
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now check the overlay with different packet sizes
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/system-offloads-testsuite.at b/tests/system-offloads-testsuite.at
deleted file mode 100644
index eb5d2d4b3..000000000
--- a/tests/system-offloads-testsuite.at
+++ /dev/null
@@ -1,25 +0,0 @@
-AT_INIT
-
-AT_COPYRIGHT([Copyright (c) 2016 Mellanox Technologies, Ltd.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at:
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.])
-
-m4_ifdef([AT_COLOR_TESTS], [AT_COLOR_TESTS])
-
-m4_include([tests/ovs-macros.at])
-m4_include([tests/ovsdb-macros.at])
-m4_include([tests/ofproto-macros.at])
-m4_include([tests/system-common-macros.at])
-m4_include([tests/system-kmod-macros.at])
-
-m4_include([tests/system-offloads-traffic.at])
diff --git a/tests/system-offloads-traffic.at b/tests/system-offloads-traffic.at
deleted file mode 100644
index 1f8079344..000000000
--- a/tests/system-offloads-traffic.at
+++ /dev/null
@@ -1,68 +0,0 @@
-AT_BANNER([datapath offloads])
-
-# DUMP_CLEAN_SORTED([])
-#
-# Normilizes output ports, recirc_id, packets and macs.
-#
-m4_define([DUMP_CLEAN_SORTED], [sed -e 's/used:[[0-9]].[[0-9]]*s/used:0.001s/;s/eth(src=[[a-z0-9:]]*,dst=[[a-z0-9:]]*)/eth(macs)/;s/actions:[[0-9,]]*/actions:output/;s/recirc_id(0),//' | sort])
-
-AT_SETUP([offloads - ping between two ports - offloads disabled])
-OVS_TRAFFIC_VSWITCHD_START()
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 10 -i 0.1 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-10 packets transmitted, 10 received, 0% packet loss, time 0ms
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-flows | grep "eth_type(0x0800)" | DUMP_CLEAN_SORTED], [0], [dnl
-in_port(2),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:9, bytes:882, used:0.001s, actions:output
-in_port(3),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:9, bytes:882, used:0.001s, actions:output
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-flows type=ovs | grep "eth_type(0x0800)" | DUMP_CLEAN_SORTED], [0], [dnl
-in_port(2),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:9, bytes:882, used:0.001s, actions:output
-in_port(3),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:9, bytes:882, used:0.001s, actions:output
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-flows type=offloaded], [0], [])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([offloads - ping between two ports - offloads enabled])
-OVS_TRAFFIC_VSWITCHD_START()
-
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:hw-offload=true])
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [ignore])
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 10 -i 0.1 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-10 packets transmitted, 10 received, 0% packet loss, time 0ms
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-flows | grep "eth_type(0x0800)" | DUMP_CLEAN_SORTED], [0], [dnl
-in_port(2),eth(macs),eth_type(0x0800), packets:9, bytes:756, used:0.001s, actions:output
-in_port(3),eth(macs),eth_type(0x0800), packets:9, bytes:756, used:0.001s, actions:output
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-flows type=ovs | grep "eth_type(0x0800)" | DUMP_CLEAN_SORTED], [0], [])
-
-AT_CHECK([ovs-appctl dpctl/dump-flows type=offloaded | grep "eth_type(0x0800)" | DUMP_CLEAN_SORTED], [0], [dnl
-in_port(2),eth(macs),eth_type(0x0800), packets:9, bytes:756, used:0.001s, actions:output
-in_port(3),eth(macs),eth_type(0x0800), packets:9, bytes:756, used:0.001s, actions:output
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP('/.*/d')
-AT_CLEANUP
diff --git a/tests/system-traffic.at b/tests/system-traffic.at
deleted file mode 100644
index a35874463..000000000
--- a/tests/system-traffic.at
+++ /dev/null
@@ -1,5932 +0,0 @@
-AT_BANNER([datapath-sanity])
-
-AT_SETUP([datapath - ping between two ports])
-OVS_TRAFFIC_VSWITCHD_START()
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - http between two ports])
-OVS_TRAFFIC_VSWITCHD_START()
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_START_L7([at_ns1], [http])
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping between two ports on vlan])
-OVS_TRAFFIC_VSWITCHD_START()
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-ADD_VLAN(p0, at_ns0, 100, "10.2.2.1/24")
-ADD_VLAN(p1, at_ns1, 100, "10.2.2.2/24")
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping between two ports on cvlan])
-OVS_TRAFFIC_VSWITCHD_START()
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-ADD_SVLAN(p0, at_ns0, 4094, "10.255.2.1/24")
-ADD_SVLAN(p1, at_ns1, 4094, "10.255.2.2/24")
-
-ADD_CVLAN(p0.4094, at_ns0, 100, "10.2.2.1/24")
-ADD_CVLAN(p1.4094, at_ns1, 100, "10.2.2.2/24")
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.2.2.2])
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping6 between two ports])
-OVS_TRAFFIC_VSWITCHD_START()
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2])
-
-NS_CHECK_EXEC([at_ns0], [ping6 -q -c 3 -i 0.3 -w 2 fc00::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping6 -s 1600 -q -c 3 -i 0.3 -w 2 fc00::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping6 -s 3200 -q -c 3 -i 0.3 -w 2 fc00::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping6 between two ports on vlan])
-OVS_TRAFFIC_VSWITCHD_START()
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-ADD_VLAN(p0, at_ns0, 100, "fc00:1::1/96")
-ADD_VLAN(p1, at_ns1, 100, "fc00:1::2/96")
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00:1::2])
-
-NS_CHECK_EXEC([at_ns0], [ping6 -q -c 3 -i 0.3 -w 2 fc00:1::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping6 -s 1600 -q -c 3 -i 0.3 -w 2 fc00:1::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping6 -s 3200 -q -c 3 -i 0.3 -w 2 fc00:1::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping6 between two ports on cvlan])
-OVS_TRAFFIC_VSWITCHD_START()
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-ADD_SVLAN(p0, at_ns0, 4094, "fc00:ffff::1/96")
-ADD_SVLAN(p1, at_ns1, 4094, "fc00:ffff::2/96")
-
-ADD_CVLAN(p0.4094, at_ns0, 100, "fc00:1::1/96")
-ADD_CVLAN(p1.4094, at_ns1, 100, "fc00:1::2/96")
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00:1::2])
-
-NS_CHECK_EXEC([at_ns0], [ping6 -q -c 3 -i 0.3 -w 2 fc00:1::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping6 -s 1600 -q -c 3 -i 0.3 -w 2 fc00:1::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping6 -s 3200 -q -c 3 -i 0.3 -w 2 fc00:1::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over bond])
-OVS_TRAFFIC_VSWITCHD_START()
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH_BOND(p1 p2, at_ns1, br0, bond0, lacp=active bond_mode=balance-tcp, "10.1.1.2/24")
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.1.1.2])
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over vxlan tunnel])
-OVS_CHECK_VXLAN()
-
-OVS_TRAFFIC_VSWITCHD_START()
-ADD_BR([br-underlay])
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24")
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL([vxlan], [br0], [at_vxlan0], [172.31.1.1], [10.1.1.100/24])
-ADD_NATIVE_TUNNEL([vxlan], [at_vxlan1], [at_ns0], [172.31.1.100], [10.1.1.1/24],
-                  [id 0 dstport 4789])
-
-dnl First, check the underlay
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now check the overlay with different packet sizes
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over vxlan6 tunnel])
-OVS_CHECK_VXLAN_UDP6ZEROCSUM()
-
-OVS_TRAFFIC_VSWITCHD_START()
-ADD_BR([br-underlay])
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "fc00::1/64", [], [], "nodad")
-AT_CHECK([ip addr add dev br-underlay "fc00::100/64" nodad])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL6([vxlan], [br0], [at_vxlan0], [fc00::1], [10.1.1.100/24])
-ADD_NATIVE_TUNNEL6([vxlan], [at_vxlan1], [at_ns0], [fc00::100], [10.1.1.1/24],
-                   [id 0 dstport 4789 udp6zerocsumtx udp6zerocsumrx])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::100])
-
-dnl First, check the underlay
-NS_CHECK_EXEC([at_ns0], [ping6 -q -c 3 -i 0.3 -w 2 fc00::100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now check the overlay with different packet sizes
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over gre tunnel])
-OVS_CHECK_KERNEL_EXCL(3, 10, 4, 15)
-OVS_CHECK_GRE()
-
-OVS_TRAFFIC_VSWITCHD_START()
-ADD_BR([br-underlay])
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24")
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL([gre], [br0], [at_gre0], [172.31.1.1], [10.1.1.100/24])
-ADD_NATIVE_TUNNEL([gretap], [ns_gre0], [at_ns0], [172.31.1.100], [10.1.1.1/24])
-
-dnl First, check the underlay
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now check the overlay with different packet sizes
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over erspan v1 tunnel])
-OVS_CHECK_KERNEL_EXCL(3, 10, 4, 15)
-OVS_CHECK_GRE()
-OVS_CHECK_ERSPAN()
-
-OVS_TRAFFIC_VSWITCHD_START()
-ADD_BR([br-underlay])
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24")
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL([erspan], [br0], [at_erspan0], [172.31.1.1], [10.1.1.100/24], [options:key=1 options:erspan_ver=1 options:erspan_idx=7])
-ADD_NATIVE_TUNNEL([erspan], [ns_erspan0], [at_ns0], [172.31.1.100], [10.1.1.1/24], [seq key 1 erspan_ver 1 erspan 7])
-
-dnl First, check the underlay
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now check the overlay with different packet sizes
-dnl NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-NS_CHECK_EXEC([at_ns0], [ping -s 1200 -i 0.3 -c 3 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over erspan v2 tunnel])
-OVS_CHECK_KERNEL_EXCL(3, 10, 4, 15)
-OVS_CHECK_GRE()
-OVS_CHECK_ERSPAN()
-
-OVS_TRAFFIC_VSWITCHD_START()
-ADD_BR([br-underlay])
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24")
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL([erspan], [br0], [at_erspan0], [172.31.1.1], [10.1.1.100/24], [options:key=1 options:erspan_ver=2 options:erspan_dir=1 options:erspan_hwid=0x7])
-ADD_NATIVE_TUNNEL([erspan], [ns_erspan0], [at_ns0], [172.31.1.100], [10.1.1.1/24], [seq key 1 erspan_ver 2 erspan_dir egress erspan_hwid 7])
-
-dnl First, check the underlay
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now check the overlay with different packet sizes
-dnl NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-NS_CHECK_EXEC([at_ns0], [ping -s 1200 -i 0.3 -c 3 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over ip6erspan v1 tunnel])
-OVS_CHECK_KERNEL_EXCL(3, 10, 4, 15)
-OVS_CHECK_GRE()
-OVS_CHECK_ERSPAN()
-
-OVS_TRAFFIC_VSWITCHD_START()
-ADD_BR([br-underlay])
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "fc00:100::1/96", [], [], nodad)
-AT_CHECK([ip addr add dev br-underlay "fc00:100::100/96" nodad])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL6([ip6erspan], [br0], [at_erspan0], [fc00:100::1], [10.1.1.100/24],
-                [options:key=123 options:erspan_ver=1 options:erspan_idx=0x7])
-ADD_NATIVE_TUNNEL6([ip6erspan], [ns_erspan0], [at_ns0], [fc00:100::100],
-                   [10.1.1.1/24], [local fc00:100::1 seq key 123 erspan_ver 1 erspan 7])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 2 fc00:100::100])
-
-dnl First, check the underlay
-NS_CHECK_EXEC([at_ns0], [ping6 -q -c 3 -i 0.3 -w 2 fc00:100::100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now check the overlay with different packet sizes
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over ip6erspan v2 tunnel])
-OVS_CHECK_KERNEL_EXCL(3, 10, 4, 15)
-OVS_CHECK_GRE()
-OVS_CHECK_ERSPAN()
-
-OVS_TRAFFIC_VSWITCHD_START()
-ADD_BR([br-underlay])
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "fc00:100::1/96", [], [], nodad)
-AT_CHECK([ip addr add dev br-underlay "fc00:100::100/96" nodad])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL6([ip6erspan], [br0], [at_erspan0], [fc00:100::1], [10.1.1.100/24],
-                [options:key=121 options:erspan_ver=2 options:erspan_dir=0 options:erspan_hwid=0x7])
-ADD_NATIVE_TUNNEL6([ip6erspan], [ns_erspan0], [at_ns0], [fc00:100::100],
-                   [10.1.1.1/24],
-                   [local fc00:100::1 seq key 121 erspan_ver 2 erspan_dir ingress erspan_hwid 0x7])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 2 fc00:100::100])
-
-dnl First, check the underlay
-NS_CHECK_EXEC([at_ns0], [ping6 -q -c 3 -i 0.3 -w 2 fc00:100::100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now check the overlay with different packet sizes
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over geneve tunnel])
-OVS_CHECK_GENEVE()
-
-OVS_TRAFFIC_VSWITCHD_START()
-ADD_BR([br-underlay])
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24")
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL([geneve], [br0], [at_gnv0], [172.31.1.1], [10.1.1.100/24])
-ADD_NATIVE_TUNNEL([geneve], [ns_gnv0], [at_ns0], [172.31.1.100], [10.1.1.1/24],
-                  [vni 0])
-
-dnl First, check the underlay
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now check the overlay with different packet sizes
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - flow resume with geneve tun_metadata])
-OVS_CHECK_GENEVE()
-
-OVS_TRAFFIC_VSWITCHD_START()
-ADD_BR([br-underlay])
-
-AT_CHECK([ovs-ofctl monitor br0 resume --detach --no-chdir --pidfile 2> /dev/null])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24")
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL([geneve], [br0], [at_gnv0], [172.31.1.1], [10.1.1.100/24])
-ADD_NATIVE_TUNNEL([geneve], [ns_gnv0], [at_ns0], [172.31.1.100], [10.1.1.1/24],
-                  [vni 0])
-
-dnl Set up flows
-AT_DATA([flows.txt], [dnl
-table=0, arp action=NORMAL
-table=0, in_port=LOCAL icmp action=output:at_gnv0
-table=0, in_port=at_gnv0 icmp action=set_field:0xa->tun_metadata0,resubmit(,1)
-table=1, icmp action=controller(pause), resubmit(,2)
-table=2, tun_metadata0=0xa, icmp action=output:LOCAL
-])
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=0,len=4}->tun_metadata0"])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over geneve6 tunnel])
-OVS_CHECK_GENEVE_UDP6ZEROCSUM()
-
-OVS_TRAFFIC_VSWITCHD_START()
-ADD_BR([br-underlay])
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "fc00::1/64", [], [], "nodad")
-AT_CHECK([ip addr add dev br-underlay "fc00::100/64" nodad])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL6([geneve], [br0], [at_gnv0], [fc00::1], [10.1.1.100/24])
-ADD_NATIVE_TUNNEL6([geneve], [ns_gnv0], [at_ns0], [fc00::100], [10.1.1.1/24],
-                   [vni 0 udp6zerocsumtx udp6zerocsumrx])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::100])
-
-dnl First, check the underlay
-NS_CHECK_EXEC([at_ns0], [ping6 -q -c 3 -i 0.3 -w 2 fc00::100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now check the overlay with different packet sizes
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over gre tunnel by simulated packets])
-OVS_CHECK_MIN_KERNEL(3, 10)
-
-OVS_TRAFFIC_VSWITCHD_START()
-AT_CHECK([ovs-vsctl -- set bridge br0 other-config:hwaddr=\"f2:ff:00:00:00:01\"])
-ADD_BR([br-underlay], [set bridge br-underlay other-config:hwaddr=\"f2:ff:00:00:00:02\"])
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24", f2:ff:00:00:00:03)
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace.
-ADD_OVS_TUNNEL([gre], [br0], [at_gre0], [172.31.1.1], [10.1.1.100/24])
-
-dnl Certain Linux distributions, like CentOS, have default iptable rules
-dnl to reject input traffic from br-underlay. Here we add a rule to walk
-dnl around it.
-iptables -I INPUT 1 -i br-underlay -j ACCEPT
-on_exit 'iptables -D INPUT 1'
-
-ip netns exec at_ns0 tcpdump -n -i p0 dst host 172.31.1.1 -l > p0.pcap &
-sleep 1
-
-dnl First, check the underlay.
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl We don't actually add gretap port as below, instead, we will
-dnl emulate one that sends packets. Suppose its mac address is f2:ff:00:00:00:04.
-dnl ADD_NATIVE_TUNNEL([gretap], [ns_gre0], [at_ns0], [172.31.1.100], [10.1.1.1/24])
-
-dnl Now, check the overlay by sending out raw arp and icmp packets.
-ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 packet=f2ff00000002f2ff00000003080045000042ec2c4000402ff3bcac1f0101ac1f016400006558fffffffffffff2ff0000000408060001080006040001f2ff000000040a0101010000000000000a010164 actions=NORMAL"
-
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "IP 172.31.1.100 > 172.31.1.1: GREv0, length 46: ARP, Reply 10.1.1.100 is-at f2:ff:00:00:00:01.* length 28" 2>&1 1>/dev/null])
-
-ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 packet=f2ff00000002f2ff0000000308004500007aec8e4000402ff322ac1f0101ac1f016400006558f2ff00000001f2ff00000004080045000054548f40004001cfb30a0101010a0101640800e6e829270003e1a3435b00000000ff1a050000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637 actions=NORMAL"
-
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "IP 172.31.1.100 > 172.31.1.1: GREv0, length 102: IP 10.1.1.100 > 10.1.1.1: ICMP echo reply,.* length 64$" 2>&1 1>/dev/null])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over erspan v1 tunnel by simulated packets])
-OVS_CHECK_MIN_KERNEL(3, 10)
-
-OVS_TRAFFIC_VSWITCHD_START()
-AT_CHECK([ovs-vsctl -- set bridge br0 other-config:hwaddr=\"f2:ff:00:00:00:01\"])
-ADD_BR([br-underlay], [set bridge br-underlay other-config:hwaddr=\"f2:ff:00:00:00:02\"])
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24", f2:ff:00:00:00:03)
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and emulate a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL([erspan], [br0], [at_erspan0], [172.31.1.1], [10.1.1.100/24], [options:key=1 options:erspan_ver=1 options:erspan_idx=7])
-
-dnl Certain Linux distributions, like CentOS, have default iptable rules
-dnl to reject input traffic from br-underlay. Here we add a rule to walk
-dnl around it.
-iptables -I INPUT 1 -i br-underlay -j ACCEPT
-on_exit 'iptables -D INPUT 1'
-
-ip netns exec at_ns0 tcpdump -n -x -i p0 dst host 172.31.1.1 -l > p0.pcap &
-sleep 1
-
-dnl First, check the underlay
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now send out an arp request from 10.1.1.1 for 10.1.1.100 in erspan.
-ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 packet=f2ff00000002f2ff0000000308004500004e151d4000402fcac0ac1f0101ac1f0164100088be000000061000000100000007fffffffffffff2ff0000000408060001080006040001f2ff000000040a0101010000000000000a010164 actions=normal"
-
-dnl 0002 is arp reply, followed by mac address of 10.1.1.100.
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "0x0030:  0806 0001 0800 0604 0002 f2ff 0000 0001" 2>&1 1>/dev/null])
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "0x0040:  0a01 0164 f2ff 0000 0004 0a01 0101" 2>&1 1>/dev/null])
-
-dnl Okay, now check the overlay with raw icmp packets.
-AT_FAIL_IF([cat p0.pcap | egrep "IP 172.31.1.100 > 172.31.1.1: GREv0,.* length 122" 2>&1 1>/dev/null])
-
-ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 packet=f2ff00000002f2ff0000000308004500008e70cb4000402f6ed2ac1f0101ac1f0164100088be000000051000000100000007f2ff00000001f2ff0000000408004500005c4a3340004001da070a0101010a010164080084f238fb0001f36a6b5b0000000021870e0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f actions=normal"
-
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "IP 172.31.1.100 > 172.31.1.1: GREv0,.* length 122" 2>&1 1>/dev/null])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over erspan v2 tunnel by simulated packets])
-OVS_CHECK_MIN_KERNEL(3, 10)
-
-OVS_TRAFFIC_VSWITCHD_START()
-AT_CHECK([ovs-vsctl -- set bridge br0 other-config:hwaddr=\"f2:ff:00:00:00:01\"])
-ADD_BR([br-underlay], [set bridge br-underlay other-config:hwaddr=\"f2:ff:00:00:00:02\"])
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24", f2:ff:00:00:00:03)
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and simulate a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL([erspan], [br0], [at_erspan0], [172.31.1.1], [10.1.1.100/24], [options:key=1 options:erspan_ver=2 options:erspan_dir=1 options:erspan_hwid=0x7])
-
-dnl Certain Linux distributions, like CentOS, have default iptable rules
-dnl to reject input traffic from br-underlay. Here we add a rule to walk
-dnl around it.
-iptables -I INPUT 1 -i br-underlay -j ACCEPT
-on_exit 'iptables -D INPUT 1'
-
-ip netns exec at_ns0 tcpdump -n -x -i p0 dst host 172.31.1.1 -l > p0.pcap &
-sleep 1
-
-dnl First, check the underlay.
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, send raw arp request and icmp echo request.
-ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 packet=f2ff00000002f2ff00000003080045000052373d4000402fa89cac1f0101ac1f0164100088be00000006200000016f54b41700008078fffffffffffff2ff0000000408060001080006040001f2ff000000040a0101010000000000000a010164 actions=normal"
-
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "0x0030:  0000 0001 0806 0001 0800 0604 0002 f2ff" 2>&1 1>/dev/null])
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "0x0040:  0000 0001 0a01 0164 f2ff 0000 0004 0a01" 2>&1 1>/dev/null])
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "0x0050:  0101" 2>&1 1>/dev/null])
-
-dnl Because tcpdump might not be able to parse erspan headers, we check icmp echo reply
-dnl by packet length.
-AT_FAIL_IF([cat p0.pcap | egrep "IP 172.31.1.100 > 172.31.1.1: GREv0,.* length 126" 2>&1 1>/dev/null])
-
-ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 packet=f2ff00000002f2ff0000000308004500009287e14000402f57b8ac1f0101ac1f0164100088be0000000520000001144cd5a400008078f2ff00000001f2ff0000000408004500005c38d640004001eb640a0101010a01016408005e57585f0001df6c6b5b0000000045bc050000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f actions=normal"
-
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "IP 172.31.1.100 > 172.31.1.1: GREv0,.* length 126" 2>&1 1>/dev/null])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over ip6erspan v1 tunnel by simulated packets])
-OVS_CHECK_MIN_KERNEL(3, 10)
-
-OVS_TRAFFIC_VSWITCHD_START()
-AT_CHECK([ovs-vsctl -- set bridge br0 other-config:hwaddr=\"f2:ff:00:00:00:01\"])
-ADD_BR([br-underlay], [set bridge br-underlay other-config:hwaddr=\"f2:ff:00:00:00:02\"])
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "fc00:100::1/96", f2:ff:00:00:00:03, [], nodad)
-AT_CHECK([ip addr add dev br-underlay "fc00:100::100/96" nodad])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and simulate a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL6([ip6erspan], [br0], [at_erspan0], [fc00:100::1], [10.1.1.100/24],
-                [options:key=123 options:erspan_ver=1 options:erspan_idx=0x7])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 2 fc00:100::100])
-
-dnl Certain Linux distributions, like CentOS, have default iptable rules
-dnl to reject input traffic from br-underlay. Here we add a rule to walk
-dnl around it.
-ip6tables -I INPUT 1 -i br-underlay -j ACCEPT
-on_exit 'ip6tables -D INPUT 1'
-
-ip netns exec at_ns0 tcpdump -n -x -i p0 dst host fc00:100::1 -l > p0.pcap &
-sleep 1
-
-dnl First, check the underlay.
-NS_CHECK_EXEC([at_ns0], [ping6 -q -c 3 -i 0.3 -w 2 fc00:100::100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now send raw arp request and icmp echo request.
-ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 packet=f2ff00000002f2ff0000000386dd60008531003a2f40fc000100000000000000000000000001fc000100000000000000000000000100100088be000000051000007b00000007fffffffffffff2ff0000000408060001080006040001f2ff000000040a0101010000000000000a010164 actions=normal"
-
-dnl Check arp reply.
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "0x0040:  0000 0001 0806 0001 0800 0604 0002 f2ff" 2>&1 1>/dev/null])
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "0x0050:  0000 0001 0a01 0164 f2ff 0000 0004 0a01" 2>&1 1>/dev/null])
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "0x0060:  0101" 2>&1 1>/dev/null])
-
-AT_FAIL_IF([cat p0.pcap | egrep "IP6 fc00:100::100 > fc00:100::1: GREv0,.* length 114" 2>&1 1>/dev/null])
-
-ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 packet=f2ff00000002f2ff0000000386dd60008531007a3c40fc000100000000000000000000000001fc0001000000000000000000000001002f00040104010100100088be000000061000407b00000007f2ff00000001f2ff0000000408004500005429b640004001fa8c0a0101010a01016408005c2c7526000118d3685b00000000e4aa020000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637 actions=normal"
-
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "IP6 fc00:100::100 > fc00:100::1: GREv0,.* length 114" 2>&1 1>/dev/null])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - ping over ip6erspan v2 tunnel by simulated packets])
-OVS_CHECK_MIN_KERNEL(3, 10)
-
-OVS_TRAFFIC_VSWITCHD_START()
-AT_CHECK([ovs-vsctl -- set bridge br0 other-config:hwaddr=\"f2:ff:00:00:00:01\"])
-ADD_BR([br-underlay], [set bridge br-underlay other-config:hwaddr=\"f2:ff:00:00:00:02\"])
-
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "fc00:100::1/96", f2:ff:00:00:00:03, [], nodad)
-AT_CHECK([ip addr add dev br-underlay "fc00:100::100/96" nodad])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and simulate a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL6([ip6erspan], [br0], [at_erspan0], [fc00:100::1], [10.1.1.100/24],
-                [options:key=121 options:erspan_ver=2 options:erspan_dir=0 options:erspan_hwid=0x7])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 2 fc00:100::100])
-
-dnl Certain Linux distributions, like CentOS, have default iptable rules
-dnl to reject input traffic from br-underlay. Here we add a rule to walk
-dnl around it.
-ip6tables -I INPUT 1 -i br-underlay -j ACCEPT
-on_exit 'ip6tables -D INPUT 1'
-
-ip netns exec at_ns0 tcpdump -n -x -i p0 dst host fc00:100::1 -l > p0.pcap &
-sleep 1
-
-dnl First, check the underlay.
-NS_CHECK_EXEC([at_ns0], [ping6 -q -c 3 -i 0.3 -w 2 fc00:100::100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now send raw arp request and icmp echo request.
-ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 packet=f2ff00000002f2ff0000000386dd60008531003e2f40fc000100000000000000000000000001fc000100000000000000000000000100100088be0000000620000079af514f9900008070fffffffffffff2ff0000000408060001080006040001f2ff000000040a0101010000000000000a010164 actions=normal"
-
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "0x0040:  0004 f2ff 0000 0001 0806 0001 0800 0604" 2>&1 1>/dev/null])
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "0x0050:  0002 f2ff 0000 0001 0a01 0164 f2ff 0000" 2>&1 1>/dev/null])
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "0x0060:  0004 0a01 0101" 2>&1 1>/dev/null])
-
-AT_FAIL_IF([cat p0.pcap | egrep "IP6 fc00:100::100 > fc00:100::1: GREv0, .* length 118" 2>&1 1>/dev/null])
-
-ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 packet=f2ff00000002f2ff0000000386dd60008531007e3c40fc000100000000000000000000000001fc0001000000000000000000000001002f00040104010100100088be0000000720004079af514f9b00008070f2ff00000001f2ff00000004080045000054ffcb4000400124770a0101010a0101640800419e23ac000112d7685b000000004caf0c0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637 actions=normal"
-
-OVS_WAIT_UNTIL([cat p0.pcap | egrep "IP6 fc00:100::100 > fc00:100::1: GREv0, .* length 118" 2>&1 1>/dev/null])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - clone action])
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1, at_ns2)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-AT_CHECK([ovs-vsctl -- set interface ovs-p0 ofport_request=1 \
-                    -- set interface ovs-p1 ofport_request=2])
-
-AT_DATA([flows.txt], [dnl
-priority=1 actions=NORMAL
-priority=10 in_port=1,ip,actions=clone(mod_dl_dst(50:54:00:00:00:0a),set_field:192.168.3.3->ip_dst), output:2
-priority=10 in_port=2,ip,actions=clone(mod_dl_src(ae:c6:7e:54:8d:4d),mod_dl_dst(50:54:00:00:00:0b),set_field:192.168.4.4->ip_dst, controller), output:1
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-AT_CHECK([cat ofctl_monitor.log | STRIP_MONITOR_CSUM], [0], [dnl
-icmp,vlan_tci=0x0000,dl_src=ae:c6:7e:54:8d:4d,dl_dst=50:54:00:00:00:0b,nw_src=10.1.1.2,nw_dst=192.168.4.4,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=0,icmp_code=0 icmp_csum: <skip>
-icmp,vlan_tci=0x0000,dl_src=ae:c6:7e:54:8d:4d,dl_dst=50:54:00:00:00:0b,nw_src=10.1.1.2,nw_dst=192.168.4.4,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=0,icmp_code=0 icmp_csum: <skip>
-icmp,vlan_tci=0x0000,dl_src=ae:c6:7e:54:8d:4d,dl_dst=50:54:00:00:00:0b,nw_src=10.1.1.2,nw_dst=192.168.4.4,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=0,icmp_code=0 icmp_csum: <skip>
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([datapath - mpls actions])
-OVS_TRAFFIC_VSWITCHD_START([_ADD_BR([br1])])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br1, "10.1.1.2/24")
-
-AT_CHECK([ip link add patch0 type veth peer name patch1])
-on_exit 'ip link del patch0'
-
-AT_CHECK([ip link set dev patch0 up])
-AT_CHECK([ip link set dev patch1 up])
-AT_CHECK([ovs-vsctl add-port br0 patch0])
-AT_CHECK([ovs-vsctl add-port br1 patch1])
-
-AT_DATA([flows.txt], [dnl
-table=0,priority=100,dl_type=0x0800 actions=push_mpls:0x8847,set_mpls_label:3,resubmit(,1)
-table=0,priority=100,dl_type=0x8847,mpls_label=3 actions=pop_mpls:0x0800,resubmit(,1)
-table=0,priority=10 actions=resubmit(,1)
-table=1,priority=10 actions=normal
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl add-flows br1 flows.txt])
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-NS_CHECK_EXEC([at_ns1], [ping -q -c 3 -i 0.3 -w 2 10.1.1.1 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-AT_SETUP([datapath - basic truncate action])
-AT_SKIP_IF([test $HAVE_NC = no])
-OVS_TRAFFIC_VSWITCHD_START()
-AT_CHECK([ovs-ofctl del-flows br0])
-
-dnl Create p0 and ovs-p0(1)
-ADD_NAMESPACES(at_ns0)
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address e6:66:c1:11:11:11])
-NS_CHECK_EXEC([at_ns0], [arp -s 10.1.1.2 e6:66:c1:22:22:22])
-
-dnl Create p1(3) and ovs-p1(2), packets received from ovs-p1 will appear in p1
-AT_CHECK([ip link add p1 type veth peer name ovs-p1])
-on_exit 'ip link del ovs-p1'
-AT_CHECK([ip link set dev ovs-p1 up])
-AT_CHECK([ip link set dev p1 up])
-AT_CHECK([ovs-vsctl add-port br0 ovs-p1 -- set interface ovs-p1 ofport_request=2])
-dnl Use p1 to check the truncated packet
-AT_CHECK([ovs-vsctl add-port br0 p1 -- set interface p1 ofport_request=3])
-
-dnl Create p2(5) and ovs-p2(4)
-AT_CHECK([ip link add p2 type veth peer name ovs-p2])
-on_exit 'ip link del ovs-p2'
-AT_CHECK([ip link set dev ovs-p2 up])
-AT_CHECK([ip link set dev p2 up])
-AT_CHECK([ovs-vsctl add-port br0 ovs-p2 -- set interface ovs-p2 ofport_request=4])
-dnl Use p2 to check the truncated packet
-AT_CHECK([ovs-vsctl add-port br0 p2 -- set interface p2 ofport_request=5])
-
-dnl basic test
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_DATA([flows.txt], [dnl
-in_port=3 dl_dst=e6:66:c1:22:22:22 actions=drop
-in_port=5 dl_dst=e6:66:c1:22:22:22 actions=drop
-in_port=1 dl_dst=e6:66:c1:22:22:22 actions=output(port=2,max_len=100),output:4
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-dnl use this file as payload file for ncat
-AT_CHECK([dd if=/dev/urandom of=payload200.bin bs=200 count=1 2> /dev/null])
-on_exit 'rm -f payload200.bin'
-NS_CHECK_EXEC([at_ns0], [nc $NC_EOF_OPT -u 10.1.1.2 1234 < payload200.bin])
-
-dnl packet with truncated size
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl dump-flows br0 table=0 | grep "in_port=3" |  sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=100
-])
-dnl packet with original size
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl dump-flows br0 table=0 | grep "in_port=5" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=242
-])
-
-dnl more complicated output actions
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_DATA([flows.txt], [dnl
-in_port=3 dl_dst=e6:66:c1:22:22:22 actions=drop
-in_port=5 dl_dst=e6:66:c1:22:22:22 actions=drop
-in_port=1 dl_dst=e6:66:c1:22:22:22 actions=output(port=2,max_len=100),output:4,output(port=2,max_len=100),output(port=4,max_len=100),output:2,output(port=4,max_len=200),output(port=2,max_len=65535)
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-NS_CHECK_EXEC([at_ns0], [nc $NC_EOF_OPT -u 10.1.1.2 1234 < payload200.bin])
-
-dnl 100 + 100 + 242 + min(65535,242) = 684
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl dump-flows br0 table=0 | grep "in_port=3" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=684
-])
-dnl 242 + 100 + min(242,200) = 542
-AT_CHECK([ovs-ofctl dump-flows br0 table=0 | grep "in_port=5" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=542
-])
-
-dnl SLOW_ACTION: disable kernel datapath truncate support
-dnl Repeat the test above, but exercise the SLOW_ACTION code path
-AT_CHECK([ovs-appctl dpif/set-dp-features br0 trunc false], [0])
-
-dnl SLOW_ACTION test1: check datapatch actions
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl ofproto/trace br0 "in_port=1,dl_type=0x800,dl_src=e6:66:c1:11:11:11,dl_dst=e6:66:c1:22:22:22,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=6,tp_src=8,tp_dst=9"], [0], [stdout])
-AT_CHECK([tail -3 stdout], [0],
-[Datapath actions: trunc(100),3,5,trunc(100),3,trunc(100),5,3,trunc(200),5,trunc(65535),3
-This flow is handled by the userspace slow path because it:
-  - Uses action(s) not supported by datapath.
-])
-
-dnl SLOW_ACTION test2: check actual packet truncate
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-NS_CHECK_EXEC([at_ns0], [nc $NC_EOF_OPT -u 10.1.1.2 1234 < payload200.bin])
-
-dnl 100 + 100 + 242 + min(65535,242) = 684
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl dump-flows br0 table=0 | grep "in_port=3" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=684
-])
-
-dnl 242 + 100 + min(242,200) = 542
-AT_CHECK([ovs-ofctl dump-flows br0 table=0 | grep "in_port=5" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=542
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Create 2 bridges and 2 namespaces to test truncate over
-dnl GRE tunnel:
-dnl   br0: overlay bridge
-dnl   ns1: connect to br0, with IP:10.1.1.2
-dnl   br-underlay: with IP: 172.31.1.100
-dnl   ns0: connect to br-underlay, with IP: 10.1.1.1
-AT_SETUP([datapath - truncate and output to gre tunnel by simulated packets])
-OVS_CHECK_MIN_KERNEL(3, 10)
-AT_SKIP_IF([test $HAVE_NC = no])
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_BR([br-underlay], [set bridge br-underlay other-config:hwaddr=\"02:90:8c:a8:a1:49\"])
-ADD_NAMESPACES(at_ns0)
-ADD_NAMESPACES(at_ns1)
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24", fa:ad:fa:25:05:60)
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL([gre], [br0], [at_gre0], [172.31.1.1], [10.1.1.100/24])
-
-dnl The below native tunnel isn't actually added. We simulate it to send
-dnl and receive packets.
-dnl ADD_NATIVE_TUNNEL([gretap], [ns_gre0], [at_ns0], [172.31.1.100], [10.1.1.1/24],
-dnl                   [], [address e6:66:c1:11:11:11])
-dnl AT_CHECK([ovs-vsctl -- set interface at_gre0 ofport_request=1])
-dnl NS_CHECK_EXEC([at_ns0], [arp -s 10.1.1.2 e6:66:c1:22:22:22])
-
-dnl Set up (p1 and ovs-p1) at br0
-ADD_VETH(p1, at_ns1, br0, '10.1.1.2/24')
-AT_CHECK([ovs-vsctl -- set interface ovs-p1 ofport_request=2])
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address e6:66:c1:22:22:22])
-NS_CHECK_EXEC([at_ns1], [arp -s 10.1.1.1 e6:66:c1:11:11:11])
-
-dnl Set up (p2 and ovs-p2) as loopback for verifying packet size
-AT_CHECK([ip link add p2 type veth peer name ovs-p2])
-on_exit 'ip link del ovs-p2'
-AT_CHECK([ip link set dev ovs-p2 up])
-AT_CHECK([ip link set dev p2 up])
-AT_CHECK([ovs-vsctl add-port br0 ovs-p2 -- set interface ovs-p2 ofport_request=3])
-AT_CHECK([ovs-vsctl add-port br0 p2 -- set interface p2 ofport_request=4])
-
-dnl use this file as payload file for ncat
-AT_CHECK([dd if=/dev/urandom of=payload200.bin bs=200 count=1 2> /dev/null])
-on_exit 'rm -f payload200.bin'
-
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_DATA([flows.txt], [dnl
-priority=99,in_port=1,actions=output(port=2,max_len=100),output(port=3,max_len=100)
-priority=99,in_port=2,udp,actions=output(port=1,max_len=100)
-priority=1,in_port=4,ip,actions=drop
-priority=1,actions=drop
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-ofctl del-flows br-underlay])
-AT_DATA([flows-underlay.txt], [dnl
-priority=99,dl_type=0x0800,nw_proto=47,in_port=1,actions=LOCAL
-priority=99,dl_type=0x0800,nw_proto=47,in_port=LOCAL,ip_dst=172.31.1.1/24,actions=1
-priority=1,actions=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br-underlay flows-underlay.txt])
-
-dnl check tunnel push path, from at_ns1 to at_ns0
-NS_CHECK_EXEC([at_ns1], [nc $NC_EOF_OPT -u 10.1.1.1 1234 < payload200.bin])
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-
-dnl Before truncation = ETH(14) + IP(20) + UDP(8) + 200 = 242B
-AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=2" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=242
-])
-dnl After truncation = outer ETH(14) + outer IP(20) + GRE(4) + 100 = 138B
-AT_CHECK([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=138
-])
-
-dnl check tunnel pop path, from at_ns0 to at_ns1
-dnl This 200-byte packet is simulated on behalf of ns_gre0
-ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 packet=02908ca8a149faadfa25056008004500010a9e9d4000402f4084ac1f0101ac1f016400006558e666c1222222e666c11111110800450000e46f8e40004011b4760a0101010a010102e026162e00d016e6a366ebf904c74132c6fed42a9e9e46240b4d9fd13c9b47d9704a388e70a5e77db16934a6188dc01d86aa20007ace2cf9cdb111f208474b88ffc851c871f0e3fb4fff138c1d288d437efff487e2b86a9c99fbf4229a6485e133bcf3e16f6e345207fda0932d9eeb602740456fd077b4847d25481337bd716155cc245be129ccc11bf82b834767b3760b52fe913c0e24f31c0e1b27f88acf7bba6b985fb64ee2cd6fc6bba1a9c1f021e253e1728b046fd4d023307e3296361a37ea2617ebcb2537e0284a81050dd0ee actions=LOCAL"
-
-dnl After truncation = 100 byte at loopback device p2(4)
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip], [0], [dnl
- n_packets=1, n_bytes=100, priority=1,ip,in_port=4 actions=drop
-])
-
-dnl SLOW_ACTION: disable datapath truncate support
-dnl Repeat the test above, but exercise the SLOW_ACTION code path
-AT_CHECK([ovs-appctl dpif/set-dp-features br0 trunc false], [0])
-
-dnl SLOW_ACTION test1: check datapatch actions
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-dnl SLOW_ACTION test2: check actual packet truncate
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl del-flows br-underlay])
-AT_CHECK([ovs-ofctl add-flows br-underlay flows-underlay.txt])
-
-dnl check tunnel push path, from at_ns1 to at_ns0
-NS_CHECK_EXEC([at_ns1], [nc $NC_EOF_OPT -u 10.1.1.1 1234 < payload200.bin])
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-
-dnl Before truncation = ETH(14) + IP(20) + UDP(8) + 200 = 242B
-AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=2" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=242
-])
-dnl After truncation = outer ETH(14) + outer IP(20) + GRE(4) + 100 = 138B
-AT_CHECK([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=138
-])
-
-dnl check tunnel pop path, from at_ns0 to at_ns1
-dnl This 200-byte packet is simulated on behalf of ns_gre0
-ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 packet=02908ca8a149faadfa25056008004500010a9e9d4000402f4084ac1f0101ac1f016400006558e666c1222222e666c11111110800450000e46f8e40004011b4760a0101010a010102e026162e00d016e6a366ebf904c74132c6fed42a9e9e46240b4d9fd13c9b47d9704a388e70a5e77db16934a6188dc01d86aa20007ace2cf9cdb111f208474b88ffc851c871f0e3fb4fff138c1d288d437efff487e2b86a9c99fbf4229a6485e133bcf3e16f6e345207fda0932d9eeb602740456fd077b4847d25481337bd716155cc245be129ccc11bf82b834767b3760b52fe913c0e24f31c0e1b27f88acf7bba6b985fb64ee2cd6fc6bba1a9c1f021e253e1728b046fd4d023307e3296361a37ea2617ebcb2537e0284a81050dd0ee actions=LOCAL"
-
-dnl After truncation = 100 byte at loopback device p2(4)
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip], [0], [dnl
- n_packets=1, n_bytes=100, priority=1,ip,in_port=4 actions=drop
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Create 2 bridges and 2 namespaces to test truncate over
-dnl GRE tunnel:
-dnl   br0: overlay bridge
-dnl   ns1: connect to br0, with IP:10.1.1.2
-dnl   br-underlay: with IP: 172.31.1.100
-dnl   ns0: connect to br-underlay, with IP: 10.1.1.1
-AT_SETUP([datapath - truncate and output to gre tunnel])
-AT_SKIP_IF([test $HAVE_NC = no])
-OVS_CHECK_KERNEL_EXCL(3, 10, 4, 15)
-OVS_CHECK_GRE()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_BR([br-underlay])
-ADD_NAMESPACES(at_ns0)
-ADD_NAMESPACES(at_ns1)
-AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24")
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL([gre], [br0], [at_gre0], [172.31.1.1], [10.1.1.100/24])
-ADD_NATIVE_TUNNEL([gretap], [ns_gre0], [at_ns0], [172.31.1.100], [10.1.1.1/24],
-                  [], [address e6:66:c1:11:11:11])
-AT_CHECK([ovs-vsctl -- set interface at_gre0 ofport_request=1])
-NS_CHECK_EXEC([at_ns0], [arp -s 10.1.1.2 e6:66:c1:22:22:22])
-
-dnl Set up (p1 and ovs-p1) at br0
-ADD_VETH(p1, at_ns1, br0, '10.1.1.2/24')
-AT_CHECK([ovs-vsctl -- set interface ovs-p1 ofport_request=2])
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address e6:66:c1:22:22:22])
-NS_CHECK_EXEC([at_ns1], [arp -s 10.1.1.1 e6:66:c1:11:11:11])
-
-dnl Set up (p2 and ovs-p2) as loopback for verifying packet size
-AT_CHECK([ip link add p2 type veth peer name ovs-p2])
-on_exit 'ip link del ovs-p2'
-AT_CHECK([ip link set dev ovs-p2 up])
-AT_CHECK([ip link set dev p2 up])
-AT_CHECK([ovs-vsctl add-port br0 ovs-p2 -- set interface ovs-p2 ofport_request=3])
-AT_CHECK([ovs-vsctl add-port br0 p2 -- set interface p2 ofport_request=4])
-
-dnl use this file as payload file for ncat
-AT_CHECK([dd if=/dev/urandom of=payload200.bin bs=200 count=1 2> /dev/null])
-on_exit 'rm -f payload200.bin'
-
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_DATA([flows.txt], [dnl
-priority=99,in_port=1,actions=output(port=2,max_len=100),output(port=3,max_len=100)
-priority=99,in_port=2,udp,actions=output(port=1,max_len=100)
-priority=1,in_port=4,ip,actions=drop
-priority=1,actions=drop
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-ofctl del-flows br-underlay])
-AT_DATA([flows-underlay.txt], [dnl
-priority=99,dl_type=0x0800,nw_proto=47,in_port=1,actions=LOCAL
-priority=99,dl_type=0x0800,nw_proto=47,in_port=LOCAL,ip_dst=172.31.1.1/24,actions=1
-priority=1,actions=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br-underlay flows-underlay.txt])
-
-dnl check tunnel push path, from at_ns1 to at_ns0
-NS_CHECK_EXEC([at_ns1], [nc $NC_EOF_OPT -u 10.1.1.1 1234 < payload200.bin])
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-
-dnl Before truncation = ETH(14) + IP(20) + UDP(8) + 200 = 242B
-AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=2" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=242
-])
-dnl After truncation = outer ETH(14) + outer IP(20) + GRE(4) + 100 = 138B
-AT_CHECK([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=138
-])
-
-dnl check tunnel pop path, from at_ns0 to at_ns1
-NS_CHECK_EXEC([at_ns0], [nc $NC_EOF_OPT -u 10.1.1.2 5678 < payload200.bin])
-dnl After truncation = 100 byte at loopback device p2(4)
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip], [0], [dnl
- n_packets=1, n_bytes=100, priority=1,ip,in_port=4 actions=drop
-])
-
-dnl SLOW_ACTION: disable datapath truncate support
-dnl Repeat the test above, but exercise the SLOW_ACTION code path
-AT_CHECK([ovs-appctl dpif/set-dp-features br0 trunc false], [0])
-
-dnl SLOW_ACTION test1: check datapatch actions
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-dnl SLOW_ACTION test2: check actual packet truncate
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-ofctl del-flows br-underlay])
-AT_CHECK([ovs-ofctl add-flows br-underlay flows-underlay.txt])
-
-dnl check tunnel push path, from at_ns1 to at_ns0
-NS_CHECK_EXEC([at_ns1], [nc $NC_EOF_OPT -u 10.1.1.1 1234 < payload200.bin])
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-
-dnl Before truncation = ETH(14) + IP(20) + UDP(8) + 200 = 242B
-AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=2" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=242
-])
-dnl After truncation = outer ETH(14) + outer IP(20) + GRE(4) + 100 = 138B
-AT_CHECK([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl
-n_bytes=138
-])
-
-dnl check tunnel pop path, from at_ns0 to at_ns1
-NS_CHECK_EXEC([at_ns0], [nc $NC_EOF_OPT -u 10.1.1.2 5678 < payload200.bin])
-dnl After truncation = 100 byte at loopback device p2(4)
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip], [0], [dnl
- n_packets=1, n_bytes=100, priority=1,ip,in_port=4 actions=drop
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_BANNER([conntrack])
-
-AT_SETUP([conntrack - controller])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg ofproto_dpif_upcall:dbg])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=100,in_port=1,udp,action=ct(commit),controller
-priority=100,in_port=2,ct_state=-trk,udp,action=ct(table=0)
-priority=100,in_port=2,ct_state=+trk+est,udp,action=controller
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-dnl Send an unsolicited reply from port 2. This should be dropped.
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 2 ct\(table=0\) '50540000000a50540000000908004500001c000000000011a4cd0a0101020a0101010002000100080000'])
-
-dnl OK, now start a new connection from port 1.
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 1 ct\(commit\),controller '50540000000a50540000000908004500001c000000000011a4cd0a0101010a0101020001000200080000'])
-
-dnl Now try a reply from port 2.
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 2 ct\(table=0\) '50540000000a50540000000908004500001c000000000011a4cd0a0101020a0101010002000100080000'])
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-dnl Check this output. We only see the latter two packets, not the first.
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1,tp_dst=2 udp_csum:0
-NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=42 ct_state=est|rpl|trk,ct_nw_src=10.1.1.1,ct_nw_dst=10.1.1.2,ct_nw_proto=17,ct_tp_src=1,ct_tp_dst=2,ip,in_port=2 (via action) data_len=42 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=2,tp_dst=1 udp_csum:0
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - force commit])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg ofproto_dpif_upcall:dbg])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=100,in_port=1,udp,action=ct(force,commit),controller
-priority=100,in_port=2,ct_state=-trk,udp,action=ct(table=0)
-priority=100,in_port=2,ct_state=+trk+est,udp,action=ct(force,commit,table=1)
-table=1,in_port=2,ct_state=+trk,udp,action=controller
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-dnl Send an unsolicited reply from port 2. This should be dropped.
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=2 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101020a0101010002000100080000 actions=resubmit(,0)"])
-
-dnl OK, now start a new connection from port 1.
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=1 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101010a0101020001000200080000 actions=resubmit(,0)"])
-
-dnl Now try a reply from port 2.
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=2 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101020a0101010002000100080000 actions=resubmit(,0)"])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-dnl Check this output. We only see the latter two packets, not the first.
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=42 in_port=1 (via action) data_len=42 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.1,nw_dst=10.1.1.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1,tp_dst=2 udp_csum:0
-NXT_PACKET_IN2 (xid=0x0): table_id=1 cookie=0x0 total_len=42 ct_state=new|trk,ct_nw_src=10.1.1.2,ct_nw_dst=10.1.1.1,ct_nw_proto=17,ct_tp_src=2,ct_tp_dst=1,ip,in_port=2 (via action) data_len=42 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.1.1.2,nw_dst=10.1.1.1,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=2,tp_dst=1 udp_csum:0
-])
-
-dnl
-dnl Check that the directionality has been changed by force commit.
-dnl
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep "orig=.src=10\.1\.1\.2,"], [], [dnl
-udp,orig=(src=10.1.1.2,dst=10.1.1.1,sport=2,dport=1),reply=(src=10.1.1.1,dst=10.1.1.2,sport=1,dport=2)
-])
-
-dnl OK, now send another packet from port 1 and see that it switches again
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=1 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101010a0101020001000200080000 actions=resubmit(,0)"])
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep "orig=.src=10\.1\.1\.1,"], [], [dnl
-udp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=1,dport=2),reply=(src=10.1.1.2,dst=10.1.1.1,sport=2,dport=1)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - ct flush by 5-tuple])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=100,in_port=1,udp,action=ct(commit),2
-priority=100,in_port=2,udp,action=ct(zone=5,commit),1
-priority=100,in_port=1,icmp,action=ct(commit),2
-priority=100,in_port=2,icmp,action=ct(zone=5,commit),1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Test UDP from port 1
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=1 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101010a0101020001000200080000 actions=resubmit(,0)"])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep "orig=.src=10\.1\.1\.1,"], [], [dnl
-udp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=1,dport=2),reply=(src=10.1.1.2,dst=10.1.1.1,sport=2,dport=1)
-])
-
-AT_CHECK([ovs-appctl dpctl/flush-conntrack 'ct_nw_src=10.1.1.2,ct_nw_dst=10.1.1.1,ct_nw_proto=17,ct_tp_src=2,ct_tp_dst=1'])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep "orig=.src=10\.1\.1\.1,"], [1], [dnl
-])
-
-dnl Test UDP from port 2
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=2 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101020a0101010002000100080000 actions=resubmit(,0)"])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep "orig=.src=10\.1\.1\.2,"], [0], [dnl
-udp,orig=(src=10.1.1.2,dst=10.1.1.1,sport=2,dport=1),reply=(src=10.1.1.1,dst=10.1.1.2,sport=1,dport=2),zone=5
-])
-
-AT_CHECK([ovs-appctl dpctl/flush-conntrack zone=5 'ct_nw_src=10.1.1.1,ct_nw_dst=10.1.1.2,ct_nw_proto=17,ct_tp_src=1,ct_tp_dst=2'])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-])
-
-dnl Test ICMP traffic
-NS_CHECK_EXEC([at_ns1], [ping -q -c 3 -i 0.3 -w 2 10.1.1.1 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep "orig=.src=10\.1\.1\.2,"], [0], [stdout])
-AT_CHECK([cat stdout | FORMAT_CT(10.1.1.1)], [0],[dnl
-icmp,orig=(src=10.1.1.2,dst=10.1.1.1,id=<cleared>,type=8,code=0),reply=(src=10.1.1.1,dst=10.1.1.2,id=<cleared>,type=0,code=0),zone=5
-])
-
-ICMP_ID=`cat stdout | cut -d ',' -f4 | cut -d '=' -f2`
-ICMP_TUPLE=ct_nw_src=10.1.1.2,ct_nw_dst=10.1.1.1,ct_nw_proto=1,icmp_id=$ICMP_ID,icmp_type=8,icmp_code=0
-AT_CHECK([ovs-appctl dpctl/flush-conntrack zone=5 $ICMP_TUPLE])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep "orig=.src=10\.1\.1\.2,"], [1], [dnl
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv4 ping])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=100,in_port=1,icmp,action=ct(commit),2
-priority=100,in_port=2,icmp,ct_state=-trk,action=ct(table=0)
-priority=100,in_port=2,icmp,ct_state=+trk+est,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Pings from ns0->ns1 should work fine.
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-icmp,orig=(src=10.1.1.1,dst=10.1.1.2,id=<cleared>,type=8,code=0),reply=(src=10.1.1.2,dst=10.1.1.1,id=<cleared>,type=0,code=0)
-])
-
-AT_CHECK([ovs-appctl dpctl/flush-conntrack])
-
-dnl Pings from ns1->ns0 should fail.
-NS_CHECK_EXEC([at_ns1], [ping -q -c 3 -i 0.3 -w 2 10.1.1.1 | FORMAT_PING], [0], [dnl
-7 packets transmitted, 0 received, 100% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - get_nconns and get/set_maxconns])
-CHECK_CONNTRACK()
-CHECK_CT_DPIF_SET_GET_MAXCONNS()
-CHECK_CT_DPIF_GET_NCONNS()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=100,in_port=1,icmp,action=ct(commit),2
-priority=100,in_port=2,icmp,ct_state=-trk,action=ct(table=0)
-priority=100,in_port=2,icmp,ct_state=+trk+est,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Pings from ns0->ns1 should work fine.
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-icmp,orig=(src=10.1.1.1,dst=10.1.1.2,id=<cleared>,type=8,code=0),reply=(src=10.1.1.2,dst=10.1.1.1,id=<cleared>,type=0,code=0)
-])
-
-AT_CHECK([ovs-appctl dpctl/ct-set-maxconns one-bad-dp], [2], [], [dnl
-ovs-vswitchd: maxconns missing or malformed (Invalid argument)
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-
-AT_CHECK([ovs-appctl dpctl/ct-set-maxconns a], [2], [], [dnl
-ovs-vswitchd: maxconns missing or malformed (Invalid argument)
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-
-AT_CHECK([ovs-appctl dpctl/ct-set-maxconns one-bad-dp 10], [2], [], [dnl
-ovs-vswitchd: datapath not found (Invalid argument)
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-
-AT_CHECK([ovs-appctl dpctl/ct-get-maxconns one-bad-dp], [2], [], [dnl
-ovs-vswitchd: datapath not found (Invalid argument)
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-
-AT_CHECK([ovs-appctl dpctl/ct-get-nconns one-bad-dp], [2], [], [dnl
-ovs-vswitchd: datapath not found (Invalid argument)
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-
-AT_CHECK([ovs-appctl dpctl/ct-get-nconns], [], [dnl
-1
-])
-
-AT_CHECK([ovs-appctl dpctl/ct-get-maxconns], [], [dnl
-3000000
-])
-
-AT_CHECK([ovs-appctl dpctl/ct-set-maxconns 10], [], [dnl
-setting maxconns successful
-])
-
-AT_CHECK([ovs-appctl dpctl/ct-get-maxconns], [], [dnl
-10
-])
-
-AT_CHECK([ovs-appctl dpctl/flush-conntrack])
-
-AT_CHECK([ovs-appctl dpctl/ct-get-nconns], [], [dnl
-0
-])
-
-AT_CHECK([ovs-appctl dpctl/ct-get-maxconns], [], [dnl
-10
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 ping])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-AT_DATA([flows.txt], [dnl
-
-dnl ICMPv6 echo request and reply go to table 1.  The rest of the traffic goes
-dnl through normal action.
-table=0,priority=10,icmp6,icmp_type=128,action=goto_table:1
-table=0,priority=10,icmp6,icmp_type=129,action=goto_table:1
-table=0,priority=1,action=normal
-
-dnl Allow everything from ns0->ns1. Only allow return traffic from ns1->ns0.
-table=1,priority=100,in_port=1,icmp6,action=ct(commit),2
-table=1,priority=100,in_port=2,icmp6,ct_state=-trk,action=ct(table=0)
-table=1,priority=100,in_port=2,icmp6,ct_state=+trk+est,action=1
-table=1,priority=1,action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2])
-
-dnl The above ping creates state in the connection tracker.  We're not
-dnl interested in that state.
-AT_CHECK([ovs-appctl dpctl/flush-conntrack])
-
-dnl Pings from ns1->ns0 should fail.
-NS_CHECK_EXEC([at_ns1], [ping6 -q -c 3 -i 0.3 -w 2 fc00::1 | FORMAT_PING], [0], [dnl
-7 packets transmitted, 0 received, 100% packet loss, time 0ms
-])
-
-dnl Pings from ns0->ns1 should work fine.
-NS_CHECK_EXEC([at_ns0], [ping6 -q -c 3 -i 0.3 -w 2 fc00::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-icmpv6,orig=(src=fc00::1,dst=fc00::2,id=<cleared>,type=128,code=0),reply=(src=fc00::2,dst=fc00::1,id=<cleared>,type=129,code=0)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - preserve registers])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1, at_ns2, at_ns3)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-ADD_VETH(p2, at_ns2, br0, "10.1.1.3/24")
-ADD_VETH(p3, at_ns3, br0, "10.1.1.4/24")
-
-dnl Allow any traffic from ns0->ns1, ns2->ns3.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=10,icmp,action=normal
-priority=100,in_port=1,tcp,ct_state=-trk,action=ct(commit,table=0)
-priority=100,in_port=1,tcp,ct_state=+trk,action=2
-priority=100,in_port=2,tcp,ct_state=-trk,action=ct(table=0)
-priority=100,in_port=2,tcp,ct_state=+trk,action=1
-priority=100,in_port=3,tcp,ct_state=-trk,action=load:0->NXM_NX_REG0[[]],ct(table=0)
-priority=100,in_port=3,tcp,ct_state=+trk,reg0=0,action=load:1->NXM_NX_REG0[[]],ct(commit,table=0)
-priority=100,in_port=3,tcp,ct_state=+trk,reg0=1,action=4
-priority=100,in_port=4,tcp,ct_state=-trk,action=ct(commit,table=0)
-priority=100,in_port=4,tcp,ct_state=+trk,action=3
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_START_L7([at_ns1], [http])
-OVS_START_L7([at_ns3], [http])
-
-dnl HTTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-dnl HTTP requests from p2->p3 should work fine.
-NS_CHECK_EXEC([at_ns2], [wget 10.1.1.4 -t 3 -T 1 --retry-connrefused -v -o wget1.log])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - invalid])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1, at_ns2, at_ns3)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-ADD_VETH(p2, at_ns2, br0, "10.1.1.3/24")
-ADD_VETH(p3, at_ns3, br0, "10.1.1.4/24")
-
-dnl Pass traffic from ns0->ns1 without committing, but attempt to track in
-dnl the opposite direction. This should fail.
-dnl Pass traffic from ns3->ns4 without committing, and this time match
-dnl invalid traffic and allow it through.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=10,icmp,action=normal
-priority=100,in_port=1,tcp,action=ct(),2
-priority=100,in_port=2,ct_state=-trk,tcp,action=ct(table=0)
-priority=100,in_port=2,ct_state=+trk+new,tcp,action=1
-priority=100,in_port=3,tcp,action=ct(),4
-priority=100,in_port=4,ct_state=-trk,tcp,action=ct(table=0)
-priority=100,in_port=4,ct_state=+trk+inv,tcp,action=3
-priority=100,in_port=4,ct_state=+trk+new,tcp,action=3
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl We set up our rules to allow the request without committing. The return
-dnl traffic can't be identified, because the initial request wasn't committed.
-dnl For the first pair of ports, this means that the connection fails.
-OVS_START_L7([at_ns1], [http])
-OVS_START_L7([at_ns3], [http])
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log], [4])
-
-dnl For the second pair, we allow packets from invalid connections, so it works.
-NS_CHECK_EXEC([at_ns2], [wget 10.1.1.4 -t 3 -T 1 --retry-connrefused -v -o wget1.log])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - zones])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1, at_ns2, at_ns3)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-ADD_VETH(p2, at_ns2, br0, "10.1.1.3/24")
-ADD_VETH(p3, at_ns3, br0, "10.1.1.4/24")
-
-dnl Allow any traffic from ns0->ns1. Allow return traffic, matching on zone.
-dnl For ns2->ns3, use a different zone and see that the match fails.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=10,icmp,action=normal
-priority=100,in_port=1,tcp,action=ct(commit,zone=1),2
-priority=100,in_port=2,ct_state=-trk,tcp,action=ct(table=0,zone=1)
-priority=100,in_port=2,ct_state=+trk,ct_zone=1,tcp,action=1
-priority=100,in_port=3,tcp,action=ct(commit,zone=2),4
-priority=100,in_port=4,ct_state=-trk,tcp,action=ct(table=0,zone=2)
-priority=100,in_port=4,ct_state=+trk,ct_zone=1,tcp,action=3
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_START_L7([at_ns1], [http])
-OVS_START_L7([at_ns3], [http])
-
-dnl HTTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-])
-
-dnl HTTP requests from p2->p3 should fail due to network failure.
-dnl Try 3 times, in 1 second intervals.
-NS_CHECK_EXEC([at_ns2], [wget 10.1.1.4 -t 3 -T 1 -v -o wget1.log], [4])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.4)], [0], [dnl
-tcp,orig=(src=10.1.1.3,dst=10.1.1.4,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.4,dst=10.1.1.3,sport=<cleared>,dport=<cleared>),zone=2,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - zones from field])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1, at_ns2, at_ns3)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-ADD_VETH(p2, at_ns2, br0, "10.1.1.3/24")
-ADD_VETH(p3, at_ns3, br0, "10.1.1.4/24")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=10,icmp,action=normal
-priority=100,in_port=1,tcp,action=load:0x1001->NXM_NX_REG0[[0..15]],ct(commit,zone=NXM_NX_REG0[[0..15]]),2
-priority=100,in_port=2,ct_state=-trk,tcp,action=load:0x1001->NXM_NX_REG0[[0..15]],ct(table=0,zone=NXM_NX_REG0[[0..15]])
-priority=100,in_port=2,ct_state=+trk,ct_zone=0x1001,tcp,action=1
-priority=100,in_port=3,tcp,action=load:0x1002->NXM_NX_REG0[[0..15]],ct(commit,zone=NXM_NX_REG0[[0..15]]),4
-priority=100,in_port=4,ct_state=-trk,tcp,action=load:0x1002->NXM_NX_REG0[[0..15]],ct(table=0,zone=NXM_NX_REG0[[0..15]])
-priority=100,in_port=4,ct_state=+trk,ct_zone=0x1001,tcp,action=3
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_START_L7([at_ns1], [http])
-OVS_START_L7([at_ns3], [http])
-
-dnl HTTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=4097,protoinfo=(state=<cleared>)
-])
-
-dnl HTTP requests from p2->p3 should fail due to network failure.
-dnl Try 3 times, in 1 second intervals.
-NS_CHECK_EXEC([at_ns2], [wget 10.1.1.4 -t 3 -T 1 -v -o wget1.log], [4])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.4)], [0], [dnl
-tcp,orig=(src=10.1.1.3,dst=10.1.1.4,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.4,dst=10.1.1.3,sport=<cleared>,dport=<cleared>),zone=4098,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - multiple bridges])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START(
-   [_ADD_BR([br1]) --\
-    add-port br0 patch+ -- set int patch+ type=patch options:peer=patch- --\
-    add-port br1 patch- -- set int patch- type=patch options:peer=patch+ --])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br1, "10.1.1.2/24")
-
-dnl Allow any traffic from ns0->br1, allow established in reverse.
-AT_DATA([flows-br0.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=10,icmp,action=normal
-priority=100,in_port=2,tcp,ct_state=-trk,action=ct(commit,zone=1),1
-priority=100,in_port=1,tcp,ct_state=-trk,action=ct(table=0,zone=1)
-priority=100,in_port=1,tcp,ct_state=+trk+est,ct_zone=1,action=2
-])
-
-dnl Allow any traffic from br0->ns1, allow established in reverse.
-AT_DATA([flows-br1.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=10,icmp,action=normal
-priority=100,in_port=1,tcp,ct_state=-trk,action=ct(table=0,zone=2)
-priority=100,in_port=1,tcp,ct_state=+trk+new,ct_zone=2,action=ct(commit,zone=2),2
-priority=100,in_port=1,tcp,ct_state=+trk+est,ct_zone=2,action=2
-priority=100,in_port=2,tcp,ct_state=-trk,action=ct(table=0,zone=2)
-priority=100,in_port=2,tcp,ct_state=+trk+est,ct_zone=2,action=ct(commit,zone=2),1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows-br0.txt])
-AT_CHECK([ovs-ofctl --bundle add-flows br1 flows-br1.txt])
-
-dnl HTTP requests from p0->p1 should work fine.
-OVS_START_L7([at_ns1], [http])
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - multiple zones])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=10,icmp,action=normal
-priority=100,in_port=1,tcp,action=ct(commit,zone=1),ct(commit,zone=2),2
-priority=100,in_port=2,ct_state=-trk,tcp,action=ct(table=0,zone=2)
-priority=100,in_port=2,ct_state=+trk,ct_zone=2,tcp,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_START_L7([at_ns1], [http])
-
-dnl HTTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-dnl (again) HTTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=2,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - multiple namespaces, internal ports])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_LOCAL_STACK()
-OVS_TRAFFIC_VSWITCHD_START(
-   [set-fail-mode br0 secure -- ])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_INT(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_INT(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-dnl
-dnl If skb->nfct is leaking from inside the namespace, this test will fail.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=10,icmp,action=normal
-priority=100,in_port=1,tcp,ct_state=-trk,action=ct(commit,zone=1),2
-priority=100,in_port=2,ct_state=-trk,tcp,action=ct(table=0,zone=1)
-priority=100,in_port=2,ct_state=+trk,ct_zone=1,tcp,action=1
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-OVS_START_L7([at_ns1], [http])
-
-dnl HTTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-dnl (again) HTTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP(["dnl
-/ioctl(SIOCGIFINDEX) on .* device failed: No such device/d
-/removing policing failed: No such device/d"])
-AT_CLEANUP
-
-AT_SETUP([conntrack - ct_mark])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1, at_ns2, at_ns3)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-ADD_VETH(p2, at_ns2, br0, "10.1.1.3/24")
-ADD_VETH(p3, at_ns3, br0, "10.1.1.4/24")
-
-dnl Allow traffic between ns0<->ns1 using the ct_mark.
-dnl Check that different marks do not match for traffic between ns2<->ns3.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=10,icmp,action=normal
-priority=100,in_port=1,tcp,action=ct(commit,exec(set_field:1->ct_mark)),2
-priority=100,in_port=2,ct_state=-trk,tcp,action=ct(table=0)
-priority=100,in_port=2,ct_state=+trk,ct_mark=1,tcp,action=1
-priority=100,in_port=3,tcp,action=ct(commit,exec(set_field:2->ct_mark)),4
-priority=100,in_port=4,ct_state=-trk,tcp,action=ct(table=0)
-priority=100,in_port=4,ct_state=+trk,ct_mark=1,tcp,action=3
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_START_L7([at_ns1], [http])
-OVS_START_L7([at_ns3], [http])
-
-dnl HTTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),mark=1,protoinfo=(state=<cleared>)
-])
-
-dnl HTTP requests from p2->p3 should fail due to network failure.
-dnl Try 3 times, in 1 second intervals.
-NS_CHECK_EXEC([at_ns2], [wget 10.1.1.4 -t 3 -T 1 -v -o wget1.log], [4])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.4)], [0], [dnl
-tcp,orig=(src=10.1.1.3,dst=10.1.1.4,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.4,dst=10.1.1.3,sport=<cleared>,dport=<cleared>),mark=2,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - ct_mark bit-fiddling])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1, at_ns2, at_ns3)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow traffic between ns0<->ns1 using the ct_mark. Return traffic should
-dnl cause an additional bit to be set in the connection (and be allowed).
-AT_DATA([flows.txt], [dnl
-table=0,priority=1,action=drop
-table=0,priority=10,arp,action=normal
-table=0,priority=10,icmp,action=normal
-table=0,priority=100,in_port=1,tcp,action=ct(table=1)
-table=0,priority=100,in_port=2,ct_state=-trk,tcp,action=ct(table=1,commit,exec(set_field:0x2/0x6->ct_mark))
-table=1,in_port=1,ct_state=+new,tcp,action=ct(commit,exec(set_field:0x5/0x5->ct_mark)),2
-table=1,in_port=1,ct_state=-new,tcp,action=2
-table=1,in_port=2,ct_state=+trk,ct_mark=3,tcp,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_START_L7([at_ns1], [http])
-
-dnl HTTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),mark=3,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - ct_mark from register])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1, at_ns2, at_ns3)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-ADD_VETH(p2, at_ns2, br0, "10.1.1.3/24")
-ADD_VETH(p3, at_ns3, br0, "10.1.1.4/24")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=10,icmp,action=normal
-priority=100,in_port=1,tcp,action=load:1->NXM_NX_REG0[[0..31]],ct(commit,exec(move:NXM_NX_REG0[[0..31]]->NXM_NX_CT_MARK[[]])),2
-priority=100,in_port=2,ct_state=-trk,tcp,action=ct(table=0)
-priority=100,in_port=2,ct_state=+trk,ct_mark=1,tcp,action=1
-priority=100,in_port=3,tcp,action=load:2->NXM_NX_REG0[[0..31]],ct(commit,exec(move:NXM_NX_REG0[[0..31]]->NXM_NX_CT_MARK[[]])),4
-priority=100,in_port=4,ct_state=-trk,tcp,action=ct(table=0)
-priority=100,in_port=4,ct_state=+trk,ct_mark=1,tcp,action=3
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_START_L7([at_ns1], [http])
-OVS_START_L7([at_ns3], [http])
-
-dnl HTTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),mark=1,protoinfo=(state=<cleared>)
-])
-
-dnl HTTP requests from p2->p3 should fail due to network failure.
-dnl Try 3 times, in 1 second intervals.
-NS_CHECK_EXEC([at_ns2], [wget 10.1.1.4 -t 3 -T 1 -v -o wget1.log], [4])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.4)], [0], [dnl
-tcp,orig=(src=10.1.1.3,dst=10.1.1.4,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.4,dst=10.1.1.3,sport=<cleared>,dport=<cleared>),mark=2,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - ct_label])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1, at_ns2, at_ns3)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-ADD_VETH(p2, at_ns2, br0, "10.1.1.3/24")
-ADD_VETH(p3, at_ns3, br0, "10.1.1.4/24")
-
-dnl Allow traffic between ns0<->ns1 using the ct_label.
-dnl Check that different labels do not match for traffic between ns2<->ns3.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=10,icmp,action=normal
-priority=100,in_port=1,tcp,action=ct(commit,exec(set_field:0x0a000d000005000001->ct_label)),2
-priority=100,in_port=2,ct_state=-trk,tcp,action=ct(table=0)
-priority=100,in_port=2,ct_state=+trk,ct_label=0x0a000d000005000001,tcp,action=1
-priority=100,in_port=3,tcp,action=ct(commit,exec(set_field:0x2->ct_label)),4
-priority=100,in_port=4,ct_state=-trk,tcp,action=ct(table=0)
-priority=100,in_port=4,ct_state=+trk,ct_label=0x0a000d000005000001,tcp,action=3
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_START_L7([at_ns1], [http])
-OVS_START_L7([at_ns3], [http])
-
-dnl HTTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-dnl HTTP requests from p2->p3 should fail due to network failure.
-dnl Try 3 times, in 1 second intervals.
-NS_CHECK_EXEC([at_ns2], [wget 10.1.1.4 -t 3 -T 1 -v -o wget1.log], [4])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - ct_label bit-fiddling])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1, at_ns2, at_ns3)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow traffic between ns0<->ns1 using the ct_labels. Return traffic should
-dnl cause an additional bit to be set in the connection labels (and be allowed)
-AT_DATA([flows.txt], [dnl
-table=0,priority=1,action=drop
-table=0,priority=10,arp,action=normal
-table=0,priority=10,icmp,action=normal
-table=0,priority=100,in_port=1,tcp,action=ct(table=1)
-table=0,priority=100,in_port=2,ct_state=-trk,tcp,action=ct(table=1,commit,exec(set_field:0x200000000/0x200000004->ct_label))
-table=1,in_port=1,tcp,ct_state=+new,action=ct(commit,exec(set_field:0x5/0x5->ct_label)),2
-table=1,in_port=1,tcp,ct_state=-new,action=2
-table=1,in_port=2,ct_state=+trk,ct_label=0x200000001,tcp,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_START_L7([at_ns1], [http])
-
-dnl HTTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),labels=0x200000001,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - ct metadata, multiple zones])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1, at_ns2, at_ns3)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow traffic between ns0<->ns1 using the ct_mark and ct_labels in zone=1,
-dnl but do *not* set any of these for the ct() in zone=2. Traffic should pass,
-dnl and we should see that the conntrack entries only apply the ct_mark and
-dnl ct_labels to the connection in zone=1.
-AT_DATA([flows.txt], [dnl
-table=0,priority=1,action=drop
-table=0,priority=10,arp,action=normal
-table=0,priority=10,icmp,action=normal
-table=0,priority=100,in_port=1,tcp,action=ct(zone=1,table=1)
-table=0,priority=100,in_port=2,ct_state=-trk,tcp,action=ct(zone=1,table=1,commit,exec(set_field:0x200000000/0x200000004->ct_label,set_field:0x2/0x6->ct_mark))
-table=1,in_port=1,tcp,ct_state=+new,action=ct(zone=1,commit,exec(set_field:0x5/0x5->ct_label,set_field:0x5/0x5->ct_mark)),ct(commit,zone=2),2
-table=1,in_port=1,tcp,ct_state=-new,action=ct(zone=2),2
-table=1,in_port=2,tcp,action=ct(zone=2),1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_START_L7([at_ns1], [http])
-
-dnl HTTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=1,mark=3,labels=0x200000001,protoinfo=(state=<cleared>)
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=2,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - ICMP related])
-AT_SKIP_IF([test $HAVE_NC = no])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow UDP traffic from ns0->ns1. Only allow related ICMP responses back.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=100,in_port=1,udp,action=ct(commit,exec(set_field:1->ct_mark)),2
-priority=100,in_port=2,icmp,ct_state=-trk,action=ct(table=0)
-priority=100,in_port=2,icmp,ct_state=+trk+rel,ct_mark=1,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl UDP packets from ns0->ns1 should solicit "destination unreachable" response.
-NS_CHECK_EXEC([at_ns0], [bash -c "echo a | nc $NC_EOF_OPT -u 10.1.1.2 10000"])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort | grep -v drop], [0], [dnl
- n_packets=1, n_bytes=44, priority=100,udp,in_port=1 actions=ct(commit,exec(load:0x1->NXM_NX_CT_MARK[[]])),output:2
- n_packets=1, n_bytes=72, priority=100,ct_state=+rel+trk,ct_mark=0x1,icmp,in_port=2 actions=output:1
- n_packets=1, n_bytes=72, priority=100,ct_state=-trk,icmp,in_port=2 actions=ct(table=0)
- n_packets=2, n_bytes=84, priority=10,arp actions=NORMAL
-NXST_FLOW reply:
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - ICMP related to original direction])
-AT_SKIP_IF([test $HAVE_NC = no])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow UDP traffic from ns0->ns1. Only allow related ICMP responses back.
-AT_DATA([flows.txt], [dnl
-priority=1000,arp,action=normal
-priority=100,ip,action=ct(table=1)
-priority=1,action=drop
-table=1,ip,action=ct(zone=34673,table=2)
-table=2,in_port=2,udp,action=ct(commit,zone=34673),1
-table=2,in_port=1,udp,action=ct(commit,zone=34673),2
-table=2,in_port=2,ct_state=+rel,icmp,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl 1. Send and UDP packet to port 53 (src=192.100.1.8,dst=192.100.2.5)
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 2 resubmit\(,0\) '00010200020400232211223308004500001c000100004011f6fac0640108c06402050035003500087b9e'])
-
-dnl 2. Send and UDP packet to port 53 (src=192.100.2.5,dst=192.100.1.8)
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 1 resubmit\(,0\) '00232211223300010200020408004500001c000100004011f6fac0640205c06401080035003500087b9e'])
-
-dnl 3. Send an ICMP port unreach reply for port 53, related to the 2nd
-dnl packet, but in the original direction of the conntrack entry created
-dnl for the 1st packet.
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 2 resubmit\(,0\) '000102000204002322112233080045000038000100003f01f7eec0640108c0640205030a80e5ffffffff4500001c000100003f11f7fac0640205c06401080035003500087b9e'])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-
-dnl 4. Repeat 3.
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 2 resubmit\(,0\) '000102000204002322112233080045000038000100003f01f7eec0640108c0640205030a80e5ffffffff4500001c000100003f11f7fac0640205c06401080035003500087b9e'])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort | grep -v drop], [0], [dnl
- n_packets=4, n_bytes=224, priority=100,ip actions=ct(table=1)
- priority=1000,arp actions=NORMAL
- table=1, n_packets=4, n_bytes=224, ip actions=ct(table=2,zone=34673)
- table=2, n_packets=1, n_bytes=42, udp,in_port=1 actions=ct(commit,zone=34673),output:2
- table=2, n_packets=1, n_bytes=42, udp,in_port=2 actions=ct(commit,zone=34673),output:1
- table=2, n_packets=2, n_bytes=140, ct_state=+rel,icmp,in_port=2 actions=output:1
-NXST_FLOW reply:
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(192.100.1.8)], [0], [dnl
-udp,orig=(src=192.100.1.8,dst=192.100.2.5,sport=<cleared>,dport=<cleared>),reply=(src=192.100.2.5,dst=192.100.1.8,sport=<cleared>,dport=<cleared>),zone=34673
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - ICMP related 2])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "172.16.0.1/24")
-ADD_VETH(p1, at_ns1, br0, "172.16.0.2/24")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-table=0,ip,action=ct(commit,table=1)
-table=1,ip,action=controller
-])
-
-AT_CHECK([ovs-ofctl --bundle replace-flows br0 flows.txt])
-
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-dnl 1. Send an ICMP port unreach reply for port 8738, without any previous request
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 2 resubmit\(,0\) 'f64c473528c9c6f54ecb72db080045c0003d2e8700004001f351ac100004ac1000030303da490000000045000021317040004011b138ac100003ac10000411112222000d20966369616f0a'])
-
-dnl 2. Send and UDP packet to port 5555
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 1 resubmit\(,0\) 'c6f94ecb72dbe64c473528c9080045000021317040004011b138ac100001ac100002a28e15b3000d20966369616f0a'])
-
-dnl 3. Send an ICMP port unreach reply from a path midpoint for port 5555, related to the first packet
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 2 resubmit\(,0\) 'e64c473528c9c6f94ecb72db080045c0003d2e8700004001f354ac100003ac1000010303553f0000000045000021317040004011b138ac100001ac100002a28e15b3000d20966369616f0a'])
-
-OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
-
-dnl Check this output. We only see the latter two packets, not the first.
-AT_CHECK([cat ofctl_monitor.log | grep -v ff02 | grep -v fe80 | grep -v no_match], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): table_id=1 cookie=0x0 total_len=75 ct_state=inv|trk,ip,in_port=2 (via action) data_len=75 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=c6:f5:4e:cb:72:db,dl_dst=f6:4c:47:35:28:c9,nw_src=172.16.0.4,nw_dst=172.16.0.3,nw_tos=192,nw_ecn=0,nw_ttl=64,icmp_type=3,icmp_code=3 icmp_csum:da49
-NXT_PACKET_IN2 (xid=0x0): table_id=1 cookie=0x0 total_len=47 ct_state=new|trk,ct_nw_src=172.16.0.1,ct_nw_dst=172.16.0.2,ct_nw_proto=17,ct_tp_src=41614,ct_tp_dst=5555,ip,in_port=1 (via action) data_len=47 (unbuffered)
-udp,vlan_tci=0x0000,dl_src=e6:4c:47:35:28:c9,dl_dst=c6:f9:4e:cb:72:db,nw_src=172.16.0.1,nw_dst=172.16.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=41614,tp_dst=5555 udp_csum:2096
-NXT_PACKET_IN2 (xid=0x0): table_id=1 cookie=0x0 total_len=75 ct_state=rel|rpl|trk,ct_nw_src=172.16.0.1,ct_nw_dst=172.16.0.2,ct_nw_proto=17,ct_tp_src=41614,ct_tp_dst=5555,ip,in_port=2 (via action) data_len=75 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=c6:f9:4e:cb:72:db,dl_dst=e6:4c:47:35:28:c9,nw_src=172.16.0.3,nw_dst=172.16.0.1,nw_tos=192,nw_ecn=0,nw_ttl=64,icmp_type=3,icmp_code=3 icmp_csum:553f
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(172.16.0.1)], [0], [dnl
-udp,orig=(src=172.16.0.1,dst=172.16.0.2,sport=<cleared>,dport=<cleared>),reply=(src=172.16.0.2,dst=172.16.0.1,sport=<cleared>,dport=<cleared>)
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(172.16.0.3)], [0], [dnl
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv4 fragmentation])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Sending ping through conntrack
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=100,in_port=1,icmp,action=ct(commit,zone=9),2
-priority=100,in_port=2,ct_state=-trk,icmp,action=ct(table=0,zone=9)
-priority=100,in_port=2,ct_state=+trk+est-new,icmp,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Modify userspace conntrack fragmentation handling.
-DPCTL_MODIFY_FRAGMENTATION()
-
-dnl Ipv4 fragmentation connectivity check.
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Ipv4 larger fragmentation connectivity check.
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Check userspace conntrack fragmentation counters.
-DPCTL_CHECK_FRAGMENTATION_PASS()
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv4 fragmentation expiry])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-
-dnl Only allow non-fragmented messages and 1st fragments of each message
-priority=100,in_port=1,icmp,ip_frag=no,action=ct(commit,zone=9),2
-priority=100,in_port=1,icmp,ip_frag=firstaction=ct(commit,zone=9),2
-priority=100,in_port=2,ct_state=-trk,icmp,action=ct(table=0,zone=9)
-priority=100,in_port=2,ct_state=+trk+est-new,icmp,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Modify userspace conntrack fragmentation handling.
-DPCTL_MODIFY_FRAGMENTATION()
-
-dnl Ipv4 fragmentation connectivity check.
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 1 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-7 packets transmitted, 0 received, 100% packet loss, time 0ms
-])
-
-dnl Check userspace conntrack fragmentation counters.
-DPCTL_CHECK_FRAGMENTATION_FAIL()
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv4 fragmentation + vlan])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-ADD_VLAN(p0, at_ns0, 100, "10.2.2.1/24")
-ADD_VLAN(p1, at_ns1, 100, "10.2.2.2/24")
-
-dnl Sending ping through conntrack
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=100,in_port=1,icmp,action=ct(commit,zone=9),2
-priority=100,in_port=2,ct_state=-trk,icmp,action=ct(table=0,zone=9)
-priority=100,in_port=2,ct_state=+trk+est-new,icmp,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Modify userspace conntrack fragmentation handling.
-DPCTL_MODIFY_FRAGMENTATION()
-
-dnl Ipv4 fragmentation connectivity check.
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Ipv4 larger fragmentation connectivity check.
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Check userspace conntrack fragmentation counters.
-DPCTL_CHECK_FRAGMENTATION_PASS()
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv4 fragmentation + cvlan])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START([set Open_vSwitch . other_config:vlan-limit=0])
-OVS_CHECK_8021AD()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-ADD_SVLAN(p0, at_ns0, 4094, "10.255.2.1/24")
-ADD_SVLAN(p1, at_ns1, 4094, "10.255.2.2/24")
-
-ADD_CVLAN(p0.4094, at_ns0, 100, "10.2.2.1/24")
-ADD_CVLAN(p1.4094, at_ns1, 100, "10.2.2.2/24")
-
-dnl Sending ping through conntrack
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=100,in_port=1,icmp,action=ct(commit,zone=9),2
-priority=100,in_port=2,ct_state=-trk,icmp,action=ct(table=0,zone=9)
-priority=100,in_port=2,ct_state=+trk+est-new,icmp,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.2.2.2])
-
-dnl Ipv4 fragmentation connectivity check.
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Ipv4 fragmentation connectivity check. (outer svlan)
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.255.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Ipv4 larger fragmentation connectivity check.
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Ipv4 larger fragmentation connectivity check. (outer svlan)
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.255.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv4 fragmentation incomplete reassembled packet])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-DPCTL_SET_MIN_FRAG_SIZE()
-
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-AT_DATA([bundle.txt], [dnl
-packet-out in_port=1, packet=50540000000a5054000000090800450001a400012000001183440a0101010a01010200010002000800000304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809,  actions=ct(commit)
-])
-
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl Uses same first fragment as above 'incomplete reassembled packet' test.
-AT_SETUP([conntrack - IPv4 fragmentation with fragments specified])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-DPCTL_SET_MIN_FRAG_SIZE()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-AT_DATA([bundle.txt], [dnl
-packet-out in_port=1, packet=50540000000a5054000000090800450001a400012000001183440a0101010a01010200010002000800000304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809,  actions=ct(commit)
-packet-out in_port=1, packet=50540000000a505400000009080045000030000100320011a4860a0101010a01010200010002000800000010203040506070809000010203040506070809, actions=ct(commit)
-])
-
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-udp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv4 fragmentation out of order])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-DPCTL_SET_MIN_FRAG_SIZE()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-AT_DATA([bundle.txt], [dnl
-packet-out in_port=1, packet=50540000000a505400000009080045000030000100320011a4860a0101010a01010200010002000800000010203040506070809000010203040506070809, actions=ct(commit)
-packet-out in_port=1, packet=50540000000a5054000000090800450001a400012000001183440a0101010a01010200010002000800000304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809,  actions=ct(commit)
-])
-
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-udp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv4 fragmentation overlapping fragments by 1 octet])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_FRAG_OVERLAP()
-OVS_TRAFFIC_VSWITCHD_START()
-DPCTL_SET_MIN_FRAG_SIZE()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-AT_DATA([bundle.txt], [dnl
-packet-out in_port=1, packet=50540000000a5054000000090800450001a400012000001183440a0101010a01010200010002000800000304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809,  actions=ct(commit)
-packet-out in_port=1, packet=50540000000a505400000009080045000030000100310011a4870a0101010a01010200010002000800000010203040506070809000010203040506070809, actions=ct(commit)
-])
-
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt])
-# There is one byte of overlap, hence the no packet gets thru. conntrack.
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv4 fragmentation overlapping fragments by 1 octet out of order])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_FRAG_OVERLAP()
-OVS_TRAFFIC_VSWITCHD_START()
-DPCTL_SET_MIN_FRAG_SIZE()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-AT_DATA([bundle.txt], [dnl
-packet-out in_port=1, packet=50540000000a505400000009080045000030000100310011a4870a0101010a01010200010002000800000010203040506070809000010203040506070809, actions=ct(commit)
-packet-out in_port=1, packet=50540000000a5054000000090800450001a400012000001183440a0101010a01010200010002000800000304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809,  actions=ct(commit)
-])
-
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt])
-# There is one byte of overlap, hence the no packet gets thru. conntrack.
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 fragmentation])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-dnl Sending ping through conntrack
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,in_port=1,ipv6,action=ct(commit,zone=9),2
-priority=10,in_port=2,ct_state=-trk,ipv6,action=ct(table=0,zone=9)
-priority=10,in_port=2,ct_state=+trk+est-new,ipv6,action=1
-priority=100,icmp6,icmp_type=135,action=normal
-priority=100,icmp6,icmp_type=136,action=normal
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2])
-
-dnl Ipv6 fragmentation connectivity check.
-NS_CHECK_EXEC([at_ns0], [ping6 -s 1600 -q -c 3 -i 0.3 -w 2 fc00::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Ipv6 larger fragmentation connectivity check.
-NS_CHECK_EXEC([at_ns0], [ping6 -s 3200 -q -c 3 -i 0.3 -w 2 fc00::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 fragmentation expiry])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-
-dnl Only allow non-fragmented messages and 1st fragments of each message
-priority=10,in_port=1,ipv6,ip_frag=first,action=ct(commit,zone=9),2
-priority=10,in_port=1,ipv6,ip_frag=no,action=ct(commit,zone=9),2
-priority=10,in_port=2,ct_state=-trk,ipv6,action=ct(table=0,zone=9)
-priority=10,in_port=2,ct_state=+trk+est-new,ipv6,action=1
-
-dnl Neighbour Discovery
-priority=100,icmp6,icmp_type=135,action=normal
-priority=100,icmp6,icmp_type=136,action=normal
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2])
-
-dnl Send an IPv6 fragment. Some time later, it should expire.
-NS_CHECK_EXEC([at_ns0], [ping6 -s 1600 -q -c 1 -i 0.3 -w 2 fc00::2 | FORMAT_PING], [0], [dnl
-7 packets transmitted, 0 received, 100% packet loss, time 0ms
-])
-
-dnl At this point, the kernel will either crash or everything is OK.
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 fragmentation + vlan])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-ADD_VLAN(p0, at_ns0, 100, "fc00:1::3/96")
-ADD_VLAN(p1, at_ns1, 100, "fc00:1::4/96")
-
-dnl Sending ping through conntrack
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,in_port=1,ipv6,action=ct(commit,zone=9),2
-priority=10,in_port=2,ct_state=-trk,ipv6,action=ct(table=0,zone=9)
-priority=10,in_port=2,ct_state=+trk+est-new,ipv6,action=1
-priority=100,icmp6,icmp_type=135,action=normal
-priority=100,icmp6,icmp_type=136,action=normal
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2])
-
-dnl Ipv4 fragmentation connectivity check.
-NS_CHECK_EXEC([at_ns0], [ping6 -s 1600 -q -c 3 -i 0.3 -w 2 fc00:1::4 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Ipv4 larger fragmentation connectivity check.
-NS_CHECK_EXEC([at_ns0], [ping6 -s 3200 -q -c 3 -i 0.3 -w 2 fc00:1::4 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 fragmentation + cvlan])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START([set Open_vSwitch . other_config:vlan-limit=0])
-OVS_CHECK_8021AD()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-ADD_SVLAN(p0, at_ns0, 4094, "fc00:ffff::3/96")
-ADD_SVLAN(p1, at_ns1, 4094, "fc00:ffff::4/96")
-
-ADD_CVLAN(p0.4094, at_ns0, 100, "fc00:1::3/96")
-ADD_CVLAN(p1.4094, at_ns1, 100, "fc00:1::4/96")
-
-dnl Sending ping through conntrack
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,in_port=1,ipv6,action=ct(commit,zone=9),2
-priority=10,in_port=2,ct_state=-trk,ipv6,action=ct(table=0,zone=9)
-priority=10,in_port=2,ct_state=+trk+est-new,ipv6,action=1
-priority=100,icmp6,icmp_type=135,action=normal
-priority=100,icmp6,icmp_type=136,action=normal
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00:1::4])
-
-dnl Ipv6 fragmentation connectivity check.
-NS_CHECK_EXEC([at_ns0], [ping6 -s 1600 -q -c 3 -i 0.3 -w 2 fc00:1::4 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Ipv6 fragmentation connectivity check. (outer svlan)
-NS_CHECK_EXEC([at_ns0], [ping6 -s 1600 -q -c 3 -i 0.3 -w 2 fc00:ffff::4 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Ipv6 larger fragmentation connectivity check.
-NS_CHECK_EXEC([at_ns0], [ping6 -s 3200 -q -c 3 -i 0.3 -w 2 fc00:1::4 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Ipv6 larger fragmentation connectivity check. (outer svlan)
-NS_CHECK_EXEC([at_ns0], [ping6 -s 3200 -q -c 3 -i 0.3 -w 2 fc00:ffff::4 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 fragmentation incomplete reassembled packet])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-DPCTL_SET_MIN_FRAG_SIZE()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-AT_DATA([bundle.txt], [dnl
-packet-out in_port=1, packet=50540000000a50540000000986dd6000000001a02cfffc000000000000000000000000000001fc0000000000000000000000000000021100000100000001000100020008f62900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809,  actions=ct(commit)
-])
-
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 fragmentation with fragments specified])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-DPCTL_SET_MIN_FRAG_SIZE()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-AT_DATA([bundle.txt], [dnl
-packet-out in_port=1, packet=50540000000a50540000000986dd6000000001a02cfffc000000000000000000000000000001fc0000000000000000000000000000021100000100000001000100020008ba0200010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809,  actions=ct(commit)
-packet-out in_port=1, packet=50540000000a50540000000986dd6000000000242cfffc000000000000000000000000000001fc000000000000000000000000000002110001980000000100010002000800000001020304050607080900010203040506070809, actions=ct(commit)
-])
-
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-udp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::1,sport=<cleared>,dport=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 fragmentation out of order])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-DPCTL_SET_MIN_FRAG_SIZE()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-AT_DATA([bundle.txt], [dnl
-packet-out in_port=1, packet=50540000000a50540000000986dd6000000000242cfffc000000000000000000000000000001fc000000000000000000000000000002110001980000000100010002000800000001020304050607080900010203040506070809, actions=ct(commit)
-packet-out in_port=1, packet=50540000000a50540000000986dd6000000001a02cfffc000000000000000000000000000001fc0000000000000000000000000000021100000100000001000100020008ba0200010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809,  actions=ct(commit)
-])
-
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-udp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::1,sport=<cleared>,dport=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 fragmentation, multiple extension headers])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-DPCTL_SET_MIN_FRAG_SIZE()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-# Add different extension headers
-AT_DATA([bundle.txt], [dnl
-packet-out in_port=1, packet=50540000000a50540000000986dd60000000019800fffc000000000000000000000000000001fc0000000000000000000000000000022c000000000000001100000100000001000100020008e04000010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607,  actions=ct(commit)
-packet-out in_port=1, packet=50540000000a50540000000986dd60000000002c00fffc000000000000000000000000000001fc0000000000000000000000000000022c00000000000000110001880000000100010002000800000001020304050607080900010203040506070809, actions=ct(commit)
-])
-
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-udp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::1,sport=<cleared>,dport=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 fragmentation, multiple extension headers + out of order])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-DPCTL_SET_MIN_FRAG_SIZE()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-# Add different extension headers
-AT_DATA([bundle.txt], [dnl
-packet-out in_port=1, packet=50540000000a50540000000986dd60000000002c00fffc000000000000000000000000000001fc0000000000000000000000000000022c00000000000000110001880000000100010002000800000001020304050607080900010203040506070809, actions=ct(commit)
-packet-out in_port=1, packet=50540000000a50540000000986dd60000000019800fffc000000000000000000000000000001fc0000000000000000000000000000022c000000000000001100000100000001000100020008e04000010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607,  actions=ct(commit)
-])
-
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-udp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::1,sport=<cleared>,dport=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 fragmentation, multiple extension headers 2])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-DPCTL_SET_MIN_FRAG_SIZE()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-# Add different extension headers
-AT_DATA([bundle.txt], [dnl
-packet-out in_port=1, packet=50540000000a50540000000986dd60000000019800fffc000000000000000000000000000001fc0000000000000000000000000000022c000000050200001100000100000001000100020008e04000010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607,  actions=ct(commit)
-packet-out in_port=1, packet=50540000000a50540000000986dd60000000002c00fffc000000000000000000000000000001fc0000000000000000000000000000022c00000005020000110001880000000100010002000800000001020304050607080900010203040506070809, actions=ct(commit)
-])
-
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-udp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::1,sport=<cleared>,dport=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 fragmentation, multiple extension headers 2 + out of order])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-DPCTL_SET_MIN_FRAG_SIZE()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-# Add different extension headers
-AT_DATA([bundle.txt], [dnl
-packet-out in_port=1, packet=50540000000a50540000000986dd60000000002c00fffc000000000000000000000000000001fc0000000000000000000000000000022c00000005020000110001880000000100010002000800000001020304050607080900010203040506070809, actions=ct(commit)
-packet-out in_port=1, packet=50540000000a50540000000986dd60000000019800fffc000000000000000000000000000001fc0000000000000000000000000000022c000000050200001100000100000001000100020008e04000010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607,  actions=ct(commit)
-])
-
-AT_CHECK([ovs-ofctl bundle br0 bundle.txt])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-udp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::1,sport=<cleared>,dport=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - Fragmentation over vxlan])
-OVS_CHECK_VXLAN()
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_LOCAL_STACK()
-
-OVS_TRAFFIC_VSWITCHD_START()
-ADD_BR([br-underlay])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Sending ping through conntrack
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=100,in_port=1,icmp,action=ct(commit,zone=9),LOCAL
-priority=100,in_port=LOCAL,icmp,action=ct(table=1,zone=9)
-table=1,in_port=LOCAL,ct_state=+trk+est,icmp,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24")
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL([vxlan], [br0], [at_vxlan0], [172.31.1.1], [10.1.1.100/24])
-ADD_NATIVE_TUNNEL([vxlan], [at_vxlan1], [at_ns0], [172.31.1.100], [10.1.1.1/24],
-                  [id 0 dstport 4789])
-
-dnl First, check the underlay
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now check the overlay with different packet sizes
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 Fragmentation over vxlan])
-OVS_CHECK_VXLAN()
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_LOCAL_STACK()
-
-OVS_TRAFFIC_VSWITCHD_START()
-ADD_BR([br-underlay])
-AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"])
-
-ADD_NAMESPACES(at_ns0)
-
-dnl Sending ping through conntrack
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=100,in_port=1,ipv6,action=ct(commit,zone=9),LOCAL
-priority=100,in_port=LOCAL,ipv6,action=ct(table=1,zone=9)
-table=1,in_port=LOCAL,ct_state=+trk+est,ipv6,action=1
-
-dnl Neighbour Discovery
-priority=1000,icmp6,icmp_type=135,action=normal
-priority=1000,icmp6,icmp_type=136,action=normal
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Set up underlay link from host into the namespace using veth pair.
-ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24")
-AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"])
-AT_CHECK([ip link set dev br-underlay up])
-
-dnl Set up tunnel endpoints on OVS outside the namespace and with a native
-dnl linux device inside the namespace.
-ADD_OVS_TUNNEL([vxlan], [br0], [at_vxlan0], [172.31.1.1], ["fc00::2/96"])
-ADD_NATIVE_TUNNEL([vxlan], [at_vxlan1], [at_ns0], [172.31.1.100], ["fc00::1/96"],
-                  [id 0 dstport 4789])
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2])
-
-dnl First, check the underlay
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Okay, now check the overlay with different packet sizes
-NS_CHECK_EXEC([at_ns0], [ping6 -q -c 3 -i 0.3 -w 2 fc00::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping6 -s 1600 -q -c 3 -i 0.3 -w 2 fc00::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-NS_CHECK_EXEC([at_ns0], [ping6 -s 3200 -q -c 3 -i 0.3 -w 2 fc00::2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - resubmit to ct multiple times])
-CHECK_CONNTRACK()
-
-OVS_TRAFFIC_VSWITCHD_START(
-   [set-fail-mode br0 secure -- ])
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-AT_DATA([flows.txt], [dnl
-table=0,priority=150,arp,action=normal
-table=0,priority=100,ip,in_port=1,action=resubmit(,1),resubmit(,2)
-
-table=1,ip,action=ct(table=3)
-table=2,ip,action=ct(table=3)
-
-table=3,ip,action=drop
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 1 10.1.1.2 | FORMAT_PING], [0], [dnl
-1 packets transmitted, 0 received, 100% packet loss, time 0ms
-])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
- n_packets=1, n_bytes=98, priority=100,ip,in_port=1 actions=resubmit(,1),resubmit(,2)
- n_packets=2, n_bytes=84, priority=150,arp actions=NORMAL
- table=1, n_packets=1, n_bytes=98, ip actions=ct(table=3)
- table=2, n_packets=1, n_bytes=98, ip actions=ct(table=3)
- table=3, n_packets=2, n_bytes=196, ip actions=drop
-NXST_FLOW reply:
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_BANNER([conntrack - L7])
-
-AT_SETUP([conntrack - IPv4 HTTP])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=10,icmp,action=normal
-priority=100,in_port=1,tcp,action=ct(commit),2
-priority=100,in_port=2,ct_state=-trk,tcp,action=ct(table=0)
-priority=100,in_port=2,ct_state=+trk+est,tcp,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_START_L7([at_ns0], [http])
-OVS_START_L7([at_ns1], [http])
-
-dnl HTTP requests from ns0->ns1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-])
-
-dnl HTTP requests from ns1->ns0 should fail due to network failure.
-dnl Try 3 times, in 1 second intervals.
-NS_CHECK_EXEC([at_ns1], [wget 10.1.1.1 -t 3 -T 1 --retry-connrefused -v -o wget1.log], [4])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 HTTP])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,icmp6,action=normal
-priority=100,in_port=1,tcp6,action=ct(commit),2
-priority=100,in_port=2,ct_state=-trk,tcp6,action=ct(table=0)
-priority=100,in_port=2,ct_state=+trk+est,tcp6,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2])
-
-OVS_START_L7([at_ns0], [http6])
-OVS_START_L7([at_ns1], [http6])
-
-dnl HTTP requests from ns0->ns1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget http://[[fc00::2]] -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-tcp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-])
-
-dnl HTTP requests from ns1->ns0 should fail due to network failure.
-dnl Try 3 times, in 1 second intervals.
-NS_CHECK_EXEC([at_ns1], [wget http://[[fc00::1]] -t 3 -T 1 --retry-connrefused -v -o wget1.log], [4])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - commit, recirc])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1, at_ns2, at_ns3)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-ADD_VETH(p2, at_ns2, br0, "10.1.1.3/24")
-ADD_VETH(p3, at_ns3, br0, "10.1.1.4/24")
-
-dnl Allow any traffic from ns0->ns1, ns2->ns3.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=10,icmp,action=normal
-priority=100,in_port=1,tcp,ct_state=-trk,action=ct(commit,table=0)
-priority=100,in_port=1,tcp,ct_state=+trk,action=2
-priority=100,in_port=2,tcp,ct_state=-trk,action=ct(table=0)
-priority=100,in_port=2,tcp,ct_state=+trk,action=1
-priority=100,in_port=3,tcp,ct_state=-trk,action=set_field:0->metadata,ct(table=0)
-priority=100,in_port=3,tcp,ct_state=+trk,metadata=0,action=set_field:1->metadata,ct(commit,table=0)
-priority=100,in_port=3,tcp,ct_state=+trk,metadata=1,action=4
-priority=100,in_port=4,tcp,ct_state=-trk,action=ct(commit,table=0)
-priority=100,in_port=4,tcp,ct_state=+trk,action=3
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_START_L7([at_ns1], [http])
-OVS_START_L7([at_ns3], [http])
-
-dnl HTTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-dnl HTTP requests from p2->p3 should work fine.
-NS_CHECK_EXEC([at_ns2], [wget 10.1.1.4 -t 3 -T 1 --retry-connrefused -v -o wget1.log])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - multiple zones, local])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_LOCAL_STACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0)
-
-AT_CHECK([ip addr add dev br0 "10.1.1.1/24"])
-AT_CHECK([ip link set dev br0 up])
-on_exit 'ip addr del dev br0 "10.1.1.1/24"'
-ADD_VETH(p0, at_ns0, br0, "10.1.1.2/24")
-
-dnl Allow traffic from local stack to ns0. Only allow neighbour discovery,
-dnl return traffic from ns0 back to the local stack.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=100,in_port=LOCAL,ip,ct_state=-trk,action=drop
-priority=100,in_port=LOCAL,ip,ct_state=+trk+new,action=ct(commit,zone=1),ct(commit,zone=2),1
-priority=100,in_port=LOCAL,ip,ct_state=+trk+est,action=ct(commit,zone=1),ct(commit,zone=2),1
-priority=100,in_port=1,ip,ct_state=-trk,action=ct(table=1,zone=1)
-table=1,in_port=1,ip,ct_state=+trk+est,ct_zone=1,action=ct(table=2,zone=2)
-table=2,in_port=1,ip,ct_state=+trk+est,ct_zone=2,action=LOCAL
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-AT_CHECK([ping -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_START_L7([at_ns0], [http])
-
-dnl HTTP requests from root namespace to p0 should work fine.
-AT_CHECK([wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-dnl (again) HTTP requests from root namespace to  p0 should work fine.
-AT_CHECK([wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2) | grep "zone"], [0], [dnl
-icmp,orig=(src=10.1.1.1,dst=10.1.1.2,id=<cleared>,type=8,code=0),reply=(src=10.1.1.2,dst=10.1.1.1,id=<cleared>,type=0,code=0),zone=1
-icmp,orig=(src=10.1.1.1,dst=10.1.1.2,id=<cleared>,type=8,code=0),reply=(src=10.1.1.2,dst=10.1.1.1,id=<cleared>,type=0,code=0),zone=2
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=2,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - multi-stage pipeline, local])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_LOCAL_STACK()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0)
-
-AT_CHECK([ip addr add dev br0 "10.1.1.1/24"])
-AT_CHECK([ip link set dev br0 up])
-on_exit 'ip addr del dev br0 "10.1.1.1/24"'
-ADD_VETH(p0, at_ns0, br0, "10.1.1.2/24")
-
-dnl Allow traffic from local stack to ns0. Only allow neighbour discovery,
-dnl return traffic from ns0 back to the local stack.
-AT_DATA([flows.txt], [dnl
-dnl default
-table=0,priority=1,action=drop
-table=0,priority=10,arp,action=normal
-
-dnl Load the output port to REG0
-table=0,priority=100,ip,in_port=LOCAL,action=load:1->NXM_NX_REG0[[0..15]],goto_table:1
-table=0,priority=100,ip,in_port=1,action=load:65534->NXM_NX_REG0[[0..15]],goto_table:1
-
-dnl Ingress pipeline
-dnl - Allow all connections from LOCAL port (commit and proceed to egress)
-dnl - All other connections go through conntracker using the input port as
-dnl   a connection tracking zone.
-table=1,priority=150,in_port=LOCAL,ip,ct_state=+trk+new,action=ct(commit,table=2,zone=OXM_OF_IN_PORT[[0..15]])
-table=1,priority=100,ip,action=ct(table=2,zone=OXM_OF_IN_PORT[[0..15]])
-table=1,priority=1,action=drop
-
-dnl Egress pipeline
-dnl - Allow all connections from LOCAL port (commit and skip to output)
-dnl - Allow other established connections to go through conntracker using
-dnl   output port as a connection tracking zone.
-table=2,priority=150,in_port=LOCAL,ip,ct_state=+trk+new,action=ct(commit,table=4,zone=NXM_NX_REG0[[0..15]])
-table=2,priority=100,ip,ct_state=+trk+est,action=ct(table=3,zone=NXM_NX_REG0[[0..15]])
-table=2,priority=1,action=drop
-
-dnl Only allow established traffic from egress ct lookup
-table=3,priority=100,ip,ct_state=+trk+est,action=goto_table:4
-table=3,priority=1,action=drop
-
-dnl output table
-table=4,priority=100,ip,action=output:NXM_NX_REG0[[]]
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-AT_CHECK([ping -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_START_L7([at_ns0], [http])
-
-dnl HTTP requests from root namespace to p0 should work fine.
-AT_CHECK([wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-dnl (again) HTTP requests from root namespace to p0 should work fine.
-AT_CHECK([wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2) | grep "zone"], [0], [dnl
-icmp,orig=(src=10.1.1.1,dst=10.1.1.2,id=<cleared>,type=8,code=0),reply=(src=10.1.1.2,dst=10.1.1.1,id=<cleared>,type=0,code=0),zone=1
-icmp,orig=(src=10.1.1.1,dst=10.1.1.2,id=<cleared>,type=8,code=0),reply=(src=10.1.1.2,dst=10.1.1.1,id=<cleared>,type=0,code=0),zone=65534
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=65534,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - limit by zone])
-CHECK_CONNTRACK()
-CHECK_CT_DPIF_PER_ZONE_LIMIT()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,arp,action=normal
-priority=100,in_port=1,udp,action=ct(commit),2
-priority=100,in_port=2,udp,action=ct(zone=3,commit),1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl dpctl/ct-set-limits default=10 zone=0,limit=5 zone=1,limit=15 zone=2,limit=3 zone=3,limit=3])
-AT_CHECK([ovs-appctl dpctl/ct-del-limits zone=1,2,4])
-AT_CHECK([ovs-appctl dpctl/ct-get-limits zone=0,1,2,3], [],[dnl
-default limit=10
-zone=0,limit=5,count=0
-zone=1,limit=10,count=0
-zone=2,limit=10,count=0
-zone=3,limit=3,count=0
-])
-
-dnl Test UDP from port 1
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=1 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101010a0101020001000200080000 actions=resubmit(,0)"])
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=1 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101010a0101020001000300080000 actions=resubmit(,0)"])
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=1 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101010a0101020001000400080000 actions=resubmit(,0)"])
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=1 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101010a0101020001000500080000 actions=resubmit(,0)"])
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=1 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101010a0101020001000600080000 actions=resubmit(,0)"])
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=1 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101010a0101020001000700080000 actions=resubmit(,0)"])
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=1 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101010a0101020001000800080000 actions=resubmit(,0)"])
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=1 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101010a0101020001000900080000 actions=resubmit(,0)"])
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=1 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101010a0101020001000a00080000 actions=resubmit(,0)"])
-
-AT_CHECK([ovs-appctl dpctl/ct-get-limits zone=0,1,2,3,4,5], [0], [dnl
-default limit=10
-zone=0,limit=5,count=5
-zone=1,limit=10,count=0
-zone=2,limit=10,count=0
-zone=3,limit=3,count=0
-zone=4,limit=10,count=0
-zone=5,limit=10,count=0
-])
-
-dnl Test ct-get-limits for all zoens
-AT_CHECK([ovs-appctl dpctl/ct-get-limits], [0], [dnl
-default limit=10
-zone=0,limit=5,count=5
-zone=3,limit=3,count=0
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep "orig=.src=10\.1\.1\.1," | sort ], [0], [dnl
-udp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=1,dport=2),reply=(src=10.1.1.2,dst=10.1.1.1,sport=2,dport=1)
-udp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=1,dport=3),reply=(src=10.1.1.2,dst=10.1.1.1,sport=3,dport=1)
-udp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=1,dport=4),reply=(src=10.1.1.2,dst=10.1.1.1,sport=4,dport=1)
-udp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=1,dport=5),reply=(src=10.1.1.2,dst=10.1.1.1,sport=5,dport=1)
-udp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=1,dport=6),reply=(src=10.1.1.2,dst=10.1.1.1,sport=6,dport=1)
-])
-
-dnl Test UDP from port 2
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=2 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101030a0101040001000200080000 actions=resubmit(,0)"])
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=2 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101030a0101040001000300080000 actions=resubmit(,0)"])
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=2 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101030a0101040001000400080000 actions=resubmit(,0)"])
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=2 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101030a0101040001000500080000 actions=resubmit(,0)"])
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 "in_port=2 packet=50540000000a50540000000908004500001c000000000011a4cd0a0101030a0101040001000600080000 actions=resubmit(,0)"])
-
-AT_CHECK([ovs-appctl dpctl/ct-get-limits zone=0,3], [0], [dnl
-default limit=10
-zone=0,limit=5,count=5
-zone=3,limit=3,count=3
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep "orig=.src=10\.1\.1\.3," | sort ], [0], [dnl
-udp,orig=(src=10.1.1.3,dst=10.1.1.4,sport=1,dport=2),reply=(src=10.1.1.4,dst=10.1.1.3,sport=2,dport=1),zone=3
-udp,orig=(src=10.1.1.3,dst=10.1.1.4,sport=1,dport=3),reply=(src=10.1.1.4,dst=10.1.1.3,sport=3,dport=1),zone=3
-udp,orig=(src=10.1.1.3,dst=10.1.1.4,sport=1,dport=4),reply=(src=10.1.1.4,dst=10.1.1.3,sport=4,dport=1),zone=3
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP(["dnl
-/could not create datapath/d
-/(Cannot allocate memory) on packet/d"])
-AT_CLEANUP
-
-AT_SETUP([FTP - no conntrack])
-AT_SKIP_IF([test $HAVE_FTP = no])
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-AT_DATA([flows.txt], [dnl
-table=0,action=normal
-])
-
-AT_CHECK([ovs-ofctl --bundle replace-flows br0 flows.txt])
-
-NETNS_DAEMONIZE([at_ns0], [[$PYTHON $srcdir/test-l7.py ftp]], [ftp1.pid])
-NETNS_DAEMONIZE([at_ns1], [[$PYTHON $srcdir/test-l7.py ftp]], [ftp0.pid])
-OVS_WAIT_UNTIL([ip netns exec at_ns1 netstat -l | grep ftp])
-
-dnl FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://10.1.1.2 --no-passive-ftp -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([find -name index.html], [0], [dnl
-./index.html
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - FTP])
-AT_SKIP_IF([test $HAVE_FTP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_ALG()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows1.txt], [dnl
-table=0,priority=1,action=drop
-table=0,priority=10,arp,action=normal
-table=0,priority=10,icmp,action=normal
-table=0,priority=100,in_port=1,tcp,action=ct(alg=ftp,commit),2
-table=0,priority=100,in_port=2,tcp,action=ct(table=1)
-table=1,in_port=2,tcp,ct_state=+trk+est,action=1
-table=1,in_port=2,tcp,ct_state=+trk+rel,action=1
-])
-
-dnl Similar policy but without allowing all traffic from ns0->ns1.
-AT_DATA([flows2.txt], [dnl
-table=0,priority=1,action=drop
-table=0,priority=10,arp,action=normal
-table=0,priority=10,icmp,action=normal
-
-dnl Allow outgoing TCP connections, and treat them as FTP
-table=0,priority=100,in_port=1,tcp,action=ct(table=1)
-table=1,in_port=1,tcp,ct_state=+trk+new,action=ct(commit,alg=ftp),2
-table=1,in_port=1,tcp,ct_state=+trk+est,action=2
-
-dnl Allow incoming FTP data connections and responses to existing connections
-table=0,priority=100,in_port=2,tcp,action=ct(table=1)
-table=1,in_port=2,tcp,ct_state=+trk+new+rel,action=ct(commit),1
-table=1,in_port=2,tcp,ct_state=+trk+est,action=1
-table=1,in_port=2,tcp,ct_state=+trk-new+rel,action=1
-])
-
-dnl flows3 is same as flows1, except no ALG is specified.
-AT_DATA([flows3.txt], [dnl
-table=0,priority=1,action=drop
-table=0,priority=10,arp,action=normal
-table=0,priority=10,icmp,action=normal
-table=0,priority=100,in_port=1,tcp,action=ct(commit),2
-table=0,priority=100,in_port=2,tcp,action=ct(table=1)
-table=1,in_port=2,tcp,ct_state=+trk+est,action=1
-table=1,in_port=2,tcp,ct_state=+trk+rel,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle replace-flows br0 flows1.txt])
-
-OVS_START_L7([at_ns0], [ftp])
-OVS_START_L7([at_ns1], [ftp])
-
-dnl FTP requests from p1->p0 should fail due to network failure.
-dnl Try 3 times, in 1 second intervals.
-NS_CHECK_EXEC([at_ns1], [wget ftp://10.1.1.1 --no-passive-ftp  -t 3 -T 1 -v -o wget1.log], [4])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.1)], [0], [dnl
-])
-
-dnl FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://10.1.1.2 --no-passive-ftp -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-])
-
-dnl Try the second set of flows.
-AT_CHECK([ovs-ofctl --bundle replace-flows br0 flows2.txt])
-AT_CHECK([ovs-appctl dpctl/flush-conntrack])
-
-dnl FTP requests from p1->p0 should fail due to network failure.
-dnl Try 3 times, in 1 second intervals.
-NS_CHECK_EXEC([at_ns1], [wget ftp://10.1.1.1 --no-passive-ftp  -t 3 -T 1 -v -o wget1.log], [4])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.1)], [0], [dnl
-])
-
-dnl Active FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://10.1.1.2 --no-passive-ftp -t 3 -T 1 --retry-connrefused -v -o wget0-1.log])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-tcp,orig=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-])
-
-AT_CHECK([ovs-appctl dpctl/flush-conntrack])
-
-dnl Passive FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0-2.log])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-])
-
-dnl Try the third set of flows, without alg specifier.
-AT_CHECK([ovs-ofctl --bundle replace-flows br0 flows3.txt])
-AT_CHECK([ovs-appctl dpctl/flush-conntrack])
-
-dnl FTP control requests from p0->p1 should work fine, but helper will not be assigned.
-NS_CHECK_EXEC([at_ns0], [wget ftp://10.1.1.2 --no-passive-ftp -t 3 -T 1 --retry-connrefused -v -o wget0-3.log], [4])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - FTP over IPv6])
-AT_SKIP_IF([test $HAVE_FTP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_ALG()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-
-dnl Allow any traffic from ns0->ns1.
-dnl Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-dnl Track all IPv6 traffic and drop the rest.
-dnl Allow ICMPv6 both ways.  No commit, so pings will not be tracked.
-table=0 priority=100 in_port=1 icmp6, action=2
-table=0 priority=100 in_port=2 icmp6, action=1
-table=0 priority=10 ip6, action=ct(table=1)
-table=0 priority=0 action=drop
-dnl
-dnl Table 1
-dnl
-dnl Allow new TCPv6 FTP control connections from port 1.
-table=1 in_port=1 ct_state=+new, tcp6, tp_dst=21, action=ct(alg=ftp,commit),2
-dnl Allow related TCPv6 connections from port 2.
-table=1 in_port=2 ct_state=+new+rel, tcp6, action=ct(commit),1
-dnl Allow established TCPv6 connections both ways.
-table=1 in_port=1 ct_state=+est, tcp6, action=2
-table=1 in_port=2 ct_state=+est, tcp6, action=1
-dnl Drop everything else.
-table=1 priority=0, action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2 >/dev/null])
-
-OVS_START_L7([at_ns1], [ftp])
-
-dnl FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://[[fc00::2]] -6 --no-passive-ftp -t 3 -T 1 --retry-connrefused -v --server-response --no-remove-listing -o wget0.log -d])
-
-dnl Discards CLOSE_WAIT and CLOSING
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-tcp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-tcp,orig=(src=fc00::2,dst=fc00::1,sport=<cleared>,dport=<cleared>),reply=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 FTP Passive])
-AT_SKIP_IF([test $HAVE_FTP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_ALG()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address 80:88:88:88:88:88])
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address 80:88:88:88:88:99])
-NS_CHECK_EXEC([at_ns0], [ip -6 neigh add fc00::2 lladdr 80:88:88:88:88:99 dev p0])
-NS_CHECK_EXEC([at_ns1], [ip -6 neigh add fc00::1 lladdr 80:88:88:88:88:88 dev p1])
-
-dnl Allow any traffic from ns0->ns1.
-dnl Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-dnl Track all IPv6 traffic and drop the rest.
-dnl Allow ICMPv6 both ways.  No commit, so pings will not be tracked.
-table=0 priority=100 in_port=1 icmp6, action=2
-table=0 priority=100 in_port=2 icmp6, action=1
-table=0 priority=10 ip6, action=ct(table=1)
-table=0 priority=0 action=drop
-dnl
-dnl Table 1
-dnl
-dnl Allow new TCPv6 FTP control connections from port 1.
-table=1 in_port=1 ct_state=+new, tcp6, tp_dst=21, action=ct(alg=ftp,commit),2
-dnl Allow related TCPv6 connections from port 1.
-table=1 in_port=1 ct_state=+new+rel, tcp6, action=ct(commit),2
-dnl Allow established TCPv6 connections both ways.
-table=1 in_port=1 ct_state=+est, tcp6, action=2
-table=1 in_port=2 ct_state=+est, tcp6, action=1
-dnl Drop everything else.
-table=1 priority=0, action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2 >/dev/null])
-
-OVS_START_L7([at_ns1], [ftp])
-
-dnl FTP passive requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://[[fc00::2]] -6 -t 3 -T 1 --retry-connrefused -v --server-response --no-remove-listing -o wget0.log -d])
-
-dnl Discards CLOSE_WAIT and CLOSING
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-tcp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-tcp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - FTP with multiple expectations])
-AT_SKIP_IF([test $HAVE_FTP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_ALG()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Dual-firewall, allow all from ns1->ns2, allow established and ftp ns2->ns1.
-AT_DATA([flows.txt], [dnl
-table=0,priority=1,action=drop
-table=0,priority=10,arp,action=normal
-table=0,priority=10,icmp,action=normal
-
-dnl Traffic from ns1
-table=0,priority=100,in_port=1,tcp,action=ct(table=1,zone=1)
-table=1,in_port=1,tcp,ct_zone=1,ct_state=+trk+new-rel,action=ct(commit,alg=ftp,zone=1),ct(commit,alg=ftp,zone=2),2
-table=1,in_port=1,tcp,ct_zone=1,ct_state=+trk+new+rel,action=ct(commit,zone=1),ct(commit,zone=2),2
-table=1,in_port=1,tcp,ct_zone=1,ct_state=+trk+est,action=ct(table=2,zone=2)
-table=2,in_port=1,tcp,ct_zone=2,ct_state=+trk+est,action=2
-
-dnl Traffic from ns2
-table=0,priority=100,in_port=2,tcp,action=ct(table=1,zone=2)
-table=1,in_port=2,tcp,ct_zone=2,ct_state=+trk+rel,action=ct(commit,zone=2),ct(commit,zone=1),1
-table=1,in_port=2,tcp,ct_zone=2,ct_state=+trk+est,action=ct(table=2,zone=1)
-table=2,in_port=2,tcp,ct_zone=1,ct_state=+trk+rel,action=ct(commit,zone=2),ct(commit,zone=1),1
-table=2,in_port=2,tcp,ct_zone=1,ct_state=+trk+est,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-OVS_START_L7([at_ns0], [ftp])
-OVS_START_L7([at_ns1], [ftp])
-
-dnl FTP requests from p1->p0 should fail due to network failure.
-dnl Try 3 times, in 1 second intervals.
-NS_CHECK_EXEC([at_ns1], [wget ftp://10.1.1.1 --no-passive-ftp  -t 3 -T 1 -v -o wget1.log], [4])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.1)], [0], [dnl
-])
-
-dnl Active FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://10.1.1.2 --no-passive-ftp -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>),helper=ftp
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=2,protoinfo=(state=<cleared>),helper=ftp
-tcp,orig=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-tcp,orig=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),zone=2,protoinfo=(state=<cleared>)
-])
-
-AT_CHECK([ovs-appctl dpctl/flush-conntrack])
-
-dnl Passive FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>),helper=ftp
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=2,protoinfo=(state=<cleared>)
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=2,protoinfo=(state=<cleared>),helper=ftp
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - TFTP])
-AT_SKIP_IF([test $HAVE_TFTP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_ALG()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows1.txt], [dnl
-table=0,priority=1,action=drop
-table=0,priority=10,arp,action=normal
-table=0,priority=10,icmp,action=normal
-table=0,priority=100,in_port=1,udp,action=ct(alg=tftp,commit),2
-table=0,priority=100,in_port=2,udp,action=ct(table=1)
-table=1,in_port=2,udp,ct_state=+trk+est,action=1
-table=1,in_port=2,udp,ct_state=+trk+rel,action=1
-])
-
-dnl Similar policy but without allowing all traffic from ns0->ns1.
-AT_DATA([flows2.txt], [dnl
-table=0,priority=1,action=drop
-table=0,priority=10,arp,action=normal
-table=0,priority=10,icmp,action=normal
-
-dnl Allow outgoing UDP connections, and treat them as TFTP
-table=0,priority=100,in_port=1,udp,action=ct(table=1)
-table=1,in_port=1,udp,ct_state=+trk+new-rel,action=ct(commit,alg=tftp),2
-table=1,in_port=1,udp,ct_state=+trk+new+rel,action=ct(commit),2
-table=1,in_port=1,udp,ct_state=+trk+est,action=2
-
-dnl Allow incoming TFTP data connections and responses to existing connections
-table=0,priority=100,in_port=2,udp,action=ct(table=1)
-table=1,in_port=2,udp,ct_state=+trk+est,action=1
-table=1,in_port=2,udp,ct_state=+trk+new+rel,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle replace-flows br0 flows1.txt])
-
-OVS_START_L7([at_ns0], [tftp])
-OVS_START_L7([at_ns1], [tftp])
-
-dnl TFTP requests from p1->p0 should fail due to network failure.
-NS_CHECK_EXEC([at_ns1], [[curl $CURL_OPT tftp://10.1.1.1/flows1.txt -o foo 2>curl0.log]], [28])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.1)], [0], [dnl
-])
-
-dnl TFTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [[curl $CURL_OPT tftp://10.1.1.2/flows1.txt -o foo 2>curl1.log]])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-udp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),helper=tftp
-])
-
-dnl Try the second set of flows.
-AT_CHECK([ovs-ofctl --bundle replace-flows br0 flows2.txt])
-AT_CHECK([ovs-appctl dpctl/flush-conntrack])
-
-dnl TFTP requests from p1->p0 should fail due to network failure.
-NS_CHECK_EXEC([at_ns1], [[curl $CURL_OPT tftp://10.1.1.1/flows1.txt -o foo 2>curl2.log]], [28])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.1)], [0], [dnl
-])
-
-dnl TFTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [[curl $CURL_OPT tftp://10.1.1.2/flows1.txt -o foo 2>curl3.log]])
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-udp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),helper=tftp
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_BANNER([conntrack - NAT])
-
-AT_SETUP([conntrack - simple SNAT])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address 80:88:88:88:88:88])
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-in_port=1,ip,action=ct(commit,zone=1,nat(src=10.1.1.240-10.1.1.255)),2
-in_port=2,ct_state=-trk,ip,action=ct(table=0,zone=1,nat)
-in_port=2,ct_state=+trk,ct_zone=1,ip,action=1
-dnl
-dnl ARP
-priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10
-priority=10 arp action=normal
-priority=0,action=drop
-dnl
-dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0
-table=8,reg2=0x0a0101f0/0xfffffff0,action=load:0x808888888888->OXM_OF_PKT_REG0[[]]
-table=8,priority=0,action=load:0->OXM_OF_PKT_REG0[[]]
-dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action.
-dnl TPA IP in reg2.
-dnl Swaps the fields of the ARP message to turn a query to a response.
-table=10 priority=100 arp xreg0=0 action=normal
-table=10 priority=10,arp,arp_op=1,action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]]
-table=10 priority=0 action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl HTTP requests from p0->p1 should work fine.
-OVS_START_L7([at_ns1], [http])
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 5 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2) | sed -e 's/dst=10.1.1.2[[45]][[0-9]]/dst=10.1.1.2XX/' | uniq], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.2XX,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - SNAT with ct_mark change on reply])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address e6:66:c1:11:11:11])
-NS_CHECK_EXEC([at_ns0], [arp -s 10.1.1.2 e6:66:c1:22:22:22])
-
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address e6:66:c1:22:22:22])
-NS_CHECK_EXEC([at_ns1], [arp -s 10.1.1.240 e6:66:c1:11:11:11])
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-in_port=1,ip,action=ct(commit,zone=1,nat(src=10.1.1.240)),2
-in_port=2,ct_state=-trk,ip,action=ct(table=0,zone=1,nat)
-dnl
-dnl Setting the mark fails if the datapath can't find the existing conntrack
-dnl entry after NAT has been reversed and the skb was lost due to an upcall.
-dnl
-in_port=2,ct_state=+trk,ct_zone=1,ip,action=ct(table=1,commit,zone=1,exec(set_field:1->ct_mark)),1
-table=1,in_port=2,ct_mark=1,ct_state=+rpl,ct_zone=1,ip,action=1
-dnl
-priority=0,action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl ICMP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [ping -c 1 10.1.1.2 | FORMAT_PING], [0], [dnl
-1 packets transmitted, 1 received, 0% packet loss, time 0ms
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2) | sed -e 's/dst=10.1.1.2[[45]][[0-9]]/dst=10.1.1.2XX/'], [0], [dnl
-icmp,orig=(src=10.1.1.1,dst=10.1.1.2,id=<cleared>,type=8,code=0),reply=(src=10.1.1.2,dst=10.1.1.2XX,id=<cleared>,type=0,code=0),zone=1,mark=1
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - SNAT with port range])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address 80:88:88:88:88:88])
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-in_port=1,tcp,action=ct(commit,zone=1,nat(src=10.1.1.240-10.1.1.255:34567-34568,random)),2
-in_port=2,ct_state=-trk,tcp,tp_dst=34567,action=ct(table=0,zone=1,nat)
-in_port=2,ct_state=-trk,tcp,tp_dst=34568,action=ct(table=0,zone=1,nat)
-in_port=2,ct_state=+trk,ct_zone=1,tcp,action=1
-dnl
-dnl ARP
-priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10
-priority=10 arp action=normal
-priority=0,action=drop
-dnl
-dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0
-table=8,reg2=0x0a0101f0/0xfffffff0,action=load:0x808888888888->OXM_OF_PKT_REG0[[]]
-table=8,priority=0,action=load:0->OXM_OF_PKT_REG0[[]]
-dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action.
-dnl TPA IP in reg2.
-dnl Swaps the fields of the ARP message to turn a query to a response.
-table=10 priority=100 arp xreg0=0 action=normal
-table=10 priority=10,arp,arp_op=1,action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]]
-table=10 priority=0 action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl HTTP requests from p0->p1 should work fine.
-OVS_START_L7([at_ns1], [http])
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 5 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2) | sed -e 's/dst=10.1.1.2[[45]][[0-9]]/dst=10.1.1.2XX/' | uniq], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.2XX,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - SNAT with port range with exhaustion])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address 80:88:88:88:88:88])
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-in_port=1,tcp,action=ct(commit,zone=1,nat(src=10.1.1.240:34568,random)),2
-in_port=2,ct_state=-trk,tcp,tp_dst=34567,action=ct(table=0,zone=1,nat)
-in_port=2,ct_state=-trk,tcp,tp_dst=34568,action=ct(table=0,zone=1,nat)
-in_port=2,ct_state=+trk,ct_zone=1,tcp,action=1
-dnl
-dnl ARP
-priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10
-priority=10 arp action=normal
-priority=0,action=drop
-dnl
-dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0
-table=8,reg2=0x0a0101f0/0xfffffff0,action=load:0x808888888888->OXM_OF_PKT_REG0[[]]
-table=8,priority=0,action=load:0->OXM_OF_PKT_REG0[[]]
-dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action.
-dnl TPA IP in reg2.
-dnl Swaps the fields of the ARP message to turn a query to a response.
-table=10 priority=100 arp xreg0=0 action=normal
-table=10 priority=10,arp,arp_op=1,action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]]
-table=10 priority=0 action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl HTTP requests from p0->p1 should work fine.
-OVS_START_L7([at_ns1], [http])
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 1 -T 1 --retry-connrefused -v -o wget0.log])
-
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 1 -T 1 --retry-connrefused -v -o wget0.log], [4])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2) | sed -e 's/dst=10.1.1.2[[45]][[0-9]]/dst=10.1.1.2XX/' | uniq], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.2XX,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP(["dnl
-/Unable to NAT due to tuple space exhaustion - if DoS attack, use firewalling and\/or zone partitioning./d
-/Dropped .* log messages in last .* seconds \(most recently, .* seconds ago\) due to excessive rate/d"])
-AT_CLEANUP
-
-AT_SETUP([conntrack - more complex SNAT])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address 80:88:88:88:88:88])
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-AT_DATA([flows.txt], [dnl
-dnl Track all IP traffic, NAT existing connections.
-priority=100 ip action=ct(table=1,zone=1,nat)
-dnl
-dnl Allow ARP, but generate responses for NATed addresses
-priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10
-priority=10 arp action=normal
-priority=0 action=drop
-dnl
-dnl Allow any traffic from ns0->ns1. SNAT ns0 to 10.1.1.240-10.1.1.255
-table=1 priority=100 in_port=1 ip ct_state=+trk+new-est action=ct(commit,zone=1,nat(src=10.1.1.240-10.1.1.255)),2
-table=1 priority=100 in_port=1 ip ct_state=+trk-new+est action=2
-dnl Only allow established traffic from ns1->ns0.
-table=1 priority=100 in_port=2 ip ct_state=+trk-new+est action=1
-table=1 priority=0 action=drop
-dnl
-dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0
-table=8 priority=100 reg2=0x0a0101f0/0xfffffff0 action=load:0x808888888888->OXM_OF_PKT_REG0[[]]
-dnl Zero result means not found.
-table=8 priority=0 action=load:0->OXM_OF_PKT_REG0[[]]
-dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action.
-dnl ARP TPA IP in reg2.
-table=10 priority=100 arp xreg0=0 action=normal
-dnl Swaps the fields of the ARP message to turn a query to a response.
-table=10 priority=10 arp arp_op=1 action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]]
-table=10 priority=0 action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl HTTP requests from p0->p1 should work fine.
-OVS_START_L7([at_ns1], [http])
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 5 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2) | sed -e 's/dst=10.1.1.2[[45]][[0-9]]/dst=10.1.1.2XX/' | uniq], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.2XX,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - simple DNAT])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address 80:88:88:88:88:88])
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-priority=100 in_port=1,ip,nw_dst=10.1.1.64,action=ct(zone=1,nat(dst=10.1.1.2),commit),2
-priority=10 in_port=1,ip,action=ct(commit,zone=1),2
-priority=100 in_port=2,ct_state=-trk,ip,action=ct(table=0,nat,zone=1)
-priority=100 in_port=2,ct_state=+trk+est,ct_zone=1,ip,action=1
-dnl
-dnl ARP
-priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10
-priority=10 arp action=normal
-priority=0,action=drop
-dnl
-dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0
-table=8,reg2=0x0a010140,action=load:0x808888888888->OXM_OF_PKT_REG0[[]]
-dnl Zero result means not found.
-table=8,priority=0,action=load:0->OXM_OF_PKT_REG0[[]]
-dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action.
-dnl TPA IP in reg2.
-table=10 priority=100 arp xreg0=0 action=normal
-dnl Swaps the fields of the ARP message to turn a query to a response.
-table=10 priority=10,arp,arp_op=1,action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]]
-table=10 priority=0 action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Should work with the virtual IP address through NAT
-OVS_START_L7([at_ns1], [http])
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.64 -t 5 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.64)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.64,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-])
-
-dnl Should work with the assigned IP address as well
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - more complex DNAT])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address 80:88:88:88:88:88])
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-dnl Track all IP traffic
-table=0 priority=100 ip action=ct(table=1,zone=1,nat)
-dnl
-dnl Allow ARP, but generate responses for NATed addresses
-table=0 priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10
-table=0 priority=10 arp action=normal
-table=0 priority=0 action=drop
-dnl
-dnl Allow any IP traffic from ns0->ns1. DNAT ns0 from 10.1.1.64 to 10.1.1.2
-table=1 priority=100 in_port=1 ct_state=+new ip nw_dst=10.1.1.64 action=ct(zone=1,nat(dst=10.1.1.2),commit),2
-table=1 priority=10 in_port=1 ct_state=+new ip action=ct(commit,zone=1),2
-table=1 priority=100 in_port=1 ct_state=+est ct_zone=1 action=2
-dnl Only allow established traffic from ns1->ns0.
-table=1 priority=100 in_port=2 ct_state=+est ct_zone=1 action=1
-table=1 priority=0 action=drop
-dnl
-dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0
-table=8,reg2=0x0a010140,action=load:0x808888888888->OXM_OF_PKT_REG0[[]]
-dnl Zero result means not found.
-table=8,priority=0,action=load:0->OXM_OF_PKT_REG0[[]]
-dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action.
-dnl TPA IP in reg2.
-table=10 priority=100 arp xreg0=0 action=normal
-dnl Swaps the fields of the ARP message to turn a query to a response.
-table=10 priority=10,arp,arp_op=1,action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]]
-table=10 priority=0 action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Should work with the virtual IP address through NAT
-OVS_START_L7([at_ns1], [http])
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.64 -t 5 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.64)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.64,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-])
-
-dnl Should work with the assigned IP address as well
-NS_CHECK_EXEC([at_ns0], [wget 10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - ICMP related with NAT])
-AT_SKIP_IF([test $HAVE_NC = no])
-AT_SKIP_IF([test $HAVE_TCPDUMP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address 80:88:88:88:88:88])
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-dnl Allow UDP traffic from ns0->ns1. Only allow related ICMP responses back.
-dnl Make sure ICMP responses are reverse-NATted.
-AT_DATA([flows.txt], [dnl
-in_port=1,udp,action=ct(commit,nat(src=10.1.1.240-10.1.1.255),exec(set_field:1->ct_mark)),2
-in_port=2,icmp,ct_state=-trk,action=ct(table=0,nat)
-in_port=2,icmp,nw_dst=10.1.1.1,ct_state=+trk+rel,ct_mark=1,action=1
-dnl
-dnl ARP
-priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10
-priority=10 arp action=normal
-priority=0,action=drop
-dnl
-dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0
-table=8,reg2=0x0a0101f0/0xfffffff0,action=load:0x808888888888->OXM_OF_PKT_REG0[[]]
-table=8,priority=0,action=load:0->OXM_OF_PKT_REG0[[]]
-dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action.
-dnl TPA IP in reg2.
-dnl Swaps the fields of the ARP message to turn a query to a response.
-table=10 priority=100 arp xreg0=0 action=normal
-table=10 priority=10,arp,arp_op=1,action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]]
-table=10 priority=0 action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-rm p0.pcap
-tcpdump -U -i ovs-p0 -w p0.pcap &
-sleep 1
-
-dnl UDP packets from ns0->ns1 should solicit "destination unreachable" response.
-NS_CHECK_EXEC([at_ns0], [bash -c "echo a | nc $NC_EOF_OPT -u 10.1.1.2 10000"])
-
-AT_CHECK([ovs-appctl revalidator/purge], [0])
-AT_CHECK([ovs-ofctl -O OpenFlow15 dump-flows br0 | ofctl_strip | sort | grep -v drop], [0], [dnl
- n_packets=1, n_bytes=42, priority=10,arp actions=NORMAL
- n_packets=1, n_bytes=44, udp,in_port=1 actions=ct(commit,nat(src=10.1.1.240-10.1.1.255),exec(set_field:0x1->ct_mark)),output:2
- n_packets=1, n_bytes=72, ct_state=+rel+trk,ct_mark=0x1,icmp,in_port=2,nw_dst=10.1.1.1 actions=output:1
- n_packets=1, n_bytes=72, ct_state=-trk,icmp,in_port=2 actions=ct(table=0,nat)
- n_packets=2, n_bytes=84, priority=100,arp,arp_op=1 actions=move:NXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10
- table=10, n_packets=1, n_bytes=42, priority=10,arp,arp_op=1 actions=set_field:2->arp_op,move:NXM_NX_ARP_SHA[[]]->NXM_NX_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_NX_ARP_SHA[[]],move:NXM_OF_ARP_SPA[[]]->NXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->NXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],set_field:0->in_port,output:NXM_NX_REG3[[0..15]]
- table=10, n_packets=1, n_bytes=42, priority=100,arp,reg0=0,reg1=0 actions=NORMAL
- table=8, n_packets=1, n_bytes=42, priority=0 actions=set_field:0->xreg0
- table=8, n_packets=1, n_bytes=42, reg2=0xa0101f0/0xfffffff0 actions=set_field:0x808888888888->xreg0
-OFPST_FLOW reply (OF1.5):
-])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2) | sed -e 's/dst=10.1.1.2[[45]][[0-9]]/dst=10.1.1.2XX/'], [0], [dnl
-udp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.2XX,sport=<cleared>,dport=<cleared>),mark=1
-])
-
-AT_CHECK([tcpdump -v "icmp" -r p0.pcap 2>/dev/null | egrep 'wrong|bad'], [1], [ignore-nolog])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-dnl CHECK_FTP_NAT(TITLE, IP_ADDR, FLOWS, CT_DUMP)
-dnl
-dnl Checks the implementation of conntrack with FTP ALGs in combination with
-dnl NAT, using the provided flow table.
-m4_define([CHECK_FTP_NAT],
-   [AT_SETUP([conntrack - FTP $1])
-    AT_SKIP_IF([test $HAVE_FTP = no])
-    AT_SKIP_IF([test $HAVE_LFTP = no])
-    CHECK_CONNTRACK()
-    CHECK_CONNTRACK_NAT()
-    CHECK_CONNTRACK_ALG()
-
-    OVS_TRAFFIC_VSWITCHD_START()
-
-    ADD_NAMESPACES(at_ns0, at_ns1)
-
-    ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-    NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address 80:88:88:88:88:88])
-    ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-    dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-    AT_DATA([flows.txt], [$3])
-
-    AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-    OVS_START_L7([at_ns1], [ftp])
-
-    dnl FTP requests from p0->p1 should work fine.
-    AT_DATA([ftp.cmd], [dnl
-set net:max-retries 1
-set net:timeout 1
-set ftp:passive-mode off
-cache off
-connect ftp://anonymous:@10.1.1.2
-ls
-ls
-ls
-ls
-])
-    NS_CHECK_EXEC([at_ns0], [lftp -f ftp.cmd > lftp.log])
-
-    dnl Discards CLOSE_WAIT and CLOSING
-    AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [$4])
-
-    OVS_TRAFFIC_VSWITCHD_STOP
-    AT_CLEANUP])
-
-dnl CHECK_FTP_SNAT_PRE_RECIRC(TITLE, IP_ADDR, IP_ADDR_AS_HEX)
-dnl
-dnl Checks the implementation of conntrack with FTP ALGs in combination with
-dnl NAT, with flow tables that implement the NATing as part of handling of
-dnl initial incoming packets - ie, the first flow is ct(nat,table=foo).
-dnl
-dnl IP_ADDR must specify the NAT address in standard "10.1.1.x" format,
-dnl and IP_ADDR_AS_HEX must specify the same address as hex, eg 0x0a0101xx.
-m4_define([CHECK_FTP_SNAT_PRE_RECIRC], [dnl
-    CHECK_FTP_NAT([SNAT prerecirc $1], [$2], [dnl
-dnl track all IP traffic, de-mangle non-NEW connections
-table=0 in_port=1, ip, action=ct(table=1,nat)
-table=0 in_port=2, ip, action=ct(table=2,nat)
-dnl
-dnl ARP
-dnl
-table=0 priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10
-table=0 priority=10 arp action=normal
-table=0 priority=0 action=drop
-dnl
-dnl Table 1: port 1 -> 2
-dnl
-dnl Allow new FTP connections. These need to be commited.
-table=1 ct_state=+new, tcp, tp_dst=21, nw_src=10.1.1.1, action=ct(alg=ftp,commit,nat(src=$2)),2
-dnl Allow established TCP connections, make sure they are NATted already.
-table=1 ct_state=+est, tcp, nw_src=$2,     action=2
-dnl
-dnl Table 1: droppers
-dnl
-table=1 priority=10, tcp, action=drop
-table=1 priority=0,action=drop
-dnl
-dnl Table 2: port 2 -> 1
-dnl
-dnl Allow established TCP connections, make sure they are reverse NATted
-table=2 ct_state=+est, tcp, nw_dst=10.1.1.1, action=1
-dnl Allow (new) related (data) connections.  These need to be commited.
-table=2 ct_state=+new+rel, tcp, nw_dst=$2, action=ct(commit,nat),1
-dnl Allow related ICMP packets, make sure they are reverse NATted
-table=2 ct_state=+rel, icmp, nw_dst=10.1.1.1, action=1
-dnl
-dnl Table 2: droppers
-dnl
-table=2 priority=10, tcp, action=drop
-table=2 priority=0, action=drop
-dnl
-dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0
-dnl
-table=8,reg2=$3/0xffffffff,action=load:0x808888888888->OXM_OF_PKT_REG0[[]]
-table=8,priority=0,action=load:0->OXM_OF_PKT_REG0[[]]
-dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action.
-dnl TPA IP in reg2.
-dnl Swaps the fields of the ARP message to turn a query to a response.
-table=10 priority=100 arp xreg0=0 action=normal
-table=10 priority=10,arp,arp_op=1,action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]]
-table=10 priority=0 action=drop
-], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=$2,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-tcp,orig=(src=10.1.1.2,dst=$2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-])
-])
-
-dnl Check that ct(nat,table=foo) works without TCP sequence adjustment.
-CHECK_FTP_SNAT_PRE_RECIRC([], [10.1.1.9], [0x0a010109])
-
-dnl Check that ct(nat,table=foo) works with TCP sequence adjustment.
-dnl
-dnl The FTP PORT command includes the ASCII representation of the address,
-dnl so when these messages need to be NATed between addresses that have
-dnl different lengths when represented in ASCII (such as the original address
-dnl of 10.1.1.1 used in the test and 10.1.1.240 here), the FTP NAT ALG must
-dnl resize the packet and adjust TCP sequence numbers. This test is kept
-dnl separate from the above to easier identify issues in this code on different
-dnl kernels.
-CHECK_FTP_SNAT_PRE_RECIRC([seqadj], [10.1.1.240], [0x0a0101f0])
-
-dnl CHECK_FTP_SNAT_POST_RECIRC(TITLE, IP_ADDR, IP_ADDR_AS_HEX)
-dnl
-dnl Checks the implementation of conntrack with FTP ALGs in combination with
-dnl NAT, with flow tables that implement the NATing after the first round
-dnl of recirculation - that is, the first flow ct(table=foo) then a subsequent
-dnl flow will implement the NATing with ct(nat..),output:foo.
-dnl
-dnl IP_ADDR must specify the NAT address in standard "10.1.1.x" format,
-dnl and IP_ADDR_AS_HEX must specify the same address as hex, eg 0x0a0101xx.
-m4_define([CHECK_FTP_SNAT_POST_RECIRC], [dnl
-    CHECK_FTP_NAT([SNAT postrecirc $1], [$2], [dnl
-dnl track all IP traffic (this includes a helper call to non-NEW packets.)
-table=0 ip, action=ct(table=1)
-dnl
-dnl ARP
-dnl
-table=0 priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10
-table=0 priority=10 arp action=normal
-table=0 priority=0 action=drop
-dnl
-dnl Table 1
-dnl
-dnl Allow new FTP connections. These need to be commited.
-dnl This does helper for new packets.
-table=1 in_port=1 ct_state=+new, tcp, tp_dst=21, action=ct(alg=ftp,commit,nat(src=$2)),2
-dnl Allow and NAT established TCP connections
-table=1 in_port=1 ct_state=+est, tcp,     action=ct(nat),2
-table=1 in_port=2 ct_state=+est, tcp,     action=ct(nat),1
-dnl Allow and NAT (new) related active (data) connections.
-dnl These need to be commited.
-table=1 in_port=2 ct_state=+new+rel, tcp, action=ct(commit,nat),1
-dnl Allow related ICMP packets.
-table=1 in_port=2 ct_state=+rel, icmp,    action=ct(nat),1
-dnl Drop everything else.
-table=1 priority=0, action=drop
-dnl
-dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0
-dnl
-table=8,reg2=$3/0xffffffff,action=load:0x808888888888->OXM_OF_PKT_REG0[[]]
-table=8,priority=0,action=load:0->OXM_OF_PKT_REG0[[]]
-dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action.
-dnl TPA IP in reg2.
-dnl Swaps the fields of the ARP message to turn a query to a response.
-table=10 priority=100 arp xreg0=0 action=normal
-table=10 priority=10,arp,arp_op=1,action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]]
-table=10 priority=0 action=drop
-], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=$2,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-tcp,orig=(src=10.1.1.2,dst=$2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-])
-])
-
-dnl Check that ct(nat,table=foo) works without TCP sequence adjustment.
-CHECK_FTP_SNAT_POST_RECIRC([], [10.1.1.9], [0x0a010109])
-
-dnl Check that ct(nat,table=foo) works with TCP sequence adjustment.
-dnl
-dnl The FTP PORT command includes the ASCII representation of the address,
-dnl so when these messages need to be NATed between addresses that have
-dnl different lengths when represented in ASCII (such as the original address
-dnl of 10.1.1.1 used in the test and 10.1.1.240 here), the FTP NAT ALG must
-dnl resize the packet and adjust TCP sequence numbers. This test is kept
-dnl separate from the above to easier identify issues in this code on different
-dnl kernels.
-CHECK_FTP_SNAT_POST_RECIRC([seqadj], [10.1.1.240], [0x0a0101f0])
-
-
-dnl CHECK_FTP_SNAT_ORIG_TUPLE(TITLE, IP_ADDR, IP_ADDR_AS_HEX)
-dnl
-dnl Checks the implementation of conntrack original direction tuple matching
-dnl with FTP ALGs in combination with NAT, with flow tables that implement
-dnl the NATing before the first round of recirculation - that is, the first
-dnl flow ct(nat, table=foo) then a subsequent flow will implement the
-dnl commiting of NATed and other connections with ct(nat..),output:foo.
-dnl
-dnl IP_ADDR must specify the NAT address in standard "10.1.1.x" format,
-dnl and IP_ADDR_AS_HEX must specify the same address as hex, eg 0x0a0101xx.
-m4_define([CHECK_FTP_SNAT_ORIG_TUPLE], [dnl
-    CHECK_FTP_NAT([SNAT orig tuple $1], [$2], [dnl
-dnl Store zone in reg4 and packet direction in reg3 (IN=1, OUT=2).
-dnl NAT is only applied to OUT-direction packets, so that ACL
-dnl processing can be done with non-NATted headers.
-dnl
-dnl Track all IP traffic in the IN-direction (IN from Port 1).
-table=0 in_port=1, ip, action=set_field:1->reg4,set_field:1->reg3,ct(zone=NXM_NX_REG4[[0..15]],table=1)
-dnl Track all IP traffic in the OUT-direction (OUT to the Port 1).
-table=0 in_port=2, ip, action=set_field:1->reg4,set_field:2->reg3,ct(zone=NXM_NX_REG4[[0..15]],nat,table=1)
-dnl
-dnl ARP
-dnl
-table=0 priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10
-table=0 priority=10 arp action=normal
-table=0 priority=0 action=drop
-dnl
-dnl Pass tracked traffic through ACL, drop everything else.
-dnl Non-REPLY/RELATED packets get the ACL lookup with the packet headers
-dnl in the actual packet direction in reg0 (IN=1, OUT=2).  REPLY packets
-dnl get the ACL lookup using the conntrack tuple and the inverted direction.
-dnl RELATED packets get ACL lookup using the conntrack tuple in the direction
-dnl of the master connection, as stored in ct_label[0].
-dnl
-dnl Incoming non-related packet in the original direction (ACL IN)
-table=1 reg3=1, ip, ct_state=-rel-rpl+trk-inv action=set_field:1->reg0,resubmit(,3),goto_table:5
-dnl Incoming non-related reply packet (CT ACL OUT)
-table=1 reg3=1, ip, ct_state=-rel+rpl+trk-inv action=set_field:2->reg0,resubmit(,3,ct),goto_table:4
-dnl Outgoing non-related packet (ACL OUT)
-table=1 reg3=2, ip, ct_state=-rel-rpl+trk-inv action=set_field:2->reg0,resubmit(,3),goto_table:5
-dnl Outgoing non-related reply packet (CT ACL IN)
-table=1 reg3=2, ip, ct_state=-rel+rpl+trk-inv action=set_field:1->reg0,resubmit(,3,ct),goto_table:4
-dnl
-dnl Related packet (CT ACL in the direction of the master connection.)
-table=1 ip, ct_state=+rel+trk-inv, action=move:NXM_NX_CT_LABEL[[0]]->NXM_NX_REG0[[0]],resubmit(,3,ct),goto_table:4
-dnl Drop everything else.
-table=1 priority=0, action=drop
-dnl
-dnl "ACL table"
-dnl
-dnl Stateful accept (1->reg2) all incoming (reg0=1) IP connections with
-dnl IP source address '10.1.1.1'.  Store rule ID (1234) in reg1, verdict
-dnl in reg2.
-table=3 priority=10, reg0=1, ip, nw_src=10.1.1.1 action=set_field:1234->reg1,set_field:1->reg2
-dnl Stateless drop (0->reg2) everything else in both directions. (Rule ID: 1235)
-table=3 priority=0, action=set_field:1235->reg1,set_field:0->reg2
-dnl
-dnl Re-process stateful traffic that was not accepted by a stateful rule as
-dnl normal traffic in the current direction.  This should also delete the
-dnl now stale conntrack state, so that new state can be created in it's place.
-dnl
-dnl Stateful accepts go to next table.
-table=4 priority=100 reg2=1, action=goto_table:5
-dnl Everything else is reprocessed disregarding the CT state, using the actual
-dnl packet direction.
-table=4 priority=0 action=move:NXM_NX_REG3[[]]->NXM_NX_REG0[[]],resubmit(,3),goto_table:5
-dnl
-dnl "ACL verdict processing table."
-dnl
-dnl Handle stateful (reg2=1) / stateless (reg2=2) accepts and drops (reg2=0)
-dnl
-dnl Drop all non-accepted packets.
-table=5 reg2=0 priority=1000 action=drop
-dnl
-dnl Commit new incoming FTP control connections with SNAT range.  Must match on
-dnl 'tcp' when setting 'alg=ftp'.  Store the directionality of non-related
-dnl connections to ct_label[0]  Store the rule ID to ct_label[96..127].
-table=5 priority=100 reg2=1 reg3=1 ct_state=+new-rel, tcp, tp_dst=21, action=ct(zone=NXM_NX_REG4[[0..15]],alg=ftp,commit,nat(src=$2),exec(move:NXM_NX_REG3[[0]]->NXM_NX_CT_LABEL[[0]],move:NXM_NX_REG1[[0..31]]->NXM_NX_CT_LABEL[[96..127]])),goto_table:6
-dnl Commit other new incoming non-related IP connections with SNAT range.
-table=5 priority=10 reg2=1 reg3=1 ct_state=+new-rel, ip, action=ct(zone=NXM_NX_REG4[[0..15]],commit,nat(src=$2),exec(move:NXM_NX_REG3[[0]]->NXM_NX_CT_LABEL[[0]],move:NXM_NX_REG1[[0..31]]->NXM_NX_CT_LABEL[[96..127]])),goto_table:6
-dnl Commit non-related outgoing new IP connections with DNAT range.
-dnl (This should not get any packets in this test.)
-table=5 priority=10 reg2=1 reg3=2 ct_state=+new-rel, ip, action=ct(zone=NXM_NX_REG4[[0..15]],commit,nat(dst=$2),exec(move:NXM_NX_REG3[[0]]->NXM_NX_CT_LABEL[[0]],move:NXM_NX_REG1[[0..31]]->NXM_NX_CT_LABEL[[96..127]])),goto_table:6
-dnl Commit new related connections in either direction, which need 'nat'
-dnl and which inherit the label (the direction of the original direction
-dnl master tuple) from the master connection.
-table=5 priority=10 reg2=1 ct_state=+new+rel, ip, action=ct(zone=NXM_NX_REG4[[0..15]],commit,nat,exec(move:NXM_NX_REG1[[0..31]]->NXM_NX_CT_LABEL[[96..127]])),goto_table:6
-dnl
-dnl NAT incoming non-NEW packets. Outgoing packets were NATted in table 0.
-dnl
-table=5 priority=10 ct_state=-new+trk-inv reg3=1 ip, action=ct(zone=NXM_NX_REG4[[0..15]],nat),goto_table:6
-dnl Forward everything else, including stateless accepts.
-table=5 priority=0 action=goto_table:6
-dnl
-dnl "Forwarding table"
-dnl
-table=6 in_port=1 action=2
-table=6 in_port=2 action=1
-dnl
-dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0
-dnl
-table=8,reg2=$3,action=load:0x808888888888->OXM_OF_PKT_REG0[[]]
-table=8,priority=0,action=load:0->OXM_OF_PKT_REG0[[]]
-dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action.
-dnl TPA IP in reg2.
-dnl Swaps the fields of the ARP message to turn a query to a response.
-table=10 priority=100 arp xreg0=0 action=normal
-table=10 priority=10,arp,arp_op=1,action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]]
-table=10 priority=0 action=drop
-], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=$2,sport=<cleared>,dport=<cleared>),zone=1,labels=0x4d2000000000000000000000001,protoinfo=(state=<cleared>),helper=ftp
-tcp,orig=(src=10.1.1.2,dst=$2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),zone=1,labels=0x4d2000000000000000000000001,protoinfo=(state=<cleared>)
-])
-])
-
-dnl Check that ct(nat,table=foo) works without TCP sequence adjustment with
-dnl an ACL table based on matching on conntrack original direction tuple only.
-CHECK_FTP_SNAT_ORIG_TUPLE([], [10.1.1.9], [0x0a010109])
-
-dnl Check that ct(nat,table=foo) works with TCP sequence adjustment with
-dnl an ACL table based on matching on conntrack original direction tuple only.
-CHECK_FTP_SNAT_ORIG_TUPLE([seqadj], [10.1.1.240], [0x0a0101f0])
-
-AT_SETUP([conntrack - IPv4 FTP Passive with SNAT])
-AT_SKIP_IF([test $HAVE_FTP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-CHECK_CONNTRACK_ALG()
-
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address e6:66:c1:11:11:11])
-NS_CHECK_EXEC([at_ns0], [arp -s 10.1.1.2 e6:66:c1:22:22:22])
-
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address e6:66:c1:22:22:22])
-NS_CHECK_EXEC([at_ns1], [arp -s 10.1.1.1 e6:66:c1:11:11:11])
-NS_CHECK_EXEC([at_ns1], [arp -s 10.1.1.240 e6:66:c1:11:11:11])
-
-dnl Allow any traffic from ns0->ns1.
-AT_DATA([flows.txt], [dnl
-dnl track all IPv4 traffic and NAT any established traffic.
-table=0 priority=10 ip, action=ct(nat,table=1)
-table=0 priority=0 action=drop
-dnl
-dnl Table 1
-dnl
-dnl Allow new FTP control connections.
-table=1 in_port=1 ct_state=+new tcp nw_src=10.1.1.1 tp_dst=21  action=ct(alg=ftp,commit,nat(src=10.1.1.240)),2
-dnl Allow related TCP connections from port 1.
-table=1 in_port=1 ct_state=+new+rel tcp nw_src=10.1.1.1 action=ct(commit,nat),2
-dnl Allow established TCP connections both ways, post-NAT match.
-table=1 in_port=1 ct_state=+est tcp nw_src=10.1.1.240 action=2
-table=1 in_port=2 ct_state=+est tcp nw_dst=10.1.1.1 action=1
-
-dnl Allow ICMP both ways.
-table=1 priority=100 in_port=1 icmp, action=2
-table=1 priority=100 in_port=2 icmp, action=1
-table=1 priority=0, action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Check that the stacks working to avoid races.
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.1.1.2 >/dev/null])
-
-OVS_START_L7([at_ns1], [ftp])
-
-dnl FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-dnl Discards CLOSE_WAIT and CLOSING
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.240,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.240,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv4 FTP Passive with DNAT])
-AT_SKIP_IF([test $HAVE_FTP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-CHECK_CONNTRACK_ALG()
-
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address e6:66:c1:11:11:11])
-NS_CHECK_EXEC([at_ns0], [arp -s 10.1.1.2 e6:66:c1:22:22:22])
-NS_CHECK_EXEC([at_ns0], [arp -s 10.1.1.240 e6:66:c1:22:22:22])
-
-ADD_VETH(p1, at_ns1, br0, "10.1.1.240/24")
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address e6:66:c1:22:22:22])
-NS_CHECK_EXEC([at_ns1], [arp -s 10.1.1.1 e6:66:c1:11:11:11])
-
-dnl Allow any traffic from ns0->ns1.
-AT_DATA([flows.txt], [dnl
-dnl track all IPv4 traffic and NAT any established traffic.
-table=0 priority=10 ip, action=ct(nat,table=1)
-table=0 priority=0 action=drop
-dnl
-dnl Table 1
-dnl
-dnl Allow new FTP control connections.
-table=1 in_port=1 ct_state=+new tcp nw_src=10.1.1.1 tp_dst=21 action=ct(alg=ftp,commit,nat(dst=10.1.1.240)),2
-dnl Allow related TCP connections from port 1.
-table=1 in_port=1 ct_state=+new+rel tcp nw_src=10.1.1.1 action=ct(commit,nat),2
-dnl Allow established TCP connections both ways, post-NAT match.
-table=1 in_port=1 ct_state=+est tcp nw_dst=10.1.1.240 action=2
-table=1 in_port=2 ct_state=+est tcp nw_dst=10.1.1.1 action=1
-
-dnl Allow ICMP both ways.
-table=1 priority=100 in_port=1 icmp, action=2
-table=1 priority=100 in_port=2 icmp, action=1
-table=1 priority=0, action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Check that the stacks working to avoid races.
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.1.1.240 >/dev/null])
-
-OVS_START_L7([at_ns1], [ftp])
-
-dnl FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://10.1.1.2 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-dnl Discards CLOSE_WAIT and CLOSING
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.240,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.240,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv4 FTP Passive with DNAT 2])
-AT_SKIP_IF([test $HAVE_FTP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-CHECK_CONNTRACK_ALG()
-
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/16")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address e6:66:c1:11:11:11])
-NS_CHECK_EXEC([at_ns0], [arp -s 10.1.1.200 e6:66:c1:22:22:22])
-NS_CHECK_EXEC([at_ns0], [arp -s 10.1.100.1 e6:66:c1:22:22:22])
-
-ADD_VETH(p1, at_ns1, br0, "10.1.100.1/16")
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address e6:66:c1:22:22:22])
-NS_CHECK_EXEC([at_ns1], [arp -s 10.1.1.1 e6:66:c1:11:11:11])
-
-dnl Allow any traffic from ns0->ns1.
-AT_DATA([flows.txt], [dnl
-dnl track all IPv4 traffic and NAT any established traffic.
-table=0 priority=10 ip, action=ct(nat,table=1)
-table=0 priority=0 action=drop
-dnl
-dnl Table 1
-dnl
-dnl Allow new FTP control connections.
-table=1 in_port=1 ct_state=+new tcp nw_src=10.1.1.1 tp_dst=21 action=ct(alg=ftp,commit,nat(dst=10.1.100.1)),2
-dnl Allow related TCP connections from port 1.
-table=1 in_port=1 ct_state=+new+rel tcp nw_src=10.1.1.1 action=ct(commit,nat),2
-dnl Allow established TCP connections both ways, post-NAT match.
-table=1 in_port=1 ct_state=+est tcp nw_dst=10.1.100.1 action=2
-table=1 in_port=2 ct_state=+est tcp nw_dst=10.1.1.1 action=1
-
-dnl Allow ICMP both ways.
-table=1 priority=100 in_port=1 icmp, action=2
-table=1 priority=100 in_port=2 icmp, action=1
-table=1 priority=0, action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Check that the stacks working to avoid races.
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.1.100.1 >/dev/null])
-
-OVS_START_L7([at_ns1], [ftp])
-
-dnl FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://10.1.1.200 -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-dnl Discards CLOSE_WAIT and CLOSING
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.200)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.200,sport=<cleared>,dport=<cleared>),reply=(src=10.1.100.1,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-tcp,orig=(src=10.1.1.1,dst=10.1.1.200,sport=<cleared>,dport=<cleared>),reply=(src=10.1.100.1,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv4 FTP Active with DNAT])
-AT_SKIP_IF([test $HAVE_FTP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-CHECK_CONNTRACK_ALG()
-
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address e6:66:c1:11:11:11])
-NS_CHECK_EXEC([at_ns0], [arp -s 10.1.1.2 e6:66:c1:22:22:22])
-NS_CHECK_EXEC([at_ns0], [arp -s 10.1.1.240 e6:66:c1:22:22:22])
-
-ADD_VETH(p1, at_ns1, br0, "10.1.1.240/24")
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address e6:66:c1:22:22:22])
-NS_CHECK_EXEC([at_ns1], [arp -s 10.1.1.1 e6:66:c1:11:11:11])
-
-dnl Allow any traffic from ns0->ns1.
-AT_DATA([flows.txt], [dnl
-dnl track all IPv4 traffic and NAT any established traffic.
-table=0 priority=10 ip, action=ct(nat,table=1)
-table=0 priority=0 action=drop
-dnl
-dnl Table 1
-dnl
-dnl Allow new FTP control connections.
-table=1 in_port=1 ct_state=+new tcp nw_src=10.1.1.1 tp_dst=21 action=ct(alg=ftp,commit,nat(dst=10.1.1.240)),2
-dnl Allow related TCP connections from port 1.
-table=1 in_port=2 ct_state=+new+rel tcp nw_src=10.1.1.240 action=ct(commit,nat),1
-dnl Allow established TCP connections both ways, post-NAT match.
-table=1 in_port=1 ct_state=+est tcp nw_dst=10.1.1.240 action=2
-table=1 in_port=2 ct_state=+est tcp nw_dst=10.1.1.1 action=1
-
-dnl Allow ICMP both ways.
-table=1 priority=100 in_port=1 icmp, action=2
-table=1 priority=100 in_port=2 icmp, action=1
-table=1 priority=0, action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Check that the stacks working to avoid races.
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.1.1.240 >/dev/null])
-
-OVS_START_L7([at_ns1], [ftp])
-
-dnl FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://10.1.1.2 --no-passive-ftp -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-dnl Discards CLOSE_WAIT and CLOSING
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.240,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-tcp,orig=(src=10.1.1.240,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv4 FTP Active with DNAT with reverse skew])
-AT_SKIP_IF([test $HAVE_FTP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-CHECK_CONNTRACK_ALG()
-
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/16")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address e6:66:c1:11:11:11])
-NS_CHECK_EXEC([at_ns0], [arp -s 10.1.1.2 e6:66:c1:22:22:22])
-NS_CHECK_EXEC([at_ns0], [arp -s 10.1.120.240 e6:66:c1:22:22:22])
-
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/16")
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address e6:66:c1:22:22:22])
-NS_CHECK_EXEC([at_ns1], [arp -s 10.1.1.1 e6:66:c1:11:11:11])
-
-dnl Allow any traffic from ns0->ns1.
-AT_DATA([flows.txt], [dnl
-dnl track all IPv4 traffic and NAT any established traffic.
-table=0 priority=10 ip, action=ct(nat,table=1)
-table=0 priority=0 action=drop
-dnl
-dnl Table 1
-dnl
-dnl Allow new FTP control connections.
-table=1 in_port=1 ct_state=+new tcp nw_src=10.1.1.1 tp_dst=21 action=ct(alg=ftp,commit,nat(dst=10.1.1.2)),2
-dnl Allow related TCP connections from port 1.
-table=1 in_port=2 ct_state=+new+rel tcp nw_src=10.1.1.2 action=ct(commit,nat),1
-dnl Allow established TCP connections both ways, post-NAT match.
-table=1 in_port=1 ct_state=+est tcp nw_dst=10.1.1.2 action=2
-table=1 in_port=2 ct_state=+est tcp nw_dst=10.1.1.1 action=1
-
-dnl Allow ICMP both ways.
-table=1 priority=100 in_port=1 icmp, action=2
-table=1 priority=100 in_port=2 icmp, action=1
-table=1 priority=0, action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Check that the stacks working to avoid races.
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.1.1.2 >/dev/null])
-
-OVS_START_L7([at_ns1], [ftp])
-
-dnl FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://10.1.120.240 --no-passive-ftp -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-dnl Discards CLOSE_WAIT and CLOSING
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.120.240)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.120.240,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-tcp,orig=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.1,dst=10.1.120.240,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 HTTP with SNAT])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address 80:88:88:88:88:88])
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-NS_CHECK_EXEC([at_ns1], [ip -6 neigh add fc00::240 lladdr 80:88:88:88:88:88 dev p1])
-NS_CHECK_EXEC([at_ns1], [ip -6 neigh add fc00::241 lladdr 80:88:88:88:88:88 dev p1])
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-priority=1,action=drop
-priority=10,icmp6,action=normal
-priority=100,in_port=1,ip6,action=ct(commit,nat(src=fc00::240-fc00::241)),2
-priority=100,in_port=2,ct_state=-trk,ip6,action=ct(nat,table=0)
-priority=100,in_port=2,ct_state=+trk+est,ip6,action=1
-priority=200,in_port=2,ct_state=+trk+new,icmp6,icmpv6_code=0,icmpv6_type=135,nd_target=fc00::240,action=ct(commit,nat(dst=fc00::1)),1
-priority=200,in_port=2,ct_state=+trk+new,icmp6,icmpv6_code=0,icmpv6_type=135,nd_target=fc00::241,action=ct(commit,nat(dst=fc00::1)),1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2])
-
-dnl HTTP requests from ns0->ns1 should work fine.
-OVS_START_L7([at_ns1], [http6])
-
-NS_CHECK_EXEC([at_ns0], [wget http://[[fc00::2]] -t 3 -T 1 --retry-connrefused -v -o wget0.log])
-
-dnl HTTP requests from ns1->ns0 should fail due to network failure.
-dnl Try 3 times, in 1 second intervals.
-OVS_START_L7([at_ns0], [http6])
-NS_CHECK_EXEC([at_ns1], [wget http://[[fc00::1]] -t 3 -T 1 -v -o wget1.log], [4])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 HTTP with DNAT])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-NS_CHECK_EXEC([at_ns0], [ip -6 link set dev p0 address 80:88:88:88:88:77])
-NS_CHECK_EXEC([at_ns1], [ip -6 link set dev p1 address 80:88:88:88:88:88])
-NS_CHECK_EXEC([at_ns0], [ip -6 neigh add fc00::240 lladdr 80:88:88:88:88:88 dev p0])
-NS_CHECK_EXEC([at_ns1], [ip -6 neigh add fc00::1 lladdr 80:88:88:88:88:77 dev p1])
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-priority=100 in_port=1,ip6,ipv6_dst=fc00::240,action=ct(zone=1,nat(dst=fc00::2),commit),2
-priority=100 in_port=2,ct_state=-trk,ip6,action=ct(table=0,nat,zone=1)
-priority=100 in_port=2,ct_state=+trk+est,ct_zone=1,ip6,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::240])
-
-NS_CHECK_EXEC([at_ns0], [ping6 -q -c 3 -i 0.3 -w 2 fc00::240 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl Should work with the virtual IP address through NAT
-OVS_START_L7([at_ns1], [http6])
-NS_CHECK_EXEC([at_ns0], [wget http://[[fc00::240]] -t 5 -T 1 --retry-connrefused -v -o wget0.log])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::1)], [0], [dnl
-icmpv6,orig=(src=fc00::1,dst=fc00::240,id=<cleared>,type=128,code=0),reply=(src=fc00::2,dst=fc00::1,id=<cleared>,type=129,code=0),zone=1
-tcp,orig=(src=fc00::1,dst=fc00::240,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::1,sport=<cleared>,dport=<cleared>),zone=1,protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 ICMP6 Related with SNAT])
-AT_SKIP_IF([test $HAVE_TCPDUMP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-NS_CHECK_EXEC([at_ns0], [ip -6 link set dev p0 address 80:88:88:88:88:77])
-NS_CHECK_EXEC([at_ns1], [ip -6 link set dev p1 address 80:88:88:88:88:88])
-
-NS_CHECK_EXEC([at_ns0], [ip -6 neigh add fc00::2 lladdr 80:88:88:88:88:88 dev p0])
-NS_CHECK_EXEC([at_ns0], [ip -6 neigh add fc00::3 lladdr 80:88:88:88:88:88 dev p0])
-NS_CHECK_EXEC([at_ns1], [ip -6 neigh add fc00::240 lladdr 80:88:88:88:88:77 dev p1])
-NS_CHECK_EXEC([at_ns1], [ip -6 neigh add fc00::1 lladdr 80:88:88:88:88:77 dev p1])
-
-NS_CHECK_EXEC([at_ns0], [ip -6 route add default via fc00::2])
-
-dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-priority=100 in_port=1,ip6,action=ct(nat(src=fc00::240),commit),2
-priority=100 in_port=2,ct_state=-trk,ip6,action=ct(table=0,nat)
-priority=100 in_port=2,ct_state=+trk+est,ip6,action=1
-priority=100 in_port=2,ct_state=+trk+rel,ip6,action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2])
-
-AT_CHECK([ovs-appctl dpctl/flush-conntrack])
-
-rm p0.pcap
-tcpdump -U -i ovs-p0 -w p0.pcap &
-sleep 1
-
-dnl UDP packets from ns0->ns1 should solicit "destination unreachable" response.
-NS_CHECK_EXEC([at_ns0], [bash -c "echo a | nc -6 $NC_EOF_OPT -u fc00::2 1"])
-
-AT_CHECK([tcpdump -v "icmp6" -r p0.pcap 2>/dev/null | egrep 'wrong|bad'], [1], [ignore-nolog])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-udp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::240,sport=<cleared>,dport=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 FTP with SNAT])
-AT_SKIP_IF([test $HAVE_FTP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-CHECK_CONNTRACK_ALG()
-
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address 80:88:88:88:88:88])
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-dnl Would be nice if NAT could translate neighbor discovery messages, too.
-NS_CHECK_EXEC([at_ns1], [ip -6 neigh add fc00::240 lladdr 80:88:88:88:88:88 dev p1])
-
-dnl Allow any traffic from ns0->ns1.
-dnl Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-dnl track all IPv6 traffic (this includes NAT & help to non-NEW packets.)
-table=0 priority=10 ip6, action=ct(nat,table=1)
-table=0 priority=0 action=drop
-dnl
-dnl Table 1
-dnl
-dnl Allow new TCPv6 FTP control connections.
-table=1 in_port=1 ct_state=+new tcp6 ipv6_src=fc00::1 tp_dst=21  action=ct(alg=ftp,commit,nat(src=fc00::240)),2
-dnl Allow related TCPv6 connections from port 2 to the NATted address.
-table=1 in_port=2 ct_state=+new+rel tcp6 ipv6_dst=fc00::240 action=ct(commit,nat),1
-dnl Allow established TCPv6 connections both ways, enforce NATting
-table=1 in_port=1 ct_state=+est tcp6 ipv6_src=fc00::240   action=2
-table=1 in_port=2 ct_state=+est tcp6 ipv6_dst=fc00::1     action=1
-dnl Allow other ICMPv6 both ways (without commit).
-table=1 priority=100 in_port=1 icmp6, action=2
-table=1 priority=100 in_port=2 icmp6, action=1
-dnl Drop everything else.
-table=1 priority=0, action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2 >/dev/null])
-
-OVS_START_L7([at_ns1], [ftp])
-
-dnl FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://[[fc00::2]] -6 --no-passive-ftp -t 3 -T 1 --retry-connrefused -v --server-response --no-remove-listing -o wget0.log -d])
-
-dnl Discards CLOSE_WAIT and CLOSING
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-tcp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::240,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-tcp,orig=(src=fc00::2,dst=fc00::240,sport=<cleared>,dport=<cleared>),reply=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 FTP Passive with SNAT])
-AT_SKIP_IF([test $HAVE_FTP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-CHECK_CONNTRACK_ALG()
-
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address 80:88:88:88:88:88])
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address 80:88:88:88:88:99])
-NS_CHECK_EXEC([at_ns0], [ip -6 neigh add fc00::2 lladdr 80:88:88:88:88:99 dev p0])
-NS_CHECK_EXEC([at_ns1], [ip -6 neigh add fc00::240 lladdr 80:88:88:88:88:88 dev p1])
-
-dnl Allow any traffic from ns0->ns1.
-dnl Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-dnl track all IPv6 traffic (this includes NAT & help to non-NEW packets.)
-table=0 priority=10 ip6, action=ct(nat,table=1)
-table=0 priority=0 action=drop
-dnl
-dnl Table 1
-dnl
-dnl Allow new TCPv6 FTP control connections.
-table=1 in_port=1 ct_state=+new tcp6 ipv6_src=fc00::1 tp_dst=21  action=ct(alg=ftp,commit,nat(src=fc00::240)),2
-dnl Allow related TCPv6 connections from port 1.
-table=1 in_port=1 ct_state=+new+rel tcp6 ipv6_dst=fc00::2 action=ct(commit,nat),2
-dnl Allow established TCPv6 connections both ways, enforce NATting
-table=1 in_port=1 ct_state=+est tcp6 ipv6_src=fc00::240 action=2
-table=1 in_port=2 ct_state=+est tcp6 ipv6_dst=fc00::1 action=1
-dnl Allow other ICMPv6 both ways (without commit).
-table=1 priority=100 in_port=1 icmp6, action=2
-table=1 priority=100 in_port=2 icmp6, action=1
-dnl Drop everything else.
-table=1 priority=0, action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2 >/dev/null])
-
-OVS_START_L7([at_ns1], [ftp])
-
-dnl FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://[[fc00::2]] -6 -t 3 -T 1 --retry-connrefused -v --server-response --no-remove-listing -o wget0.log -d])
-
-dnl Discards CLOSE_WAIT and CLOSING
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-tcp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::240,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-tcp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::240,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv6 FTP with SNAT - orig tuple])
-AT_SKIP_IF([test $HAVE_FTP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-CHECK_CONNTRACK_ALG()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address 80:88:88:88:88:88])
-ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
-dnl Would be nice if NAT could translate neighbor discovery messages, too.
-NS_CHECK_EXEC([at_ns1], [ip -6 neigh add fc00::240 lladdr 80:88:88:88:88:88 dev p1])
-
-dnl Allow any traffic from ns0->ns1.
-dnl Only allow nd, return traffic from ns1->ns0.
-AT_DATA([flows.txt], [dnl
-dnl track all IPv6 traffic (this includes NAT & help to non-NEW packets.)
-table=0 priority=10 ip6, action=ct(nat,table=1)
-table=0 priority=0 action=drop
-dnl
-dnl Table 1
-dnl
-dnl Allow other ICMPv6 both ways (without commit).
-table=1 priority=100 in_port=1 icmp6, action=2
-table=1 priority=100 in_port=2 icmp6, action=1
-dnl Allow new TCPv6 FTP control connections.
-table=1 priority=10 in_port=1 ct_state=+new+trk-inv tcp6 ct_nw_proto=6 ct_ipv6_src=fc00::1 ct_tp_dst=21  action=ct(alg=ftp,commit,nat(src=fc00::240)),2
-dnl Allow related TCPv6 connections from port 2 to the NATted address.
-table=1 priority=10 in_port=2 ct_state=+new+rel+trk-inv ipv6 ct_nw_proto=6 ct_ipv6_src=fc00::1 ct_tp_dst=21 action=ct(commit,nat),1
-dnl Allow established TCPv6 connections both ways, enforce NATting
-table=1 priority=10 in_port=1 ct_state=+est+trk-inv ipv6 ct_nw_proto=6 ct_ipv6_src=fc00::1 ct_tp_dst=21 action=2
-table=1 priority=10 in_port=2 ct_state=+est+trk-inv ipv6 ct_nw_proto=6 ct_ipv6_src=fc00::1 ct_tp_dst=21 action=1
-dnl Drop everything else.
-table=1 priority=0, action=drop
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Linux seems to take a little time to get its IPv6 stack in order. Without
-dnl waiting, we get occasional failures due to the following error:
-dnl "connect: Cannot assign requested address"
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2 >/dev/null])
-
-NETNS_DAEMONIZE([at_ns1], [[$PYTHON $srcdir/test-l7.py ftp]], [ftp0.pid])
-OVS_WAIT_UNTIL([ip netns exec at_ns1 netstat -l | grep ftp])
-
-dnl FTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [wget ftp://[[fc00::2]] -6 --no-passive-ftp -t 3 -T 1 --retry-connrefused -v --server-response --no-remove-listing -o wget0.log -d])
-
-dnl Discards CLOSE_WAIT and CLOSING
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(fc00::2)], [0], [dnl
-tcp,orig=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),reply=(src=fc00::2,dst=fc00::240,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>),helper=ftp
-tcp,orig=(src=fc00::2,dst=fc00::240,sport=<cleared>,dport=<cleared>),reply=(src=fc00::1,dst=fc00::2,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - IPv4 TFTP with SNAT])
-AT_SKIP_IF([test $HAVE_TFTP = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-CHECK_CONNTRACK_ALG()
-
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address e6:66:c1:11:11:11])
-NS_CHECK_EXEC([at_ns0], [arp -s 10.1.1.2 e6:66:c1:22:22:22])
-
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address e6:66:c1:22:22:22])
-NS_CHECK_EXEC([at_ns1], [arp -s 10.1.1.1 e6:66:c1:11:11:11])
-NS_CHECK_EXEC([at_ns1], [arp -s 10.1.1.240 e6:66:c1:11:11:11])
-
-dnl Allow any traffic from ns0->ns1.
-AT_DATA([flows.txt], [dnl
-dnl track all IPv4 traffic.
-table=0 priority=10 ip, action=ct(table=1)
-dnl drop everything else.
-table=0 priority=0 action=drop
-dnl
-dnl Table 1
-dnl Allow ICMP both ways.
-table=1 priority=100 in_port=1 icmp, action=2
-table=1 priority=100 in_port=2 icmp, action=1
-dnl
-dnl Allow new TFTP control connections.
-table=1 in_port=1 ct_state=+new udp nw_src=10.1.1.1 tp_dst=69  action=ct(alg=tftp,commit,nat(src=10.1.1.240)),2
-dnl Allow related UDP connections from port 1.
-table=1 in_port=2 ct_state=+new+rel udp nw_src=10.1.1.2 action=ct(commit,nat),1
-dnl Allow established and NAT them.
-table=1 in_port=1 ct_state=+est udp nw_src=10.1.1.1 action=ct(nat,table=2)
-table=1 in_port=2 ct_state=+est udp nw_src=10.1.1.2 action=ct(nat,table=2)
-dnl
-table=1 priority=0, action=drop
-dnl
-table=2 in_port=1 ct_state=+est udp nw_src=10.1.1.240 action=2
-table=2 in_port=2 ct_state=+est udp nw_dst=10.1.1.1 action=1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Check that the stacks working to avoid races.
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.1.1.2 >/dev/null])
-
-OVS_START_L7([at_ns0], [tftp])
-OVS_START_L7([at_ns1], [tftp])
-
-dnl TFTP requests from p0->p1 should work fine.
-NS_CHECK_EXEC([at_ns0], [[curl $CURL_OPT tftp://10.1.1.2/flows.txt -o foo 2>curl0.log]])
-
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.2)], [0], [dnl
-udp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.240,sport=<cleared>,dport=<cleared>),helper=tftp
-udp,orig=(src=10.1.1.2,dst=10.1.1.240,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>)
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - DNAT load balancing])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns1, at_ns2, at_ns3, at_ns4)
-
-ADD_VETH(p1, at_ns1, br0, "10.1.1.1/24")
-ADD_VETH(p2, at_ns2, br0, "10.1.1.2/24")
-ADD_VETH(p3, at_ns3, br0, "10.1.1.3/24")
-ADD_VETH(p4, at_ns4, br0, "10.1.1.4/24")
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address 80:88:88:88:88:11])
-NS_CHECK_EXEC([at_ns2], [ip link set dev p2 address 80:88:88:88:88:22])
-NS_CHECK_EXEC([at_ns3], [ip link set dev p3 address 80:88:88:88:88:33])
-NS_CHECK_EXEC([at_ns4], [ip link set dev p4 address 80:88:88:88:88:44])
-
-dnl Select group for load balancing.  One bucket per server.  Each bucket
-dnl tracks and NATs the connection and recirculates to table 4 for egress
-dnl routing.  Packets of existing connections are always NATted based on
-dnl connection state, only new connections are NATted according to the
-dnl specific NAT parameters in each bucket.
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn add-group br0 "group_id=234,type=select,bucket=weight=100,ct(nat(dst=10.1.1.2),commit,table=4),bucket=weight=100,ct(nat(dst=10.1.1.3),commit,table=4),bucket=weight=100,ct(nat(dst=10.1.1.4),commit,table=4)"])
-
-AT_DATA([flows.txt], [dnl
-dnl Track connections to the virtual IP address.
-table=0 priority=100 ip nw_dst=10.1.1.64 action=group:234
-dnl All other IP traffic is allowed but the connection state is no commited.
-table=0 priority=90 ip action=ct(table=4,nat)
-dnl
-dnl Allow ARP, but generate responses for virtual addresses
-table=0 priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10
-table=0 priority=10 arp action=normal
-table=0 priority=0 action=drop
-dnl
-dnl Routing table
-dnl
-table=4,ip,nw_dst=10.1.1.1 action=mod_dl_dst:80:88:88:88:88:11,output:1
-table=4,ip,nw_dst=10.1.1.2 action=mod_dl_dst:80:88:88:88:88:22,output:2
-table=4,ip,nw_dst=10.1.1.3 action=mod_dl_dst:80:88:88:88:88:33,output:3
-table=4,ip,nw_dst=10.1.1.4 action=mod_dl_dst:80:88:88:88:88:44,output:4
-table=4 priority=0 action=drop
-dnl
-dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0
-table=8,reg2=0x0a010140,action=load:0x808888888888->OXM_OF_PKT_REG0[[]]
-dnl Zero result means not found.
-table=8,priority=0,action=load:0->OXM_OF_PKT_REG0[[]]
-dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action.
-dnl TPA IP in reg2.
-table=10 priority=100 arp xreg0=0 action=normal
-dnl Swaps the fields of the ARP message to turn a query to a response.
-table=10 priority=10,arp,arp_op=1,action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]]
-table=10 priority=0 action=controller
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Start web servers
-OVS_START_L7([at_ns2], [http])
-OVS_START_L7([at_ns3], [http])
-OVS_START_L7([at_ns4], [http])
-
-on_exit 'ovs-ofctl -O OpenFlow15 dump-flows br0'
-on_exit 'ovs-appctl revalidator/purge'
-on_exit 'ovs-appctl dpif/dump-flows br0'
-
-dnl Should work with the virtual IP address through NAT
-for i in 1 2 3 4 5 6 7 8 9 10 11 12; do
-    echo Request $i
-    NS_CHECK_EXEC([at_ns1], [wget 10.1.1.64 -t 5 -T 1 --retry-connrefused -v -o wget$i.log])
-done
-
-dnl Each server should have at least one connection.
-AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(10.1.1.64)], [0], [dnl
-tcp,orig=(src=10.1.1.1,dst=10.1.1.64,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-tcp,orig=(src=10.1.1.1,dst=10.1.1.64,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.3,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-tcp,orig=(src=10.1.1.1,dst=10.1.1.64,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.4,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),protoinfo=(state=<cleared>)
-])
-
-ovs-appctl dpif/dump-flows br0
-ovs-appctl revalidator/purge
-ovs-ofctl -O OpenFlow15 dump-flows br0
-ovs-ofctl -O OpenFlow15 dump-group-stats br0
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([conntrack - DNAT load balancing with NC])
-AT_SKIP_IF([test $HAVE_NC = no])
-CHECK_CONNTRACK()
-CHECK_CONNTRACK_NAT()
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns1, at_ns2, at_ns3, at_ns4, at_ns5)
-
-ADD_VETH(p1, at_ns1, br0, "10.1.1.1/24")
-ADD_VETH(p2, at_ns2, br0, "10.1.1.2/24")
-ADD_VETH(p3, at_ns3, br0, "10.1.1.3/24")
-ADD_VETH(p4, at_ns4, br0, "10.1.1.4/24")
-ADD_VETH(p5, at_ns5, br0, "10.1.1.5/24")
-NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address 80:88:88:88:88:11])
-NS_CHECK_EXEC([at_ns2], [ip link set dev p2 address 80:88:88:88:88:22])
-NS_CHECK_EXEC([at_ns3], [ip link set dev p3 address 80:88:88:88:88:33])
-NS_CHECK_EXEC([at_ns4], [ip link set dev p4 address 80:88:88:88:88:44])
-NS_CHECK_EXEC([at_ns5], [ip link set dev p5 address 80:88:88:88:88:55])
-
-dnl Select group for load balancing.  One bucket per server.  Each bucket
-dnl tracks and NATs the connection and recirculates to table 4 for egress
-dnl routing.  Packets of existing connections are always NATted based on
-dnl connection state, only new connections are NATted according to the
-dnl specific NAT parameters in each bucket.
-AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn add-group br0 "group_id=234,type=select,bucket=weight=100,ct(nat(dst=10.1.1.2),commit,table=4),bucket=weight=100,ct(nat(dst=10.1.1.3),commit,table=4),bucket=weight=100,ct(nat(dst=10.1.1.4),commit,table=4)"])
-
-AT_DATA([flows.txt], [dnl
-dnl Track connections to the virtual IP address.
-table=0 priority=100 ip nw_dst=10.1.1.64 action=group:234
-dnl All other IP traffic is allowed but the connection state is no commited.
-table=0 priority=90 ip action=ct(table=4,nat)
-dnl
-dnl Allow ARP, but generate responses for virtual addresses
-table=0 priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10
-table=0 priority=10 arp action=normal
-table=0 priority=0 action=drop
-dnl
-dnl Routing table
-dnl
-table=4,ip,nw_dst=10.1.1.1 action=mod_dl_dst:80:88:88:88:88:11,output:1
-table=4,ip,nw_dst=10.1.1.2 action=mod_dl_dst:80:88:88:88:88:22,output:2
-table=4,ip,nw_dst=10.1.1.3 action=mod_dl_dst:80:88:88:88:88:33,output:3
-table=4,ip,nw_dst=10.1.1.4 action=mod_dl_dst:80:88:88:88:88:44,output:4
-table=4,ip,nw_dst=10.1.1.5 action=mod_dl_dst:80:88:88:88:88:55,output:5
-table=4 priority=0 action=drop
-dnl
-dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0
-table=8,reg2=0x0a010140,action=load:0x808888888888->OXM_OF_PKT_REG0[[]]
-dnl Zero result means not found.
-table=8,priority=0,action=load:0->OXM_OF_PKT_REG0[[]]
-dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action.
-dnl TPA IP in reg2.
-table=10 priority=100 arp xreg0=0 action=normal
-dnl Swaps the fields of the ARP message to turn a query to a response.
-table=10 priority=10,arp,arp_op=1,action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]]
-table=10 priority=0 action=controller
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl Start web servers
-OVS_START_L7([at_ns2], [http])
-OVS_START_L7([at_ns3], [http])
-OVS_START_L7([at_ns4], [http])
-
-on_exit 'ovs-ofctl -O OpenFlow15 dump-flows br0'
-on_exit 'ovs-appctl revalidator/purge'
-on_exit 'ovs-appctl dpif/dump-flows br0'
-
-sleep 5
-
-dnl Should work with the virtual IP address through NAT
-for i in 1 2 3 4 5 6 7 8 9; do
-    echo Request $i
-    NS_CHECK_EXEC([at_ns1], [echo "TEST1" | nc -p 4100$i 10.1.1.64 80 > nc-1-$i.log])
-    NS_CHECK_EXEC([at_ns5], [echo "TEST5" | nc -p 4100$i 10.1.1.64 80 > nc-5-$i.log])
-done
-
-conntrack -L 2>&1
-
-ovs-appctl dpif/dump-flows br0
-ovs-appctl revalidator/purge
-ovs-ofctl -O OpenFlow15 dump-flows br0
-ovs-ofctl -O OpenFlow15 dump-group-stats br0
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([conntrack - floating IP])
-AT_SKIP_IF([test $HAVE_NC = no])
-CHECK_CONNTRACK()
-OVS_TRAFFIC_VSWITCHD_START()
-OVS_CHECK_CT_CLEAR()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24", "f0:00:00:01:01:01") dnl FIP 10.254.254.1
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24", "f0:00:00:01:01:02") dnl FIP 10.254.254.2
-
-dnl Static ARPs
-NS_CHECK_EXEC([at_ns0], [ip neigh add 10.1.1.2 lladdr f0:00:00:01:01:02 dev p0])
-NS_CHECK_EXEC([at_ns1], [ip neigh add 10.1.1.1 lladdr f0:00:00:01:01:01 dev p1])
-
-dnl Static ARP and route entries for the FIP "gateway"
-NS_CHECK_EXEC([at_ns0], [ip neigh add 10.1.1.254 lladdr f0:00:00:01:01:FE dev p0])
-NS_CHECK_EXEC([at_ns1], [ip neigh add 10.1.1.254 lladdr f0:00:00:01:01:FE dev p1])
-NS_CHECK_EXEC([at_ns0], [ip route add default nexthop via 10.1.1.254])
-NS_CHECK_EXEC([at_ns1], [ip route add default nexthop via 10.1.1.254])
-
-NETNS_DAEMONIZE([at_ns0], [nc -l -k 1234 > /dev/null], [nc0.pid])
-
-AT_DATA([flows.txt], [dnl
-table=0,priority=10  ip action=ct(table=1)
-table=0,priority=1   action=drop
-dnl dst FIP
-table=1,priority=20  ip,ct_state=+trk+est,nw_dst=10.254.254.0/24 action=goto_table:10
-table=1,priority=20  ip,ct_state=+trk+new,nw_dst=10.254.254.0/24 action=ct(commit,table=10)
-dnl dst local
-table=1,priority=10  ip,ct_state=+trk+est action=goto_table:20
-table=1,priority=10  ip,ct_state=+trk+new action=ct(commit,table=20)
-table=1,priority=1   ip,ct_state=+trk+inv action=drop
-dnl
-dnl FIP translation (dst FIP, src local) --> (dst local, src FIP)
-table=10             ip,nw_dst=10.254.254.1 action=set_field:10.1.1.1->nw_dst,goto_table:11
-table=10             ip,nw_dst=10.254.254.2 action=set_field:10.1.1.2->nw_dst,goto_table:11
-table=11             ip,nw_src=10.1.1.1 action=set_field:10.254.254.1->nw_src,goto_table:12
-table=11             ip,nw_src=10.1.1.2 action=set_field:10.254.254.2->nw_src,goto_table:12
-dnl clear conntrack and do another lookup since we changed the tuple
-table=12,priority=10 ip action=ct_clear,ct(table=13)
-table=12,priority=1  action=drop
-table=13             ip,ct_state=+trk+est action=goto_table:20
-table=13             ip,ct_state=+trk+new action=ct(commit,table=20)
-table=13             ip,ct_state=+trk+inv action=drop
-dnl
-dnl Output
-table=20             ip,nw_src=10.1.1.1 action=set_field:f0:00:00:01:01:01->eth_src,goto_table:21
-table=20             ip,nw_src=10.1.1.2 action=set_field:f0:00:00:01:01:02->eth_src,goto_table:21
-table=20             ip,nw_src=10.254.254.0/24 action=set_field:f0:00:00:01:01:FE->eth_src,goto_table:21
-table=21             ip,nw_dst=10.1.1.1 action=set_field:f0:00:00:01:01:01->eth_dst,output:ovs-p0
-table=21             ip,nw_dst=10.1.1.2 action=set_field:f0:00:00:01:01:02->eth_dst,output:ovs-p1
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
-
-dnl non-FIP case
-NS_CHECK_EXEC([at_ns1], [echo "foobar" |nc $NC_EOF_OPT 10.1.1.1 1234])
-OVS_WAIT_UNTIL([[ovs-appctl dpctl/dump-conntrack | sed -e 's/port=[0-9]*/port=<cleared>/g' -e 's/id=[0-9]*/id=<cleared>/g' |
-grep "tcp,orig=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),protoinfo=(state=TIME_WAIT)"
-]])
-
-dnl Check that the full session ends as expected (i.e. TIME_WAIT). Otherwise it
-dnl means the datapath didn't process the ct_clear action. Ending in SYN_RECV
-dnl (OVS maps to ESTABLISHED) means the initial frame was committed, but not a
-dnl second time after the FIP translation (because ct_clear didn't occur).
-NS_CHECK_EXEC([at_ns1], [echo "foobar" |nc $NC_EOF_OPT 10.254.254.1 1234])
-OVS_WAIT_UNTIL([[ovs-appctl dpctl/dump-conntrack | sed -e 's/port=[0-9]*/port=<cleared>/g' -e 's/id=[0-9]*/id=<cleared>/g' |
-grep "tcp,orig=(src=10.254.254.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.1,dst=10.254.254.2,sport=<cleared>,dport=<cleared>),protoinfo=(state=TIME_WAIT)"
-]])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_BANNER([802.1ad])
-
-AT_SETUP([802.1ad - vlan_limit])
-OVS_TRAFFIC_VSWITCHD_START([set Open_vSwitch . other_config:vlan-limit=0])
-OVS_CHECK_8021AD()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-ADD_SVLAN(p0, at_ns0, 4094, "10.255.2.1/24")
-ADD_SVLAN(p1, at_ns1, 4094, "10.255.2.2/24")
-
-ADD_CVLAN(p0.4094, at_ns0, 100, "10.2.2.1/24")
-ADD_CVLAN(p1.4094, at_ns1, 100, "10.2.2.2/24")
-
-AT_CHECK([ovs-ofctl add-flow br0 "priority=1 action=normal"])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.2.2.2])
-
-dnl CVLAN traffic should match the flow and drop
-AT_CHECK([ovs-appctl revalidator/purge])
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:vlan-limit=1])
-AT_CHECK([ovs-ofctl add-flow br0 "priority=100 dl_type=0x8100 action=drop"])
-NS_CHECK_EXEC([at_ns0], [ping -q -c 1 -w 3 10.2.2.2], [1], [ignore])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([802.1ad - push/pop outer 802.1ad])
-OVS_TRAFFIC_VSWITCHD_START([set Open_vSwitch . other_config:vlan-limit=0])
-OVS_CHECK_8021AD()
-
-ADD_BR([br1])
-ADD_BR([br2])
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-AT_CHECK([ip link add ovs-p0 type veth peer name ovs-p1])
-AT_CHECK([ip link set dev ovs-p0 up])
-AT_CHECK([ip link set dev ovs-p1 up])
-AT_CHECK([ovs-vsctl add-port br0 ovs-p0])
-AT_CHECK([ovs-vsctl add-port br1 ovs-p1])
-on_exit 'ip link del ovs-p0'
-
-AT_CHECK([ip link add ovs-p2 type veth peer name ovs-p3])
-AT_CHECK([ip link set dev ovs-p2 up])
-AT_CHECK([ip link set dev ovs-p3 up])
-AT_CHECK([ovs-vsctl add-port br0 ovs-p2])
-AT_CHECK([ovs-vsctl add-port br2 ovs-p3])
-on_exit 'ip link del ovs-p2'
-
-ADD_VETH(p4, at_ns0, br1, "10.1.1.1/24")
-ADD_VETH(p5, at_ns1, br2, "10.1.1.2/24")
-ADD_CVLAN(p4, at_ns0, 100, "10.2.2.1/24")
-ADD_CVLAN(p5, at_ns1, 100, "10.2.2.2/24")
-
-AT_DATA([flows-br0.txt], [dnl
-priority=1 action=drop
-priority=100 in_port=1 action=push_vlan:0x88a8,mod_vlan_vid=4094,output:2
-priority=100 in_port=2 action=push_vlan:0x88a8,mod_vlan_vid=4094,output:1
-])
-
-AT_DATA([flows-customer-br.txt], [dnl
-priority=1 action=normal
-priority=100 in_port=1 vlan_tci=0x1000/0x1000 action=pop_vlan,normal
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows-br0.txt])
-AT_CHECK([ovs-ofctl --bundle add-flows br1 flows-customer-br.txt])
-AT_CHECK([ovs-ofctl --bundle add-flows br2 flows-customer-br.txt])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.2.2.2])
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([802.1ad - push/pop outer 802.1q])
-OVS_TRAFFIC_VSWITCHD_START([set Open_vSwitch . other_config:vlan-limit=0])
-OVS_CHECK_8021AD()
-
-ADD_BR([br1])
-ADD_BR([br2])
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-AT_CHECK([ip link add ovs-p0 type veth peer name ovs-p1])
-AT_CHECK([ip link set dev ovs-p0 up])
-AT_CHECK([ip link set dev ovs-p1 up])
-AT_CHECK([ovs-vsctl add-port br0 ovs-p0])
-AT_CHECK([ovs-vsctl add-port br1 ovs-p1])
-on_exit 'ip link del ovs-p0'
-
-AT_CHECK([ip link add ovs-p2 type veth peer name ovs-p3])
-AT_CHECK([ip link set dev ovs-p2 up])
-AT_CHECK([ip link set dev ovs-p3 up])
-AT_CHECK([ovs-vsctl add-port br0 ovs-p2])
-AT_CHECK([ovs-vsctl add-port br2 ovs-p3])
-on_exit 'ip link del ovs-p2'
-
-ADD_VETH(p4, at_ns0, br1, "10.1.1.1/24")
-ADD_VETH(p5, at_ns1, br2, "10.1.1.2/24")
-ADD_CVLAN(p4, at_ns0, 100, "10.2.2.1/24")
-ADD_CVLAN(p5, at_ns1, 100, "10.2.2.2/24")
-
-AT_DATA([flows-br0.txt], [dnl
-priority=1 action=drop
-priority=100 in_port=1 action=push_vlan:0x8100,mod_vlan_vid=4094,output:2
-priority=100 in_port=2 action=push_vlan:0x8100,mod_vlan_vid=4094,output:1
-])
-
-AT_DATA([flows-customer-br.txt], [dnl
-priority=1 action=normal
-priority=100 in_port=1 vlan_tci=0x1000/0x1000 action=pop_vlan,normal
-])
-
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows-br0.txt])
-AT_CHECK([ovs-ofctl --bundle add-flows br1 flows-customer-br.txt])
-AT_CHECK([ovs-ofctl --bundle add-flows br2 flows-customer-br.txt])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.2.2.2])
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([802.1ad - 802.1q tunnel])
-OVS_TRAFFIC_VSWITCHD_START([set Open_vSwitch . other_config:vlan-limit=0])
-OVS_CHECK_8021AD()
-
-ADD_BR([br1])
-ADD_BR([br2])
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-AT_CHECK([ip link add ovs-p0 type veth peer name ovs-p1])
-AT_CHECK([ip link set dev ovs-p0 up])
-AT_CHECK([ip link set dev ovs-p1 up])
-AT_CHECK([ovs-vsctl add-port br0 ovs-p0])
-AT_CHECK([ovs-vsctl add-port br1 ovs-p1])
-on_exit 'ip link del ovs-p0'
-
-AT_CHECK([ip link add ovs-p2 type veth peer name ovs-p3])
-AT_CHECK([ip link set dev ovs-p2 up])
-AT_CHECK([ip link set dev ovs-p3 up])
-AT_CHECK([ovs-vsctl add-port br0 ovs-p2])
-AT_CHECK([ovs-vsctl add-port br2 ovs-p3])
-on_exit 'ip link del ovs-p2'
-
-ADD_VETH(p4, at_ns0, br1, "10.1.1.1/24")
-ADD_VETH(p5, at_ns1, br2, "10.1.1.2/24")
-ADD_CVLAN(p4, at_ns0, 100, "10.2.2.1/24")
-ADD_CVLAN(p5, at_ns1, 100, "10.2.2.2/24")
-ADD_CVLAN(p4, at_ns0, 200, "10.3.2.1/24")
-ADD_CVLAN(p5, at_ns1, 200, "10.3.2.2/24")
-ADD_CVLAN(p4, at_ns0, 300, "10.4.2.1/24")
-ADD_CVLAN(p5, at_ns1, 300, "10.4.2.2/24")
-
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-AT_CHECK([ovs-ofctl add-flow br1 action=normal])
-AT_CHECK([ovs-ofctl add-flow br2 action=normal])
-AT_CHECK([ovs-vsctl set port ovs-p0 vlan_mode=dot1q-tunnel tag=4094 cvlans=100,200])
-AT_CHECK([ovs-vsctl set port ovs-p2 vlan_mode=dot1q-tunnel tag=4094 cvlans=100,200])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.2.2.2])
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.3.2.2])
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.3.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.3.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-dnl CVLAN 300 is not permitted by dot1q-tunnel
-NS_CHECK_EXEC([at_ns0], [ping -q -c 1 -w 3 10.4.2.2], [1], [ignore])
-
-OVS_TRAFFIC_VSWITCHD_STOP(["/dropping VLAN \(0\|300\) packet received on dot1q-tunnel port/d"])
-AT_CLEANUP
-
-AT_SETUP([802.1ad - double vlan match])
-OVS_TRAFFIC_VSWITCHD_START([set Open_vSwitch . other_config:vlan-limit=0])
-OVS_CHECK_8021AD()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
-ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
-
-ADD_SVLAN(p0, at_ns0, 4094, "10.255.2.1/24")
-ADD_SVLAN(p1, at_ns1, 4094, "10.255.2.2/24")
-
-ADD_CVLAN(p0.4094, at_ns0, 100, "10.2.2.1/24")
-ADD_CVLAN(p1.4094, at_ns1, 100, "10.2.2.2/24")
-
-AT_DATA([flows-br0.txt], [dnl
-table=0,priority=1                action=drop
-table=0,priority=100 dl_vlan=4094 action=pop_vlan,goto_table:1
-table=1,priority=100 dl_vlan=100  action=push_vlan:0x88a8,mod_vlan_vid:4094,normal
-])
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows-br0.txt])
-
-OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.2.2.2])
-
-NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-NS_CHECK_EXEC([at_ns0], [ping -s 1600 -q -c 3 -i 0.3 -w 2 10.2.2.2 | FORMAT_PING], [0], [dnl
-3 packets transmitted, 3 received, 0% packet loss, time 0ms
-])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_BANNER([nsh-datapath])
-
-AT_SETUP([nsh - encap header])
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "0.0.0.0")
-ADD_VETH(p1, at_ns1, br0, "0.0.0.0")
-
-dnl The flow will encap a nsh header to the TCP syn packet
-dnl eth/ip/tcp --> OVS --> eth/nsh/eth/ip/tcp
-AT_CHECK([ovs-ofctl -Oopenflow13 add-flow br0 "table=0,priority=100,in_port=ovs-p0,ip,actions=encap(nsh(md_type=1)),set_field:0x1234->nsh_spi,set_field:0x11223344->nsh_c1,encap(ethernet),set_field:f2:ff:00:00:00:02->dl_dst,set_field:f2:ff:00:00:00:01->dl_src,ovs-p1"])
-
-rm ovs-p1.pcap
-tcpdump -U -i ovs-p1 -w ovs-p1.pcap &
-sleep 1
-
-dnl The hex dump is a TCP syn packet. pkt=eth/ip/tcp
-dnl The packet is sent from p0(at_ns0) interface directed to
-dnl p1(at_ns1) interface
-NS_CHECK_EXEC([at_ns0], [$PYTHON $srcdir/sendpkt.py p0 f2 00 00 00 00 02 f2 00 00 00 00 01 08 00 45 00 00 28 00 01 00 00 40 06 b0 13 c0 a8 00 0a 0a 00 00 0a 04 00 08 00 00 00 00 c8 00 00 00 00 50 02 20 00 b8 5e 00 00 > /dev/null])
-
-sleep 1
-
-dnl Check the expected nsh encapsulated packet on the egress interface
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0000: *f2ff *0000 *0002 *f2ff *0000 *0001 *894f *0fc6" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0010: *0103 *0012 *34ff *1122 *3344 *0000 *0000 *0000" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0020: *0000 *0000 *0000 *f200 *0000 *0002 *f200 *0000" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0030: *0001 *0800 *4500 *0028 *0001 *0000 *4006 *b013" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0040: *c0a8 *000a *0a00 *000a *0400 *0800 *0000 *00c8" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0050: *0000 *0000 *5002 *2000 *b85e *0000" 2>&1 1>/dev/null])
-
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([nsh - decap header])
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "0.0.0.0")
-ADD_VETH(p1, at_ns1, br0, "0.0.0.0")
-
-dnl The flow will decap a nsh header which in turn carries a TCP syn packet
-dnl eth/nsh/eth/ip/tcp --> OVS --> eth/ip/tcp
-AT_CHECK([ovs-ofctl -Oopenflow13 add-flow br0 "table=0,priority=100,in_port=ovs-p0,dl_type=0x894f, actions=decap(),decap(), ovs-p1"])
-
-rm ovs-p1.pcap
-tcpdump -U -i ovs-p1 -w ovs-p1.pcap &
-sleep 1
-
-dnl The hex dump is NSH packet with TCP syn payload. pkt=eth/nsh/eth/ip/tcp
-dnl The packet is sent from p0(at_ns0) interface directed to
-dnl p1(at_ns1) interface
-NS_CHECK_EXEC([at_ns0], [$PYTHON $srcdir/sendpkt.py p0 f2 ff 00 00 00 02 f2 ff 00 00 00 01 89 4f 02 06 01 03 00 00 64 03 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 f2 00 00 00 00 02 f2 00 00 00 00 01 08 00 45 00 00 28 00 01 00 00 40 06 b0 13 c0 a8 00 0a 0a 00 00 0a 04 00 08 00 00 00 00 c8 00 00 00 00 50 02 20 00 b8 5e 00 00 > /dev/null])
-
-sleep 1
-
-dnl Check the expected de-capsulated TCP packet on the egress interface
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0000: *f200 *0000 *0002 *f200 *0000 *0001 *0800 *4500" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0010: *0028 *0001 *0000 *4006 *b013 *c0a8 *000a *0a00" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0020: *000a *0400 *0800 *0000 *00c8 *0000 *0000 *5002" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0030: *2000 *b85e *0000" 2>&1 1>/dev/null])
-
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([nsh - replace header])
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1)
-
-ADD_VETH(p0, at_ns0, br0, "0.0.0.0")
-ADD_VETH(p1, at_ns1, br0, "0.0.0.0")
-
-dnl The flow will decap a nsh header and encap a new nsh header
-dnl eth/nsh-X/eth/ip/tcp --> OVS --> eth/nsh-Y/eth/ip/tcp
-dnl The flow will add another NSH header with nsh_spi=0x101, nsh_si=4,
-dnl nsh_ttl=7 and change the md1 context
-AT_CHECK([ovs-ofctl -Oopenflow13 add-flow br0 "table=0,priority=100,in_port=ovs-p0,dl_type=0x894f,nsh_spi=0x100,nsh_si=0x03,actions=decap(),decap(),encap(nsh(md_type=1)),set_field:0x07->nsh_ttl,set_field:0x0101->nsh_spi,set_field:0x04->nsh_si,set_field:0x100f0e0d->nsh_c1,set_field:0x0c0b0a09->nsh_c2,set_field:0x08070605->nsh_c3,set_field:0x04030201->nsh_c4,encap(ethernet),set_field:f2:ff:00:00:00:02->dl_dst,set_field:f2:ff:00:00:00:01->dl_src,ovs-p1"])
-
-rm ovs-p1.pcap
-tcpdump -U -i ovs-p1 -w ovs-p1.pcap &
-sleep 1
-
-dnl The hex dump is NSH packet with TCP syn payload. pkt=eth/nsh/eth/ip/tcp
-dnl The nsh_ttl is 8, nsh_spi is 0x100 and nsh_si is 3
-dnl The packet is sent from p0(at_ns0) interface directed to
-dnl p1(at_ns1) interface
-NS_CHECK_EXEC([at_ns0], [$PYTHON $srcdir/sendpkt.py p0 f2 ff 00 00 00 02 f2 ff 00 00 00 01 89 4f 02 06 01 03 00 01 00 03 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 f2 00 00 00 00 02 f2 00 00 00 00 01 08 00 45 00 00 28 00 01 00 00 40 06 b0 13 c0 a8 00 0a 0a 00 00 0a 04 00 08 00 00 00 00 c8 00 00 00 00 50 02 20 00 b8 5e 00 00 > /dev/null])
-
-sleep 1
-
-dnl Check the expected NSH packet with new fields in the header
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0000: *f2ff *0000 *0002 *f2ff *0000* 0001 *894f *01c6" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0010: *0103 *0001 *0104 *100f *0e0d *0c0b *0a09 *0807" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0020: *0605 *0403 *0201 *f200 *0000 *0002 *f200 *0000" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0030: *0001 *0800 *4500 *0028 *0001 *0000 *4006 *b013" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0040: *c0a8 *000a *0a00 *000a *0400 *0800 *0000 *00c8" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0050: *0000 *0000 *5002 *2000 *b85e *0000" 2>&1 1>/dev/null])
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
-
-
-AT_SETUP([nsh - forward])
-OVS_TRAFFIC_VSWITCHD_START()
-
-ADD_NAMESPACES(at_ns0, at_ns1, at_ns2)
-
-ADD_VETH(p0, at_ns0, br0, "0.0.0.0")
-ADD_VETH(p1, at_ns1, br0, "0.0.0.0")
-ADD_VETH(p2, at_ns2, br0, "0.0.0.0")
-
-dnl Push two flows to OVS. #1 will check on SPI=0X100, SI=2 and send the
-dnl packet to at_ns1. #2 will check on SPI=0X100, SI=1 and send the
-dnl packet to to at_ns2.
-AT_CHECK([ovs-ofctl -Oopenflow13 add-flow br0 "table=0,priority=100,dl_type=0x894f,nsh_spi=0x100,nsh_si=0x02,actions=ovs-p1"])
-AT_CHECK([ovs-ofctl -Oopenflow13 add-flow br0 "table=0,priority=100,dl_type=0x894f,nsh_spi=0x100,nsh_si=0x01,actions=ovs-p2"])
-
-
-rm ovs-p1.pcap
-rm ovs-p2.pcap
-tcpdump -U -i ovs-p1 -w ovs-p1.pcap &
-tcpdump -U -i ovs-p2 -w ovs-p2.pcap &
-sleep 1
-
-dnl First send packet from at_ns0 --> OVS with SPI=0x100 and SI=2
-NS_CHECK_EXEC([at_ns0], [$PYTHON $srcdir/sendpkt.py p0 f2 ff 00 00 00 02 f2 ff 00 00 00 01 89 4f 02 06 01 03 00 01 00 02 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 f2 00 00 00 00 02 f2 00 00 00 00 01 08 00 45 00 00 28 00 01 00 00 40 06 b0 13 c0 a8 00 0a 0a 00 00 0a 04 00 08 00 00 00 00 c8 00 00 00 00 50 02 20 00 b8 5e 00 00 > /dev/null])
-
-sleep 1
-
-dnl Check for the above packet on ovs-p1 interface
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0000: *f2ff *0000 *0002 *f2ff *0000 *0001 *894f *0206" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0010: *0103 *0001 *0002 *0102 *0304 *0506 *0708 *090a" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0020: *0b0c *0d0e *0f10 *f200 *0000 *0002 *f200 *0000" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0030: *0001 *0800 *4500 *0028 *0001 *0000 *4006 *b013" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0040: *c0a8 *000a *0a00 *000a *0400 *0800 *0000 *00c8" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p1.pcap 2>&1 | egrep "0x0050: *0000 *0000 *5002 *2000 *b85e *0000" 2>&1 1>/dev/null])
-
-
-dnl Send the second packet from at_ns1 --> OVS with SPI=0x100 and SI=1
-NS_CHECK_EXEC([at_ns1], [$PYTHON $srcdir/sendpkt.py p1 f2 ff 00 00 00 02 f2 ff 00 00 00 01 89 4f 01 c6 01 03 00 01 00 01 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 f2 00 00 00 00 02 f2 00 00 00 00 01 08 00 45 00 00 28 00 01 00 00 40 06 b0 13 c0 a8 00 0a 0a 00 00 0a 04 00 08 00 00 00 00 c8 00 00 00 00 50 02 20 00 b8 5e 00 00 > /dev/null])
-
-sleep 1
-
-dnl Check for the above packet on ovs-p2 interface
-AT_CHECK([tcpdump -xx -r ovs-p2.pcap 2>&1 | egrep "0x0000: *f2ff *0000 *0002 *f2ff *0000 *0001 *894f *01c6" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p2.pcap 2>&1 | egrep "0x0010: *0103 *0001 *0001 *0102 *0304 *0506 *0708 *090a" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p2.pcap 2>&1 | egrep "0x0020: *0b0c *0d0e *0f10 *f200 *0000 *0002 *f200 *0000" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p2.pcap 2>&1 | egrep "0x0030: *0001 *0800 *4500 *0028 *0001 *0000 *4006 *b013" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p2.pcap 2>&1 | egrep "0x0040: *c0a8 *000a *0a00 *000a *0400 *0800 *0000 *00c8" 2>&1 1>/dev/null])
-AT_CHECK([tcpdump -xx -r ovs-p2.pcap 2>&1 | egrep "0x0050: *0000 *0000 *5002 *2000 *b85e *0000" 2>&1 1>/dev/null])
-
-
-
-OVS_TRAFFIC_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/system-userspace-testsuite.at b/tests/system-userspace-testsuite.at
index c0aaa606d..784eedd2c 100644
--- a/tests/system-userspace-testsuite.at
+++ b/tests/system-userspace-testsuite.at
@@ -22,8 +22,4 @@ m4_include([tests/ofproto-macros.at])
 m4_include([tests/system-userspace-macros.at])
 m4_include([tests/system-common-macros.at])
 
-m4_include([tests/system-traffic.at])
-m4_include([tests/system-layer3-tunnels.at])
 m4_include([tests/system-ovn.at])
-m4_include([tests/system-interface.at])
-m4_include([tests/system-userspace-packet-type-aware.at])
diff --git a/tests/test-aa.c b/tests/test-aa.c
deleted file mode 100644
index 0107d2263..000000000
--- a/tests/test-aa.c
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Copyright (c) 2015 Avaya, Inc.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "ovs-lldp.h"
-#include "ovstest.h"
-
-#define ETH_TYPE_LLDP   0x88cc
-
-/* Dummy MAC addresses */
-static const struct eth_addr chassis_mac = ETH_ADDR_C(5e,10,8e,e7,84,ad);
-static const struct eth_addr eth_src = ETH_ADDR_C(5e,10,8e,e7,84,ad);
-
-/* LLDP multicast address */
-static const struct eth_addr eth_addr_lldp = ETH_ADDR_C(01,80,c2,00,00,0e);
-
-/* Count of tests run */
-static int num_tests = 0;
-
-
-/*
- * Helper function to validate port info
- */
-static void
-check_received_port(struct lldpd_port *sport,
-                    struct lldpd_port *rport)
-{
-    assert(rport->p_id_subtype == sport->p_id_subtype);
-    assert(rport->p_id_len == sport->p_id_len);
-    assert(strncmp(rport->p_id, sport->p_id, sport->p_id_len) == 0);
-    assert(strcmp(rport->p_descr, sport->p_descr) == 0);
-}
-
-
-/*
- * Helper function to validate chassis info
- */
-static void
-check_received_chassis(struct lldpd_chassis *schassis,
-                       struct lldpd_chassis *rchassis)
-{
-    assert(rchassis->c_id_subtype == schassis->c_id_subtype);
-    assert(rchassis->c_id_len == schassis->c_id_len);
-    assert(memcmp(rchassis->c_id, schassis->c_id, schassis->c_id_len) == 0);
-    assert(strcmp(rchassis->c_name, schassis->c_name) == 0);
-    assert(strcmp(rchassis->c_descr, schassis->c_descr) == 0);
-    assert(rchassis->c_cap_available == schassis->c_cap_available);
-    assert(rchassis->c_cap_enabled == schassis->c_cap_enabled);
-}
-
-
-/*
- * Helper function to validate auto-attach info
- */
-static void
-check_received_aa(struct lldpd_port *sport,
-                  struct lldpd_port *rport,
-                  struct lldpd_aa_isid_vlan_maps_tlv *smap)
-{
-    struct lldpd_aa_isid_vlan_maps_tlv *received_map;
-    int i = 0;
-
-    assert(rport->p_element.type == sport->p_element.type);
-    assert(rport->p_element.mgmt_vlan == sport->p_element.mgmt_vlan);
-    assert(eth_addr_equals(rport->p_element.system_id.system_mac,
-                           sport->p_element.system_id.system_mac));
-    assert(rport->p_element.system_id.conn_type ==
-           sport->p_element.system_id.conn_type);
-    assert(rport->p_element.system_id.rsvd ==
-           sport->p_element.system_id.rsvd);
-    assert(rport->p_element.system_id.rsvd2[0] ==
-           sport->p_element.system_id.rsvd2[0]);
-    assert(rport->p_element.system_id.rsvd2[1] ==
-           sport->p_element.system_id.rsvd2[1]);
-
-    /* Should receive 2 mappings */
-    assert(!ovs_list_is_empty(&rport->p_isid_vlan_maps));
-
-    /* For each received isid/vlan mapping */
-    LIST_FOR_EACH (received_map, m_entries, &rport->p_isid_vlan_maps) {
-
-        /* Validate against mapping sent */
-        assert(smap[i].isid_vlan_data.status ==
-               received_map->isid_vlan_data.status);
-        assert(smap[i].isid_vlan_data.vlan ==
-               received_map->isid_vlan_data.vlan);
-        assert(smap[i].isid_vlan_data.isid ==
-               received_map->isid_vlan_data.isid);
-
-        /* Next mapping sent */
-        i++;
-    }
-    assert(i == 2);
-}
-
-
-/*
- * Validate basic send/receive processing
- */
-static int
-test_aa_send(void)
-{
-    struct lldp           *lldp;
-    struct lldpd_hardware hardware;
-    struct lldpd_chassis  chassis;
-
-    struct lldpd_chassis *nchassis = NULL;
-    struct lldpd_port    *nport = NULL;
-
-    struct lldpd_hardware *hw = NULL;
-    struct lldpd_chassis  *ch = NULL;
-
-    struct lldpd_aa_isid_vlan_maps_tlv map_init[2];
-    struct lldpd_aa_isid_vlan_maps_tlv map[2];
-
-    uint32_t      stub[512 / 4];
-    struct dp_packet packet;
-
-    int n;
-
-    /* Prepare data used to construct and validate LLDPPDU */
-    hardware.h_lport.p_id_subtype = LLDP_PORTID_SUBTYPE_IFNAME;
-    hardware.h_lport.p_id = "FastEthernet 1/5";
-    hardware.h_lport.p_id_len = strlen(hardware.h_lport.p_id);
-    hardware.h_lport.p_descr = "Fake port description";
-    hardware.h_lport.p_mfs = 1516;
-
-    /* Auto attach element discovery info */
-    hardware.h_lport.p_element.type =
-        LLDP_TLV_AA_ELEM_TYPE_CLIENT_VIRTUAL_SWITCH;
-    hardware.h_lport.p_element.mgmt_vlan = 0xCDC;
-    eth_addr_from_uint64(0x010203040506ULL,
-                         &hardware.h_lport.p_element.system_id.system_mac);
-
-    hardware.h_lport.p_element.system_id.conn_type = 0x5;
-    hardware.h_lport.p_element.system_id.rsvd = 0x3CC;
-    hardware.h_lport.p_element.system_id.rsvd2[0] = 0xB;
-    hardware.h_lport.p_element.system_id.rsvd2[1] = 0xE;
-
-    /* Local chassis info */
-    chassis.c_id_subtype = LLDP_CHASSISID_SUBTYPE_LLADDR;
-    chassis.c_id = CONST_CAST(uint8_t *, chassis_mac.ea);
-    chassis.c_id_len = ETH_ADDR_LEN;
-    chassis.c_name = "Dummy chassis";
-    chassis.c_descr = "Long dummy chassis description";
-    chassis.c_cap_available = LLDP_CAP_BRIDGE;
-    chassis.c_cap_enabled = LLDP_CAP_BRIDGE;
-
-    /* ISID/VLAN mappings */
-    map_init[0].isid_vlan_data.status  = 0xC;
-    map_init[0].isid_vlan_data.vlan    = 0x64;
-    map_init[0].isid_vlan_data.isid    = 0x010203;
-
-    map_init[1].isid_vlan_data.status  = 0xD;
-    map_init[1].isid_vlan_data.vlan    = 0xF;
-    map_init[1].isid_vlan_data.isid    = 0x040506;
-
-    /* Prepare an empty packet buffer */
-    dp_packet_use_stub(&packet, stub, sizeof stub);
-    dp_packet_clear(&packet);
-
-    /* Create a dummy lldp instance */
-    lldp = lldp_create_dummy();
-    if ((lldp == NULL) ||
-        (lldp->lldpd == NULL) ||
-        ovs_list_is_empty(&lldp->lldpd->g_hardware)) {
-        printf("Error: unable to create dummy lldp instance");
-        return 1;
-    }
-
-    /* Populate instance with local chassis info */
-    hw = lldpd_first_hardware(lldp->lldpd);
-    ch = hw->h_lport.p_chassis;
-    ch->c_id_subtype = chassis.c_id_subtype;
-    ch->c_id = chassis.c_id;
-    ch->c_id_len = chassis.c_id_len;
-    ch->c_name = chassis.c_name;
-    ch->c_descr = chassis.c_descr;
-    ch->c_cap_available = chassis.c_cap_available;
-    ch->c_cap_enabled = chassis.c_cap_enabled;
-
-    /* Populate instance with local port info */
-    hw->h_lport.p_id_subtype = hardware.h_lport.p_id_subtype;
-    hw->h_lport.p_id = hardware.h_lport.p_id;
-    hw->h_lport.p_id_len = strlen(hw->h_lport.p_id);
-    hw->h_lport.p_descr = hardware.h_lport.p_descr;
-    hw->h_lport.p_mfs = hardware.h_lport.p_mfs;
-
-    /* Populate instance with auto attach element discovery info */
-
-    hw->h_lport.p_element.type = hardware.h_lport.p_element.type;
-    hw->h_lport.p_element.mgmt_vlan = hardware.h_lport.p_element.mgmt_vlan;
-    hw->h_lport.p_element.system_id.system_mac =
-        hardware.h_lport.p_element.system_id.system_mac;
-
-    hw->h_lport.p_element.system_id.conn_type =
-        hardware.h_lport.p_element.system_id.conn_type;
-    hw->h_lport.p_element.system_id.rsvd =
-        hardware.h_lport.p_element.system_id.rsvd;
-    hw->h_lport.p_element.system_id.rsvd2[0] =
-        hardware.h_lport.p_element.system_id.rsvd2[0];
-    hw->h_lport.p_element.system_id.rsvd2[1] =
-        hardware.h_lport.p_element.system_id.rsvd2[1];
-
-    /* Populate instance with two auto attach isid/vlan mappings */
-    map[0].isid_vlan_data.status  = map_init[0].isid_vlan_data.status;
-    map[0].isid_vlan_data.vlan    = map_init[0].isid_vlan_data.vlan;
-    map[0].isid_vlan_data.isid    = map_init[0].isid_vlan_data.isid;
-
-    map[1].isid_vlan_data.status  = map_init[1].isid_vlan_data.status;
-    map[1].isid_vlan_data.vlan    = map_init[1].isid_vlan_data.vlan;
-    map[1].isid_vlan_data.isid    = map_init[1].isid_vlan_data.isid;
-
-    ovs_list_init(&hw->h_lport.p_isid_vlan_maps);
-    ovs_list_push_back(&hw->h_lport.p_isid_vlan_maps, &map[0].m_entries);
-    ovs_list_push_back(&hw->h_lport.p_isid_vlan_maps, &map[1].m_entries);
-
-    /* Construct LLDPPDU (including Ethernet header) */
-    eth_compose(&packet, eth_addr_lldp, eth_src, ETH_TYPE_LLDP, 0);
-    n = lldp_send(lldp->lldpd, hw, &packet);
-
-    if (n == 0) {
-        printf("Error: unable to build packet\n");
-        return 1;
-    }
-
-    /* Decode the constructed LLDPPDU */
-    assert(lldp_decode(NULL, dp_packet_data(&packet), dp_packet_size(&packet), hw,
-                       &nchassis, &nport) != -1);
-
-    /* Expecting returned pointers to allocated structures */
-    if (!nchassis || !nport) {
-        printf("Error: unable to decode packet");
-        return 1;
-    }
-
-    /* Verify chassis values */
-    check_received_chassis(&chassis, nchassis);
-
-    /* Verify port values */
-    check_received_port(&hardware.h_lport, nport);
-
-    /* Verify auto attach values */
-    check_received_aa(&hardware.h_lport, nport, map_init);
-
-    lldpd_chassis_cleanup(nchassis, true);
-    lldpd_port_cleanup(nport, true);
-    free(nport);
-    lldp_destroy_dummy(lldp);
-
-    return 0;
-}
-
-
-static void
-test_aa_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    int num_errors = 0;
-
-    /* Make sure we emit valid auto-attach LLDPPDUs */
-    num_tests++;
-    num_errors += test_aa_send();
-
-    /* Add more tests here */
-
-    printf("executed %d tests, %d errors\n", num_tests, num_errors);
-
-    exit(num_errors != 0);
-}
-
-OVSTEST_REGISTER("test-aa", test_aa_main);
diff --git a/tests/test-aes128.c b/tests/test-aes128.c
deleted file mode 100644
index 7960551be..000000000
--- a/tests/test-aes128.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 2013, 2014 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "aes128.h"
-#include <ctype.h>
-#include "ovstest.h"
-#include "util.h"
-
-static void
-hex_to_uint8(const char *input, uint8_t *output, size_t n)
-{
-    size_t i;
-
-    if (strlen(input) != n * 2) {
-        goto error;
-    }
-    for (i = 0; i < n; i++) {
-        bool ok;
-
-        output[i] = hexits_value(&input[i * 2], 2, &ok);
-        if (!ok) {
-            goto error;
-        }
-    }
-    return;
-
-error:
-    ovs_fatal(0, "\"%s\" is not exactly %"PRIuSIZE" hex digits", input, n * 2);
-}
-
-static void
-test_aes128_main(int argc, char *argv[])
-{
-    struct aes128 aes;
-    uint8_t plaintext[16];
-    uint8_t ciphertext[16];
-    uint8_t key[16];
-    size_t i;
-
-    if (argc != 3) {
-        ovs_fatal(0, "usage: %s KEY PLAINTEXT, where KEY and PLAINTEXT each "
-                  "consist of 32 hex digits", argv[0]);
-    }
-
-    hex_to_uint8(argv[1], key, 16);
-    hex_to_uint8(argv[2], plaintext, 16);
-
-    aes128_schedule(&aes, key);
-    aes128_encrypt(&aes, plaintext, ciphertext);
-    for (i = 0; i < 16; i++) {
-        printf("%02x", ciphertext[i]);
-    }
-    putchar('\n');
-}
-
-OVSTEST_REGISTER("test-aes128", test_aes128_main);
diff --git a/tests/test-atomic.c b/tests/test-atomic.c
deleted file mode 100644
index 4b1374b70..000000000
--- a/tests/test-atomic.c
+++ /dev/null
@@ -1,434 +0,0 @@
-/*
- * Copyright (c) 2013, 2014 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "fatal-signal.h"
-#include "ovs-atomic.h"
-#include "ovstest.h"
-#include "ovs-thread.h"
-#include "timeval.h"
-#include "util.h"
-#include "openvswitch/vlog.h"
-
-VLOG_DEFINE_THIS_MODULE(test_atomic);
-
-#define TEST_ATOMIC_TYPE(ATOMIC_TYPE, BASE_TYPE)        \
-    {                                                   \
-        ATOMIC_TYPE x = ATOMIC_VAR_INIT(1);             \
-        BASE_TYPE value, orig;                          \
-                                                        \
-        atomic_read(&x, &value);                        \
-        ovs_assert(value == 1);                         \
-                                                        \
-        atomic_store(&x, 2);                            \
-        atomic_read(&x, &value);                        \
-        ovs_assert(value == 2);                         \
-                                                        \
-        atomic_init(&x, 3);                             \
-        atomic_read(&x, &value);                        \
-        ovs_assert(value == 3);                         \
-                                                        \
-        atomic_add(&x, 1, &orig);                       \
-        ovs_assert(orig == 3);                          \
-        atomic_read(&x, &value);                        \
-        ovs_assert(value == 4);                         \
-                                                        \
-        atomic_sub(&x, 2, &orig);                       \
-        ovs_assert(orig == 4);                          \
-        atomic_read(&x, &value);                        \
-        ovs_assert(value == 2);                         \
-                                                        \
-        atomic_or(&x, 6, &orig);                        \
-        ovs_assert(orig == 2);                          \
-        atomic_read(&x, &value);                        \
-        ovs_assert(value == 6);                         \
-                                                        \
-        atomic_and(&x, 10, &orig);                      \
-        ovs_assert(orig == 6);                          \
-        atomic_read(&x, &value);                        \
-        ovs_assert(value == 2);                         \
-                                                        \
-        atomic_xor(&x, 10, &orig);                      \
-        ovs_assert(orig == 2);                          \
-        atomic_read(&x, &value);                        \
-        ovs_assert(value == 8);                         \
-    }
-
-#define TEST_ATOMIC_TYPE_EXPLICIT(ATOMIC_TYPE, BASE_TYPE,               \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW)   \
-    {                                                                   \
-        ATOMIC_TYPE x = ATOMIC_VAR_INIT(1);                             \
-        BASE_TYPE value, orig;                                          \
-                                                                        \
-        atomic_read_explicit(&x, &value, ORDER_READ);                   \
-        ovs_assert(value == 1);                                         \
-                                                                        \
-        atomic_store_explicit(&x, 2, ORDER_STORE);                      \
-        atomic_read_explicit(&x, &value, ORDER_READ);                   \
-        ovs_assert(value == 2);                                         \
-                                                                        \
-        atomic_init(&x, 3);                                             \
-        atomic_read_explicit(&x, &value, ORDER_READ);                   \
-        ovs_assert(value == 3);                                         \
-                                                                        \
-        atomic_add_explicit(&x, 1, &orig, ORDER_RMW);                   \
-        ovs_assert(orig == 3);                                          \
-        atomic_read_explicit(&x, &value, ORDER_READ);                   \
-        ovs_assert(value == 4);                                         \
-                                                                        \
-        atomic_sub_explicit(&x, 2, &orig, ORDER_RMW);                   \
-        ovs_assert(orig == 4);                                          \
-        atomic_read_explicit(&x, &value, ORDER_READ);                   \
-        ovs_assert(value == 2);                                         \
-                                                                        \
-        atomic_or_explicit(&x, 6, &orig, ORDER_RMW);                    \
-        ovs_assert(orig == 2);                                          \
-        atomic_read_explicit(&x, &value, ORDER_READ);                   \
-        ovs_assert(value == 6);                                         \
-                                                                        \
-        atomic_and_explicit(&x, 10, &orig, ORDER_RMW);                  \
-        ovs_assert(orig == 6);                                          \
-        atomic_read_explicit(&x, &value, ORDER_READ);                   \
-        ovs_assert(value == 2);                                         \
-                                                                        \
-        atomic_xor_explicit(&x, 10, &orig, ORDER_RMW);                  \
-        ovs_assert(orig == 2);                                          \
-        atomic_read_explicit(&x, &value, ORDER_READ);                   \
-        ovs_assert(value == 8);                                         \
-    }
-
-
-#define TEST_ATOMIC_ORDER(ORDER_READ, ORDER_STORE, ORDER_RMW)           \
-    {                                                                   \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_char, char,                    \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_uchar, unsigned char,          \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_schar, signed char,            \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_short, short,                  \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_ushort, unsigned short,        \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_int, int,                      \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_uint, unsigned int,            \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_long, long int,                \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_ulong, unsigned long int,      \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_llong, long long int,          \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_ullong, unsigned long long int, \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_size_t, size_t,                \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_ptrdiff_t, ptrdiff_t,          \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_intmax_t, intmax_t,            \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_uintmax_t, uintmax_t,          \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_intptr_t, intptr_t,            \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_uintptr_t, uintptr_t,          \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_uint8_t, uint8_t,              \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_int8_t, int8_t,                \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_uint16_t, uint16_t,            \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_int16_t, int16_t,              \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_uint32_t, uint32_t,            \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-        TEST_ATOMIC_TYPE_EXPLICIT(atomic_int32_t, int32_t,              \
-                                  ORDER_READ, ORDER_STORE, ORDER_RMW);  \
-    }
-
-static void
-test_atomic_flag(void)
-{
-    atomic_flag flag = ATOMIC_FLAG_INIT;
-    ovs_assert(atomic_flag_test_and_set(&flag) == false);
-    ovs_assert(atomic_flag_test_and_set(&flag) == true);
-    atomic_flag_clear(&flag);
-    ovs_assert(atomic_flag_test_and_set(&flag) == false);
-}
-
-static uint32_t a;
-
-struct atomic_aux {
-    ATOMIC(uint64_t) count;
-    uint32_t b;
-    ATOMIC(uint32_t *) data;
-    ATOMIC(uint64_t) data64;
-};
-
-static ATOMIC(struct atomic_aux *) paux = ATOMIC_VAR_INIT(NULL);
-static struct atomic_aux *auxes = NULL;
-
-#define ATOMIC_ITEM_COUNT 1000000
-#define	DURATION 5000
-
-static void *
-atomic_consumer(void * arg1 OVS_UNUSED)
-{
-    struct atomic_aux *old_aux = NULL;
-    uint64_t count;
-    long long int stop_time = time_msec() + DURATION;
-
-    do {
-        struct atomic_aux *aux;
-        uint32_t b;
-
-        /* Wait for a new item.  We may not be fast enough to process every
-         * item, but we are guaranteed to see the last one. */
-        do {
-            atomic_read_explicit(&paux, &aux, memory_order_consume);
-        } while (aux == old_aux);
-
-        b = aux->b;
-        atomic_read_explicit(&aux->count, &count, memory_order_relaxed);
-        ovs_assert(b == count + 42);
-
-        old_aux = aux;
-    } while (count < ATOMIC_ITEM_COUNT - 1 && time_msec() < stop_time);
-
-    if (time_msec() >= stop_time) {
-        if (count < 10) {
-            VLOG_WARN("atomic_consumer test stopped due to excessive runtime. "
-                      "Count = %"PRIu64, count);
-        }
-    }
-
-    return NULL;
-}
-
-static void *
-atomic_producer(void * arg1 OVS_UNUSED)
-{
-    size_t i;
-
-    for (i = 0; i < ATOMIC_ITEM_COUNT; i++) {
-        struct atomic_aux *aux = &auxes[i];
-
-        aux->count = ATOMIC_VAR_INIT(i);
-        aux->b = i + 42;
-
-        /* Publish the new item. */
-        atomic_store_explicit(&paux, aux, memory_order_release);
-    }
-
-    return NULL;
-}
-
-static void
-test_cons_rel(void)
-{
-    pthread_t reader, writer;
-
-    atomic_init(&paux, NULL);
-
-    auxes = xmalloc(sizeof *auxes * ATOMIC_ITEM_COUNT);
-
-    reader = ovs_thread_create("consumer", atomic_consumer, NULL);
-    writer = ovs_thread_create("producer", atomic_producer, NULL);
-
-    xpthread_join(reader, NULL);
-    xpthread_join(writer, NULL);
-
-    free(auxes);
-}
-
-static void *
-atomic_reader(void *aux_)
-{
-    struct atomic_aux *aux = aux_;
-    uint64_t count;
-    uint64_t data;
-    long long int now = time_msec();
-    long long int stop_time = now + DURATION;
-
-    do {
-        /* Non-synchronized add. */
-        atomic_add_explicit(&aux->count, 1, &count, memory_order_relaxed);
-
-        do {
-            atomic_read_explicit(&aux->data64, &data, memory_order_acquire);
-        } while (!data && (now = time_msec()) < stop_time);
-
-        if (now >= stop_time) {
-            if (count < 10) {
-                VLOG_WARN("atomic_reader test stopped due to excessive "
-                          "runtime. Count = %"PRIu64, count);
-            }
-            break;
-        }
-
-        ovs_assert(data == a && data == aux->b && a == aux->b);
-
-        atomic_read_explicit(&aux->count, &count, memory_order_relaxed);
-
-        ovs_assert(count == 2 * a && count == 2 * aux->b && count == 2 * data);
-
-        atomic_store_explicit(&aux->data64, UINT64_C(0), memory_order_release);
-    } while (count < 2 * ATOMIC_ITEM_COUNT);
-
-    return NULL;
-}
-
-static void *
-atomic_writer(void *aux_)
-{
-    struct atomic_aux *aux = aux_;
-    uint64_t old_count;
-    uint64_t data;
-    size_t i;
-    long long int now = time_msec();
-    long long int stop_time = now + DURATION;
-
-    for (i = 0; i < ATOMIC_ITEM_COUNT; i++) {
-        /* Wait for the reader to be done with the data. */
-        do {
-            atomic_read_explicit(&aux->data64, &data, memory_order_acquire);
-        } while (data && (now = time_msec()) < stop_time);
-
-        if (now >= stop_time) {
-            if (i < 10) {
-                VLOG_WARN("atomic_writer test stopped due to excessive "
-                          "runtime, Count = %"PRIuSIZE, i);
-            }
-            break;
-        }
-
-        a = i + 1;
-        atomic_add_explicit(&aux->count, 1, &old_count, memory_order_relaxed);
-        aux->b++;
-        atomic_store_explicit(&aux->data64,
-                              (i & 1) ? (uint64_t)aux->b : a, memory_order_release);
-    }
-
-    return NULL;
-}
-
-static void
-test_acq_rel(void)
-{
-    pthread_t reader, writer;
-    struct atomic_aux *aux = xmalloc(sizeof *aux);
-
-    a = 0;
-    aux->b = 0;
-
-    aux->count = ATOMIC_VAR_INIT(0);
-    atomic_init(&aux->data, NULL);
-    aux->data64 = ATOMIC_VAR_INIT(0);
-
-    reader = ovs_thread_create("reader", atomic_reader, aux);
-    writer = ovs_thread_create("writer", atomic_writer, aux);
-
-    xpthread_join(reader, NULL);
-    xpthread_join(writer, NULL);
-    free(aux);
-}
-
-static void
-test_atomic_plain(void)
-{
-    TEST_ATOMIC_TYPE(atomic_char, char);
-    TEST_ATOMIC_TYPE(atomic_uchar, unsigned char);
-    TEST_ATOMIC_TYPE(atomic_schar, signed char);
-    TEST_ATOMIC_TYPE(atomic_short, short);
-    TEST_ATOMIC_TYPE(atomic_ushort, unsigned short);
-    TEST_ATOMIC_TYPE(atomic_int, int);
-    TEST_ATOMIC_TYPE(atomic_uint, unsigned int);
-    TEST_ATOMIC_TYPE(atomic_long, long int);
-    TEST_ATOMIC_TYPE(atomic_ulong, unsigned long int);
-    TEST_ATOMIC_TYPE(atomic_llong, long long int);
-    TEST_ATOMIC_TYPE(atomic_ullong, unsigned long long int);
-    TEST_ATOMIC_TYPE(atomic_size_t, size_t);
-    TEST_ATOMIC_TYPE(atomic_ptrdiff_t, ptrdiff_t);
-    TEST_ATOMIC_TYPE(atomic_intmax_t, intmax_t);
-    TEST_ATOMIC_TYPE(atomic_uintmax_t, uintmax_t);
-    TEST_ATOMIC_TYPE(atomic_intptr_t, intptr_t);
-    TEST_ATOMIC_TYPE(atomic_uintptr_t, uintptr_t);
-    TEST_ATOMIC_TYPE(atomic_uint8_t, uint8_t);
-    TEST_ATOMIC_TYPE(atomic_int8_t, int8_t);
-    TEST_ATOMIC_TYPE(atomic_uint16_t, uint16_t);
-    TEST_ATOMIC_TYPE(atomic_int16_t, int16_t);
-    TEST_ATOMIC_TYPE(atomic_uint32_t, uint32_t);
-    TEST_ATOMIC_TYPE(atomic_int32_t, int32_t);
-    TEST_ATOMIC_TYPE(atomic_uint64_t, uint64_t);
-    TEST_ATOMIC_TYPE(atomic_int64_t, int64_t);
-}
-
-static void
-test_atomic_relaxed(void)
-{
-    TEST_ATOMIC_ORDER(memory_order_relaxed, memory_order_relaxed,
-                      memory_order_relaxed);
-}
-
-static void
-test_atomic_consume(void)
-{
-    TEST_ATOMIC_ORDER(memory_order_consume, memory_order_release,
-                      memory_order_release);
-}
-
-static void
-test_atomic_acquire(void)
-{
-    TEST_ATOMIC_ORDER(memory_order_acquire, memory_order_release,
-                      memory_order_release);
-}
-
-static void
-test_atomic_acq_rel(void)
-{
-    TEST_ATOMIC_ORDER(memory_order_acquire, memory_order_release,
-                      memory_order_acq_rel);
-}
-
-static void
-test_atomic_seq_cst(void)
-{
-    TEST_ATOMIC_ORDER(memory_order_seq_cst, memory_order_seq_cst,
-                      memory_order_seq_cst);
-}
-
-static void
-test_atomic_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    fatal_signal_init();
-    test_atomic_plain();
-    test_atomic_relaxed();
-    test_atomic_consume();
-    test_atomic_acquire();
-    test_atomic_acq_rel();
-    test_atomic_seq_cst();
-
-    test_atomic_flag();
-
-    test_acq_rel();
-    test_cons_rel();
-}
-
-OVSTEST_REGISTER("test-atomic", test_atomic_main);
diff --git a/tests/test-bitmap.c b/tests/test-bitmap.c
deleted file mode 100644
index 484407b7d..000000000
--- a/tests/test-bitmap.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 2014 Kmindg <kmindg at gmail.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "bitmap.h"
-#include <assert.h>
-#include "command-line.h"
-#include "ovstest.h"
-#include "timeval.h"
-
-enum { MAX_BITS = 20 * BITMAP_ULONG_BITS };
-
-static int
-elapsed(const struct timeval *start)
-{
-    struct timeval end;
-
-    xgettimeofday(&end);
-    return timeval_to_msec(&end) - timeval_to_msec(start);
-}
-
-/* Tests bitmap_equal. */
-static void
-test_bitmap_equal(void)
-{
-    unsigned long *a, *b;
-
-    a = bitmap_allocate(MAX_BITS);
-    b = bitmap_allocate(MAX_BITS);
-
-    /* equal test */
-    assert(bitmap_equal(a, b, MAX_BITS));
-    assert(bitmap_equal(a, b, MAX_BITS - 1));
-    assert(bitmap_equal(a, b, MAX_BITS - (BITMAP_ULONG_BITS - 1)));
-
-    bitmap_set_multiple(a, 10 * BITMAP_ULONG_BITS, BITMAP_ULONG_BITS, true);
-    assert(bitmap_equal(a, b, 10 * BITMAP_ULONG_BITS));
-
-    /* non-equal test */
-    assert(!bitmap_equal(a, b, 11 * BITMAP_ULONG_BITS));
-    assert(!bitmap_equal(a, b, 11 * BITMAP_ULONG_BITS - 1));
-    assert(!bitmap_equal(a, b,
-                         11 * BITMAP_ULONG_BITS - (BITMAP_ULONG_BITS - 1)));
-
-    free(b);
-    free(a);
-}
-
-/* Tests bitmap_scan. */
-static void
-test_bitmap_scan(void)
-{
-    unsigned long *a;
-
-    a = bitmap_allocate(MAX_BITS);
-
-    /* scan for 1 */
-    assert(bitmap_scan(a, true, 1, BITMAP_ULONG_BITS) == BITMAP_ULONG_BITS);
-    assert(bitmap_scan(a, true, BITMAP_ULONG_BITS - 1, BITMAP_ULONG_BITS)
-           == BITMAP_ULONG_BITS);
-    assert(bitmap_scan(a, true, 0, BITMAP_ULONG_BITS) == BITMAP_ULONG_BITS);
-    assert(bitmap_scan(a, true, 0, BITMAP_ULONG_BITS + 1)
-           == BITMAP_ULONG_BITS + 1);
-    assert(bitmap_scan(a, true, 0, 2 * BITMAP_ULONG_BITS - 1)
-           == 2 * BITMAP_ULONG_BITS - 1);
-
-    bitmap_set1(a, MAX_BITS - 1);
-    assert(bitmap_scan(a, true, 0, MAX_BITS) == MAX_BITS - 1);
-    bitmap_set1(a, MAX_BITS - BITMAP_ULONG_BITS + 1);
-    assert(bitmap_scan(a, true, 3, MAX_BITS)
-           == MAX_BITS - BITMAP_ULONG_BITS + 1);
-    bitmap_set1(a, BITMAP_ULONG_BITS - 1);
-    assert(bitmap_scan(a, true, 7, MAX_BITS - 1) == BITMAP_ULONG_BITS - 1);
-    bitmap_set1(a, 0);
-    assert(bitmap_scan(a, true, 0, MAX_BITS - 7) == 0);
-
-    bitmap_set_multiple(a, 0, MAX_BITS, true);
-
-    /* scan for 0 */
-    assert(bitmap_scan(a, false, 1, BITMAP_ULONG_BITS) == BITMAP_ULONG_BITS);
-    assert(bitmap_scan(a, false, BITMAP_ULONG_BITS - 1, BITMAP_ULONG_BITS)
-           == BITMAP_ULONG_BITS);
-    assert(bitmap_scan(a, false, 0, BITMAP_ULONG_BITS) == BITMAP_ULONG_BITS);
-    assert(bitmap_scan(a, false, 0, BITMAP_ULONG_BITS + 1)
-           == BITMAP_ULONG_BITS + 1);
-    assert(bitmap_scan(a, false, 0, 2 * BITMAP_ULONG_BITS - 1)
-           == 2 * BITMAP_ULONG_BITS - 1);
-
-    bitmap_set0(a, MAX_BITS - 1);
-    assert(bitmap_scan(a, false, 0, MAX_BITS) == MAX_BITS - 1);
-    bitmap_set0(a, MAX_BITS - BITMAP_ULONG_BITS + 1);
-    assert(bitmap_scan(a, false, 3, MAX_BITS)
-           == MAX_BITS - BITMAP_ULONG_BITS + 1);
-    bitmap_set0(a, BITMAP_ULONG_BITS - 1);
-    assert(bitmap_scan(a, false, 7, MAX_BITS - 1) == BITMAP_ULONG_BITS - 1);
-    bitmap_set0(a, 0);
-    assert(bitmap_scan(a, false, 0, MAX_BITS - 7) == 0);
-
-    free(a);
-}
-
-static void
-run_test(void (*function)(void))
-{
-    function();
-    printf(".");
-}
-
-static void
-run_tests(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    run_test(test_bitmap_equal);
-    run_test(test_bitmap_scan);
-    printf("\n");
-}
-
-static void
-run_benchmarks(struct ovs_cmdl_context *ctx)
-{
-    int n_iter = strtol(ctx->argv[1], NULL, 10);
-    struct timeval start;
-
-    xgettimeofday(&start);
-    for (int i = 0; i < n_iter; i++) {
-        test_bitmap_equal();
-    }
-    printf("bitmap equal:  %5d ms\n", elapsed(&start));
-
-    xgettimeofday(&start);
-    for (int i = 0; i < n_iter; i++) {
-        test_bitmap_scan();
-    }
-    printf("bitmap scan:  %5d ms\n", elapsed(&start));
-    printf("\n");
-}
-
-static const struct ovs_cmdl_command commands[] = {
-    {"check", NULL, 0, 0, run_tests, OVS_RO},
-    {"benchmark", NULL, 1, 1, run_benchmarks, OVS_RO},
-    {NULL, NULL, 0, 0, NULL, OVS_RO},
-};
-
-static void
-test_bitmap_main(int argc, char *argv[])
-{
-    struct ovs_cmdl_context ctx = {
-        .argc = argc - 1,
-        .argv = argv + 1,
-    };
-
-    set_program_name(argv[0]);
-    ovs_cmdl_run_command(&ctx, commands);
-}
-
-OVSTEST_REGISTER("test-bitmap", test_bitmap_main);
diff --git a/tests/test-bundle.c b/tests/test-bundle.c
deleted file mode 100644
index 124ad5b43..000000000
--- a/tests/test-bundle.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/* Copyright (c) 2011, 2012, 2013, 2014, 2017 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include <math.h>
-#include <stdlib.h>
-#include "bundle.h"
-#include "flow.h"
-#include "openvswitch/ofp-actions.h"
-#include "openvswitch/ofpbuf.h"
-#include "ovstest.h"
-#include "util.h"
-
-#define N_FLOWS  50000
-#define MAX_SLAVES 8 /* Maximum supported by this test framework. */
-
-struct slave {
-    ofp_port_t slave_id;
-
-    bool enabled;
-    size_t flow_count;
-};
-
-struct slave_group {
-    size_t n_slaves;
-    struct slave slaves[MAX_SLAVES];
-};
-
-static struct slave *
-slave_lookup(struct slave_group *sg, ofp_port_t slave_id)
-{
-    size_t i;
-
-    for (i = 0; i < sg->n_slaves; i++) {
-        if (sg->slaves[i].slave_id == slave_id) {
-            return &sg->slaves[i];
-        }
-    }
-
-    return NULL;
-}
-
-static bool
-slave_enabled_cb(ofp_port_t slave_id, void *aux)
-{
-    struct slave *slave;
-
-    slave = slave_lookup(aux, slave_id);
-    return slave ? slave->enabled : false;
-}
-
-static struct ofpact_bundle *
-parse_bundle_actions(char *actions)
-{
-    struct ofpact_bundle *bundle;
-    struct ofpbuf ofpacts;
-    struct ofpact *action;
-    char *error;
-
-    ofpbuf_init(&ofpacts, 0);
-    error = bundle_parse_load(actions, NULL, &ofpacts);
-    if (error) {
-        ovs_fatal(0, "%s", error);
-    }
-
-    action = ofpacts.data;
-    bundle = ofpact_get_BUNDLE(xmemdup(action, action->len));
-    ofpbuf_uninit(&ofpacts);
-
-    if (bundle->n_slaves > MAX_SLAVES) {
-        ovs_fatal(0, "At most %u slaves are supported", MAX_SLAVES);
-    }
-
-    return bundle;
-}
-
-static const char *
-mask_str(uint8_t mask, size_t n_bits)
-{
-    static char str[9];
-    size_t i;
-
-    n_bits = MIN(n_bits, 8);
-    for (i = 0; i < n_bits; i++) {
-        str[i] = (1 << i) & mask ? '1' : '0';
-    }
-    str[i] = '\0';
-
-    return str;
-}
-
-static void
-test_bundle_main(int argc, char *argv[])
-{
-    bool ok = true;
-    struct ofpact_bundle *bundle;
-    struct flow *flows;
-    size_t i, n_permute, old_n_enabled;
-    struct slave_group sg;
-    int old_active;
-
-    set_program_name(argv[0]);
-
-    if (argc != 2) {
-        ovs_fatal(0, "usage: %s bundle_action", program_name);
-    }
-
-    bundle = parse_bundle_actions(argv[1]);
-
-    /* Generate 'slaves' array. */
-    sg.n_slaves = 0;
-    for (i = 0; i < bundle->n_slaves; i++) {
-        ofp_port_t slave_id = bundle->slaves[i];
-
-        if (slave_lookup(&sg, slave_id)) {
-            ovs_fatal(0, "Redundant slaves are not supported. ");
-        }
-
-        sg.slaves[sg.n_slaves].slave_id = slave_id;
-        sg.n_slaves++;
-    }
-
-    /* Generate flows. */
-    flows = xmalloc(N_FLOWS * sizeof *flows);
-    for (i = 0; i < N_FLOWS; i++) {
-        flow_random_hash_fields(&flows[i]);
-        flows[i].regs[0] = ofp_to_u16(OFPP_NONE);
-    }
-
-    /* Cycles through each possible liveness permutation for the given
-     * n_slaves.  The initial state is equivalent to all slaves down, so we
-     * skip it by starting at i = 1. We do one extra iteration to cover
-     * transitioning from the final state back to the initial state. */
-    old_n_enabled = 0;
-    old_active = -1;
-    n_permute = 1 << sg.n_slaves;
-    for (i = 1; i <= n_permute + 1; i++) {
-        struct slave *slave;
-        size_t j, n_enabled, changed;
-        double disruption, perfect;
-        uint8_t mask;
-        int active;
-
-        mask = i % n_permute;
-
-        /* Gray coding ensures that in each iteration exactly one slave
-         * changes its liveness.  This makes the expected disruption a bit
-         * easier to calculate, and is likely similar to how failures will be
-         * experienced in the wild. */
-        mask = mask ^ (mask >> 1);
-
-        /* Initialize slaves. */
-        n_enabled = 0;
-        for (j = 0; j < sg.n_slaves; j++) {
-            slave = &sg.slaves[j];
-            slave->flow_count = 0;
-            slave->enabled = ((1 << j) & mask) != 0;
-
-            if (slave->enabled) {
-                n_enabled++;
-            }
-        }
-
-        active = -1;
-        for (j = 0; j < sg.n_slaves; j++) {
-            if (sg.slaves[j].enabled) {
-                active = j;
-                break;
-            }
-        }
-
-        changed = 0;
-        for (j = 0; j < N_FLOWS; j++) {
-            struct flow *flow = &flows[j];
-            ofp_port_t old_slave_id, ofp_port;
-            struct flow_wildcards wc;
-
-            old_slave_id = u16_to_ofp(flow->regs[0]);
-            ofp_port = bundle_execute(bundle, flow, &wc, slave_enabled_cb,
-                                      &sg);
-            flow->regs[0] = ofp_to_u16(ofp_port);
-
-            if (ofp_port != OFPP_NONE) {
-                slave_lookup(&sg, ofp_port)->flow_count++;
-            }
-
-            if (old_slave_id != ofp_port) {
-                changed++;
-            }
-        }
-
-        if (bundle->algorithm == NX_BD_ALG_ACTIVE_BACKUP) {
-            perfect = active == old_active ? 0.0 : 1.0;
-        } else {
-            if (old_n_enabled || n_enabled) {
-                perfect = 1.0 / MAX(old_n_enabled, n_enabled);
-            } else {
-                /* This will happen when 'sg.n_slaves' is 0. */
-                perfect = 0;
-            }
-        }
-
-        disruption = changed / (double)N_FLOWS;
-        printf("%s: disruption=%.2f (perfect=%.2f)",
-               mask_str(mask, sg.n_slaves), disruption, perfect);
-
-        for (j = 0 ; j < sg.n_slaves; j++) {
-            slave = &sg.slaves[j];
-            double flow_percent;
-
-            flow_percent = slave->flow_count / (double)N_FLOWS;
-            printf( " %.2f", flow_percent);
-
-            if (slave->enabled) {
-                double perfect_fp;
-
-                if (bundle->algorithm == NX_BD_ALG_ACTIVE_BACKUP) {
-                    perfect_fp = j == active ? 1.0 : 0.0;
-                } else {
-                    perfect_fp = 1.0 / n_enabled;
-                }
-
-                if (fabs(flow_percent - perfect_fp) >= .01) {
-                    fprintf(stderr, "%s: slave %d: flow_percentage=%.5f for"
-                            " differs from perfect=%.5f by more than .01\n",
-                            mask_str(mask, sg.n_slaves), slave->slave_id,
-                            flow_percent, perfect_fp);
-                    ok = false;
-                }
-            } else if (slave->flow_count) {
-                fprintf(stderr, "%s: slave %d: disabled slave received"
-                        " flows.\n", mask_str(mask, sg.n_slaves),
-                        slave->slave_id);
-                ok = false;
-            }
-        }
-        printf("\n");
-
-        if (fabs(disruption - perfect) >= .01) {
-            fprintf(stderr, "%s: disruption=%.5f differs from perfect=%.5f by"
-                    " more than .01\n", mask_str(mask, sg.n_slaves),
-                    disruption, perfect);
-            ok = false;
-        }
-
-        old_active = active;
-        old_n_enabled = n_enabled;
-    }
-
-    free(bundle);
-    free(flows);
-    exit(ok ? 0 : 1);
-}
-
-OVSTEST_REGISTER("test-bundle", test_bundle_main);
diff --git a/tests/test-byte-order.c b/tests/test-byte-order.c
deleted file mode 100644
index 2b8edf35c..000000000
--- a/tests/test-byte-order.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2010, 2011 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "byte-order.h"
-#include <assert.h>
-#include <inttypes.h>
-#include "ovstest.h"
-
-static void
-test_byte_order_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-#ifndef __CHECKER__
-    /* I picked some random numbers. */
-    const uint16_t s = 0xc9bd;
-    const uint32_t l = 0xffe56ae8;
-    const uint64_t ll = UINT64_C(0xb6fe878a9117ecdb);
-
-    assert(htons(ntohs(s)) == s);
-    assert(ntohs(htons(s)) == s);
-    assert(CONSTANT_HTONS(ntohs(s)) == s);
-    assert(ntohs(CONSTANT_HTONS(s)) == s);
-    assert(ntohs(CONSTANT_HTONS(l)) == (uint16_t) l);
-    assert(ntohs(CONSTANT_HTONS(ll)) == (uint16_t) ll);
-
-    assert(htonl(ntohl(l)) == l);
-    assert(ntohl(htonl(l)) == l);
-    assert(CONSTANT_HTONL(ntohl(l)) == l);
-    assert(ntohl(CONSTANT_HTONL(l)) == l);
-    assert(ntohl(CONSTANT_HTONL(ll)) == (uint32_t) ll);
-
-    assert(htonll(ntohll(ll)) == ll);
-    assert(ntohll(htonll(ll)) == ll);
-    assert(CONSTANT_HTONLL(ntohll(ll)) == ll);
-    assert(ntohll(CONSTANT_HTONLL(ll)));
-#else  /* __CHECKER__ */
-/* Making sparse happy with this code makes it unreadable, so don't bother. */
-#endif
-}
-
-OVSTEST_REGISTER("test-byte-order", test_byte_order_main);
diff --git a/tests/test-ccmap.c b/tests/test-ccmap.c
deleted file mode 100644
index 5c51bbe83..000000000
--- a/tests/test-ccmap.c
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 2010, 2013, 2014, 2016 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* A non-exhaustive test for some of the functions and macros declared in
- * ccmap.h. */
-
-#include <config.h>
-#undef NDEBUG
-#include "ccmap.h"
-#include <assert.h>
-#include <getopt.h>
-#include <string.h>
-#include "bitmap.h"
-#include "command-line.h"
-#include "fat-rwlock.h"
-#include "hash.h"
-#include "openvswitch/hmap.h"
-#include "ovstest.h"
-#include "ovs-thread.h"
-#include "random.h"
-#include "timeval.h"
-#include "util.h"
-
-typedef size_t hash_func(int value);
-
-static int
-compare_uint32s(const void *a_, const void *b_)
-{
-    const uint32_t *a = a_;
-    const uint32_t *b = b_;
-    return *a < *b ? -1 : *a > *b;
-}
-
-/* Verifies that 'ccmap' contains exactly the 'n' values in 'values'. */
-static void
-check_ccmap(struct ccmap *ccmap, const int values[], size_t n, hash_func *hash)
-{
-    uint32_t *hashes = xmalloc(sizeof *hashes * n);
-    int i;
-
-    for (i = 0; i < n; i++) {
-        hashes[i] = hash(values[i]);
-    }
-    qsort(hashes, n, sizeof *hashes, compare_uint32s);
-
-    /* Check that all the values are there in lookup. */
-    for (i = 0; i < n; i++) {
-        uint32_t h = hashes[i];
-        size_t count = ccmap_find(ccmap, h);
-
-        assert(count);   /* Must have at least one. */
-        assert(i + count <= n); /* May not have too many. */
-
-        /* Skip colliding hash values and assert they were in the count. */
-        while (--count) {
-            i++;
-            assert(hashes[i] == h);
-        }
-        /* Make sure next hash is different. */
-        if (i + 1 < n) {
-            assert(hashes[i + 1] != h);
-        }
-    }
-
-    /* Check counters. */
-    assert(ccmap_is_empty(ccmap) == !n);
-    assert(ccmap_count(ccmap) == n);
-
-    free(hashes);
-}
-
-static void
-shuffle(int *p, size_t n)
-{
-    for (; n > 1; n--, p++) {
-        int *q = &p[random_range(n)];
-        int tmp = *p;
-
-        *p = *q;
-        *q = tmp;
-    }
-}
-
-static size_t
-identity_hash(int value)
-{
-    return value;
-}
-
-static size_t
-good_hash(int value)
-{
-    return hash_int(value, 0x1234abcd);
-}
-
-static size_t
-constant_hash(int value OVS_UNUSED)
-{
-    return 123;
-}
-
-/* Tests basic ccmap increment and decrement. */
-static void
-test_ccmap_inc_dec(hash_func *hash)
-{
-    enum { N_ELEMS = 1000 };
-
-    int values[N_ELEMS];
-    struct ccmap ccmap;
-    size_t i;
-
-    ccmap_init(&ccmap);
-    for (i = 0; i < N_ELEMS; i++) {
-        ccmap_inc(&ccmap, hash(i));
-        values[i] = i;
-        check_ccmap(&ccmap, values, i + 1, hash);
-    }
-    shuffle(values, N_ELEMS);
-    for (i = 0; i < N_ELEMS; i++) {
-        ccmap_dec(&ccmap, hash(values[i]));
-        check_ccmap(&ccmap, values + (i + 1), N_ELEMS - (i + 1), hash);
-    }
-    ccmap_destroy(&ccmap);
-}
-
-static void
-run_test(void (*function)(hash_func *))
-{
-    hash_func *hash_funcs[] = { identity_hash, good_hash, constant_hash };
-
-    for (size_t i = 0; i < ARRAY_SIZE(hash_funcs); i++) {
-        function(hash_funcs[i]);
-        printf(".");
-        fflush(stdout);
-    }
-}
-
-static void
-run_tests(struct ovs_cmdl_context *ctx)
-{
-    int n = ctx->argc >= 2 ? atoi(ctx->argv[1]) : 100;
-    for (int i = 0; i < n; i++) {
-        run_test(test_ccmap_inc_dec);
-    }
-    printf("\n");
-}
-
-static int n_elems;             /* Number of elements to insert. */
-static int n_threads;           /* Number of threads to search and mutate. */
-static uint32_t mutation_frac;  /* % mutations, as fraction of UINT32_MAX. */
-
-
-static void benchmark_ccmap(void);
-
-static int
-elapsed(const struct timeval *start)
-{
-    struct timeval end;
-
-    xgettimeofday(&end);
-    return timeval_to_msec(&end) - timeval_to_msec(start);
-}
-
-static void
-run_benchmarks(struct ovs_cmdl_context *ctx)
-{
-    n_elems = strtol(ctx->argv[1], NULL, 10);
-    n_threads = strtol(ctx->argv[2], NULL, 10);
-    mutation_frac = strtod(ctx->argv[3], NULL) / 100.0 * UINT32_MAX;
-
-    printf("Benchmarking with n=%d, %d threads, %.2f%% mutations\n",
-           n_elems, n_threads, (double) mutation_frac / UINT32_MAX * 100.);
-
-    benchmark_ccmap();
-}
-
-/* ccmap benchmark. */
-
-struct ccmap_aux {
-    struct ovs_mutex mutex;
-    struct ccmap *ccmap;
-};
-
-static void *
-search_ccmap(void *aux_)
-{
-    struct ccmap_aux *aux = aux_;
-    size_t i;
-
-    if (mutation_frac) {
-        for (i = 0; i < n_elems; i++) {
-            uint32_t hash = hash_int(i, 0);
-
-            if (random_uint32() < mutation_frac) {
-                ovs_mutex_lock(&aux->mutex);
-                uint32_t count = ccmap_find(aux->ccmap, hash);
-                if (count) {
-                    ccmap_dec(aux->ccmap, hash);
-                }
-                ovs_mutex_unlock(&aux->mutex);
-            } else {
-                ignore(ccmap_find(aux->ccmap, hash));
-            }
-        }
-    } else {
-        for (i = 0; i < n_elems; i++) {
-            ignore(ccmap_find(aux->ccmap, hash_int(i, 0)));
-        }
-    }
-    return NULL;
-}
-
-static void
-benchmark_ccmap(void)
-{
-    struct ccmap ccmap;
-    struct timeval start;
-    pthread_t *threads;
-    struct ccmap_aux aux;
-    size_t i;
-
-    /* Insertions. */
-    xgettimeofday(&start);
-    ccmap_init(&ccmap);
-    for (i = 0; i < n_elems; i++) {
-        ccmap_inc(&ccmap, hash_int(i, 0));
-    }
-    printf("ccmap insert:  %5d ms\n", elapsed(&start));
-
-    /* Search and mutation. */
-    xgettimeofday(&start);
-    aux.ccmap = &ccmap;
-    ovs_mutex_init(&aux.mutex);
-    threads = xmalloc(n_threads * sizeof *threads);
-    for (i = 0; i < n_threads; i++) {
-        threads[i] = ovs_thread_create("search", search_ccmap, &aux);
-    }
-    for (i = 0; i < n_threads; i++) {
-        xpthread_join(threads[i], NULL);
-    }
-    free(threads);
-    printf("ccmap search:  %5d ms\n", elapsed(&start));
-
-    /* Destruction. */
-    xgettimeofday(&start);
-    for (i = 0; i < n_elems; i++) {
-        uint32_t hash = hash_int(i, 0);
-
-        if (ccmap_find(&ccmap, hash)) {
-            /* Also remove any colliding hashes. */
-            while (ccmap_dec(&ccmap, hash)) {
-                ;
-            }
-        }
-    }
-    ccmap_destroy(&ccmap);
-    printf("ccmap destroy: %5d ms\n", elapsed(&start));
-}
-
-
-static const struct ovs_cmdl_command commands[] = {
-    {"check", NULL, 0, 1, run_tests, OVS_RO},
-    {"benchmark", NULL, 3, 3, run_benchmarks, OVS_RO},
-    {NULL, NULL, 0, 0, NULL, OVS_RO},
-};
-
-static void
-test_ccmap_main(int argc, char *argv[])
-{
-    struct ovs_cmdl_context ctx = {
-        .argc = argc - optind,
-        .argv = argv + optind,
-    };
-
-    set_program_name(argv[0]);
-    ovs_cmdl_run_command(&ctx, commands);
-}
-
-OVSTEST_REGISTER("test-ccmap", test_ccmap_main);
diff --git a/tests/test-classifier.c b/tests/test-classifier.c
deleted file mode 100644
index 6d53d016d..000000000
--- a/tests/test-classifier.c
+++ /dev/null
@@ -1,1909 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* "White box" tests for classifier.
- *
- * With very few exceptions, these tests obtain complete coverage of every
- * basic block and every branch in the classifier implementation, e.g. a clean
- * report from "gcov -b".  (Covering the exceptions would require finding
- * collisions in the hash function used for flow data, etc.)
- *
- * This test should receive a clean report from "valgrind --leak-check=full":
- * it frees every heap block that it allocates.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "classifier.h"
-#include <assert.h>
-#include <errno.h>
-#include <limits.h>
-#include "byte-order.h"
-#include "classifier-private.h"
-#include "command-line.h"
-#include "fatal-signal.h"
-#include "flow.h"
-#include "ovstest.h"
-#include "ovs-atomic.h"
-#include "ovs-thread.h"
-#include "packets.h"
-#include "random.h"
-#include "timeval.h"
-#include "unaligned.h"
-#include "util.h"
-
-static bool versioned = false;
-
-/* Fields in a rule. */
-#define CLS_FIELDS                            \
-    /*        struct flow        all-caps */  \
-    /*        member name        name     */  \
-    /*        -----------        -------- */  \
-    CLS_FIELD(tunnel.tun_id,     TUN_ID)      \
-    CLS_FIELD(metadata,          METADATA)    \
-    CLS_FIELD(nw_src,            NW_SRC)      \
-    CLS_FIELD(nw_dst,            NW_DST)      \
-    CLS_FIELD(in_port.ofp_port,  IN_PORT)     \
-    CLS_FIELD(vlans[0].tci,      VLAN_TCI)    \
-    CLS_FIELD(dl_type,           DL_TYPE)     \
-    CLS_FIELD(tp_src,            TP_SRC)      \
-    CLS_FIELD(tp_dst,            TP_DST)      \
-    CLS_FIELD(dl_src,            DL_SRC)      \
-    CLS_FIELD(dl_dst,            DL_DST)      \
-    CLS_FIELD(nw_proto,          NW_PROTO)    \
-    CLS_FIELD(nw_tos,            NW_DSCP)
-
-/* Field indexes.
- *
- * (These are also indexed into struct classifier's 'tables' array.) */
-enum {
-#define CLS_FIELD(MEMBER, NAME) CLS_F_IDX_##NAME,
-    CLS_FIELDS
-#undef CLS_FIELD
-    CLS_N_FIELDS
-};
-
-/* Field information. */
-struct cls_field {
-    int ofs;                    /* Offset in struct flow. */
-    int len;                    /* Length in bytes. */
-    const char *name;           /* Name (for debugging). */
-};
-
-static const struct cls_field cls_fields[CLS_N_FIELDS] = {
-#define CLS_FIELD(MEMBER, NAME)                 \
-    { offsetof(struct flow, MEMBER),            \
-      sizeof ((struct flow *)0)->MEMBER,        \
-      #NAME },
-    CLS_FIELDS
-#undef CLS_FIELD
-};
-
-struct test_rule {
-    struct ovs_list list_node;
-    int aux;                    /* Auxiliary data. */
-    struct cls_rule cls_rule;   /* Classifier rule data. */
-};
-
-static struct test_rule *
-test_rule_from_cls_rule(const struct cls_rule *rule)
-{
-    return rule ? CONTAINER_OF(rule, struct test_rule, cls_rule) : NULL;
-}
-
-static void
-test_rule_destroy(struct test_rule *rule)
-{
-    if (rule) {
-        cls_rule_destroy(&rule->cls_rule);
-        free(rule);
-    }
-}
-
-static struct test_rule *make_rule(int wc_fields, int priority, int value_pat);
-static void free_rule(struct test_rule *);
-static struct test_rule *clone_rule(const struct test_rule *);
-
-/* Trivial (linear) classifier. */
-struct tcls {
-    size_t n_rules;
-    size_t allocated_rules;
-    struct test_rule **rules;
-};
-
-static void
-tcls_init(struct tcls *tcls)
-{
-    tcls->n_rules = 0;
-    tcls->allocated_rules = 0;
-    tcls->rules = NULL;
-}
-
-static void
-tcls_destroy(struct tcls *tcls)
-{
-    if (tcls) {
-        size_t i;
-
-        for (i = 0; i < tcls->n_rules; i++) {
-            test_rule_destroy(tcls->rules[i]);
-        }
-        free(tcls->rules);
-    }
-}
-
-static bool
-tcls_is_empty(const struct tcls *tcls)
-{
-    return tcls->n_rules == 0;
-}
-
-static struct test_rule *
-tcls_insert(struct tcls *tcls, const struct test_rule *rule)
-{
-    size_t i;
-
-    for (i = 0; i < tcls->n_rules; i++) {
-        const struct cls_rule *pos = &tcls->rules[i]->cls_rule;
-        if (cls_rule_equal(pos, &rule->cls_rule)) {
-            /* Exact match. */
-            ovsrcu_postpone(free_rule, tcls->rules[i]);
-            tcls->rules[i] = clone_rule(rule);
-            return tcls->rules[i];
-        } else if (pos->priority < rule->cls_rule.priority) {
-            break;
-        }
-    }
-
-    if (tcls->n_rules >= tcls->allocated_rules) {
-        tcls->rules = x2nrealloc(tcls->rules, &tcls->allocated_rules,
-                                 sizeof *tcls->rules);
-    }
-    if (i != tcls->n_rules) {
-        memmove(&tcls->rules[i + 1], &tcls->rules[i],
-                sizeof *tcls->rules * (tcls->n_rules - i));
-    }
-    tcls->rules[i] = clone_rule(rule);
-    tcls->n_rules++;
-    return tcls->rules[i];
-}
-
-static void
-tcls_remove(struct tcls *cls, const struct test_rule *rule)
-{
-    size_t i;
-
-    for (i = 0; i < cls->n_rules; i++) {
-        struct test_rule *pos = cls->rules[i];
-        if (pos == rule) {
-            test_rule_destroy(pos);
-
-            memmove(&cls->rules[i], &cls->rules[i + 1],
-                    sizeof *cls->rules * (cls->n_rules - i - 1));
-
-            cls->n_rules--;
-            return;
-        }
-    }
-    OVS_NOT_REACHED();
-}
-
-static bool
-match(const struct cls_rule *wild_, const struct flow *fixed)
-{
-    struct match wild;
-    int f_idx;
-
-    minimatch_expand(&wild_->match, &wild);
-    for (f_idx = 0; f_idx < CLS_N_FIELDS; f_idx++) {
-        bool eq;
-
-        if (f_idx == CLS_F_IDX_NW_SRC) {
-            eq = !((fixed->nw_src ^ wild.flow.nw_src)
-                   & wild.wc.masks.nw_src);
-        } else if (f_idx == CLS_F_IDX_NW_DST) {
-            eq = !((fixed->nw_dst ^ wild.flow.nw_dst)
-                   & wild.wc.masks.nw_dst);
-        } else if (f_idx == CLS_F_IDX_TP_SRC) {
-            eq = !((fixed->tp_src ^ wild.flow.tp_src)
-                   & wild.wc.masks.tp_src);
-        } else if (f_idx == CLS_F_IDX_TP_DST) {
-            eq = !((fixed->tp_dst ^ wild.flow.tp_dst)
-                   & wild.wc.masks.tp_dst);
-        } else if (f_idx == CLS_F_IDX_DL_SRC) {
-            eq = eth_addr_equal_except(fixed->dl_src, wild.flow.dl_src,
-                                       wild.wc.masks.dl_src);
-        } else if (f_idx == CLS_F_IDX_DL_DST) {
-            eq = eth_addr_equal_except(fixed->dl_dst, wild.flow.dl_dst,
-                                       wild.wc.masks.dl_dst);
-        } else if (f_idx == CLS_F_IDX_VLAN_TCI) {
-            eq = !((fixed->vlans[0].tci ^ wild.flow.vlans[0].tci)
-                   & wild.wc.masks.vlans[0].tci);
-        } else if (f_idx == CLS_F_IDX_TUN_ID) {
-            eq = !((fixed->tunnel.tun_id ^ wild.flow.tunnel.tun_id)
-                   & wild.wc.masks.tunnel.tun_id);
-        } else if (f_idx == CLS_F_IDX_METADATA) {
-            eq = !((fixed->metadata ^ wild.flow.metadata)
-                   & wild.wc.masks.metadata);
-        } else if (f_idx == CLS_F_IDX_NW_DSCP) {
-            eq = !((fixed->nw_tos ^ wild.flow.nw_tos) &
-                   (wild.wc.masks.nw_tos & IP_DSCP_MASK));
-        } else if (f_idx == CLS_F_IDX_NW_PROTO) {
-            eq = !((fixed->nw_proto ^ wild.flow.nw_proto)
-                   & wild.wc.masks.nw_proto);
-        } else if (f_idx == CLS_F_IDX_DL_TYPE) {
-            eq = !((fixed->dl_type ^ wild.flow.dl_type)
-                   & wild.wc.masks.dl_type);
-        } else if (f_idx == CLS_F_IDX_IN_PORT) {
-            eq = !((fixed->in_port.ofp_port
-                    ^ wild.flow.in_port.ofp_port)
-                   & wild.wc.masks.in_port.ofp_port);
-        } else {
-            OVS_NOT_REACHED();
-        }
-
-        if (!eq) {
-            return false;
-        }
-    }
-    return true;
-}
-
-static struct cls_rule *
-tcls_lookup(const struct tcls *cls, const struct flow *flow)
-{
-    size_t i;
-
-    for (i = 0; i < cls->n_rules; i++) {
-        struct test_rule *pos = cls->rules[i];
-        if (match(&pos->cls_rule, flow)) {
-            return &pos->cls_rule;
-        }
-    }
-    return NULL;
-}
-
-static void
-tcls_delete_matches(struct tcls *cls, const struct cls_rule *target)
-{
-    size_t i;
-
-    for (i = 0; i < cls->n_rules; ) {
-        struct test_rule *pos = cls->rules[i];
-        if (!minimask_has_extra(pos->cls_rule.match.mask,
-                                target->match.mask)) {
-            struct flow flow;
-
-            miniflow_expand(pos->cls_rule.match.flow, &flow);
-            if (match(target, &flow)) {
-                tcls_remove(cls, pos);
-                continue;
-            }
-        }
-        i++;
-    }
-}
-
-static ovs_be32 nw_src_values[] = { CONSTANT_HTONL(0xc0a80001),
-                                    CONSTANT_HTONL(0xc0a04455) };
-static ovs_be32 nw_dst_values[] = { CONSTANT_HTONL(0xc0a80002),
-                                    CONSTANT_HTONL(0xc0a04455) };
-static ovs_be64 tun_id_values[] = {
-    0,
-    CONSTANT_HTONLL(UINT64_C(0xfedcba9876543210)) };
-static ovs_be64 metadata_values[] = {
-    0,
-    CONSTANT_HTONLL(UINT64_C(0xfedcba9876543210)) };
-static ofp_port_t in_port_values[] = { OFP_PORT_C(1), OFPP_LOCAL };
-static ovs_be16 vlan_tci_values[] = { CONSTANT_HTONS(101), CONSTANT_HTONS(0) };
-static ovs_be16 dl_type_values[]
-            = { CONSTANT_HTONS(ETH_TYPE_IP), CONSTANT_HTONS(ETH_TYPE_ARP) };
-static ovs_be16 tp_src_values[] = { CONSTANT_HTONS(49362),
-                                    CONSTANT_HTONS(80) };
-static ovs_be16 tp_dst_values[] = { CONSTANT_HTONS(6667), CONSTANT_HTONS(22) };
-static struct eth_addr dl_src_values[] = {
-    ETH_ADDR_C(00,02,e3,0f,80,a4),
-    ETH_ADDR_C(5e,33,7f,5f,1e,99)
-};
-static struct eth_addr dl_dst_values[] = {
-    ETH_ADDR_C(4a,27,71,ae,64,c1),
-    ETH_ADDR_C(ff,ff,ff,ff,ff,ff)
-};
-static uint8_t nw_proto_values[] = { IPPROTO_TCP, IPPROTO_ICMP };
-static uint8_t nw_dscp_values[] = { 48, 0 };
-
-static void *values[CLS_N_FIELDS][2];
-
-static void
-init_values(void)
-{
-    values[CLS_F_IDX_TUN_ID][0] = &tun_id_values[0];
-    values[CLS_F_IDX_TUN_ID][1] = &tun_id_values[1];
-
-    values[CLS_F_IDX_METADATA][0] = &metadata_values[0];
-    values[CLS_F_IDX_METADATA][1] = &metadata_values[1];
-
-    values[CLS_F_IDX_IN_PORT][0] = &in_port_values[0];
-    values[CLS_F_IDX_IN_PORT][1] = &in_port_values[1];
-
-    values[CLS_F_IDX_VLAN_TCI][0] = &vlan_tci_values[0];
-    values[CLS_F_IDX_VLAN_TCI][1] = &vlan_tci_values[1];
-
-    values[CLS_F_IDX_DL_SRC][0] = &dl_src_values[0];
-    values[CLS_F_IDX_DL_SRC][1] = &dl_src_values[1];
-
-    values[CLS_F_IDX_DL_DST][0] = &dl_dst_values[0];
-    values[CLS_F_IDX_DL_DST][1] = &dl_dst_values[1];
-
-    values[CLS_F_IDX_DL_TYPE][0] = &dl_type_values[0];
-    values[CLS_F_IDX_DL_TYPE][1] = &dl_type_values[1];
-
-    values[CLS_F_IDX_NW_SRC][0] = &nw_src_values[0];
-    values[CLS_F_IDX_NW_SRC][1] = &nw_src_values[1];
-
-    values[CLS_F_IDX_NW_DST][0] = &nw_dst_values[0];
-    values[CLS_F_IDX_NW_DST][1] = &nw_dst_values[1];
-
-    values[CLS_F_IDX_NW_PROTO][0] = &nw_proto_values[0];
-    values[CLS_F_IDX_NW_PROTO][1] = &nw_proto_values[1];
-
-    values[CLS_F_IDX_NW_DSCP][0] = &nw_dscp_values[0];
-    values[CLS_F_IDX_NW_DSCP][1] = &nw_dscp_values[1];
-
-    values[CLS_F_IDX_TP_SRC][0] = &tp_src_values[0];
-    values[CLS_F_IDX_TP_SRC][1] = &tp_src_values[1];
-
-    values[CLS_F_IDX_TP_DST][0] = &tp_dst_values[0];
-    values[CLS_F_IDX_TP_DST][1] = &tp_dst_values[1];
-}
-
-#define N_NW_SRC_VALUES ARRAY_SIZE(nw_src_values)
-#define N_NW_DST_VALUES ARRAY_SIZE(nw_dst_values)
-#define N_TUN_ID_VALUES ARRAY_SIZE(tun_id_values)
-#define N_METADATA_VALUES ARRAY_SIZE(metadata_values)
-#define N_IN_PORT_VALUES ARRAY_SIZE(in_port_values)
-#define N_VLAN_TCI_VALUES ARRAY_SIZE(vlan_tci_values)
-#define N_DL_TYPE_VALUES ARRAY_SIZE(dl_type_values)
-#define N_TP_SRC_VALUES ARRAY_SIZE(tp_src_values)
-#define N_TP_DST_VALUES ARRAY_SIZE(tp_dst_values)
-#define N_DL_SRC_VALUES ARRAY_SIZE(dl_src_values)
-#define N_DL_DST_VALUES ARRAY_SIZE(dl_dst_values)
-#define N_NW_PROTO_VALUES ARRAY_SIZE(nw_proto_values)
-#define N_NW_DSCP_VALUES ARRAY_SIZE(nw_dscp_values)
-
-#define N_FLOW_VALUES (N_NW_SRC_VALUES *        \
-                       N_NW_DST_VALUES *        \
-                       N_TUN_ID_VALUES *        \
-                       N_IN_PORT_VALUES *       \
-                       N_VLAN_TCI_VALUES *       \
-                       N_DL_TYPE_VALUES *       \
-                       N_TP_SRC_VALUES *        \
-                       N_TP_DST_VALUES *        \
-                       N_DL_SRC_VALUES *        \
-                       N_DL_DST_VALUES *        \
-                       N_NW_PROTO_VALUES *      \
-                       N_NW_DSCP_VALUES)
-
-static unsigned int
-get_value(unsigned int *x, unsigned n_values)
-{
-    unsigned int rem = *x % n_values;
-    *x /= n_values;
-    return rem;
-}
-
-static void
-compare_classifiers(struct classifier *cls, size_t n_invisible_rules,
-                    ovs_version_t version, struct tcls *tcls)
-{
-    static const int confidence = 500;
-    unsigned int i;
-
-    assert(classifier_count(cls) == tcls->n_rules + n_invisible_rules);
-    for (i = 0; i < confidence; i++) {
-        const struct cls_rule *cr0, *cr1, *cr2;
-        struct flow flow;
-        struct flow_wildcards wc;
-        unsigned int x;
-
-        flow_wildcards_init_catchall(&wc);
-        x = random_range(N_FLOW_VALUES);
-        memset(&flow, 0, sizeof flow);
-        flow.nw_src = nw_src_values[get_value(&x, N_NW_SRC_VALUES)];
-        flow.nw_dst = nw_dst_values[get_value(&x, N_NW_DST_VALUES)];
-        flow.tunnel.tun_id = tun_id_values[get_value(&x, N_TUN_ID_VALUES)];
-        flow.metadata = metadata_values[get_value(&x, N_METADATA_VALUES)];
-        flow.in_port.ofp_port = in_port_values[get_value(&x,
-                                                   N_IN_PORT_VALUES)];
-        flow.vlans[0].tci = vlan_tci_values[get_value(&x, N_VLAN_TCI_VALUES)];
-        flow.dl_type = dl_type_values[get_value(&x, N_DL_TYPE_VALUES)];
-        flow.tp_src = tp_src_values[get_value(&x, N_TP_SRC_VALUES)];
-        flow.tp_dst = tp_dst_values[get_value(&x, N_TP_DST_VALUES)];
-        flow.dl_src = dl_src_values[get_value(&x, N_DL_SRC_VALUES)];
-        flow.dl_dst = dl_dst_values[get_value(&x, N_DL_DST_VALUES)];
-        flow.nw_proto = nw_proto_values[get_value(&x, N_NW_PROTO_VALUES)];
-        flow.nw_tos = nw_dscp_values[get_value(&x, N_NW_DSCP_VALUES)];
-
-        /* This assertion is here to suppress a GCC 4.9 array-bounds warning */
-        ovs_assert(cls->n_tries <= CLS_MAX_TRIES);
-
-        cr0 = classifier_lookup(cls, version, &flow, &wc);
-        cr1 = tcls_lookup(tcls, &flow);
-        assert((cr0 == NULL) == (cr1 == NULL));
-        if (cr0 != NULL) {
-            const struct test_rule *tr0 = test_rule_from_cls_rule(cr0);
-            const struct test_rule *tr1 = test_rule_from_cls_rule(cr1);
-
-            assert(cls_rule_equal(cr0, cr1));
-            assert(tr0->aux == tr1->aux);
-
-            /* Make sure the rule should have been visible. */
-            assert(cls_rule_visible_in_version(cr0, version));
-        }
-        cr2 = classifier_lookup(cls, version, &flow, NULL);
-        assert(cr2 == cr0);
-    }
-}
-
-static void
-destroy_classifier(struct classifier *cls)
-{
-    struct test_rule *rule;
-
-    classifier_defer(cls);
-    CLS_FOR_EACH (rule, cls_rule, cls) {
-        classifier_remove_assert(cls, &rule->cls_rule);
-        ovsrcu_postpone(free_rule, rule);
-    }
-    classifier_destroy(cls);
-}
-
-static void
-pvector_verify(const struct pvector *pvec)
-{
-    void *ptr OVS_UNUSED;
-    int prev_priority = INT_MAX;
-
-    PVECTOR_FOR_EACH (ptr, pvec) {
-        int priority = cursor__.vector[cursor__.entry_idx].priority;
-        if (priority > prev_priority) {
-            ovs_abort(0, "Priority vector is out of order (%u > %u)",
-                      priority, prev_priority);
-        }
-        prev_priority = priority;
-    }
-}
-
-static unsigned int
-trie_verify(const rcu_trie_ptr *trie, unsigned int ofs, unsigned int n_bits)
-{
-    const struct trie_node *node = ovsrcu_get(struct trie_node *, trie);
-
-    if (node) {
-        assert(node->n_rules == 0 || node->n_bits > 0);
-        ofs += node->n_bits;
-        assert((ofs > 0 || (ofs == 0 && node->n_bits == 0)) && ofs <= n_bits);
-
-        return node->n_rules
-            + trie_verify(&node->edges[0], ofs, n_bits)
-            + trie_verify(&node->edges[1], ofs, n_bits);
-    }
-    return 0;
-}
-
-static void
-verify_tries(struct classifier *cls)
-    OVS_NO_THREAD_SAFETY_ANALYSIS
-{
-    unsigned int n_rules = 0;
-    int i;
-
-    for (i = 0; i < cls->n_tries; i++) {
-        n_rules += trie_verify(&cls->tries[i].root, 0,
-                               cls->tries[i].field->n_bits);
-    }
-    assert(n_rules <= cls->n_rules);
-}
-
-static void
-check_tables(const struct classifier *cls, int n_tables, int n_rules,
-             int n_dups, int n_invisible, ovs_version_t version)
-    OVS_NO_THREAD_SAFETY_ANALYSIS
-{
-    const struct cls_subtable *table;
-    struct test_rule *test_rule;
-    int found_tables = 0;
-    int found_tables_with_visible_rules = 0;
-    int found_rules = 0;
-    int found_dups = 0;
-    int found_invisible = 0;
-    int found_visible_but_removable = 0;
-    int found_rules2 = 0;
-
-    pvector_verify(&cls->subtables);
-    CMAP_FOR_EACH (table, cmap_node, &cls->subtables_map) {
-        const struct cls_match *head;
-        int max_priority = INT_MIN;
-        unsigned int max_count = 0;
-        bool found = false;
-        bool found_visible_rules = false;
-        const struct cls_subtable *iter;
-
-        /* Locate the subtable from 'subtables'. */
-        PVECTOR_FOR_EACH (iter, &cls->subtables) {
-            if (iter == table) {
-                if (found) {
-                    ovs_abort(0, "Subtable %p duplicated in 'subtables'.",
-                              table);
-                }
-                found = true;
-            }
-        }
-        if (!found) {
-            ovs_abort(0, "Subtable %p not found from 'subtables'.", table);
-        }
-
-        assert(!cmap_is_empty(&table->rules));
-        assert(trie_verify(&table->ports_trie, 0, table->ports_mask_len)
-               == (table->ports_mask_len ? cmap_count(&table->rules) : 0));
-
-        found_tables++;
-
-        CMAP_FOR_EACH (head, cmap_node, &table->rules) {
-            int prev_priority = INT_MAX;
-            ovs_version_t prev_version = 0;
-            const struct cls_match *rule, *prev;
-            bool found_visible_rules_in_list = false;
-
-            assert(head->priority <= table->max_priority);
-
-            if (head->priority > max_priority) {
-                max_priority = head->priority;
-                max_count = 0;
-            }
-
-            FOR_EACH_RULE_IN_LIST_PROTECTED(rule, prev, head) {
-                ovs_version_t rule_version;
-                const struct cls_rule *found_rule;
-
-                /* Priority may not increase. */
-                assert(rule->priority <= prev_priority);
-
-                if (rule->priority == max_priority) {
-                    ++max_count;
-                }
-
-                /* Count invisible rules and visible duplicates. */
-                if (!cls_match_visible_in_version(rule, version)) {
-                    found_invisible++;
-                } else {
-                    if (cls_match_is_eventually_invisible(rule)) {
-                        found_visible_but_removable++;
-                    }
-                    if (found_visible_rules_in_list) {
-                        found_dups++;
-                    }
-                    found_visible_rules_in_list = true;
-                    found_visible_rules = true;
-                }
-
-                /* Rule must be visible in the version it was inserted. */
-                rule_version = rule->versions.add_version;
-                assert(cls_match_visible_in_version(rule, rule_version));
-
-                /* We should always find the latest version of the rule,
-                 * unless all rules have been marked for removal.
-                 * Later versions must always be later in the list. */
-                found_rule = classifier_find_rule_exactly(cls, rule->cls_rule,
-                                                          rule_version);
-                if (found_rule && found_rule != rule->cls_rule) {
-                    struct cls_match *cls_match;
-                    cls_match = get_cls_match_protected(found_rule);
-
-                    assert(found_rule->priority == rule->priority);
-
-                    /* Found rule may not have a lower version. */
-                    assert(cls_match->versions.add_version >= rule_version);
-
-                    /* This rule must not be visible in the found rule's
-                     * version. */
-                    assert(!cls_match_visible_in_version(
-                               rule, cls_match->versions.add_version));
-                }
-
-                if (rule->priority == prev_priority) {
-                    /* Exact duplicate rule may not have a lower version. */
-                    assert(rule_version >= prev_version);
-
-                    /* Previous rule must not be visible in rule's version. */
-                    assert(!cls_match_visible_in_version(prev, rule_version));
-                }
-
-                prev_priority = rule->priority;
-                prev_version = rule_version;
-                found_rules++;
-            }
-        }
-
-        if (found_visible_rules) {
-            found_tables_with_visible_rules++;
-        }
-
-        assert(table->max_priority == max_priority);
-        assert(table->max_count == max_count);
-    }
-
-    assert(found_tables == cmap_count(&cls->subtables_map));
-    assert(found_tables == pvector_count(&cls->subtables));
-    assert(n_tables == -1 || n_tables == found_tables_with_visible_rules);
-    assert(n_rules == -1 || found_rules == n_rules + found_invisible);
-    assert(n_dups == -1 || found_dups == n_dups);
-    assert(found_invisible == n_invisible);
-
-    CLS_FOR_EACH (test_rule, cls_rule, cls) {
-        found_rules2++;
-    }
-    /* Iteration does not see removable rules. */
-    assert(found_rules
-           == found_rules2 + found_visible_but_removable + found_invisible);
-}
-
-static struct test_rule *
-make_rule(int wc_fields, int priority, int value_pat)
-{
-    const struct cls_field *f;
-    struct test_rule *rule;
-    struct match match;
-
-    match_init_catchall(&match);
-    for (f = &cls_fields[0]; f < &cls_fields[CLS_N_FIELDS]; f++) {
-        int f_idx = f - cls_fields;
-        int value_idx = (value_pat & (1u << f_idx)) != 0;
-        memcpy((char *) &match.flow + f->ofs,
-               values[f_idx][value_idx], f->len);
-
-        if (f_idx == CLS_F_IDX_NW_SRC) {
-            match.wc.masks.nw_src = OVS_BE32_MAX;
-        } else if (f_idx == CLS_F_IDX_NW_DST) {
-            match.wc.masks.nw_dst = OVS_BE32_MAX;
-        } else if (f_idx == CLS_F_IDX_TP_SRC) {
-            match.wc.masks.tp_src = OVS_BE16_MAX;
-        } else if (f_idx == CLS_F_IDX_TP_DST) {
-            match.wc.masks.tp_dst = OVS_BE16_MAX;
-        } else if (f_idx == CLS_F_IDX_DL_SRC) {
-            WC_MASK_FIELD(&match.wc, dl_src);
-        } else if (f_idx == CLS_F_IDX_DL_DST) {
-            WC_MASK_FIELD(&match.wc, dl_dst);
-        } else if (f_idx == CLS_F_IDX_VLAN_TCI) {
-            match.wc.masks.vlans[0].tci = OVS_BE16_MAX;
-        } else if (f_idx == CLS_F_IDX_TUN_ID) {
-            match.wc.masks.tunnel.tun_id = OVS_BE64_MAX;
-        } else if (f_idx == CLS_F_IDX_METADATA) {
-            match.wc.masks.metadata = OVS_BE64_MAX;
-        } else if (f_idx == CLS_F_IDX_NW_DSCP) {
-            match.wc.masks.nw_tos |= IP_DSCP_MASK;
-        } else if (f_idx == CLS_F_IDX_NW_PROTO) {
-            match.wc.masks.nw_proto = UINT8_MAX;
-        } else if (f_idx == CLS_F_IDX_DL_TYPE) {
-            match.wc.masks.dl_type = OVS_BE16_MAX;
-        } else if (f_idx == CLS_F_IDX_IN_PORT) {
-            match.wc.masks.in_port.ofp_port = u16_to_ofp(UINT16_MAX);
-        } else {
-            OVS_NOT_REACHED();
-        }
-    }
-
-    rule = xzalloc(sizeof *rule);
-    cls_rule_init(&rule->cls_rule, &match, wc_fields
-                  ? (priority == INT_MIN ? priority + 1 :
-                     priority == INT_MAX ? priority - 1 : priority)
-                  : 0);
-    return rule;
-}
-
-static struct test_rule *
-clone_rule(const struct test_rule *src)
-{
-    struct test_rule *dst;
-
-    dst = xmalloc(sizeof *dst);
-    dst->aux = src->aux;
-    cls_rule_clone(&dst->cls_rule, &src->cls_rule);
-    return dst;
-}
-
-static void
-free_rule(struct test_rule *rule)
-{
-    cls_rule_destroy(&rule->cls_rule);
-    free(rule);
-}
-
-static void
-shuffle(int *p, size_t n)
-{
-    for (; n > 1; n--, p++) {
-        int *q = &p[random_range(n)];
-        int tmp = *p;
-        *p = *q;
-        *q = tmp;
-    }
-}
-
-static void
-shuffle_u32s(uint32_t *p, size_t n)
-{
-    for (; n > 1; n--, p++) {
-        uint32_t *q = &p[random_range(n)];
-        uint32_t tmp = *p;
-        *p = *q;
-        *q = tmp;
-    }
-}
-
-/* Classifier tests. */
-
-static enum mf_field_id trie_fields[2] = {
-    MFF_IPV4_DST, MFF_IPV4_SRC
-};
-
-static void
-set_prefix_fields(struct classifier *cls)
-{
-    verify_tries(cls);
-    classifier_set_prefix_fields(cls, trie_fields, ARRAY_SIZE(trie_fields));
-    verify_tries(cls);
-}
-
-/* Tests an empty classifier. */
-static void
-test_empty(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    struct classifier cls;
-    struct tcls tcls;
-
-    classifier_init(&cls, flow_segment_u64s);
-    set_prefix_fields(&cls);
-    tcls_init(&tcls);
-    assert(classifier_is_empty(&cls));
-    assert(tcls_is_empty(&tcls));
-    compare_classifiers(&cls, 0, OVS_VERSION_MIN, &tcls);
-    classifier_destroy(&cls);
-    tcls_destroy(&tcls);
-}
-
-/* Destroys a null classifier. */
-static void
-test_destroy_null(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    classifier_destroy(NULL);
-}
-
-/* Tests classification with one rule at a time. */
-static void
-test_single_rule(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    unsigned int wc_fields;     /* Hilarious. */
-
-    for (wc_fields = 0; wc_fields < (1u << CLS_N_FIELDS); wc_fields++) {
-        struct classifier cls;
-        struct test_rule *rule, *tcls_rule;
-        struct tcls tcls;
-
-        rule = make_rule(wc_fields,
-                         hash_bytes(&wc_fields, sizeof wc_fields, 0), 0);
-        classifier_init(&cls, flow_segment_u64s);
-        set_prefix_fields(&cls);
-        tcls_init(&tcls);
-        tcls_rule = tcls_insert(&tcls, rule);
-
-        classifier_insert(&cls, &rule->cls_rule, OVS_VERSION_MIN, NULL, 0);
-        compare_classifiers(&cls, 0, OVS_VERSION_MIN, &tcls);
-        check_tables(&cls, 1, 1, 0, 0, OVS_VERSION_MIN);
-
-        classifier_remove_assert(&cls, &rule->cls_rule);
-        tcls_remove(&tcls, tcls_rule);
-        assert(classifier_is_empty(&cls));
-        assert(tcls_is_empty(&tcls));
-        compare_classifiers(&cls, 0, OVS_VERSION_MIN, &tcls);
-
-        ovsrcu_postpone(free_rule, rule);
-        classifier_destroy(&cls);
-        tcls_destroy(&tcls);
-    }
-}
-
-/* Tests replacing one rule by another. */
-static void
-test_rule_replacement(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    unsigned int wc_fields;
-
-    for (wc_fields = 0; wc_fields < (1u << CLS_N_FIELDS); wc_fields++) {
-        struct classifier cls;
-        struct test_rule *rule1;
-        struct test_rule *rule2;
-        struct tcls tcls;
-
-        rule1 = make_rule(wc_fields, OFP_DEFAULT_PRIORITY, UINT_MAX);
-        rule2 = make_rule(wc_fields, OFP_DEFAULT_PRIORITY, UINT_MAX);
-        rule2->aux += 5;
-        rule2->aux += 5;
-
-        classifier_init(&cls, flow_segment_u64s);
-        set_prefix_fields(&cls);
-        tcls_init(&tcls);
-        tcls_insert(&tcls, rule1);
-        classifier_insert(&cls, &rule1->cls_rule, OVS_VERSION_MIN, NULL, 0);
-        compare_classifiers(&cls, 0, OVS_VERSION_MIN, &tcls);
-        check_tables(&cls, 1, 1, 0, 0, OVS_VERSION_MIN);
-        tcls_destroy(&tcls);
-
-        tcls_init(&tcls);
-        tcls_insert(&tcls, rule2);
-
-        assert(test_rule_from_cls_rule(
-                   classifier_replace(&cls, &rule2->cls_rule, OVS_VERSION_MIN,
-                                      NULL, 0)) == rule1);
-        ovsrcu_postpone(free_rule, rule1);
-        compare_classifiers(&cls, 0, OVS_VERSION_MIN, &tcls);
-        check_tables(&cls, 1, 1, 0, 0, OVS_VERSION_MIN);
-        classifier_defer(&cls);
-        classifier_remove_assert(&cls, &rule2->cls_rule);
-
-        tcls_destroy(&tcls);
-        destroy_classifier(&cls);
-    }
-}
-
-static int
-factorial(int n_items)
-{
-    int n, i;
-
-    n = 1;
-    for (i = 2; i <= n_items; i++) {
-        n *= i;
-    }
-    return n;
-}
-
-static void
-swap(int *a, int *b)
-{
-    int tmp = *a;
-    *a = *b;
-    *b = tmp;
-}
-
-static void
-reverse(int *a, int n)
-{
-    int i;
-
-    for (i = 0; i < n / 2; i++) {
-        int j = n - (i + 1);
-        swap(&a[i], &a[j]);
-    }
-}
-
-static bool
-next_permutation(int *a, int n)
-{
-    int k;
-
-    for (k = n - 2; k >= 0; k--) {
-        if (a[k] < a[k + 1]) {
-            int l;
-
-            for (l = n - 1; ; l--) {
-                if (a[l] > a[k]) {
-                    swap(&a[k], &a[l]);
-                    reverse(a + (k + 1), n - (k + 1));
-                    return true;
-                }
-            }
-        }
-    }
-    return false;
-}
-
-/* Tests classification with rules that have the same matching criteria. */
-static void
-test_many_rules_in_one_list (struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    enum { N_RULES = 3 };
-    int n_pris;
-
-    for (n_pris = N_RULES; n_pris >= 1; n_pris--) {
-        int ops[N_RULES * 2];
-        int pris[N_RULES];
-        int n_permutations;
-        int i;
-
-        pris[0] = 0;
-        for (i = 1; i < N_RULES; i++) {
-            pris[i] = pris[i - 1] + (n_pris > i);
-        }
-
-        for (i = 0; i < N_RULES * 2; i++) {
-            ops[i] = i / 2;
-        }
-
-        n_permutations = 0;
-        do {
-            struct test_rule *rules[N_RULES];
-            struct test_rule *tcls_rules[N_RULES];
-            int pri_rules[N_RULES];
-            struct classifier cls;
-            struct tcls tcls;
-            ovs_version_t version = OVS_VERSION_MIN;
-            size_t n_invisible_rules = 0;
-
-            n_permutations++;
-
-            for (i = 0; i < N_RULES; i++) {
-                rules[i] = make_rule(456, pris[i], 0);
-                tcls_rules[i] = NULL;
-                pri_rules[i] = -1;
-            }
-
-            classifier_init(&cls, flow_segment_u64s);
-            set_prefix_fields(&cls);
-            tcls_init(&tcls);
-
-            for (i = 0; i < ARRAY_SIZE(ops); i++) {
-                struct test_rule *displaced_rule = NULL;
-                struct cls_rule *removable_rule = NULL;
-                int j = ops[i];
-                int m, n;
-
-                if (!tcls_rules[j]) {
-                    tcls_rules[j] = tcls_insert(&tcls, rules[j]);
-                    if (versioned) {
-                        /* Insert the new rule in the next version. */
-                        ++version;
-
-                        displaced_rule = test_rule_from_cls_rule(
-                            classifier_find_rule_exactly(&cls,
-                                                         &rules[j]->cls_rule,
-                                                         version));
-                        if (displaced_rule) {
-                            /* Mark the old rule for removal after the current
-                             * version. */
-                            cls_rule_make_invisible_in_version(
-                                &displaced_rule->cls_rule, version);
-                            n_invisible_rules++;
-                            removable_rule = &displaced_rule->cls_rule;
-                        }
-                        classifier_insert(&cls, &rules[j]->cls_rule, version,
-                                          NULL, 0);
-                    } else {
-                        displaced_rule = test_rule_from_cls_rule(
-                            classifier_replace(&cls, &rules[j]->cls_rule,
-                                               version, NULL, 0));
-                    }
-                    if (pri_rules[pris[j]] >= 0) {
-                        int k = pri_rules[pris[j]];
-                        assert(displaced_rule != NULL);
-                        assert(displaced_rule != rules[j]);
-                        assert(pris[j] == displaced_rule->cls_rule.priority);
-                        tcls_rules[k] = NULL;
-                    } else {
-                        assert(displaced_rule == NULL);
-                    }
-                    pri_rules[pris[j]] = j;
-                } else {
-                    if (versioned) {
-                        /* Mark the rule for removal after the current
-                         * version. */
-                        ++version;
-                        cls_rule_make_invisible_in_version(
-                            &rules[j]->cls_rule, version);
-                        n_invisible_rules++;
-                        removable_rule = &rules[j]->cls_rule;
-                    } else {
-                        classifier_remove_assert(&cls, &rules[j]->cls_rule);
-                    }
-                    tcls_remove(&tcls, tcls_rules[j]);
-                    tcls_rules[j] = NULL;
-                    pri_rules[pris[j]] = -1;
-                }
-                compare_classifiers(&cls, n_invisible_rules, version, &tcls);
-                n = 0;
-                for (m = 0; m < N_RULES; m++) {
-                    n += tcls_rules[m] != NULL;
-                }
-                check_tables(&cls, n > 0, n, n - 1, n_invisible_rules,
-                             version);
-
-                if (versioned && removable_rule) {
-                    struct cls_match *cls_match =
-                        get_cls_match_protected(removable_rule);
-
-                    /* Removable rule is no longer visible. */
-                    assert(cls_match);
-                    assert(!cls_match_visible_in_version(cls_match, version));
-                    classifier_remove_assert(&cls, removable_rule);
-                    n_invisible_rules--;
-                }
-            }
-
-            classifier_defer(&cls);
-            for (i = 0; i < N_RULES; i++) {
-                if (classifier_remove(&cls, &rules[i]->cls_rule)) {
-                    ovsrcu_postpone(free_rule, rules[i]);
-                }
-            }
-            classifier_destroy(&cls);
-            tcls_destroy(&tcls);
-        } while (next_permutation(ops, ARRAY_SIZE(ops)));
-        assert(n_permutations == (factorial(N_RULES * 2) >> N_RULES));
-    }
-}
-
-static int
-count_ones(unsigned long int x)
-{
-    int n = 0;
-
-    while (x) {
-        x = zero_rightmost_1bit(x);
-        n++;
-    }
-
-    return n;
-}
-
-static bool
-array_contains(int *array, int n, int value)
-{
-    int i;
-
-    for (i = 0; i < n; i++) {
-        if (array[i] == value) {
-            return true;
-        }
-    }
-
-    return false;
-}
-
-/* Tests classification with two rules at a time that fall into the same
- * table but different lists. */
-static void
-test_many_rules_in_one_table(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    int iteration;
-
-    for (iteration = 0; iteration < 50; iteration++) {
-        enum { N_RULES = 20 };
-        struct test_rule *rules[N_RULES];
-        struct test_rule *tcls_rules[N_RULES];
-        struct classifier cls;
-        struct tcls tcls;
-        ovs_version_t version = OVS_VERSION_MIN;
-        size_t n_invisible_rules = 0;
-        int value_pats[N_RULES];
-        int value_mask;
-        int wcf;
-        int i;
-
-        do {
-            wcf = random_uint32() & ((1u << CLS_N_FIELDS) - 1);
-            value_mask = ~wcf & ((1u << CLS_N_FIELDS) - 1);
-        } while ((1 << count_ones(value_mask)) < N_RULES);
-
-        classifier_init(&cls, flow_segment_u64s);
-        set_prefix_fields(&cls);
-        tcls_init(&tcls);
-
-        for (i = 0; i < N_RULES; i++) {
-            int priority = random_range(INT_MAX);
-
-            do {
-                value_pats[i] = random_uint32() & value_mask;
-            } while (array_contains(value_pats, i, value_pats[i]));
-
-            ++version;
-            rules[i] = make_rule(wcf, priority, value_pats[i]);
-            tcls_rules[i] = tcls_insert(&tcls, rules[i]);
-
-            classifier_insert(&cls, &rules[i]->cls_rule, version, NULL, 0);
-            compare_classifiers(&cls, n_invisible_rules, version, &tcls);
-
-            check_tables(&cls, 1, i + 1, 0, n_invisible_rules, version);
-        }
-
-        for (i = 0; i < N_RULES; i++) {
-            tcls_remove(&tcls, tcls_rules[i]);
-            if (versioned) {
-                /* Mark the rule for removal after the current version. */
-                ++version;
-                cls_rule_make_invisible_in_version(&rules[i]->cls_rule,
-                                                   version);
-                n_invisible_rules++;
-            } else {
-                classifier_remove_assert(&cls, &rules[i]->cls_rule);
-            }
-            compare_classifiers(&cls, n_invisible_rules, version, &tcls);
-            check_tables(&cls, i < N_RULES - 1, N_RULES - (i + 1), 0,
-                         n_invisible_rules, version);
-            if (!versioned) {
-                ovsrcu_postpone(free_rule, rules[i]);
-            }
-        }
-
-        if (versioned) {
-            for (i = 0; i < N_RULES; i++) {
-                classifier_remove_assert(&cls, &rules[i]->cls_rule);
-                n_invisible_rules--;
-
-                compare_classifiers(&cls, n_invisible_rules, version, &tcls);
-                check_tables(&cls, 0, 0, 0, n_invisible_rules, version);
-                ovsrcu_postpone(free_rule, rules[i]);
-            }
-        }
-
-        classifier_destroy(&cls);
-        tcls_destroy(&tcls);
-    }
-}
-
-/* Tests classification with many rules at a time that fall into random lists
- * in 'n' tables. */
-static void
-test_many_rules_in_n_tables(int n_tables)
-{
-    enum { MAX_RULES = 50 };
-    int wcfs[10];
-    int iteration;
-    int i;
-
-    assert(n_tables < 10);
-    for (i = 0; i < n_tables; i++) {
-        do {
-            wcfs[i] = random_uint32() & ((1u << CLS_N_FIELDS) - 1);
-        } while (array_contains(wcfs, i, wcfs[i]));
-    }
-
-    for (iteration = 0; iteration < 30; iteration++) {
-        int priorities[MAX_RULES];
-        struct classifier cls;
-        struct tcls tcls;
-        ovs_version_t version = OVS_VERSION_MIN;
-        size_t n_invisible_rules = 0;
-        struct ovs_list list = OVS_LIST_INITIALIZER(&list);
-
-        random_set_seed(iteration + 1);
-        for (i = 0; i < MAX_RULES; i++) {
-            priorities[i] = (i * 129) & INT_MAX;
-        }
-        shuffle(priorities, ARRAY_SIZE(priorities));
-
-        classifier_init(&cls, flow_segment_u64s);
-        set_prefix_fields(&cls);
-        tcls_init(&tcls);
-
-        for (i = 0; i < MAX_RULES; i++) {
-            struct test_rule *rule;
-            int priority = priorities[i];
-            int wcf = wcfs[random_range(n_tables)];
-            int value_pat = random_uint32() & ((1u << CLS_N_FIELDS) - 1);
-            rule = make_rule(wcf, priority, value_pat);
-            tcls_insert(&tcls, rule);
-            classifier_insert(&cls, &rule->cls_rule, version, NULL, 0);
-            compare_classifiers(&cls, n_invisible_rules, version, &tcls);
-            check_tables(&cls, -1, i + 1, -1, n_invisible_rules, version);
-        }
-
-        while (classifier_count(&cls) - n_invisible_rules > 0) {
-            struct test_rule *target;
-            struct test_rule *rule;
-            size_t n_removable_rules = 0;
-
-            target = clone_rule(tcls.rules[random_range(tcls.n_rules)]);
-
-            CLS_FOR_EACH_TARGET (rule, cls_rule, &cls, &target->cls_rule,
-                                 version) {
-                if (versioned) {
-                    /* Mark the rule for removal after the current version. */
-                    cls_rule_make_invisible_in_version(&rule->cls_rule,
-                                                       version + 1);
-                    n_removable_rules++;
-                    compare_classifiers(&cls, n_invisible_rules, version,
-                                        &tcls);
-                    check_tables(&cls, -1, -1, -1, n_invisible_rules, version);
-
-                    ovs_list_push_back(&list, &rule->list_node);
-                } else if (classifier_remove(&cls, &rule->cls_rule)) {
-                    ovsrcu_postpone(free_rule, rule);
-                }
-            }
-
-            ++version;
-            n_invisible_rules += n_removable_rules;
-
-            tcls_delete_matches(&tcls, &target->cls_rule);
-            free_rule(target);
-
-            compare_classifiers(&cls, n_invisible_rules, version, &tcls);
-            check_tables(&cls, -1, -1, -1, n_invisible_rules, version);
-        }
-        if (versioned) {
-            struct test_rule *rule;
-
-            /* Remove rules that are no longer visible. */
-            LIST_FOR_EACH_POP (rule, list_node, &list) {
-                classifier_remove_assert(&cls, &rule->cls_rule);
-                n_invisible_rules--;
-
-                compare_classifiers(&cls, n_invisible_rules, version,
-                                    &tcls);
-                check_tables(&cls, -1, -1, -1, n_invisible_rules, version);
-            }
-        }
-
-        destroy_classifier(&cls);
-        tcls_destroy(&tcls);
-    }
-}
-
-static void
-test_many_rules_in_two_tables(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    test_many_rules_in_n_tables(2);
-}
-
-static void
-test_many_rules_in_five_tables(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    test_many_rules_in_n_tables(5);
-}
-
-/* Classifier benchmarks. */
-
-static int n_rules;             /* Number of rules to insert. */
-static int n_priorities;        /* Number of priorities to use. */
-static int n_tables;            /* Number of subtables. */
-static int n_threads;           /* Number of threads to search and mutate. */
-static int n_lookups;           /* Number of lookups each thread performs. */
-
-static void benchmark(bool use_wc);
-
-static int
-elapsed(const struct timeval *start)
-{
-    struct timeval end;
-
-    xgettimeofday(&end);
-    return timeval_to_msec(&end) - timeval_to_msec(start);
-}
-
-static void
-run_benchmarks(struct ovs_cmdl_context *ctx)
-{
-    if (ctx->argc < 5
-        || (ctx->argc > 1 && !strcmp(ctx->argv[1], "--help"))) {
-        printf(
-            "usage: ovstest %s benchmark <n_rules> <n_priorities> <n_subtables> <n_threads> <n_lookups>\n"
-            "\n"
-            "where:\n"
-            "\n"
-            "<n_rules>      - The number of rules to install for lookups.  More rules\n"
-            "                 makes misses less likely.\n"
-            "<n_priorities> - How many different priorities to use.  Using only 1\n"
-            "                 priority will force lookups to continue through all\n"
-            "                 subtables.\n"
-            "<n_subtables>  - Number of subtables to use.  Normally a classifier has\n"
-            "                 rules with different kinds of masks, resulting in\n"
-            "                 multiple subtables (one per mask).  However, in some\n"
-            "                 special cases a table may consist of only one kind of\n"
-            "                 rules, so there will be only one subtable.\n"
-            "<n_threads>    - How many lookup threads to use.  Using one thread should\n"
-            "                 give less variance accross runs, but classifier\n"
-            "                 scaling can be tested with multiple threads.\n"
-            "<n_lookups>    - How many lookups each thread should perform.\n"
-            "\n", program_name);
-        return;
-    }
-
-    n_rules = strtol(ctx->argv[1], NULL, 10);
-    n_priorities = strtol(ctx->argv[2], NULL, 10);
-    n_tables = strtol(ctx->argv[3], NULL, 10);
-    n_threads = strtol(ctx->argv[4], NULL, 10);
-    n_lookups = strtol(ctx->argv[5], NULL, 10);
-
-    printf("\nBenchmarking with:\n"
-           "%d rules with %d priorities in %d tables, "
-           "%d threads doing %d lookups each\n",
-           n_rules, n_priorities, n_tables, n_threads, n_lookups);
-
-    puts("\nWithout wildcards: \n");
-    benchmark(false);
-    puts("\nWith wildcards: \n");
-    benchmark(true);
-}
-
-struct cls_aux {
-    const struct classifier *cls;
-    size_t n_lookup_flows;
-    struct flow *lookup_flows;
-    bool use_wc;
-    atomic_int hits;
-    atomic_int misses;
-};
-
-static void *
-lookup_classifier(void *aux_)
-{
-    struct cls_aux *aux = aux_;
-    ovs_version_t version = OVS_VERSION_MIN;
-    int hits = 0, old_hits;
-    int misses = 0, old_misses;
-    size_t i;
-
-    random_set_seed(1);
-
-    for (i = 0; i < n_lookups; i++) {
-        const struct cls_rule *cr;
-        struct flow_wildcards wc;
-        unsigned int x;
-
-        x = random_range(aux->n_lookup_flows);
-
-        if (aux->use_wc) {
-            flow_wildcards_init_catchall(&wc);
-            cr = classifier_lookup(aux->cls, version, &aux->lookup_flows[x],
-                                   &wc);
-        } else {
-            cr = classifier_lookup(aux->cls, version, &aux->lookup_flows[x],
-                                   NULL);
-        }
-        if (cr) {
-            hits++;
-        } else {
-            misses++;
-        }
-    }
-    atomic_add(&aux->hits, hits, &old_hits);
-    atomic_add(&aux->misses, misses, &old_misses);
-    return NULL;
-}
-
-/* Benchmark classification. */
-static void
-benchmark(bool use_wc)
-{
-    struct classifier cls;
-    ovs_version_t version = OVS_VERSION_MIN;
-    struct cls_aux aux;
-    int *wcfs = xmalloc(n_tables * sizeof *wcfs);
-    int *priorities = xmalloc(n_priorities * sizeof *priorities);
-    struct timeval start;
-    pthread_t *threads;
-    int i;
-
-    fatal_signal_init();
-
-    random_set_seed(1);
-
-    for (i = 0; i < n_tables; i++) {
-        do {
-            wcfs[i] = random_uint32() & ((1u << CLS_N_FIELDS) - 1);
-        } while (array_contains(wcfs, i, wcfs[i]));
-    }
-
-    for (i = 0; i < n_priorities; i++) {
-        priorities[i] = (i * 129) & INT_MAX;
-    }
-    shuffle(priorities, n_priorities);
-
-    classifier_init(&cls, flow_segment_u64s);
-    set_prefix_fields(&cls);
-
-    /* Create lookup flows. */
-    aux.use_wc = use_wc;
-    aux.cls = &cls;
-    aux.n_lookup_flows = 2 * N_FLOW_VALUES;
-    aux.lookup_flows = xzalloc(aux.n_lookup_flows * sizeof *aux.lookup_flows);
-    for (i = 0; i < aux.n_lookup_flows; i++) {
-        struct flow *flow = &aux.lookup_flows[i];
-        unsigned int x;
-
-        x = random_range(N_FLOW_VALUES);
-        flow->nw_src = nw_src_values[get_value(&x, N_NW_SRC_VALUES)];
-        flow->nw_dst = nw_dst_values[get_value(&x, N_NW_DST_VALUES)];
-        flow->tunnel.tun_id = tun_id_values[get_value(&x, N_TUN_ID_VALUES)];
-        flow->metadata = metadata_values[get_value(&x, N_METADATA_VALUES)];
-        flow->in_port.ofp_port = in_port_values[get_value(&x,
-                                                          N_IN_PORT_VALUES)];
-        flow->vlans[0].tci = vlan_tci_values[get_value(&x, N_VLAN_TCI_VALUES)];
-        flow->dl_type = dl_type_values[get_value(&x, N_DL_TYPE_VALUES)];
-        flow->tp_src = tp_src_values[get_value(&x, N_TP_SRC_VALUES)];
-        flow->tp_dst = tp_dst_values[get_value(&x, N_TP_DST_VALUES)];
-        flow->dl_src = dl_src_values[get_value(&x, N_DL_SRC_VALUES)];
-        flow->dl_dst = dl_dst_values[get_value(&x, N_DL_DST_VALUES)];
-        flow->nw_proto = nw_proto_values[get_value(&x, N_NW_PROTO_VALUES)];
-        flow->nw_tos = nw_dscp_values[get_value(&x, N_NW_DSCP_VALUES)];
-    }
-    atomic_init(&aux.hits, 0);
-    atomic_init(&aux.misses, 0);
-
-    /* Rule insertion. */
-    for (i = 0; i < n_rules; i++) {
-        struct test_rule *rule;
-        const struct cls_rule *old_cr;
-
-        int priority = priorities[random_range(n_priorities)];
-        int wcf = wcfs[random_range(n_tables)];
-        int value_pat = random_uint32() & ((1u << CLS_N_FIELDS) - 1);
-
-        rule = make_rule(wcf, priority, value_pat);
-        old_cr = classifier_find_rule_exactly(&cls, &rule->cls_rule, version);
-        if (!old_cr) {
-            classifier_insert(&cls, &rule->cls_rule, version, NULL, 0);
-        } else {
-            free_rule(rule);
-        }
-    }
-
-    /* Lookup. */
-    xgettimeofday(&start);
-    threads = xmalloc(n_threads * sizeof *threads);
-    for (i = 0; i < n_threads; i++) {
-        threads[i] = ovs_thread_create("lookups", lookup_classifier, &aux);
-    }
-    for (i = 0; i < n_threads; i++) {
-        xpthread_join(threads[i], NULL);
-    }
-
-    int elapsed_msec = elapsed(&start);
-
-    free(threads);
-
-    int hits, misses;
-    atomic_read(&aux.hits, &hits);
-    atomic_read(&aux.misses, &misses);
-    printf("hits: %d, misses: %d\n", hits, misses);
-
-    printf("classifier lookups:  %5d ms, %"PRId64" lookups/sec\n",
-           elapsed_msec,
-           (((uint64_t)hits + misses) * 1000) / elapsed_msec);
-
-    destroy_classifier(&cls);
-    free(aux.lookup_flows);
-    free(priorities);
-    free(wcfs);
-}
-
-/* Miniflow tests. */
-
-static uint32_t
-random_value(void)
-{
-    static const uint32_t values_[] =
-        { 0xffffffff, 0xaaaaaaaa, 0x55555555, 0x80000000,
-          0x00000001, 0xface0000, 0x00d00d1e, 0xdeadbeef };
-
-    return values_[random_range(ARRAY_SIZE(values_))];
-}
-
-static bool
-choose(unsigned int n, unsigned int *idxp)
-{
-    if (*idxp < n) {
-        return true;
-    } else {
-        *idxp -= n;
-        return false;
-    }
-}
-
-#define FLOW_U32S (FLOW_U64S * 2)
-
-static bool
-init_consecutive_values(int n_consecutive, struct flow *flow,
-                        unsigned int *idxp)
-{
-    uint32_t *flow_u32 = (uint32_t *) flow;
-
-    if (choose(FLOW_U32S - n_consecutive + 1, idxp)) {
-        int i;
-
-        for (i = 0; i < n_consecutive; i++) {
-            flow_u32[*idxp + i] = random_value();
-        }
-        return true;
-    } else {
-        return false;
-    }
-}
-
-static bool
-next_random_flow(struct flow *flow, unsigned int idx)
-{
-    uint32_t *flow_u32 = (uint32_t *) flow;
-
-    memset(flow, 0, sizeof *flow);
-
-    /* Empty flow. */
-    if (choose(1, &idx)) {
-        return true;
-    }
-
-    /* All flows with a small number of consecutive nonzero values. */
-    for (int i = 1; i <= 4; i++) {
-        if (init_consecutive_values(i, flow, &idx)) {
-            return true;
-        }
-    }
-
-    /* All flows with a large number of consecutive nonzero values. */
-    for (int i = FLOW_U32S - 4; i <= FLOW_U32S; i++) {
-        if (init_consecutive_values(i, flow, &idx)) {
-            return true;
-        }
-    }
-
-    /* All flows with exactly two nonconsecutive nonzero values. */
-    if (choose((FLOW_U32S - 1) * (FLOW_U32S - 2) / 2, &idx)) {
-        int ofs1;
-
-        for (ofs1 = 0; ofs1 < FLOW_U32S - 2; ofs1++) {
-            int ofs2;
-
-            for (ofs2 = ofs1 + 2; ofs2 < FLOW_U32S; ofs2++) {
-                if (choose(1, &idx)) {
-                    flow_u32[ofs1] = random_value();
-                    flow_u32[ofs2] = random_value();
-                    return true;
-                }
-            }
-        }
-        OVS_NOT_REACHED();
-    }
-
-    /* 16 randomly chosen flows with N >= 3 nonzero values. */
-    if (choose(16 * (FLOW_U32S - 4), &idx)) {
-        int n = idx / 16 + 3;
-
-        for (int i = 0; i < n; i++) {
-            flow_u32[i] = random_value();
-        }
-        shuffle_u32s(flow_u32, FLOW_U32S);
-
-        return true;
-    }
-
-    return false;
-}
-
-static void
-any_random_flow(struct flow *flow)
-{
-    static unsigned int max;
-    if (!max) {
-        while (next_random_flow(flow, max)) {
-            max++;
-        }
-    }
-
-    next_random_flow(flow, random_range(max));
-}
-
-static void
-toggle_masked_flow_bits(struct flow *flow, const struct flow_wildcards *mask)
-{
-    const uint32_t *mask_u32 = (const uint32_t *) &mask->masks;
-    uint32_t *flow_u32 = (uint32_t *) flow;
-    int i;
-
-    for (i = 0; i < FLOW_U32S; i++) {
-        if (mask_u32[i] != 0) {
-            uint32_t bit;
-
-            do {
-                bit = 1u << random_range(32);
-            } while (!(bit & mask_u32[i]));
-            flow_u32[i] ^= bit;
-        }
-    }
-}
-
-static void
-wildcard_extra_bits(struct flow_wildcards *mask)
-{
-    uint32_t *mask_u32 = (uint32_t *) &mask->masks;
-    int i;
-
-    for (i = 0; i < FLOW_U32S; i++) {
-        if (mask_u32[i] != 0) {
-            uint32_t bit;
-
-            do {
-                bit = 1u << random_range(32);
-            } while (!(bit & mask_u32[i]));
-            mask_u32[i] &= ~bit;
-        }
-    }
-}
-
-/* Returns a copy of 'src'.  The caller must eventually free the returned
- * miniflow with free(). */
-static struct miniflow *
-miniflow_clone__(const struct miniflow *src)
-{
-    struct miniflow *dst;
-    size_t data_size;
-
-    data_size = miniflow_alloc(&dst, 1, src);
-    miniflow_clone(dst, src, data_size / sizeof(uint64_t));
-    return dst;
-}
-
-/* Returns a hash value for 'flow', given 'basis'. */
-static inline uint32_t
-miniflow_hash__(const struct miniflow *flow, uint32_t basis)
-{
-    const uint64_t *p = miniflow_get_values(flow);
-    size_t n_values = miniflow_n_values(flow);
-    struct flowmap hash_map = FLOWMAP_EMPTY_INITIALIZER;
-    uint32_t hash = basis;
-    size_t idx;
-
-    FLOWMAP_FOR_EACH_INDEX(idx, flow->map) {
-        uint64_t value = *p++;
-
-        if (value) {
-            hash = hash_add64(hash, value);
-            flowmap_set(&hash_map, idx, 1);
-        }
-    }
-    map_t map;
-    FLOWMAP_FOR_EACH_MAP (map, hash_map) {
-        hash = hash_add64(hash, map);
-    }
-
-    return hash_finish(hash, n_values);
-}
-
-static void
-test_miniflow(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    struct flow flow;
-    unsigned int idx;
-
-    random_set_seed(0xb3faca38);
-    for (idx = 0; next_random_flow(&flow, idx); idx++) {
-        const uint64_t *flow_u64 = (const uint64_t *) &flow;
-        struct miniflow *miniflow, *miniflow2, *miniflow3;
-        struct flow flow2, flow3;
-        struct flow_wildcards mask;
-        struct minimask *minimask;
-        int i;
-
-        /* Convert flow to miniflow. */
-        miniflow = miniflow_create(&flow);
-
-        /* Check that the flow equals its miniflow. */
-        for (i = 0; i < FLOW_MAX_VLAN_HEADERS; i++) {
-            assert(miniflow_get_vid(miniflow, i) ==
-                   vlan_tci_to_vid(flow.vlans[i].tci));
-        }
-        for (i = 0; i < FLOW_U64S; i++) {
-            assert(miniflow_get(miniflow, i) == flow_u64[i]);
-        }
-
-        /* Check that the miniflow equals itself. */
-        assert(miniflow_equal(miniflow, miniflow));
-
-        /* Convert miniflow back to flow and verify that it's the same. */
-        miniflow_expand(miniflow, &flow2);
-        assert(flow_equal(&flow, &flow2));
-
-        /* Check that copying a miniflow works properly. */
-        miniflow2 = miniflow_clone__(miniflow);
-        assert(miniflow_equal(miniflow, miniflow2));
-        assert(miniflow_hash__(miniflow, 0) == miniflow_hash__(miniflow2, 0));
-        miniflow_expand(miniflow2, &flow3);
-        assert(flow_equal(&flow, &flow3));
-
-        /* Check that masked matches work as expected for identical flows and
-         * miniflows. */
-        do {
-            next_random_flow(&mask.masks, 1);
-        } while (flow_wildcards_is_catchall(&mask));
-        minimask = minimask_create(&mask);
-        assert(minimask_is_catchall(minimask)
-               == flow_wildcards_is_catchall(&mask));
-        assert(miniflow_equal_in_minimask(miniflow, miniflow2, minimask));
-        assert(miniflow_equal_flow_in_minimask(miniflow, &flow2, minimask));
-        assert(miniflow_hash_in_minimask(miniflow, minimask, 0x12345678) ==
-               flow_hash_in_minimask(&flow, minimask, 0x12345678));
-        assert(minimask_hash(minimask, 0) ==
-               miniflow_hash__(&minimask->masks, 0));
-
-        /* Check that masked matches work as expected for differing flows and
-         * miniflows. */
-        toggle_masked_flow_bits(&flow2, &mask);
-        assert(!miniflow_equal_flow_in_minimask(miniflow, &flow2, minimask));
-        miniflow3 = miniflow_create(&flow2);
-        assert(!miniflow_equal_in_minimask(miniflow, miniflow3, minimask));
-
-        /* Clean up. */
-        free(miniflow);
-        free(miniflow2);
-        free(miniflow3);
-        free(minimask);
-    }
-}
-
-static void
-test_minimask_has_extra(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    struct flow_wildcards catchall;
-    struct minimask *minicatchall;
-    struct flow flow;
-    unsigned int idx;
-
-    flow_wildcards_init_catchall(&catchall);
-    minicatchall = minimask_create(&catchall);
-    assert(minimask_is_catchall(minicatchall));
-
-    random_set_seed(0x2ec7905b);
-    for (idx = 0; next_random_flow(&flow, idx); idx++) {
-        struct flow_wildcards mask;
-        struct minimask *minimask;
-
-        mask.masks = flow;
-        minimask = minimask_create(&mask);
-        assert(!minimask_has_extra(minimask, minimask));
-        assert(minimask_has_extra(minicatchall, minimask)
-               == !minimask_is_catchall(minimask));
-        if (!minimask_is_catchall(minimask)) {
-            struct minimask *minimask2;
-
-            wildcard_extra_bits(&mask);
-            minimask2 = minimask_create(&mask);
-            assert(minimask_has_extra(minimask2, minimask));
-            assert(!minimask_has_extra(minimask, minimask2));
-            free(minimask2);
-        }
-
-        free(minimask);
-    }
-
-    free(minicatchall);
-}
-
-static void
-test_minimask_combine(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    struct flow_wildcards catchall;
-    struct minimask *minicatchall;
-    struct flow flow;
-    unsigned int idx;
-
-    flow_wildcards_init_catchall(&catchall);
-    minicatchall = minimask_create(&catchall);
-    assert(minimask_is_catchall(minicatchall));
-
-    random_set_seed(0x181bf0cd);
-    for (idx = 0; next_random_flow(&flow, idx); idx++) {
-        struct minimask *minimask, *minimask2;
-        struct flow_wildcards mask, mask2, combined, combined2;
-        struct {
-            struct minimask minicombined;
-            uint64_t storage[FLOW_U64S];
-        } m;
-        struct flow flow2;
-
-        mask.masks = flow;
-        minimask = minimask_create(&mask);
-
-        minimask_combine(&m.minicombined, minimask, minicatchall, m.storage);
-        assert(minimask_is_catchall(&m.minicombined));
-
-        any_random_flow(&flow2);
-        mask2.masks = flow2;
-        minimask2 = minimask_create(&mask2);
-
-        minimask_combine(&m.minicombined, minimask, minimask2, m.storage);
-        flow_wildcards_and(&combined, &mask, &mask2);
-        minimask_expand(&m.minicombined, &combined2);
-        assert(flow_wildcards_equal(&combined, &combined2));
-
-        free(minimask);
-        free(minimask2);
-    }
-
-    free(minicatchall);
-}
-
-
-static void help(struct ovs_cmdl_context *ctx);
-
-static const struct ovs_cmdl_command commands[] = {
-    /* Classifier tests. */
-    {"empty", NULL, 0, 0, test_empty, OVS_RO },
-    {"destroy-null", NULL, 0, 0, test_destroy_null, OVS_RO },
-    {"single-rule", NULL, 0, 0, test_single_rule, OVS_RO },
-    {"rule-replacement", NULL, 0, 0, test_rule_replacement, OVS_RO },
-    {"many-rules-in-one-list", NULL, 0, 1, test_many_rules_in_one_list, OVS_RO },
-    {"many-rules-in-one-table", NULL, 0, 1, test_many_rules_in_one_table, OVS_RO },
-    {"many-rules-in-two-tables", NULL, 0, 0, test_many_rules_in_two_tables, OVS_RO },
-    {"many-rules-in-five-tables", NULL, 0, 0, test_many_rules_in_five_tables, OVS_RO },
-    {"benchmark", NULL, 0, 5, run_benchmarks, OVS_RO },
-
-    /* Miniflow and minimask tests. */
-    {"miniflow", NULL, 0, 0, test_miniflow, OVS_RO },
-    {"minimask_has_extra", NULL, 0, 0, test_minimask_has_extra, OVS_RO },
-    {"minimask_combine", NULL, 0, 0, test_minimask_combine, OVS_RO },
-
-    {"--help", NULL, 0, 0, help, OVS_RO },
-    {NULL, NULL, 0, 0, NULL, OVS_RO },
-};
-
-static void
-help(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    const struct ovs_cmdl_command *p;
-    struct ds test_names = DS_EMPTY_INITIALIZER;
-    const int linesize = 80;
-
-    printf("usage: ovstest %s TEST [TESTARGS]\n"
-           "where TEST is one of the following:\n\n",
-           program_name);
-
-    for (p = commands; p->name != NULL; p++) {
-        if (*p->name != '-') { /* Skip internal commands */
-            if (test_names.length > 1
-                && test_names.length + strlen(p->name) + 1 >= linesize) {
-                test_names.length -= 1;
-                printf ("%s\n", ds_cstr(&test_names));
-                ds_clear(&test_names);
-            }
-            ds_put_format(&test_names, "%s, ", p->name);
-        }
-    }
-    if (test_names.length > 2) {
-        test_names.length -= 2;
-        printf("%s\n", ds_cstr(&test_names));
-    }
-    ds_destroy(&test_names);
-}
-
-static void
-test_classifier_main(int argc, char *argv[])
-{
-    struct ovs_cmdl_context ctx = {
-        .argc = argc - 1,
-        .argv = argv + 1,
-    };
-    set_program_name(argv[0]);
-
-    if (argc > 1 && !strcmp(argv[1], "--versioned")) {
-        versioned = true;
-        ctx.argc--;
-        ctx.argv++;
-    }
-
-    init_values();
-    ovs_cmdl_run_command(&ctx, commands);
-}
-
-OVSTEST_REGISTER("test-classifier", test_classifier_main);
diff --git a/tests/test-cmap.c b/tests/test-cmap.c
deleted file mode 100644
index 070547560..000000000
--- a/tests/test-cmap.c
+++ /dev/null
@@ -1,652 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 2010, 2013, 2014, 2016, 2017 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* A non-exhaustive test for some of the functions and macros declared in
- * cmap.h. */
-
-#include <config.h>
-#undef NDEBUG
-#include "cmap.h"
-#include <assert.h>
-#include <getopt.h>
-#include <string.h>
-#include "bitmap.h"
-#include "command-line.h"
-#include "fat-rwlock.h"
-#include "hash.h"
-#include "openvswitch/hmap.h"
-#include "ovstest.h"
-#include "ovs-thread.h"
-#include "random.h"
-#include "timeval.h"
-#include "util.h"
-
-/* Sample cmap element. */
-struct element {
-    int value;
-    struct cmap_node node;
-};
-
-typedef size_t hash_func(int value);
-
-static int
-compare_ints(const void *a_, const void *b_)
-{
-    const int *a = a_;
-    const int *b = b_;
-    return *a < *b ? -1 : *a > *b;
-}
-
-/* Verifies that 'cmap' contains exactly the 'n' values in 'values'. */
-static void
-check_cmap(struct cmap *cmap, const int values[], size_t n,
-           hash_func *hash)
-{
-    int *sort_values, *cmap_values, *cmap_values2;
-    const struct element *e;
-    size_t i, batch_size;
-
-    struct cmap_position pos = { 0, 0, 0 };
-    struct cmap_node *node;
-
-    /* Check that all the values are there in iteration. */
-    sort_values = xmalloc(sizeof *sort_values * n);
-    cmap_values = xmalloc(sizeof *sort_values * n);
-    cmap_values2 = xmalloc(sizeof *sort_values * n);
-
-    /* Here we test cursor iteration */
-    i = 0;
-    CMAP_FOR_EACH (e, node, cmap) {
-        assert(i < n);
-        cmap_values[i++] = e->value;
-    }
-    assert(i == n);
-
-    /* Here we test iteration with cmap_next_position() */
-    i = 0;
-    while ((node = cmap_next_position(cmap, &pos))) {
-        e = OBJECT_CONTAINING(node, e, node);
-
-        assert(i < n);
-        cmap_values2[i++] = e->value;
-    }
-    assert(i == n);
-
-    memcpy(sort_values, values, sizeof *sort_values * n);
-    qsort(sort_values, n, sizeof *sort_values, compare_ints);
-    qsort(cmap_values, n, sizeof *cmap_values, compare_ints);
-    qsort(cmap_values2, n, sizeof *cmap_values2, compare_ints);
-
-    for (i = 0; i < n; i++) {
-        assert(sort_values[i] == cmap_values[i]);
-        assert(sort_values[i] == cmap_values2[i]);
-    }
-
-    free(cmap_values2);
-    free(cmap_values);
-    free(sort_values);
-
-    /* Check that all the values are there in lookup. */
-    for (i = 0; i < n; i++) {
-        size_t count = 0;
-
-        CMAP_FOR_EACH_WITH_HASH (e, node, hash(values[i]), cmap) {
-            count += e->value == values[i];
-        }
-        assert(count == 1);
-    }
-
-    /* Check that all the values are there in batched lookup. */
-    batch_size = n % BITMAP_ULONG_BITS + 1;
-    for (i = 0; i < n; i += batch_size) {
-        unsigned long map;
-        uint32_t hashes[sizeof map * CHAR_BIT];
-        const struct cmap_node *nodes[sizeof map * CHAR_BIT];
-        size_t count = 0;
-        int k, j;
-
-        j = MIN(n - i, batch_size); /* Actual batch size. */
-        map = ~0UL >> (BITMAP_ULONG_BITS - j);
-
-        for (k = 0; k < j; k++) {
-            hashes[k] = hash(values[i + k]);
-        }
-        map = cmap_find_batch(cmap, map, hashes, nodes);
-
-        ULLONG_FOR_EACH_1(k, map) {
-            CMAP_NODE_FOR_EACH (e, node, nodes[k]) {
-                count += e->value == values[i + k];
-            }
-        }
-        assert(count == j); /* j elements in a batch. */
-    }
-
-    /* Check that cmap_first() returns NULL only when cmap_is_empty(). */
-    assert(!cmap_first(cmap) == cmap_is_empty(cmap));
-
-    /* Check counters. */
-    assert(cmap_is_empty(cmap) == !n);
-    assert(cmap_count(cmap) == n);
-}
-
-static void
-shuffle(int *p, size_t n)
-{
-    for (; n > 1; n--, p++) {
-        int *q = &p[random_range(n)];
-        int tmp = *p;
-        *p = *q;
-        *q = tmp;
-    }
-}
-
-/* Prints the values in 'cmap', plus 'name' as a title. */
-static void OVS_UNUSED
-print_cmap(const char *name, struct cmap *cmap)
-{
-    struct cmap_cursor cursor;
-    struct element *e;
-
-    printf("%s:", name);
-    CMAP_CURSOR_FOR_EACH (e, node, &cursor, cmap) {
-        printf(" %d", e->value);
-    }
-    printf("\n");
-}
-
-/* Prints the 'n' values in 'values', plus 'name' as a title. */
-static void OVS_UNUSED
-print_ints(const char *name, const int *values, size_t n)
-{
-    size_t i;
-
-    printf("%s:", name);
-    for (i = 0; i < n; i++) {
-        printf(" %d", values[i]);
-    }
-    printf("\n");
-}
-
-static size_t
-identity_hash(int value)
-{
-    return value;
-}
-
-static size_t
-good_hash(int value)
-{
-    return hash_int(value, 0x1234abcd);
-}
-
-static size_t
-constant_hash(int value OVS_UNUSED)
-{
-    return 123;
-}
-
-/* Tests basic cmap insertion and deletion. */
-static void
-test_cmap_insert_replace_delete(hash_func *hash)
-{
-    enum { N_ELEMS = 1000 };
-
-    struct element elements[N_ELEMS];
-    struct element copies[N_ELEMS];
-    int values[N_ELEMS];
-    struct cmap cmap = CMAP_INITIALIZER;
-    size_t i;
-
-    for (i = 0; i < N_ELEMS; i++) {
-        elements[i].value = i;
-        cmap_insert(&cmap, &elements[i].node, hash(i));
-        values[i] = i;
-        check_cmap(&cmap, values, i + 1, hash);
-    }
-    shuffle(values, N_ELEMS);
-    for (i = 0; i < N_ELEMS; i++) {
-        copies[values[i]].value = values[i];
-        cmap_replace(&cmap, &elements[values[i]].node,
-                     &copies[values[i]].node, hash(values[i]));
-        check_cmap(&cmap, values, N_ELEMS, hash);
-    }
-    shuffle(values, N_ELEMS);
-    for (i = 0; i < N_ELEMS; i++) {
-        cmap_remove(&cmap, &copies[values[i]].node, hash(values[i]));
-        check_cmap(&cmap, values + (i + 1), N_ELEMS - (i + 1), hash);
-    }
-    cmap_destroy(&cmap);
-}
-
-static void
-run_test(void (*function)(hash_func *))
-{
-    hash_func *hash_funcs[] = { identity_hash, good_hash, constant_hash };
-    size_t i;
-
-    for (i = 0; i < ARRAY_SIZE(hash_funcs); i++) {
-        function(hash_funcs[i]);
-        printf(".");
-        fflush(stdout);
-    }
-}
-
-static void
-run_tests(struct ovs_cmdl_context *ctx)
-{
-    int n;
-    int i;
-
-    n = ctx->argc >= 2 ? atoi(ctx->argv[1]) : 100;
-    for (i = 0; i < n; i++) {
-        run_test(test_cmap_insert_replace_delete);
-    }
-    printf("\n");
-}
-
-static int n_elems;             /* Number of elements to insert. */
-static int n_threads;           /* Number of threads to search and mutate. */
-static uint32_t mutation_frac;  /* % mutations, as fraction of UINT32_MAX. */
-static int n_batch;             /* Number of elements in each batch. */
-
-#define N_BATCH_MAX BITMAP_ULONG_BITS
-
-static void benchmark_cmap(void);
-static void benchmark_cmap_batched(void);
-static void benchmark_hmap(void);
-
-static int
-elapsed(const struct timeval *start)
-{
-    struct timeval end;
-
-    xgettimeofday(&end);
-    return timeval_to_msec(&end) - timeval_to_msec(start);
-}
-
-static void
-run_benchmarks(struct ovs_cmdl_context *ctx)
-{
-    n_elems = strtol(ctx->argv[1], NULL, 10);
-    n_threads = strtol(ctx->argv[2], NULL, 10);
-    mutation_frac = strtod(ctx->argv[3], NULL) / 100.0 * UINT32_MAX;
-    n_batch = ctx->argc > 4 ? strtol(ctx->argv[4], NULL, 10) : 1;
-
-    if (n_batch > N_BATCH_MAX) {
-        n_batch = N_BATCH_MAX;
-    }
-    printf("Benchmarking with n=%d, %d threads, %.2f%% mutations, batch size %d:\n",
-           n_elems, n_threads, (double) mutation_frac / UINT32_MAX * 100.,
-           n_batch);
-
-    if (n_batch > 0) {
-        benchmark_cmap_batched();
-    }
-    putchar('\n');
-    benchmark_cmap();
-    putchar('\n');
-    benchmark_hmap();
-}
-
-/* cmap benchmark. */
-
-static struct element *
-find(const struct cmap *cmap, int value)
-{
-    struct element *e;
-
-    CMAP_FOR_EACH_WITH_HASH (e, node, hash_int(value, 0), cmap) {
-        if (e->value == value) {
-            return e;
-        }
-    }
-    return NULL;
-}
-
-struct cmap_aux {
-    struct ovs_mutex mutex;
-    struct cmap *cmap;
-};
-
-static void *
-search_cmap(void *aux_)
-{
-    struct cmap_aux *aux = aux_;
-    size_t i;
-
-    if (mutation_frac) {
-        for (i = 0; i < n_elems; i++) {
-            struct element *e;
-
-            if (random_uint32() < mutation_frac) {
-                ovs_mutex_lock(&aux->mutex);
-                e = find(aux->cmap, i);
-                if (e) {
-                    cmap_remove(aux->cmap, &e->node, hash_int(e->value, 0));
-                }
-                ovs_mutex_unlock(&aux->mutex);
-            } else {
-                ignore(find(aux->cmap, i));
-            }
-        }
-    } else {
-        for (i = 0; i < n_elems; i++) {
-            ignore(find(aux->cmap, i));
-        }
-    }
-    return NULL;
-}
-
-static void
-benchmark_cmap(void)
-{
-    struct element *elements;
-    struct cmap cmap;
-    struct element *e;
-    struct timeval start;
-    pthread_t *threads;
-    struct cmap_aux aux;
-    size_t i;
-
-    elements = xmalloc(n_elems * sizeof *elements);
-
-    /* Insertions. */
-    xgettimeofday(&start);
-    cmap_init(&cmap);
-    for (i = 0; i < n_elems; i++) {
-        elements[i].value = i;
-        cmap_insert(&cmap, &elements[i].node, hash_int(i, 0));
-    }
-    printf("cmap insert:  %5d ms\n", elapsed(&start));
-
-    /* Iteration. */
-    xgettimeofday(&start);
-    CMAP_FOR_EACH (e, node, &cmap) {
-        ignore(e);
-    }
-    printf("cmap iterate: %5d ms\n", elapsed(&start));
-
-    /* Search and mutation. */
-    xgettimeofday(&start);
-    aux.cmap = &cmap;
-    ovs_mutex_init(&aux.mutex);
-    threads = xmalloc(n_threads * sizeof *threads);
-    for (i = 0; i < n_threads; i++) {
-        threads[i] = ovs_thread_create("search", search_cmap, &aux);
-    }
-    for (i = 0; i < n_threads; i++) {
-        xpthread_join(threads[i], NULL);
-    }
-    free(threads);
-    printf("cmap search:  %5d ms\n", elapsed(&start));
-
-    /* Destruction. */
-    xgettimeofday(&start);
-    CMAP_FOR_EACH (e, node, &cmap) {
-        cmap_remove(&cmap, &e->node, hash_int(e->value, 0));
-    }
-    cmap_destroy(&cmap);
-    printf("cmap destroy: %5d ms\n", elapsed(&start));
-
-    free(elements);
-}
-
-static size_t
-find_batch(const struct cmap *cmap, const int value)
-{
-    size_t i, ret;
-    const size_t end = MIN(n_batch, n_elems - value);
-    uint32_t hashes[N_BATCH_MAX];
-    const struct cmap_node *nodes[N_BATCH_MAX];
-
-    if (mutation_frac) {
-        for (i = 0; i < end; i++) {
-            if (random_uint32() < mutation_frac) {
-                break;
-            }
-            hashes[i] = hash_int(value + i, 0);
-        }
-    } else {
-        for (i = 0; i < end; i++) {
-            hashes[i] = hash_int(value + i, 0);
-        }
-    }
-
-    ret = i;
-
-    unsigned long map = i ? ~0UL >> (BITMAP_ULONG_BITS - i) : 0;
-    map = cmap_find_batch(cmap, map, hashes, nodes);
-
-    ULLONG_FOR_EACH_1(i, map) {
-        struct element *e;
-
-        CMAP_NODE_FOR_EACH (e, node, nodes[i]) {
-            if (OVS_LIKELY(e->value == value + i)) {
-                ignore(e); /* Found result. */
-                break;
-            }
-        }
-    }
-    return ret;
-}
-
-static void *
-search_cmap_batched(void *aux_)
-{
-    struct cmap_aux *aux = aux_;
-    size_t i = 0, j;
-
-    for (;;) {
-        struct element *e;
-
-        j = find_batch(aux->cmap, i);
-        i += j;
-        if (i >= n_elems) {
-            break;
-        }
-        if (j < n_batch) {
-            ovs_mutex_lock(&aux->mutex);
-            e = find(aux->cmap, i);
-            if (e) {
-                cmap_remove(aux->cmap, &e->node, hash_int(e->value, 0));
-            }
-            ovs_mutex_unlock(&aux->mutex);
-        }
-    }
-
-    return NULL;
-}
-
-static void
-benchmark_cmap_batched(void)
-{
-    struct element *elements;
-    struct cmap cmap;
-    struct element *e;
-    struct timeval start;
-    pthread_t *threads;
-    struct cmap_aux aux;
-    size_t i;
-
-    elements = xmalloc(n_elems * sizeof *elements);
-
-    /* Insertions. */
-    xgettimeofday(&start);
-    cmap_init(&cmap);
-    for (i = 0; i < n_elems; i++) {
-        elements[i].value = i;
-        cmap_insert(&cmap, &elements[i].node, hash_int(i, 0));
-    }
-    printf("cmap insert:  %5d ms\n", elapsed(&start));
-
-    /* Iteration. */
-    xgettimeofday(&start);
-    CMAP_FOR_EACH (e, node, &cmap) {
-        ignore(e);
-    }
-    printf("cmap iterate: %5d ms\n", elapsed(&start));
-
-    /* Search and mutation. */
-    xgettimeofday(&start);
-    aux.cmap = &cmap;
-    ovs_mutex_init(&aux.mutex);
-    threads = xmalloc(n_threads * sizeof *threads);
-    for (i = 0; i < n_threads; i++) {
-        threads[i] = ovs_thread_create("search", search_cmap_batched, &aux);
-    }
-    for (i = 0; i < n_threads; i++) {
-        xpthread_join(threads[i], NULL);
-    }
-    free(threads);
-    printf("batch search: %5d ms\n", elapsed(&start));
-
-    /* Destruction. */
-    xgettimeofday(&start);
-    CMAP_FOR_EACH (e, node, &cmap) {
-        cmap_remove(&cmap, &e->node, hash_int(e->value, 0));
-    }
-    cmap_destroy(&cmap);
-    printf("cmap destroy: %5d ms\n", elapsed(&start));
-
-    free(elements);
-}
-
-/* hmap benchmark. */
-struct helement {
-    int value;
-    struct hmap_node node;
-};
-
-static struct helement *
-hfind(const struct hmap *hmap, int value)
-{
-    struct helement *e;
-
-    HMAP_FOR_EACH_WITH_HASH (e, node, hash_int(value, 0), hmap) {
-        if (e->value == value) {
-            return e;
-        }
-    }
-    return NULL;
-}
-
-struct hmap_aux {
-    struct hmap *hmap;
-    struct fat_rwlock fatlock;
-};
-
-static void *
-search_hmap(void *aux_)
-{
-    struct hmap_aux *aux = aux_;
-    size_t i;
-
-    if (mutation_frac) {
-        for (i = 0; i < n_elems; i++) {
-            if (random_uint32() < mutation_frac) {
-                struct helement *e;
-
-                fat_rwlock_wrlock(&aux->fatlock);
-                e = hfind(aux->hmap, i);
-                if (e) {
-                    hmap_remove(aux->hmap, &e->node);
-                }
-                fat_rwlock_unlock(&aux->fatlock);
-            } else {
-                fat_rwlock_rdlock(&aux->fatlock);
-                ignore(hfind(aux->hmap, i));
-                fat_rwlock_unlock(&aux->fatlock);
-            }
-        }
-    } else {
-        for (i = 0; i < n_elems; i++) {
-            ignore(hfind(aux->hmap, i));
-        }
-    }
-    return NULL;
-}
-
-static void
-benchmark_hmap(void)
-{
-    struct helement *elements;
-    struct hmap hmap;
-    struct helement *e, *next;
-    struct timeval start;
-    pthread_t *threads;
-    struct hmap_aux aux;
-    size_t i;
-
-    elements = xmalloc(n_elems * sizeof *elements);
-
-    xgettimeofday(&start);
-    hmap_init(&hmap);
-    for (i = 0; i < n_elems; i++) {
-        elements[i].value = i;
-        hmap_insert(&hmap, &elements[i].node, hash_int(i, 0));
-    }
-
-    printf("hmap insert:  %5d ms\n", elapsed(&start));
-
-    xgettimeofday(&start);
-    HMAP_FOR_EACH (e, node, &hmap) {
-        ignore(e);
-    }
-    printf("hmap iterate: %5d ms\n", elapsed(&start));
-
-    xgettimeofday(&start);
-    aux.hmap = &hmap;
-    fat_rwlock_init(&aux.fatlock);
-    threads = xmalloc(n_threads * sizeof *threads);
-    for (i = 0; i < n_threads; i++) {
-        threads[i] = ovs_thread_create("search", search_hmap, &aux);
-    }
-    for (i = 0; i < n_threads; i++) {
-        xpthread_join(threads[i], NULL);
-    }
-    free(threads);
-    printf("hmap search:  %5d ms\n", elapsed(&start));
-
-    /* Destruction. */
-    xgettimeofday(&start);
-    HMAP_FOR_EACH_SAFE (e, next, node, &hmap) {
-        hmap_remove(&hmap, &e->node);
-    }
-    hmap_destroy(&hmap);
-    printf("hmap destroy: %5d ms\n", elapsed(&start));
-
-    free(elements);
-}
-
-static const struct ovs_cmdl_command commands[] = {
-    {"check", NULL, 0, 1, run_tests, OVS_RO},
-    {"benchmark", NULL, 3, 4, run_benchmarks, OVS_RO},
-    {NULL, NULL, 0, 0, NULL, OVS_RO},
-};
-
-static void
-test_cmap_main(int argc, char *argv[])
-{
-    struct ovs_cmdl_context ctx = {
-        .argc = argc - optind,
-        .argv = argv + optind,
-    };
-
-    set_program_name(argv[0]);
-    ovs_cmdl_run_command(&ctx, commands);
-}
-
-OVSTEST_REGISTER("test-cmap", test_cmap_main);
diff --git a/tests/test-conntrack.c b/tests/test-conntrack.c
deleted file mode 100644
index 07a4857cf..000000000
--- a/tests/test-conntrack.c
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright (c) 2015, 2017 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#include "conntrack.h"
-
-#include "dp-packet.h"
-#include "fatal-signal.h"
-#include "flow.h"
-#include "netdev.h"
-#include "ovs-thread.h"
-#include "ovstest.h"
-#include "pcap-file.h"
-#include "timeval.h"
-
-static const char payload[] = "50540000000a50540000000908004500001c0000000000"
-                              "11a4cd0a0101010a0101020001000200080000";
-
-static struct dp_packet_batch *
-prepare_packets(size_t n, bool change, unsigned tid, ovs_be16 *dl_type)
-{
-    struct dp_packet_batch *pkt_batch = xzalloc(sizeof *pkt_batch);
-    struct flow flow;
-    size_t i;
-
-    ovs_assert(n <= ARRAY_SIZE(pkt_batch->packets));
-
-    dp_packet_batch_init(pkt_batch);
-    for (i = 0; i < n; i++) {
-        struct udp_header *udp;
-        struct dp_packet *pkt = dp_packet_new(sizeof payload/2);
-
-        dp_packet_put_hex(pkt, payload, NULL);
-        flow_extract(pkt, &flow);
-
-        udp = dp_packet_l4(pkt);
-        udp->udp_src = htons(ntohs(udp->udp_src) + tid);
-
-        if (change) {
-            udp->udp_dst = htons(ntohs(udp->udp_dst) + i);
-        }
-
-        dp_packet_batch_add(pkt_batch, pkt);
-        *dl_type = flow.dl_type;
-    }
-
-    return pkt_batch;
-}
-
-static void
-destroy_packets(struct dp_packet_batch *pkt_batch)
-{
-    dp_packet_delete_batch(pkt_batch, true);
-    free(pkt_batch);
-}
-
-struct thread_aux {
-    pthread_t thread;
-    unsigned tid;
-};
-
-static struct conntrack ct;
-static unsigned long n_threads, n_pkts, batch_size;
-static bool change_conn = false;
-static struct ovs_barrier barrier;
-
-static void *
-ct_thread_main(void *aux_)
-{
-    struct thread_aux *aux = aux_;
-    struct dp_packet_batch *pkt_batch;
-    ovs_be16 dl_type;
-    size_t i;
-    long long now = time_msec();
-
-    pkt_batch = prepare_packets(batch_size, change_conn, aux->tid, &dl_type);
-    ovs_barrier_block(&barrier);
-    for (i = 0; i < n_pkts; i += batch_size) {
-        conntrack_execute(&ct, pkt_batch, dl_type, false, true, 0, NULL, NULL,
-                          0, 0, NULL, NULL, now);
-    }
-    ovs_barrier_block(&barrier);
-    destroy_packets(pkt_batch);
-
-    return NULL;
-}
-
-static void
-test_benchmark(struct ovs_cmdl_context *ctx)
-{
-    struct thread_aux *threads;
-    long long start;
-    unsigned i;
-
-    fatal_signal_init();
-
-    /* Parse arguments */
-    n_threads = strtoul(ctx->argv[1], NULL, 0);
-    if (!n_threads) {
-        ovs_fatal(0, "n_threads must be at least one");
-    }
-    n_pkts = strtoul(ctx->argv[2], NULL, 0);
-    batch_size = strtoul(ctx->argv[3], NULL, 0);
-    if (batch_size == 0 || batch_size > NETDEV_MAX_BURST) {
-        ovs_fatal(0, "batch_size must be between 1 and NETDEV_MAX_BURST(%u)",
-                  NETDEV_MAX_BURST);
-    }
-    if (ctx->argc > 4) {
-        change_conn = strtoul(ctx->argv[4], NULL, 0);
-    }
-
-    threads = xcalloc(n_threads, sizeof *threads);
-    ovs_barrier_init(&barrier, n_threads + 1);
-    conntrack_init(&ct);
-
-    /* Create threads */
-    for (i = 0; i < n_threads; i++) {
-        threads[i].tid = i;
-        threads[i].thread = ovs_thread_create("ct_thread", ct_thread_main,
-                                              &threads[i]);
-    }
-    /* Starts the work inside the threads */
-    ovs_barrier_block(&barrier);
-    start = time_msec();
-
-    /* Wait for the threads to finish the work */
-    ovs_barrier_block(&barrier);
-    printf("conntrack:  %5lld ms\n", time_msec() - start);
-
-    for (i = 0; i < n_threads; i++) {
-        xpthread_join(threads[i].thread, NULL);
-    }
-
-    conntrack_destroy(&ct);
-    ovs_barrier_destroy(&barrier);
-    free(threads);
-}
-
-static void
-pcap_batch_execute_conntrack(struct conntrack *ct_,
-                             struct dp_packet_batch *pkt_batch)
-{
-    struct dp_packet_batch new_batch;
-    ovs_be16 dl_type = htons(0);
-    long long now = time_msec();
-
-    dp_packet_batch_init(&new_batch);
-
-    /* pkt_batch contains packets with different 'dl_type'. We have to
-     * call conntrack_execute() on packets with the same 'dl_type'. */
-    struct dp_packet *packet;
-    DP_PACKET_BATCH_FOR_EACH (i, packet, pkt_batch) {
-        struct flow flow;
-
-        /* This also initializes the l3 and l4 pointers. */
-        flow_extract(packet, &flow);
-
-        if (dp_packet_batch_is_empty(&new_batch)) {
-            dl_type = flow.dl_type;
-        }
-
-        if (flow.dl_type != dl_type) {
-            conntrack_execute(ct_, &new_batch, dl_type, false, true, 0,
-                              NULL, NULL, 0, 0, NULL, NULL, now);
-            dp_packet_batch_init(&new_batch);
-        }
-        dp_packet_batch_add(&new_batch, packet);
-    }
-
-    if (!dp_packet_batch_is_empty(&new_batch)) {
-        conntrack_execute(ct_, &new_batch, dl_type, false, true, 0, NULL, NULL,
-                          0, 0, NULL, NULL, now);
-    }
-
-}
-
-static void
-test_pcap(struct ovs_cmdl_context *ctx)
-{
-    size_t total_count, batch_size_;
-    struct pcap_file *pcap;
-    int err = 0;
-
-    pcap = ovs_pcap_open(ctx->argv[1], "rb");
-    if (!pcap) {
-        return;
-    }
-
-    batch_size_ = 1;
-    if (ctx->argc > 2) {
-        batch_size_ = strtoul(ctx->argv[2], NULL, 0);
-        if (batch_size_ == 0 || batch_size_ > NETDEV_MAX_BURST) {
-            ovs_fatal(0,
-                      "batch_size must be between 1 and NETDEV_MAX_BURST(%u)",
-                      NETDEV_MAX_BURST);
-        }
-    }
-
-    fatal_signal_init();
-
-    conntrack_init(&ct);
-    total_count = 0;
-    for (;;) {
-        struct dp_packet *packet;
-        struct dp_packet_batch pkt_batch_;
-        struct dp_packet_batch *batch = &pkt_batch_;
-
-        dp_packet_batch_init(batch);
-        for (int i = 0; i < batch_size_; i++) {
-            err = ovs_pcap_read(pcap, &packet, NULL);
-            if (err) {
-                break;
-            }
-            dp_packet_batch_add(batch, packet);
-        }
-        if (dp_packet_batch_is_empty(batch)) {
-            break;
-        }
-        pcap_batch_execute_conntrack(&ct, batch);
-
-        DP_PACKET_BATCH_FOR_EACH (i, packet, batch) {
-            struct ds ds = DS_EMPTY_INITIALIZER;
-
-            total_count++;
-
-            format_flags(&ds, ct_state_to_string, packet->md.ct_state, '|');
-            printf("%"PRIuSIZE": %s\n", total_count, ds_cstr(&ds));
-
-            ds_destroy(&ds);
-        }
-
-        dp_packet_delete_batch(batch, true);
-    }
-    conntrack_destroy(&ct);
-    ovs_pcap_close(pcap);
-}
-
-static const struct ovs_cmdl_command commands[] = {
-    /* Connection tracker tests. */
-    /* Starts 'n_threads' threads. Each thread will send 'n_pkts' packets to
-     * the connection tracker, 'batch_size' per call. If 'change_connection'
-     * is '1', each packet in a batch will have a different source and
-     * destination port */
-    {"benchmark", "n_threads n_pkts batch_size [change_connection]", 3, 4,
-     test_benchmark, OVS_RO},
-    /* Reads packets from 'file' and sends them to the connection tracker,
-     * 'batch_size' (1 by default) per call, with the commit flag set.
-     * Prints the ct_state of each packet. */
-    {"pcap", "file [batch_size]", 1, 2, test_pcap, OVS_RO},
-
-    {NULL, NULL, 0, 0, NULL, OVS_RO},
-};
-
-static void
-test_conntrack_main(int argc, char *argv[])
-{
-    struct ovs_cmdl_context ctx = {
-        .argc = argc - 1,
-        .argv = argv + 1,
-    };
-    set_program_name(argv[0]);
-    ovs_cmdl_run_command(&ctx, commands);
-}
-
-OVSTEST_REGISTER("test-conntrack", test_conntrack_main);
diff --git a/tests/test-csum.c b/tests/test-csum.c
deleted file mode 100644
index b94bd6481..000000000
--- a/tests/test-csum.c
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 2011, 2014 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "csum.h"
-#include <assert.h>
-#include <inttypes.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "crc32c.h"
-#include "ovstest.h"
-#include "packets.h"
-#include "random.h"
-#include "unaligned.h"
-#include "util.h"
-
-struct test_case {
-    char *data;
-    size_t size;                /* Test requires a multiple of 4. */
-    uint16_t csum;
-};
-
-#define TEST_CASE(DATA, CSUM) { DATA, (sizeof DATA) - 1, CSUM }
-
-static const struct test_case test_cases[] = {
-    /* RFC 1071 section 3. */
-    TEST_CASE("\x00\x01\xf2\x03"
-              "\xf4\xf5\xf6\xf7",
-              0xffff - 0xddf2 /* ~0xddf2 */),
-
-    /* http://www.sbprojects.com/projects/tcpip/theory/theory14.htm */
-    TEST_CASE("\x45\x00\x00\x28"
-              "\x1F\xFD\x40\x00"
-              "\x80\x06\x00\x00"
-              "\xC0\xA8\x3B\x0A"
-              "\xC0\xA8\x3B\x32",
-              0xe345),
-
-    /* http://mathforum.org/library/drmath/view/54379.html */
-    TEST_CASE("\x86\x5e\xac\x60"
-              "\x71\x2a\x81\xb5",
-              0xda60),
-};
-
-static void
-mark(char c)
-{
-    putchar(c);
-    fflush(stdout);
-}
-
-#if 0
-/* This code is useful for generating new test cases for RFC 1624 section 4. */
-static void
-generate_rfc1624_test_case(void)
-{
-    int i;
-
-    for (i = 0; i < 10000000; i++) {
-        uint32_t data[8];
-        int j;
-
-        for (j = 0; j < 8; j++) {
-            data[j] = random_uint32();
-        }
-        data[7] &= 0x0000ffff;
-        data[7] |= 0x55550000;
-        if (ntohs(~csum(data, sizeof data - 2)) == 0xcd7a) {
-            ovs_hex_dump(stdout, data, sizeof data, 0, false);
-            exit(0);
-        }
-    }
-}
-#endif
-
-
-
-/* Make sure we get the calculation in RFC 1624 section 4 correct. */
-static void
-test_rfc1624(void)
-{
-    /* "...an IP packet header in which a 16-bit field m = 0x5555..." */
-    uint8_t data[32] = {
-        0xfe, 0x8f, 0xc1, 0x14, 0x4b, 0x6f, 0x70, 0x2a,
-        0x80, 0x29, 0x78, 0xc0, 0x58, 0x81, 0x77, 0xaa,
-        0x66, 0x64, 0xfc, 0x96, 0x63, 0x97, 0x64, 0xee,
-        0x12, 0x53, 0x1d, 0xa9, 0x2d, 0xa9, 0x55, 0x55
-    };
-
-    /* "...the one's complement sum of all other header octets is 0xCD7A." */
-    assert(ntohs(csum(data, sizeof data - 2)) == 0xffff - 0xcd7a);
-
-    /* "...the header checksum would be:
-
-          HC = ~(0xCD7A + 0x5555)
-             = ~0x22D0
-             =  0xDD2F"
-    */
-    assert(ntohs(csum(data, sizeof data)) == 0xdd2f);
-
-    /* "a 16-bit field m = 0x5555 changes to m' = 0x3285..." */
-    data[30] = 0x32;
-    data[31] = 0x85;
-
-    /* "The new checksum via recomputation is:
-
-          HC' = ~(0xCD7A + 0x3285)
-              = ~0xFFFF
-              =  0x0000"
-    */
-    assert(ntohs(csum(data, sizeof data)) == 0x0000);
-
-    /* "Applying [Eqn. 3] to the example above, we get the correct result:
-
-          HC' = ~(C + (-m) + m')
-              = ~(0x22D0 + ~0x5555 + 0x3285)
-              = ~0xFFFF
-              =  0x0000" */
-    assert(recalc_csum16(htons(0xdd2f), htons(0x5555), htons(0x3285))
-           == htons(0x0000));
-
-    mark('#');
-}
-
-/* CRC32C checksum tests, based on Intel IPPs, Chapter 13,
- * ippsCRC32C_8u() example, found at the following location:
- * http://software.intel.com/sites/products/documentation/hpc/ipp/ipps/ */
-static void
-test_crc32c(void)
-{
-    int i;
-    uint8_t data[48] = {
-        0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
-        0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18,
-        0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-    };
-
-    /* iSCSI Read PDU */
-    assert(ntohl(crc32c(data, 48)) == 0x563a96d9L);
-
-    /* 32 bytes of all zeroes */
-    for (i = 0; i < 32; i++) data[i] = 0x00;
-    assert(ntohl(crc32c(data, 32)) == 0xaa36918aL);
-
-    /* 32 bytes of all ones */
-    for (i = 0; i < 32; i++) data[i] = 0xff;
-    assert(ntohl(crc32c(data, 32)) == 0x43aba862L);
-
-    /* 32 bytes of incrementing 00..1f */
-    for (i = 0; i < 32; i++) data[i] = i;
-    assert(ntohl(crc32c(data, 32)) == 0x4e79dd46L);
-
-    /* 32 bytes of decrementing 1f..00 */
-    for (i  = 0; i < 32; i++) data[i] = 31 - i;
-    assert(ntohl(crc32c(data, 32)) == 0x5cdb3f11L);
-
-    mark('#');
-}
-
-/* Check the IP pseudoheader calculation. */
-static void
-test_pseudo(void)
-{
-    ovs_be16 csum;
-    /* Try an IP header similar to one that the tunnel code
-     * might generate. */
-    struct ip_header ip = {
-        .ip_ihl_ver = IP_IHL_VER(5, 4),
-        .ip_tos = 0,
-        .ip_tot_len = htons(134),
-        .ip_id = 0,
-        .ip_frag_off = htons(IP_DF),
-        .ip_ttl = 64,
-        .ip_proto = IPPROTO_UDP,
-        .ip_csum = htons(0x1265),
-        .ip_src = { .hi = htons(0x1400), .lo = htons(0x0002) },
-        .ip_dst = { .hi = htons(0x1400), .lo = htons(0x0001) }
-    };
-
-    csum = csum_finish(packet_csum_pseudoheader(&ip));
-    assert(csum == htons(0xd779));
-
-    /* And also test something totally different to check for
-     * corner cases. */
-    memset(&ip, 0xff, sizeof ip);
-    csum = csum_finish(packet_csum_pseudoheader(&ip));
-    assert(csum == htons(0xff3c));
-
-    mark('#');
-}
-
-static void
-test_csum_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    const struct test_case *tc;
-    int i;
-
-    for (tc = test_cases; tc < &test_cases[ARRAY_SIZE(test_cases)]; tc++) {
-        const void *data = tc->data;
-        const ovs_be16 *data16 = (OVS_FORCE const ovs_be16 *) data;
-        const ovs_be32 *data32 = (OVS_FORCE const ovs_be32 *) data;
-        uint32_t partial;
-
-        /* Test csum(). */
-        assert(ntohs(csum(tc->data, tc->size)) == tc->csum);
-        mark('.');
-
-        /* Test csum_add16(). */
-        partial = 0;
-        for (i = 0; i < tc->size / 2; i++) {
-            partial = csum_add16(partial, get_unaligned_be16(&data16[i]));
-        }
-        assert(ntohs(csum_finish(partial)) == tc->csum);
-        mark('.');
-
-        /* Test csum_add32(). */
-        partial = 0;
-        for (i = 0; i < tc->size / 4; i++) {
-            partial = csum_add32(partial, get_unaligned_be32(&data32[i]));
-        }
-        assert(ntohs(csum_finish(partial)) == tc->csum);
-        mark('.');
-
-        /* Test alternating csum_add16() and csum_add32(). */
-        partial = 0;
-        for (i = 0; i < tc->size / 4; i++) {
-            if (i % 2) {
-                partial = csum_add32(partial, get_unaligned_be32(&data32[i]));
-            } else {
-                ovs_be16 u0 = get_unaligned_be16(&data16[i * 2]);
-                ovs_be16 u1 = get_unaligned_be16(&data16[i * 2 + 1]);
-                partial = csum_add16(partial, u0);
-                partial = csum_add16(partial, u1);
-            }
-        }
-        assert(ntohs(csum_finish(partial)) == tc->csum);
-        mark('.');
-
-        /* Test csum_continue(). */
-        partial = 0;
-        for (i = 0; i < tc->size / 4; i++) {
-            if (i) {
-                partial = csum_continue(partial, &data32[i], 4);
-            } else {
-                partial = csum_continue(partial, &data16[i * 2], 2);
-                partial = csum_continue(partial, &data16[i * 2 + 1], 2);
-            }
-        }
-        assert(ntohs(csum_finish(partial)) == tc->csum);
-        mark('#');
-    }
-
-    test_rfc1624();
-    test_crc32c();
-    test_pseudo();
-
-    /* Test recalc_csum16(). */
-    for (i = 0; i < 32; i++) {
-        ovs_be16 old_u16, new_u16;
-        ovs_be16 old_csum;
-        ovs_be16 data[16];
-        int j, index;
-
-        for (j = 0; j < ARRAY_SIZE(data); j++) {
-            data[j] = (OVS_FORCE ovs_be16) random_uint32();
-        }
-        old_csum = csum(data, sizeof data);
-        index = random_range(ARRAY_SIZE(data));
-        old_u16 = data[index];
-        new_u16 = data[index] = (OVS_FORCE ovs_be16) random_uint32();
-        assert(csum(data, sizeof data)
-               == recalc_csum16(old_csum, old_u16, new_u16));
-        mark('.');
-    }
-    mark('#');
-
-    /* Test recalc_csum32(). */
-    for (i = 0; i < 32; i++) {
-        ovs_be32 old_u32, new_u32;
-        ovs_be16 old_csum;
-        ovs_be32 data[16];
-        int j, index;
-
-        for (j = 0; j < ARRAY_SIZE(data); j++) {
-            data[j] = (OVS_FORCE ovs_be32) random_uint32();
-        }
-        old_csum = csum(data, sizeof data);
-        index = random_range(ARRAY_SIZE(data));
-        old_u32 = data[index];
-        new_u32 = data[index] = (OVS_FORCE ovs_be32) random_uint32();
-        assert(csum(data, sizeof data)
-               == recalc_csum32(old_csum, old_u32, new_u32));
-        mark('.');
-    }
-    mark('#');
-
-    putchar('\n');
-}
-
-OVSTEST_REGISTER("test-csum", test_csum_main);
diff --git a/tests/test-daemon.py b/tests/test-daemon.py
deleted file mode 100644
index 3f4200d61..000000000
--- a/tests/test-daemon.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright (c) 2010, 2011 Nicira, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import argparse
-import signal
-import sys
-import time
-
-import ovs.daemon
-import ovs.util
-
-
-def handler(signum, _):
-    raise Exception("Signal handler called with %d" % signum)
-
-
-def main():
-
-    if sys.platform != 'win32':
-        # signal.SIGHUP does not exist on Windows
-        signal.signal(signal.SIGHUP, handler)
-
-    parser = argparse.ArgumentParser(
-            description="Open vSwitch daemonization test program for Python.")
-    parser.add_argument("-b", "--bail", action="store_true",
-            help="Exit with an error after daemonize_start().")
-
-    ovs.daemon.add_args(parser)
-    args = parser.parse_args()
-    ovs.daemon.handle_args(args)
-
-    ovs.daemon.daemonize_start()
-    if args.bail:
-        sys.stderr.write("%s: exiting after daemonize_start() as requested\n"
-                         % ovs.util.PROGRAM_NAME)
-        sys.exit(1)
-    ovs.daemon.daemonize_complete()
-
-    while True:
-        time.sleep(1)
-
-
-if __name__ == '__main__':
-    try:
-        main()
-    except SystemExit:
-        # Let system.exit() calls complete normally
-        raise
-    except:
-        sys.exit(ovs.daemon.RESTART_EXIT_CODE)
diff --git a/tests/test-flows.c b/tests/test-flows.c
deleted file mode 100644
index 7adbe5dd9..000000000
--- a/tests/test-flows.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2017 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "flow.h"
-#include <assert.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include "classifier.h"
-#include "openflow/openflow.h"
-#include "openvswitch/ofp-match.h"
-#include "openvswitch/ofp-print.h"
-#include "openvswitch/ofpbuf.h"
-#include "openvswitch/vlog.h"
-#include "ovstest.h"
-#include "dp-packet.h"
-#include "pcap-file.h"
-#include "timeval.h"
-#include "util.h"
-
-static void
-test_flows_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    struct ofp10_match expected_match;
-    FILE *flows;
-    struct pcap_file *pcap;
-    int retval;
-    int n = 0, errors = 0;
-
-    set_program_name(argv[0]);
-
-    flows = fopen(argv[1], "rb");
-    if (!flows) {
-        ovs_fatal(errno, "failed to open %s", argv[1]);
-    }
-    pcap = ovs_pcap_open(argv[2], "rb");
-    if (!pcap) {
-        ovs_fatal(errno, "failed to open %s", argv[2]);
-    }
-
-    while (fread(&expected_match, sizeof expected_match, 1, flows)) {
-        struct dp_packet *packet;
-        struct ofp10_match extracted_match;
-        struct match match;
-        struct flow flow;
-        n++;
-
-        retval = ovs_pcap_read(pcap, &packet, NULL);
-        if (retval == EOF) {
-            ovs_fatal(0, "unexpected end of file reading pcap file");
-        } else if (retval) {
-            ovs_fatal(retval, "error reading pcap file");
-        }
-
-        flow_extract(packet, &flow);
-        flow.in_port.ofp_port = u16_to_ofp(1);
-
-        match_wc_init(&match, &flow);
-        ofputil_match_to_ofp10_match(&match, &extracted_match);
-
-        if (memcmp(&expected_match, &extracted_match, sizeof expected_match)) {
-            char *exp_s = ofp10_match_to_string(&expected_match, NULL, 2);
-            char *got_s = ofp10_match_to_string(&extracted_match, NULL, 2);
-            errors++;
-            printf("mismatch on packet #%d (1-based).\n", n);
-            printf("Packet:\n");
-            ofp_print_packet(stdout, dp_packet_data(packet), dp_packet_size(packet), htonl(PT_ETH));
-            ovs_hex_dump(stdout, dp_packet_data(packet), dp_packet_size(packet), 0, true);
-            match_print(&match, NULL);
-            printf("Expected flow:\n%s\n", exp_s);
-            printf("Actually extracted flow:\n%s\n", got_s);
-            ovs_hex_dump(stdout, &expected_match, sizeof expected_match, 0, false);
-            ovs_hex_dump(stdout, &extracted_match, sizeof extracted_match, 0, false);
-            printf("\n");
-            free(exp_s);
-            free(got_s);
-        }
-
-        dp_packet_delete(packet);
-    }
-    ovs_pcap_close(pcap);
-    printf("checked %d packets, %d errors\n", n, errors);
-    exit(errors != 0);
-}
-
-OVSTEST_REGISTER("test-flows", test_flows_main);
diff --git a/tests/test-hash.c b/tests/test-hash.c
deleted file mode 100644
index 5d3f8ea43..000000000
--- a/tests/test-hash.c
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * Copyright (c) 2009, 2012, 2014, 2015 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "hash.h"
-#include <assert.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "jhash.h"
-#include "ovstest.h"
-
-static void
-set_bit(uint32_t array[3], int bit)
-{
-    assert(bit >= 0 && bit <= 96);
-    memset(array, 0, sizeof(uint32_t) * 3);
-    if (bit < 96) {
-        array[bit / 32] = UINT32_C(1) << (bit % 32);
-    }
-}
-
-/* When bit == n_bits, the function just 0 sets the 'values'. */
-static void
-set_bit128(ovs_u128 *values, int bit, int n_bits)
-{
-    assert(bit >= 0 && bit <= 2048);
-    memset(values, 0, n_bits/8);
-    if (bit < n_bits) {
-        int b = bit % 128;
-
-        if (b < 64) {
-            values[bit / 128].u64.lo = UINT64_C(1) << (b % 64);
-        } else {
-            values[bit / 128].u64.hi = UINT64_C(1) << (b % 64);
-        }
-    }
-}
-
-static uint64_t
-get_range128(ovs_u128 *value, int ofs, uint64_t mask)
-{
-    return ((ofs < 64 ? (value->u64.lo >> ofs) : 0) & mask)
-        | ((ofs <= 64 ? (value->u64.hi << (64 - ofs)) : (value->u64.hi >> (ofs - 64)) & mask));
-}
-
-static uint32_t
-hash_words_cb(uint32_t input)
-{
-    return hash_words(&input, 1, 0);
-}
-
-static uint32_t
-jhash_words_cb(uint32_t input)
-{
-    return jhash_words(&input, 1, 0);
-}
-
-static uint32_t
-hash_int_cb(uint32_t input)
-{
-    return hash_int(input, 0);
-}
-
-static void
-check_word_hash(uint32_t (*hash)(uint32_t), const char *name,
-                int min_unique)
-{
-    int i, j;
-
-    for (i = 0; i <= 32; i++) {
-        uint32_t in1 = i < 32 ? UINT32_C(1) << i : 0;
-        for (j = i + 1; j <= 32; j++) {
-            uint32_t in2 = j < 32 ? UINT32_C(1) << j : 0;
-            uint32_t out1 = hash(in1);
-            uint32_t out2 = hash(in2);
-            const uint32_t unique_mask = (UINT32_C(1) << min_unique) - 1;
-            int ofs;
-            for (ofs = 0; ofs < 32 - min_unique; ofs++) {
-                uint32_t bits1 = (out1 >> ofs) & unique_mask;
-                uint32_t bits2 = (out2 >> ofs) & unique_mask;
-                if (bits1 == bits2) {
-                    printf("Partial collision for '%s':\n", name);
-                    printf("%s(%08"PRIx32") = %08"PRIx32"\n", name, in1, out1);
-                    printf("%s(%08"PRIx32") = %08"PRIx32"\n", name, in2, out2);
-                    printf("%d bits of output starting at bit %d "
-                           "are both 0x%"PRIx32"\n", min_unique, ofs, bits1);
-                }
-            }
-        }
-    }
-}
-
-static void
-check_3word_hash(uint32_t (*hash)(const uint32_t[], size_t, uint32_t),
-                 const char *name)
-{
-    int i, j;
-
-    for (i = 0; i <= 96; i++) {
-        for (j = i + 1; j <= 96; j++) {
-            uint32_t in0[3], in1[3], in2[3];
-            uint32_t out0,out1, out2;
-            const int min_unique = 12;
-            const uint32_t unique_mask = (UINT32_C(1) << min_unique) - 1;
-
-            set_bit(in0, i);
-            set_bit(in1, i);
-            set_bit(in2, j);
-            out0 = hash(in0, 3, 0);
-            out1 = hash(in1, 3, 0);
-            out2 = hash(in2, 3, 0);
-
-            if (out0 != out1) {
-                printf("%s hash not the same for non-64 aligned data "
-                       "%08"PRIx32" != %08"PRIx32"\n", name, out0, out1);
-            }
-            if ((out1 & unique_mask) == (out2 & unique_mask)) {
-                printf("%s has a partial collision:\n", name);
-                printf("hash(1 << %d) == %08"PRIx32"\n", i, out1);
-                printf("hash(1 << %d) == %08"PRIx32"\n", j, out2);
-                printf("The low-order %d bits of output are both "
-                       "0x%"PRIx32"\n", min_unique, out1 & unique_mask);
-            }
-        }
-    }
-}
-
-static void
-check_hash_bytes128(void (*hash)(const void *, size_t, uint32_t, ovs_u128 *),
-                    const char *name, const int min_unique)
-{
-    const uint64_t unique_mask = (UINT64_C(1) << min_unique) - 1;
-    const int n_bits = sizeof(ovs_u128) * 8;
-    int i, j;
-
-    for (i = 0; i <= n_bits; i++) {
-        OVS_PACKED(struct offset_ovs_u128 {
-            uint32_t a;
-            ovs_u128 b;
-        }) in0;
-        ovs_u128 in1;
-        ovs_u128 out0, out1;
-
-        set_bit128(&in1, i, n_bits);
-        in0.b = in1;
-        hash(&in0.b, sizeof(ovs_u128), 0, &out0);
-        hash(&in1, sizeof(ovs_u128), 0, &out1);
-        if (!ovs_u128_equals(out0, out1)) {
-            printf("%s hash not the same for non-64 aligned data "
-                   "%016"PRIx64"%016"PRIx64" != %016"PRIx64"%016"PRIx64"\n",
-                   name, out0.u64.lo, out0.u64.hi, out1.u64.lo, out1.u64.hi);
-        }
-
-        for (j = i + 1; j <= n_bits; j++) {
-            ovs_u128 in2;
-            ovs_u128 out2;
-            int ofs;
-
-            set_bit128(&in2, j, n_bits);
-            hash(&in2, sizeof(ovs_u128), 0, &out2);
-            for (ofs = 0; ofs < 128 - min_unique; ofs++) {
-                uint64_t bits1 = get_range128(&out1, ofs, unique_mask);
-                uint64_t bits2 = get_range128(&out2, ofs, unique_mask);
-
-                if (bits1 == bits2) {
-                    printf("%s has a partial collision:\n", name);
-                    printf("hash(1 << %d) == %016"PRIx64"%016"PRIx64"\n",
-                           i, out1.u64.hi, out1.u64.lo);
-                    printf("hash(1 << %d) == %016"PRIx64"%016"PRIx64"\n",
-                           j, out2.u64.hi, out2.u64.lo);
-                    printf("%d bits of output starting at bit %d "
-                           "are both 0x%016"PRIx64"\n", min_unique, ofs, bits1);
-                }
-            }
-        }
-    }
-}
-
-static void
-check_256byte_hash(void (*hash)(const void *, size_t, uint32_t, ovs_u128 *),
-                   const char *name, const int min_unique)
-{
-    const uint64_t unique_mask = (UINT64_C(1) << min_unique) - 1;
-    const int n_bits = sizeof(ovs_u128) * 8 * 16;
-    int i, j;
-
-    for (i = 0; i <= n_bits; i++) {
-        OVS_PACKED(struct offset_ovs_u128 {
-            uint32_t a;
-            ovs_u128 b[16];
-        }) in0;
-        ovs_u128 in1[16];
-        ovs_u128 out0, out1;
-
-        set_bit128(in1, i, n_bits);
-        for (j = 0; j < 16; j++) {
-            in0.b[j] = in1[j];
-        }
-        hash(&in0.b, sizeof(ovs_u128) * 16, 0, &out0);
-        hash(in1, sizeof(ovs_u128) * 16, 0, &out1);
-        if (!ovs_u128_equals(out0, out1)) {
-            printf("%s hash not the same for non-64 aligned data "
-                   "%016"PRIx64"%016"PRIx64" != %016"PRIx64"%016"PRIx64"\n",
-                   name, out0.u64.lo, out0.u64.hi, out1.u64.lo, out1.u64.hi);
-        }
-
-        for (j = i + 1; j <= n_bits; j++) {
-            ovs_u128 in2[16];
-            ovs_u128 out2;
-
-            set_bit128(in2, j, n_bits);
-            hash(in2, sizeof(ovs_u128) * 16, 0, &out2);
-            if ((out1.u64.lo & unique_mask) == (out2.u64.lo & unique_mask)) {
-                printf("%s has a partial collision:\n", name);
-                printf("hash(1 << %4d) == %016"PRIx64"%016"PRIx64"\n", i,
-                       out1.u64.hi, out1.u64.lo);
-                printf("hash(1 << %4d) == %016"PRIx64"%016"PRIx64"\n", j,
-                       out2.u64.hi, out2.u64.lo);
-                printf("The low-order %d bits of output are both "
-                       "0x%"PRIx64"\n", min_unique, out1.u64.lo & unique_mask);
-            }
-        }
-    }
-}
-
-static void
-test_hash_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    /*
-     * The following tests check that all hashes computed with hash_function
-     * with one 1-bit (or no 1-bits) set within a X-bit word have different
-     * values in all N-bit consecutive comparisons.
-     *
-     *    test_function(hash_function, test_name, N)
-     *
-     * Given a random distribution, the probability of at least one collision
-     * in any set of N bits is approximately
-     *
-     *                      1 - (prob of no collisions)
-     *                          **(combination of all possible comparisons)
-     *                   == 1 - ((2**N - 1)/2**N)**C(X+1,2)
-     *                   == p
-     *
-     * There are (X-N) ways to pick N consecutive bits in a X-bit word, so if we
-     * assumed independence then the chance of having no collisions in any of
-     * those X-bit runs would be (1-p)**(X-N) == q.  If this q is very small
-     * and we can also find a relatively small 'magic number' N such that there
-     * is no collision in any comparison, then it means we have a pretty good
-     * hash function.
-     *
-     * The values of each parameters mentioned above for the tested hash
-     * functions are summarized as follow:
-     *
-     * hash_function       X      N        p             q
-     * -------------      ---    ---    -------       -------
-     *
-     * hash_words_cb       32     11     0.22          0.0044
-     * jhash_words_cb      32     11     0.22          0.0044
-     * hash_int_cb         32     12     0.12          0.0078
-     * hash_bytes128      128     19     0.0156        0.174
-     *
-     */
-    check_word_hash(hash_words_cb, "hash_words", 11);
-    check_word_hash(jhash_words_cb, "jhash_words", 11);
-    check_word_hash(hash_int_cb, "hash_int", 12);
-    check_hash_bytes128(hash_bytes128, "hash_bytes128", 19);
-
-    /*
-     * The following tests check that all hashes computed with hash_function
-     * with one 1-bit (or no 1-bits) set within Y X-bit word have different
-     * values in their lowest N bits.
-     *
-     *    test_function(hash_function, test_name, N)
-     *
-     * Given a random distribution, the probability of at least one collision
-     * in any set of N bits is approximately
-     *
-     *                      1 - (prob of no collisions)
-     *                          **(combination of all possible comparisons)
-     *                   == 1 - ((2**N - 1)/2**N)**C(Y*X+1,2)
-     *                   == p
-     *
-     * If this p is not very small and we can also find a relatively small
-     * 'magic number' N such that there is no collision in any comparison,
-     * then it means we have a pretty good hash function.
-     *
-     * The values of each parameters mentioned above for the tested hash
-     * functions are summarized as follow:
-     *
-     * hash_function       Y      X      N        p
-     * -------------      ---    ---    ---    -------
-     *
-     * hash_words          3      32     12     0.68
-     * jhash_words         3      32     12     0.68
-     * hash_bytes128      16     128     23     0.22
-     *
-     */
-    check_3word_hash(hash_words, "hash_words");
-    check_3word_hash(jhash_words, "jhash_words");
-    check_256byte_hash(hash_bytes128, "hash_bytes128", 23);
-}
-
-OVSTEST_REGISTER("test-hash", test_hash_main);
diff --git a/tests/test-heap.c b/tests/test-heap.c
deleted file mode 100644
index 88c9f25f7..000000000
--- a/tests/test-heap.c
+++ /dev/null
@@ -1,489 +0,0 @@
-/*
- * Copyright (c) 2012, 2014 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* A test for for functions and macros declared in heap.h. */
-
-#include <config.h>
-#undef NDEBUG
-#include "heap.h"
-#include <assert.h>
-#include <inttypes.h>
-#include <limits.h>
-#include <stdlib.h>
-#include "command-line.h"
-#include "ovstest.h"
-#include "random.h"
-#include "util.h"
-
-/* Sample heap element. */
-struct element {
-    uint32_t full_pri;
-    struct heap_node heap_node;
-};
-
-static struct element *
-element_from_heap_node(const struct heap_node *node)
-{
-    return CONTAINER_OF(node, struct element, heap_node);
-}
-
-static int
-compare_uint32s(const void *a_, const void *b_)
-{
-    const uint32_t *a = a_;
-    const uint32_t *b = b_;
-    return *a < *b ? -1 : *a > *b;
-}
-
-/* Verifies that 'heap' is internally consistent and contains all 'n' of the
- * 'priorities'. */
-static void
-check_heap(const struct heap *heap, const uint32_t priorities[], size_t n)
-{
-    uint32_t *priorities_copy;
-    uint32_t *elements_copy;
-    struct element *element;
-    size_t i;
-
-    assert(heap_count(heap) == n);
-    assert(heap_is_empty(heap) == !n);
-    if (n > 0) {
-        assert(heap_max(heap) == heap->array[1]);
-    }
-
-    /* Check indexes. */
-    for (i = 1; i <= n; i++) {
-        assert(heap->array[i]->idx == i);
-    }
-
-    /* Check that priority values are internally consistent. */
-    for (i = 1; i <= n; i++) {
-        element = element_from_heap_node(heap->array[i]);
-        assert(element->heap_node.priority == (element->full_pri >> 16));
-    }
-
-    /* Check the heap property. */
-    for (i = 1; i <= n; i++) {
-        size_t parent = heap_parent__(i);
-        size_t left = heap_left__(i);
-        size_t right = heap_right__(i);
-
-        if (parent >= 1) {
-            assert(heap->array[parent]->priority >= heap->array[i]->priority);
-        }
-        if (left <= n) {
-            assert(heap->array[left]->priority <= heap->array[i]->priority);
-        }
-        if (right <= n) {
-            assert(heap->array[right]->priority <= heap->array[i]->priority);
-        }
-    }
-
-    /* Check that HEAP_FOR_EACH iterates all the nodes in order. */
-    i = 0;
-    HEAP_FOR_EACH (element, heap_node, heap) {
-        assert(i < n);
-        assert(&element->heap_node == heap->array[i + 1]);
-        i++;
-    }
-    assert(i == n);
-
-    priorities_copy = xmemdup(priorities, n * sizeof *priorities);
-    elements_copy = xmalloc(n * sizeof *priorities);
-    i = 0;
-    HEAP_FOR_EACH (element, heap_node, heap) {
-        elements_copy[i++] = element->heap_node.priority;
-    }
-
-    qsort(priorities_copy, n, sizeof *priorities_copy, compare_uint32s);
-    qsort(elements_copy, n, sizeof *elements_copy, compare_uint32s);
-    for (i = 0; i < n; i++) {
-        assert((priorities_copy[i] >> 16) == elements_copy[i]);
-    }
-
-    free(priorities_copy);
-    free(elements_copy);
-}
-
-static void
-shuffle(uint32_t *p, size_t n)
-{
-    for (; n > 1; n--, p++) {
-        uint32_t *q = &p[random_range(n)];
-        uint32_t tmp = *p;
-        *p = *q;
-        *q = tmp;
-    }
-}
-
-/* Prints the values in 'heap', plus 'name' as a title. */
-static void OVS_UNUSED
-print_heap(const char *name, struct heap *heap)
-{
-    struct element *e;
-
-    printf("%s:", name);
-    HEAP_FOR_EACH (e, heap_node, heap) {
-        printf(" %"PRIu32":%"PRIu32, e->full_pri >> 16, e->full_pri & 0xffff);
-    }
-    printf("\n");
-}
-
-static int
-factorial(int n_items)
-{
-    int n, i;
-
-    n = 1;
-    for (i = 2; i <= n_items; i++) {
-        n *= i;
-    }
-    return n;
-}
-
-static void
-swap(uint32_t *a, uint32_t *b)
-{
-    uint32_t tmp = *a;
-    *a = *b;
-    *b = tmp;
-}
-
-static void
-reverse(uint32_t *a, int n)
-{
-    int i;
-
-    for (i = 0; i < n / 2; i++) {
-        int j = n - (i + 1);
-        swap(&a[i], &a[j]);
-    }
-}
-
-static bool
-next_permutation(uint32_t *a, int n)
-{
-    int k;
-
-    for (k = n - 2; k >= 0; k--) {
-        if ((a[k] >> 16) < (a[k + 1] >> 16)) {
-            int l;
-
-            for (l = n - 1; ; l--) {
-                if ((a[l] >> 16) > (a[k] >> 16)) {
-                    swap(&a[k], &a[l]);
-                    reverse(a + (k + 1), n - (k + 1));
-                    return true;
-                }
-            }
-        }
-    }
-    return false;
-}
-
-static void
-test_insert_delete__(struct element *elements,
-                     const uint32_t *insert,
-                     const uint32_t *delete,
-                     size_t n)
-{
-    struct heap heap;
-    size_t i;
-
-    heap_init(&heap);
-    check_heap(&heap, NULL, 0);
-    for (i = 0; i < n; i++) {
-        uint32_t priority = insert[i];
-
-        elements[i].full_pri = priority;
-        heap_insert(&heap, &elements[i].heap_node, priority >> 16);
-        check_heap(&heap, insert, i + 1);
-    }
-
-    for (i = 0; i < n; i++) {
-        struct element *element;
-
-        HEAP_FOR_EACH (element, heap_node, &heap) {
-            if (element->full_pri == delete[i]) {
-                goto found;
-            }
-        }
-        OVS_NOT_REACHED();
-
-    found:
-        heap_remove(&heap, &element->heap_node);
-        check_heap(&heap, delete + i + 1, n - (i + 1));
-    }
-    heap_destroy(&heap);
-}
-
-static void
-test_insert_delete_raw__(struct element *elements,
-                         const uint32_t *insert, unsigned int insert_pattern,
-                         const uint32_t *delete, unsigned int delete_pattern,
-                         size_t n)
-{
-    struct heap heap;
-    size_t i;
-
-    heap_init(&heap);
-    check_heap(&heap, NULL, 0);
-    for (i = 0; i < n; i++) {
-        uint32_t priority = insert[i];
-
-        elements[i].full_pri = priority;
-        heap_raw_insert(&heap, &elements[i].heap_node, priority >> 16);
-        if (insert_pattern & (1u << i)) {
-            heap_rebuild(&heap);
-            check_heap(&heap, insert, i + 1);
-        }
-    }
-
-    for (i = 0; i < n; i++) {
-        struct element *element;
-
-        HEAP_FOR_EACH (element, heap_node, &heap) {
-            if (element->full_pri == delete[i]) {
-                goto found;
-            }
-        }
-        OVS_NOT_REACHED();
-
-    found:
-        heap_raw_remove(&heap, &element->heap_node);
-        if (delete_pattern & (1u << i)) {
-            heap_rebuild(&heap);
-            check_heap(&heap, delete + i + 1, n - (i + 1));
-        }
-    }
-    heap_destroy(&heap);
-}
-
-static void
-test_heap_insert_delete_same_order(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    enum { N_ELEMS = 7 };
-
-    uint32_t insert[N_ELEMS];
-    int n_permutations;
-    size_t i;
-
-    for (i = 0; i < N_ELEMS; i++) {
-        insert[i] = i << 16;
-    }
-
-    n_permutations = 0;
-    do {
-        struct element elements[N_ELEMS];
-
-        n_permutations++;
-        test_insert_delete__(elements, insert, insert, N_ELEMS);
-    } while (next_permutation(insert, N_ELEMS));
-    assert(n_permutations == factorial(N_ELEMS));
-}
-
-static void
-test_heap_insert_delete_reverse_order(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    enum { N_ELEMS = 7 };
-
-    uint32_t insert[N_ELEMS];
-    int n_permutations;
-    size_t i;
-
-    for (i = 0; i < N_ELEMS; i++) {
-        insert[i] = i << 16;
-    }
-
-    n_permutations = 0;
-    do {
-        struct element elements[N_ELEMS];
-        uint32_t delete[N_ELEMS];
-
-        n_permutations++;
-
-        for (i = 0; i < N_ELEMS; i++) {
-            delete[N_ELEMS - i - 1] = insert[i];
-        }
-
-        test_insert_delete__(elements, insert, delete, N_ELEMS);
-    } while (next_permutation(insert, N_ELEMS));
-    assert(n_permutations == factorial(N_ELEMS));
-}
-
-static void
-test_heap_insert_delete_every_order(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    enum { N_ELEMS = 5 };
-
-    uint32_t insert[N_ELEMS];
-    int outer_permutations;
-    size_t i;
-
-    for (i = 0; i < N_ELEMS; i++) {
-        insert[i] = i << 16;
-    }
-
-    outer_permutations = 0;
-    do {
-        struct element elements[N_ELEMS];
-        uint32_t delete[N_ELEMS];
-        int inner_permutations;
-
-        outer_permutations++;
-
-        for (i = 0; i < N_ELEMS; i++) {
-            delete[i] = i << 16;
-        }
-
-        inner_permutations = 0;
-        do {
-            inner_permutations++;
-            test_insert_delete__(elements, insert, delete, N_ELEMS);
-        } while (next_permutation(delete, N_ELEMS));
-        assert(inner_permutations == factorial(N_ELEMS));
-    } while (next_permutation(insert, N_ELEMS));
-    assert(outer_permutations == factorial(N_ELEMS));
-}
-
-static void
-test_heap_insert_delete_same_order_with_dups(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    enum { N_ELEMS = 7 };
-
-    unsigned int pattern;
-    size_t i;
-
-    for (pattern = 0; pattern < (1u << N_ELEMS); pattern += 2) {
-        int n_permutations, expected_permutations;
-        uint32_t insert[N_ELEMS];
-        int j;
-
-        j = 0;
-        for (i = 0; i < N_ELEMS; i++) {
-            if (i && !(pattern & (1u << i))) {
-                j++;
-            }
-            insert[i] = (j << 16) | i;
-        }
-
-        expected_permutations = factorial(N_ELEMS);
-        for (i = 0; i < N_ELEMS; ) {
-            j = i + 1;
-            if (pattern & (1u << i)) {
-                for (; j < N_ELEMS; j++) {
-                    if (!(pattern & (1u << j))) {
-                        break;
-                    }
-                }
-                expected_permutations /= factorial(j - i + 1);
-            }
-            i = j;
-        }
-
-        n_permutations = 0;
-        do {
-            struct element elements[N_ELEMS];
-
-            n_permutations++;
-            test_insert_delete__(elements, insert, insert, N_ELEMS);
-        } while (next_permutation(insert, N_ELEMS));
-        assert(n_permutations == expected_permutations);
-    }
-}
-
-static void
-test_heap_raw_insert(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    enum { N_ELEMS = 7 };
-
-    uint32_t insert[N_ELEMS];
-    int n_permutations;
-    size_t i;
-
-    for (i = 0; i < N_ELEMS; i++) {
-        insert[i] = i << 16;
-    }
-
-    n_permutations = 0;
-    do {
-        struct element elements[N_ELEMS];
-
-        n_permutations++;
-        test_insert_delete_raw__(elements,
-                                 insert, 1u << (N_ELEMS - 1),
-                                 insert, UINT_MAX,
-                                 N_ELEMS);
-    } while (next_permutation(insert, N_ELEMS));
-    assert(n_permutations == factorial(N_ELEMS));
-}
-
-static void
-test_heap_raw_delete(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    enum { N_ELEMS = 16 };
-
-    uint32_t insert[N_ELEMS];
-    uint32_t delete[N_ELEMS];
-    size_t i;
-
-    for (i = 0; i < N_ELEMS; i++) {
-        insert[i] = i << 16;
-        delete[i] = i << 16;
-    }
-
-    for (i = 0; i < 1000; i++) {
-        struct element elements[N_ELEMS];
-
-        shuffle(insert, N_ELEMS);
-        shuffle(delete, N_ELEMS);
-
-        test_insert_delete_raw__(elements,
-                                 insert, 0,
-                                 delete,
-                                 (1u << (N_ELEMS - 1)) | (1u << (N_ELEMS / 2)),
-                                 N_ELEMS);
-    }
-}
-
-static const struct ovs_cmdl_command commands[] = {
-    { "insert-delete-same-order", NULL, 0, 0,
-      test_heap_insert_delete_same_order, OVS_RO },
-    { "insert-delete-reverse-order", NULL, 0, 0,
-      test_heap_insert_delete_reverse_order, OVS_RO },
-    { "insert-delete-every-order", NULL, 0, 0,
-      test_heap_insert_delete_every_order, OVS_RO },
-    { "insert-delete-same-order-with-dups", NULL, 0, 0,
-      test_heap_insert_delete_same_order_with_dups, OVS_RO },
-    { "raw-insert", NULL, 0, 0, test_heap_raw_insert, OVS_RO },
-    { "raw-delete", NULL, 0, 0, test_heap_raw_delete, OVS_RO },
-    { NULL, NULL, 0, 0, NULL, OVS_RO },
-};
-
-static void
-test_heap_main(int argc, char *argv[])
-{
-    struct ovs_cmdl_context ctx = {
-        .argc = argc - 1,
-        .argv = argv + 1,
-    };
-
-    set_program_name(argv[0]);
-
-    ovs_cmdl_run_command(&ctx, commands);
-}
-
-OVSTEST_REGISTER("test-heap", test_heap_main);
diff --git a/tests/test-hindex.c b/tests/test-hindex.c
deleted file mode 100644
index af06be5fc..000000000
--- a/tests/test-hindex.c
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 2010, 2013, 2014 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* A non-exhaustive test for some of the functions and macros declared in
- * hindex.h. */
-
-#include <config.h>
-#undef NDEBUG
-#include "hindex.h"
-#include <assert.h>
-#include <string.h>
-#include "hash.h"
-#include "ovstest.h"
-#include "random.h"
-#include "util.h"
-
-/* Sample hindex element. */
-struct element {
-    int value;
-    struct hindex_node node;
-};
-
-typedef size_t hash_func(int value);
-
-static int
-compare_ints(const void *a_, const void *b_)
-{
-    const int *a = a_;
-    const int *b = b_;
-    return *a < *b ? -1 : *a > *b;
-}
-
-/* Verifies that 'hindex' contains exactly the 'n' values in 'values'. */
-static void
-check_hindex(struct hindex *hindex, const int values[], size_t n,
-           hash_func *hash)
-{
-    int *sort_values, *hindex_values;
-    struct element *e;
-    size_t i;
-
-    /* Check that all the values are there in iteration. */
-    sort_values = xmalloc(sizeof *sort_values * n);
-    hindex_values = xmalloc(sizeof *sort_values * n);
-
-    i = 0;
-    HINDEX_FOR_EACH (e, node, hindex) {
-        assert(i < n);
-        hindex_values[i++] = e->value;
-    }
-    assert(i == n);
-
-    memcpy(sort_values, values, sizeof *sort_values * n);
-    qsort(sort_values, n, sizeof *sort_values, compare_ints);
-    qsort(hindex_values, n, sizeof *hindex_values, compare_ints);
-
-    for (i = 0; i < n; i++) {
-        assert(sort_values[i] == hindex_values[i]);
-    }
-
-    free(hindex_values);
-    free(sort_values);
-
-    /* Check that all the values are there in lookup. */
-    for (i = 0; i < n; i++) {
-        size_t count = 0;
-
-        HINDEX_FOR_EACH_WITH_HASH (e, node, hash(values[i]), hindex) {
-            count += e->value == values[i];
-        }
-        assert(count == 1);
-    }
-
-    /* Check counters. */
-    assert(hindex_is_empty(hindex) == !n);
-    assert(hindex->n_unique <= n);
-}
-
-/* Puts the 'n' values in 'values' into 'elements', and then puts those
- * elements into 'hindex'. */
-static void
-make_hindex(struct hindex *hindex, struct element elements[],
-          int values[], size_t n, hash_func *hash)
-{
-    size_t i;
-
-    hindex_init(hindex);
-    for (i = 0; i < n; i++) {
-        elements[i].value = i;
-        hindex_insert(hindex, &elements[i].node, hash(elements[i].value));
-        values[i] = i;
-    }
-}
-
-static void
-shuffle(int *p, size_t n)
-{
-    for (; n > 1; n--, p++) {
-        int *q = &p[random_range(n)];
-        int tmp = *p;
-        *p = *q;
-        *q = tmp;
-    }
-}
-
-/* Prints the 'n' values in 'values', plus 'name' as a title. */
-static void OVS_UNUSED
-print_ints(const char *name, const int *values, size_t n)
-{
-    size_t i;
-
-    printf("%s:", name);
-    for (i = 0; i < n; i++) {
-        printf(" %d", values[i]);
-    }
-    printf("\n");
-}
-
-/* Prints the values in 'hindex', plus 'name' as a title. */
-static void OVS_UNUSED
-print_hindex(const char *name, struct hindex *hindex)
-{
-    struct element *e;
-
-    printf("%s:", name);
-    HINDEX_FOR_EACH (e, node, hindex) {
-        printf(" %d(%"PRIuSIZE")", e->value, e->node.hash & hindex->mask);
-    }
-    printf("\n");
-}
-
-static size_t
-unique_hash(int value)
-{
-    return value;
-}
-
-static size_t
-good_hash(int value)
-{
-    return hash_int(value, 0x1234abcd);
-}
-
-static size_t
-constant_hash(int value OVS_UNUSED)
-{
-    return 123;
-}
-
-static size_t
-mod4_hash(int value)
-{
-    return value % 4;
-}
-
-static size_t
-mod3_hash(int value)
-{
-    return value % 3;
-}
-
-static size_t
-mod2_hash(int value)
-{
-    return value % 2;
-}
-
-static size_t
-multipart_hash(int value)
-{
-    return (mod4_hash(value) << 16) | (constant_hash(value) & 0xFFFF);
-}
-
-/* Tests basic hindex insertion and deletion. */
-static void
-test_hindex_insert_delete(hash_func *hash)
-{
-    enum { N_ELEMS = 100 };
-
-    struct element elements[N_ELEMS];
-    int values[N_ELEMS];
-    struct hindex hindex;
-    size_t i;
-
-    hindex_init(&hindex);
-    for (i = 0; i < N_ELEMS; i++) {
-        elements[i].value = i;
-        hindex_insert(&hindex, &elements[i].node, hash(i));
-        values[i] = i;
-        check_hindex(&hindex, values, i + 1, hash);
-    }
-    shuffle(values, N_ELEMS);
-    for (i = 0; i < N_ELEMS; i++) {
-        hindex_remove(&hindex, &elements[values[i]].node);
-        check_hindex(&hindex, values + (i + 1), N_ELEMS - (i + 1), hash);
-    }
-    hindex_destroy(&hindex);
-}
-
-/* Tests basic hindex_reserve() and hindex_shrink(). */
-static void
-test_hindex_reserve_shrink(hash_func *hash)
-{
-    enum { N_ELEMS = 32 };
-
-    size_t i;
-
-    for (i = 0; i < N_ELEMS; i++) {
-        struct element elements[N_ELEMS];
-        int values[N_ELEMS];
-        struct hindex hindex;
-        size_t j;
-
-        hindex_init(&hindex);
-        hindex_reserve(&hindex, i);
-        for (j = 0; j < N_ELEMS; j++) {
-            elements[j].value = j;
-            hindex_insert(&hindex, &elements[j].node, hash(j));
-            values[j] = j;
-            check_hindex(&hindex, values, j + 1, hash);
-        }
-        shuffle(values, N_ELEMS);
-        for (j = 0; j < N_ELEMS; j++) {
-            hindex_remove(&hindex, &elements[values[j]].node);
-            hindex_shrink(&hindex);
-            check_hindex(&hindex, values + (j + 1), N_ELEMS - (j + 1), hash);
-        }
-        hindex_destroy(&hindex);
-    }
-}
-
-/* Tests that HINDEX_FOR_EACH_SAFE properly allows for deletion of the current
- * element of a hindex.  */
-static void
-test_hindex_for_each_safe(hash_func *hash)
-{
-    enum { MAX_ELEMS = 10 };
-    size_t n;
-    unsigned long int pattern;
-
-    for (n = 0; n <= MAX_ELEMS; n++) {
-        for (pattern = 0; pattern < 1ul << n; pattern++) {
-            struct element elements[MAX_ELEMS];
-            int values[MAX_ELEMS];
-            struct hindex hindex;
-            struct element *e, *next;
-            size_t n_remaining;
-            int i;
-
-            make_hindex(&hindex, elements, values, n, hash);
-
-            i = 0;
-            n_remaining = n;
-            HINDEX_FOR_EACH_SAFE (e, next, node, &hindex) {
-                assert(i < n);
-                if (pattern & (1ul << e->value)) {
-                    size_t j;
-                    hindex_remove(&hindex, &e->node);
-                    for (j = 0; ; j++) {
-                        assert(j < n_remaining);
-                        if (values[j] == e->value) {
-                            values[j] = values[--n_remaining];
-                            break;
-                        }
-                    }
-                }
-                check_hindex(&hindex, values, n_remaining, hash);
-                i++;
-            }
-            assert(i == n);
-
-            for (i = 0; i < n; i++) {
-                if (pattern & (1ul << i)) {
-                    n_remaining++;
-                }
-            }
-            assert(n == n_remaining);
-
-            hindex_destroy(&hindex);
-        }
-    }
-}
-
-static void
-run_test(void (*function)(hash_func *))
-{
-    hash_func *hash_funcs[] = {
-        unique_hash,
-        good_hash,
-        constant_hash,
-        mod4_hash,
-        mod3_hash,
-        mod2_hash,
-        multipart_hash,
-    };
-    size_t i;
-
-    for (i = 0; i < ARRAY_SIZE(hash_funcs); i++) {
-        function(hash_funcs[i]);
-        printf(".");
-        fflush(stdout);
-    }
-}
-
-static void
-test_hindex_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    run_test(test_hindex_insert_delete);
-    run_test(test_hindex_for_each_safe);
-    run_test(test_hindex_reserve_shrink);
-    printf("\n");
-}
-
-OVSTEST_REGISTER("test-hindex", test_hindex_main);
diff --git a/tests/test-hmap.c b/tests/test-hmap.c
deleted file mode 100644
index 9259b0b3f..000000000
--- a/tests/test-hmap.c
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 2010, 2013, 2014 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* A non-exhaustive test for some of the functions and macros declared in
- * hmap.h. */
-
-#include <config.h>
-#undef NDEBUG
-#include "openvswitch/hmap.h"
-#include <assert.h>
-#include <string.h>
-#include "hash.h"
-#include "ovstest.h"
-#include "random.h"
-#include "util.h"
-
-/* Sample hmap element. */
-struct element {
-    int value;
-    struct hmap_node node;
-};
-
-typedef size_t hash_func(int value);
-
-static int
-compare_ints(const void *a_, const void *b_)
-{
-    const int *a = a_;
-    const int *b = b_;
-    return *a < *b ? -1 : *a > *b;
-}
-
-/* Verifies that 'hmap' contains exactly the 'n' values in 'values'. */
-static void
-check_hmap(struct hmap *hmap, const int values[], size_t n,
-           hash_func *hash)
-{
-    int *sort_values, *hmap_values;
-    struct element *e;
-    size_t i;
-
-    /* Check that all the values are there in iteration. */
-    sort_values = xmalloc(sizeof *sort_values * n);
-    hmap_values = xmalloc(sizeof *sort_values * n);
-
-    i = 0;
-    HMAP_FOR_EACH (e, node, hmap) {
-        assert(i < n);
-        hmap_values[i++] = e->value;
-    }
-    assert(i == n);
-
-    memcpy(sort_values, values, sizeof *sort_values * n);
-    qsort(sort_values, n, sizeof *sort_values, compare_ints);
-    qsort(hmap_values, n, sizeof *hmap_values, compare_ints);
-
-    for (i = 0; i < n; i++) {
-        assert(sort_values[i] == hmap_values[i]);
-    }
-
-    free(hmap_values);
-    free(sort_values);
-
-    /* Check that all the values are there in lookup. */
-    for (i = 0; i < n; i++) {
-        size_t count = 0;
-
-        HMAP_FOR_EACH_WITH_HASH (e, node, hash(values[i]), hmap) {
-            count += e->value == values[i];
-        }
-        assert(count == 1);
-    }
-
-    /* Check counters. */
-    assert(hmap_is_empty(hmap) == !n);
-    assert(hmap_count(hmap) == n);
-}
-
-/* Puts the 'n' values in 'values' into 'elements', and then puts those
- * elements into 'hmap'. */
-static void
-make_hmap(struct hmap *hmap, struct element elements[],
-          int values[], size_t n, hash_func *hash)
-{
-    size_t i;
-
-    hmap_init(hmap);
-    for (i = 0; i < n; i++) {
-        elements[i].value = i;
-        hmap_insert(hmap, &elements[i].node, hash(elements[i].value));
-        values[i] = i;
-    }
-}
-
-static void
-shuffle(int *p, size_t n)
-{
-    for (; n > 1; n--, p++) {
-        int *q = &p[random_range(n)];
-        int tmp = *p;
-        *p = *q;
-        *q = tmp;
-    }
-}
-
-#if 0
-/* Prints the values in 'hmap', plus 'name' as a title. */
-static void
-print_hmap(const char *name, struct hmap *hmap)
-{
-    struct element *e;
-
-    printf("%s:", name);
-    HMAP_FOR_EACH (e, node, hmap) {
-        printf(" %d(%"PRIuSIZE")", e->value, e->node.hash & hmap->mask);
-    }
-    printf("\n");
-}
-
-/* Prints the 'n' values in 'values', plus 'name' as a title. */
-static void
-print_ints(const char *name, const int *values, size_t n)
-{
-    size_t i;
-
-    printf("%s:", name);
-    for (i = 0; i < n; i++) {
-        printf(" %d", values[i]);
-    }
-    printf("\n");
-}
-#endif
-
-static size_t
-identity_hash(int value)
-{
-    return value;
-}
-
-static size_t
-good_hash(int value)
-{
-    return hash_int(value, 0x1234abcd);
-}
-
-static size_t
-constant_hash(int value OVS_UNUSED)
-{
-    return 123;
-}
-
-/* Tests basic hmap insertion and deletion. */
-static void
-test_hmap_insert_delete(hash_func *hash)
-{
-    enum { N_ELEMS = 100 };
-
-    struct element elements[N_ELEMS];
-    int values[N_ELEMS];
-    struct hmap hmap;
-    size_t i;
-
-    hmap_init(&hmap);
-    for (i = 0; i < N_ELEMS; i++) {
-        elements[i].value = i;
-        hmap_insert(&hmap, &elements[i].node, hash(i));
-        values[i] = i;
-        check_hmap(&hmap, values, i + 1, hash);
-    }
-    shuffle(values, N_ELEMS);
-    for (i = 0; i < N_ELEMS; i++) {
-        hmap_remove(&hmap, &elements[values[i]].node);
-        check_hmap(&hmap, values + (i + 1), N_ELEMS - (i + 1), hash);
-    }
-    hmap_destroy(&hmap);
-}
-
-/* Tests basic hmap_reserve() and hmap_shrink(). */
-static void
-test_hmap_reserve_shrink(hash_func *hash)
-{
-    enum { N_ELEMS = 32 };
-
-    size_t i;
-
-    for (i = 0; i < N_ELEMS; i++) {
-        struct element elements[N_ELEMS];
-        int values[N_ELEMS];
-        struct hmap hmap;
-        size_t j;
-
-        hmap_init(&hmap);
-        hmap_reserve(&hmap, i);
-        for (j = 0; j < N_ELEMS; j++) {
-            elements[j].value = j;
-            hmap_insert(&hmap, &elements[j].node, hash(j));
-            values[j] = j;
-            check_hmap(&hmap, values, j + 1, hash);
-        }
-        shuffle(values, N_ELEMS);
-        for (j = 0; j < N_ELEMS; j++) {
-            hmap_remove(&hmap, &elements[values[j]].node);
-            hmap_shrink(&hmap);
-            check_hmap(&hmap, values + (j + 1), N_ELEMS - (j + 1), hash);
-        }
-        hmap_destroy(&hmap);
-    }
-}
-
-/* Tests that HMAP_FOR_EACH_SAFE properly allows for deletion of the current
- * element of a hmap.  */
-static void
-test_hmap_for_each_safe(hash_func *hash)
-{
-    enum { MAX_ELEMS = 10 };
-    size_t n;
-    unsigned long int pattern;
-
-    for (n = 0; n <= MAX_ELEMS; n++) {
-        for (pattern = 0; pattern < 1ul << n; pattern++) {
-            struct element elements[MAX_ELEMS];
-            int values[MAX_ELEMS];
-            struct hmap hmap;
-            struct element *e, *next;
-            size_t n_remaining;
-            int i;
-
-            make_hmap(&hmap, elements, values, n, hash);
-
-            i = 0;
-            n_remaining = n;
-            HMAP_FOR_EACH_SAFE (e, next, node, &hmap) {
-                assert(i < n);
-                if (pattern & (1ul << e->value)) {
-                    size_t j;
-                    hmap_remove(&hmap, &e->node);
-                    for (j = 0; ; j++) {
-                        assert(j < n_remaining);
-                        if (values[j] == e->value) {
-                            values[j] = values[--n_remaining];
-                            break;
-                        }
-                    }
-                }
-                check_hmap(&hmap, values, n_remaining, hash);
-                i++;
-            }
-            assert(i == n);
-
-            for (i = 0; i < n; i++) {
-                if (pattern & (1ul << i)) {
-                    n_remaining++;
-                }
-            }
-            assert(n == n_remaining);
-
-            hmap_destroy(&hmap);
-        }
-    }
-}
-
-/* Tests that HMAP_FOR_EACH_POP removes every element of a hmap. */
-static void
-test_hmap_for_each_pop(hash_func *hash)
-{
-    enum { MAX_ELEMS = 10 };
-    size_t n;
-
-    for (n = 0; n <= MAX_ELEMS; n++) {
-        struct element elements[MAX_ELEMS];
-        int values[MAX_ELEMS];
-        struct hmap hmap;
-        struct element *e;
-        size_t n_remaining, i;
-
-        make_hmap(&hmap, elements, values, n, hash);
-
-        i = 0;
-        n_remaining = n;
-        HMAP_FOR_EACH_POP (e, node, &hmap) {
-            size_t j;
-
-            assert(i < n);
-
-            for (j = 0; ; j++) {
-                assert(j < n_remaining);
-                if (values[j] == e->value) {
-                    values[j] = values[--n_remaining];
-                    break;
-                }
-            }
-            /* Trash the element memory (including the hmap node) */
-            memset(e, 0, sizeof *e);
-            check_hmap(&hmap, values, n_remaining, hash);
-            i++;
-        }
-        assert(i == n);
-
-        hmap_destroy(&hmap);
-    }
-}
-
-static void
-run_test(void (*function)(hash_func *))
-{
-    hash_func *hash_funcs[] = { identity_hash, good_hash, constant_hash };
-    size_t i;
-
-    for (i = 0; i < ARRAY_SIZE(hash_funcs); i++) {
-        function(hash_funcs[i]);
-        printf(".");
-        fflush(stdout);
-    }
-}
-
-static void
-test_hmap_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    run_test(test_hmap_insert_delete);
-    run_test(test_hmap_for_each_safe);
-    run_test(test_hmap_reserve_shrink);
-    run_test(test_hmap_for_each_pop);
-    printf("\n");
-}
-
-OVSTEST_REGISTER("test-hmap", test_hmap_main);
diff --git a/tests/test-json.c b/tests/test-json.c
deleted file mode 100644
index a7ee595e0..000000000
--- a/tests/test-json.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 2014 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "openvswitch/json.h"
-#include <ctype.h>
-#include <errno.h>
-#include <getopt.h>
-#include <stdio.h>
-#include "ovstest.h"
-#include "util.h"
-
-/* --pretty: If set, the JSON output is pretty-printed, instead of printed as
- * compactly as possible.  */
-static int pretty = 0;
-
-/* --multiple: If set, the input is a sequence of JSON objects or arrays,
- * instead of exactly one object or array. */
-static int multiple = 0;
-
-static bool
-print_and_free_json(struct json *json)
-{
-    bool ok;
-    if (json->type == JSON_STRING) {
-        printf("error: %s\n", json->string);
-        ok = false;
-    } else {
-        char *s = json_to_string(json, JSSF_SORT | (pretty ? JSSF_PRETTY : 0));
-        puts(s);
-        free(s);
-        ok = true;
-    }
-    json_destroy(json);
-    return ok;
-}
-
-static bool
-refill(FILE *file, void *buffer, size_t buffer_size, size_t *n, size_t *used)
-{
-    *used = 0;
-    if (feof(file)) {
-        *n = 0;
-        return false;
-    } else {
-        *n = fread(buffer, 1, buffer_size, file);
-        if (ferror(file)) {
-            ovs_fatal(errno, "Error reading input file");
-        }
-        return *n > 0;
-    }
-}
-
-static bool
-parse_multiple(FILE *stream)
-{
-    struct json_parser *parser;
-    char buffer[BUFSIZ];
-    size_t n, used;
-    bool ok;
-
-    parser = NULL;
-    n = used = 0;
-    ok = true;
-    while (used < n || refill(stream, buffer, sizeof buffer, &n, &used)) {
-        if (!parser && isspace((unsigned char) buffer[used])) {
-            /* Skip white space. */
-            used++;
-        } else {
-            if (!parser) {
-                parser = json_parser_create(0);
-            }
-
-            used += json_parser_feed(parser, &buffer[used], n - used);
-            if (used < n) {
-                if (!print_and_free_json(json_parser_finish(parser))) {
-                    ok = false;
-                }
-                parser = NULL;
-            }
-        }
-    }
-    if (parser) {
-        if (!print_and_free_json(json_parser_finish(parser))) {
-            ok = false;
-        }
-    }
-    return ok;
-}
-
-static void
-test_json_main(int argc, char *argv[])
-{
-    const char *input_file;
-    FILE *stream;
-    bool ok;
-
-    set_program_name(argv[0]);
-
-    for (;;) {
-        static const struct option options[] = {
-            {"pretty", no_argument, &pretty, 1},
-            {"multiple", no_argument, &multiple, 1},
-        };
-        int option_index = 0;
-        int c = getopt_long (argc, argv, "", options, &option_index);
-
-        if (c == -1) {
-            break;
-        }
-        switch (c) {
-        case 0:
-            break;
-
-        case '?':
-            exit(1);
-
-        default:
-            abort();
-        }
-    }
-
-    if (argc - optind != 1) {
-        ovs_fatal(0, "usage: %s [--pretty] [--multiple] INPUT.json",
-                  program_name);
-    }
-
-    input_file = argv[optind];
-    stream = !strcmp(input_file, "-") ? stdin : fopen(input_file, "r");
-    if (!stream) {
-        ovs_fatal(errno, "Cannot open \"%s\"", input_file);
-    }
-
-    if (multiple) {
-        ok = parse_multiple(stream);
-    } else {
-        ok = print_and_free_json(json_from_stream(stream));
-    }
-
-    fclose(stream);
-
-    exit(!ok);
-}
-
-OVSTEST_REGISTER("test-json", test_json_main);
diff --git a/tests/test-json.py b/tests/test-json.py
deleted file mode 100644
index 582aa720a..000000000
--- a/tests/test-json.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright (c) 2009, 2010 Nicira, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from __future__ import print_function
-
-import codecs
-import getopt
-import sys
-
-import ovs.json
-
-import six
-
-
-def print_json(json):
-    if isinstance(json, six.string_types):
-        print("error: %s" % json)
-        return False
-    else:
-        ovs.json.to_stream(json, sys.stdout)
-        sys.stdout.write("\n")
-        return True
-
-
-def parse_multiple(stream):
-    buf = stream.read(4096)
-    ok = True
-    parser = None
-    while len(buf):
-        if parser is None and buf[0] in " \t\r\n":
-            buf = buf[1:]
-        else:
-            if parser is None:
-                parser = ovs.json.Parser()
-            n = parser.feed(buf)
-            buf = buf[n:]
-            if len(buf):
-                if not print_json(parser.finish()):
-                    ok = False
-                parser = None
-        if len(buf) == 0:
-            buf = stream.read(4096)
-    if parser and not print_json(parser.finish()):
-        ok = False
-    return ok
-
-
-def main(argv):
-    argv0 = argv[0]
-
-    # When this is used with Python 3, the program produces no output.
-    if six.PY2:
-        # Make stdout and stderr UTF-8, even if they are redirected to a file.
-        sys.stdout = codecs.getwriter("utf-8")(sys.stdout)
-        sys.stderr = codecs.getwriter("utf-8")(sys.stderr)
-
-    try:
-        options, args = getopt.gnu_getopt(argv[1:], '', ['multiple'])
-    except getopt.GetoptError as geo:
-        sys.stderr.write("%s: %s\n" % (argv0, geo.msg))
-        sys.exit(1)
-
-    multiple = False
-    for key, value in options:
-        if key == '--multiple':
-            multiple = True
-        else:
-            sys.stderr.write("%s: unhandled option %s\n" % (argv0, key))
-            sys.exit(1)
-
-    if len(args) != 1:
-        sys.stderr.write("usage: %s [--multiple] INPUT.json\n" % argv0)
-        sys.exit(1)
-
-    input_file = args[0]
-    if input_file == "-":
-        stream = sys.stdin
-    else:
-        stream = open(input_file, "r")
-
-    if multiple:
-        ok = parse_multiple(stream)
-    else:
-        ok = print_json(ovs.json.from_stream(stream))
-
-    if not ok:
-        sys.exit(1)
-
-
-if __name__ == '__main__':
-    main(sys.argv)
diff --git a/tests/test-jsonrpc.c b/tests/test-jsonrpc.c
deleted file mode 100644
index 04e941b14..000000000
--- a/tests/test-jsonrpc.c
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "jsonrpc.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <getopt.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "command-line.h"
-#include "daemon.h"
-#include "openvswitch/json.h"
-#include "ovstest.h"
-#include "openvswitch/poll-loop.h"
-#include "stream-ssl.h"
-#include "stream.h"
-#include "timeval.h"
-#include "util.h"
-#include "openvswitch/vlog.h"
-
-OVS_NO_RETURN static void usage(void);
-static void parse_options(int argc, char *argv[]);
-static struct ovs_cmdl_command *get_all_commands(void);
-
-static void
-test_jsonrpc_main(int argc, char *argv[])
-{
-    struct ovs_cmdl_context ctx = { .argc = 0, };
-    ovs_cmdl_proctitle_init(argc, argv);
-    set_program_name(argv[0]);
-    service_start(&argc, &argv);
-    parse_options(argc, argv);
-    ctx.argc = argc - optind;
-    ctx.argv = argv + optind;
-    ovs_cmdl_run_command(&ctx, get_all_commands());
-}
-
-static void
-parse_options(int argc, char *argv[])
-{
-    enum {
-        OPT_BOOTSTRAP_CA_CERT = UCHAR_MAX + 1,
-        DAEMON_OPTION_ENUMS,
-        SSL_OPTION_ENUMS,
-    };
-    static const struct option long_options[] = {
-        {"verbose", optional_argument, NULL, 'v'},
-        {"help", no_argument, NULL, 'h'},
-        DAEMON_LONG_OPTIONS,
-        {"bootstrap-ca-cert", required_argument, NULL, OPT_BOOTSTRAP_CA_CERT},
-        STREAM_SSL_LONG_OPTIONS,
-        {NULL, 0, NULL, 0},
-    };
-    char *short_options = ovs_cmdl_long_options_to_short_options(long_options);
-
-    for (;;) {
-        int c = getopt_long(argc, argv, short_options, long_options, NULL);
-        if (c == -1) {
-            break;
-        }
-
-        switch (c) {
-        case 'h':
-            usage();
-
-        case 'v':
-            vlog_set_verbosity(optarg);
-            break;
-
-        DAEMON_OPTION_HANDLERS
-
-        STREAM_SSL_OPTION_HANDLERS
-
-        case OPT_BOOTSTRAP_CA_CERT:
-            stream_ssl_set_ca_cert_file(optarg, true);
-            break;
-
-        case '?':
-            exit(EXIT_FAILURE);
-
-        default:
-            abort();
-        }
-    }
-    free(short_options);
-}
-
-static void
-usage(void)
-{
-    printf("%s: JSON-RPC test utility\n"
-           "usage: %s [OPTIONS] COMMAND [ARG...]\n"
-           "  listen LOCAL             listen for connections on LOCAL\n"
-           "  request REMOTE METHOD PARAMS   send request, print reply\n"
-           "  notify REMOTE METHOD PARAMS  send notification and exit\n",
-           program_name, program_name);
-    stream_usage("JSON-RPC", true, true, true);
-    daemon_usage();
-    vlog_usage();
-    printf("\nOther options:\n"
-           "  -h, --help                  display this help message\n");
-    exit(EXIT_SUCCESS);
-}
-
-/* Command helper functions. */
-
-static struct json *
-parse_json(const char *s)
-{
-    struct json *json = json_from_string(s);
-    if (json->type == JSON_STRING) {
-        ovs_fatal(0, "\"%s\": %s", s, json->string);
-    }
-    return json;
-}
-
-static void
-print_and_free_json(struct json *json)
-{
-    char *string = json_to_string(json, JSSF_SORT);
-    json_destroy(json);
-    puts(string);
-    free(string);
-}
-
-/* Command implementations. */
-
-static int
-handle_rpc(struct jsonrpc *rpc, struct jsonrpc_msg *msg, bool *done)
-{
-    if (msg->type == JSONRPC_REQUEST) {
-        struct jsonrpc_msg *reply = NULL;
-        if (!strcmp(msg->method, "echo")) {
-            reply = jsonrpc_create_reply(json_clone(msg->params), msg->id);
-        } else {
-            struct json *error = json_object_create();
-            json_object_put_string(error, "error", "unknown method");
-            reply = jsonrpc_create_error(error, msg->id);
-            ovs_error(0, "unknown request %s", msg->method);
-        }
-        jsonrpc_send(rpc, reply);
-        return 0;
-    } else if (msg->type == JSONRPC_NOTIFY) {
-        if (!strcmp(msg->method, "shutdown")) {
-            *done = true;
-            return 0;
-        } else {
-            ovs_error(0, "unknown notification %s", msg->method);
-            return ENOTTY;
-        }
-    } else {
-        ovs_error(0, "unsolicited JSON-RPC reply or error");
-        return EPROTO;
-    }
-}
-
-static void
-do_listen(struct ovs_cmdl_context *ctx)
-{
-    struct pstream *pstream;
-    struct jsonrpc **rpcs;
-    size_t n_rpcs, allocated_rpcs;
-    bool done;
-    int error;
-
-    error = jsonrpc_pstream_open(ctx->argv[1], &pstream, DSCP_DEFAULT);
-    if (error) {
-        ovs_fatal(error, "could not listen on \"%s\"", ctx->argv[1]);
-    }
-
-    daemonize();
-
-    rpcs = NULL;
-    n_rpcs = allocated_rpcs = 0;
-    done = false;
-    for (;;) {
-        struct stream *stream;
-        size_t i;
-
-        /* Accept new connections. */
-        error = pstream_accept(pstream, &stream);
-        if (!error) {
-            if (n_rpcs >= allocated_rpcs) {
-                rpcs = x2nrealloc(rpcs, &allocated_rpcs, sizeof *rpcs);
-            }
-            rpcs[n_rpcs++] = jsonrpc_open(stream);
-        } else if (error != EAGAIN) {
-            ovs_fatal(error, "pstream_accept failed");
-        }
-
-        /* Service existing connections. */
-        for (i = 0; i < n_rpcs; ) {
-            struct jsonrpc *rpc = rpcs[i];
-            struct jsonrpc_msg *msg;
-
-            jsonrpc_run(rpc);
-            if (!jsonrpc_get_backlog(rpc)) {
-                error = jsonrpc_recv(rpc, &msg);
-                if (!error) {
-                    error = handle_rpc(rpc, msg, &done);
-                    jsonrpc_msg_destroy(msg);
-                } else if (error == EAGAIN) {
-                    error = 0;
-                }
-            }
-
-            if (!error) {
-                error = jsonrpc_get_status(rpc);
-            }
-            if (error) {
-                jsonrpc_close(rpc);
-                ovs_error(error, "connection closed");
-                memmove(&rpcs[i], &rpcs[i + 1],
-                        (n_rpcs - i - 1) * sizeof *rpcs);
-                n_rpcs--;
-            } else {
-                i++;
-            }
-        }
-
-        /* Wait for something to do. */
-        if (done && !n_rpcs) {
-            break;
-        }
-        pstream_wait(pstream);
-        for (i = 0; i < n_rpcs; i++) {
-            struct jsonrpc *rpc = rpcs[i];
-
-            jsonrpc_wait(rpc);
-            if (!jsonrpc_get_backlog(rpc)) {
-                jsonrpc_recv_wait(rpc);
-            }
-        }
-        poll_block();
-    }
-    free(rpcs);
-    pstream_close(pstream);
-}
-
-static void
-do_request(struct ovs_cmdl_context *ctx)
-{
-    struct jsonrpc_msg *msg;
-    struct jsonrpc *rpc;
-    struct json *params;
-    struct stream *stream;
-    const char *method;
-    char *string;
-    int error;
-
-    method = ctx->argv[2];
-    params = parse_json(ctx->argv[3]);
-    msg = jsonrpc_create_request(method, params, NULL);
-    string = jsonrpc_msg_is_valid(msg);
-    if (string) {
-        ovs_fatal(0, "not a valid JSON-RPC request: %s", string);
-    }
-
-    error = stream_open_block(jsonrpc_stream_open(ctx->argv[1], &stream,
-                              DSCP_DEFAULT), -1, &stream);
-    if (error) {
-        ovs_fatal(error, "could not open \"%s\"", ctx->argv[1]);
-    }
-    rpc = jsonrpc_open(stream);
-
-    error = jsonrpc_send(rpc, msg);
-    if (error) {
-        ovs_fatal(error, "could not send request");
-    }
-
-    error = jsonrpc_recv_block(rpc, &msg);
-    if (error) {
-        ovs_fatal(error, "error waiting for reply");
-    }
-    print_and_free_json(jsonrpc_msg_to_json(msg));
-
-    jsonrpc_close(rpc);
-}
-
-static void
-do_notify(struct ovs_cmdl_context *ctx)
-{
-    struct jsonrpc_msg *msg;
-    struct jsonrpc *rpc;
-    struct json *params;
-    struct stream *stream;
-    const char *method;
-    char *string;
-    int error;
-
-    method = ctx->argv[2];
-    params = parse_json(ctx->argv[3]);
-    msg = jsonrpc_create_notify(method, params);
-    string = jsonrpc_msg_is_valid(msg);
-    if (string) {
-        ovs_fatal(0, "not a JSON RPC-valid notification: %s", string);
-    }
-
-    error = stream_open_block(jsonrpc_stream_open(ctx->argv[1], &stream,
-                              DSCP_DEFAULT), -1, &stream);
-    if (error) {
-        ovs_fatal(error, "could not open \"%s\"", ctx->argv[1]);
-    }
-    rpc = jsonrpc_open(stream);
-
-    error = jsonrpc_send_block(rpc, msg);
-    if (error) {
-        ovs_fatal(error, "could not send notification");
-    }
-    jsonrpc_close(rpc);
-}
-
-static void
-do_help(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    usage();
-}
-
-static struct ovs_cmdl_command all_commands[] = {
-    { "listen", NULL, 1, 1, do_listen, OVS_RO },
-    { "request", NULL, 3, 3, do_request, OVS_RO },
-    { "notify", NULL, 3, 3, do_notify, OVS_RO },
-    { "help", NULL, 0, INT_MAX, do_help, OVS_RO },
-    { NULL, NULL, 0, 0, NULL, OVS_RO },
-};
-
-static struct ovs_cmdl_command *
-get_all_commands(void)
-{
-    return all_commands;
-}
-
-OVSTEST_REGISTER("test-jsonrpc", test_jsonrpc_main);
diff --git a/tests/test-jsonrpc.py b/tests/test-jsonrpc.py
deleted file mode 100644
index 3eabcd78d..000000000
--- a/tests/test-jsonrpc.py
+++ /dev/null
@@ -1,223 +0,0 @@
-# Copyright (c) 2009, 2010, 2011 Nicira, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from __future__ import print_function
-
-import argparse
-import errno
-import os
-import sys
-
-import ovs.daemon
-import ovs.json
-import ovs.jsonrpc
-import ovs.poller
-import ovs.stream
-
-
-def handle_rpc(rpc, msg):
-    done = False
-    reply = None
-
-    if msg.type == ovs.jsonrpc.Message.T_REQUEST:
-        if msg.method == "echo":
-            reply = ovs.jsonrpc.Message.create_reply(msg.params, msg.id)
-        else:
-            reply = ovs.jsonrpc.Message.create_error(
-                {"error": "unknown method"}, msg.id)
-            sys.stderr.write("unknown request %s" % msg.method)
-    elif msg.type == ovs.jsonrpc.Message.T_NOTIFY:
-        if msg.method == "shutdown":
-            done = True
-        else:
-            rpc.error(errno.ENOTTY)
-            sys.stderr.write("unknown notification %s" % msg.method)
-    else:
-        rpc.error(errno.EPROTO)
-        sys.stderr.write("unsolicited JSON-RPC reply or error\n")
-
-    if reply:
-        rpc.send(reply)
-    return done
-
-
-def do_listen(name):
-    if sys.platform != 'win32' or (
-            ovs.daemon._detach and ovs.daemon._detached):
-        # On Windows the child is a new process created which should be the
-        # one that creates the PassiveStream. Without this check, the new
-        # child process will create a new PassiveStream overwriting the one
-        # that the parent process created.
-        error, pstream = ovs.stream.PassiveStream.open(name)
-        if error:
-            sys.stderr.write("could not listen on \"%s\": %s\n"
-                             % (name, os.strerror(error)))
-            sys.exit(1)
-
-    ovs.daemon.daemonize()
-
-    rpcs = []
-    done = False
-    while True:
-        # Accept new connections.
-        error, stream = pstream.accept()
-        if stream:
-            rpcs.append(ovs.jsonrpc.Connection(stream))
-        elif error != errno.EAGAIN:
-            sys.stderr.write("PassiveStream.accept() failed\n")
-            sys.exit(1)
-
-        # Service existing connections.
-        dead_rpcs = []
-        for rpc in rpcs:
-            rpc.run()
-
-            error = 0
-            if not rpc.get_backlog():
-                error, msg = rpc.recv()
-                if not error:
-                    if handle_rpc(rpc, msg):
-                        done = True
-
-            error = rpc.get_status()
-            if error:
-                rpc.close()
-                dead_rpcs.append(rpc)
-        rpcs = [rpc for rpc in rpcs if rpc not in dead_rpcs]
-
-        if done and not rpcs:
-            break
-
-        poller = ovs.poller.Poller()
-        pstream.wait(poller)
-        for rpc in rpcs:
-            rpc.wait(poller)
-            if not rpc.get_backlog():
-                rpc.recv_wait(poller)
-        poller.block()
-    pstream.close()
-
-
-def do_request(name, method, params_string):
-    params = ovs.json.from_string(params_string)
-    msg = ovs.jsonrpc.Message.create_request(method, params)
-    s = msg.is_valid()
-    if s:
-        sys.stderr.write("not a valid JSON-RPC request: %s\n" % s)
-        sys.exit(1)
-
-    error, stream = ovs.stream.Stream.open_block(ovs.stream.Stream.open(name))
-    if error:
-        sys.stderr.write("could not open \"%s\": %s\n"
-                         % (name, os.strerror(error)))
-        sys.exit(1)
-
-    rpc = ovs.jsonrpc.Connection(stream)
-
-    error = rpc.send(msg)
-    if error:
-        sys.stderr.write("could not send request: %s\n" % os.strerror(error))
-        sys.exit(1)
-
-    error, msg = rpc.recv_block()
-    if error:
-        sys.stderr.write("error waiting for reply: %s\n" % os.strerror(error))
-        sys.exit(1)
-
-    print(ovs.json.to_string(msg.to_json()))
-
-    rpc.close()
-
-
-def do_notify(name, method, params_string):
-    params = ovs.json.from_string(params_string)
-    msg = ovs.jsonrpc.Message.create_notify(method, params)
-    s = msg.is_valid()
-    if s:
-        sys.stderr.write("not a valid JSON-RPC notification: %s\n" % s)
-        sys.exit(1)
-
-    error, stream = ovs.stream.Stream.open_block(ovs.stream.Stream.open(name))
-    if error:
-        sys.stderr.write("could not open \"%s\": %s\n"
-                         % (name, os.strerror(error)))
-        sys.exit(1)
-
-    rpc = ovs.jsonrpc.Connection(stream)
-
-    error = rpc.send_block(msg)
-    if error:
-        sys.stderr.write("could not send notification: %s\n"
-                         % os.strerror(error))
-        sys.exit(1)
-
-    rpc.close()
-
-
-def main(argv):
-
-    parser = argparse.ArgumentParser(
-            description="JSON-RPC test utility for Python.",
-            formatter_class=argparse.RawDescriptionHelpFormatter)
-
-    commands = {"listen": (do_listen, 1),
-                "request": (do_request, 3),
-                "notify": (do_notify, 3),
-                "help": (parser.print_help, (0,))}
-
-    group_description = """\
-listen LOCAL             listen for connections on LOCAL
-request REMOTE METHOD PARAMS   send request, print reply
-notify REMOTE METHOD PARAMS  send notification and exit
-""" + ovs.stream.usage("JSON-RPC")
-
-    group = parser.add_argument_group(title="Commands",
-                                      description=group_description)
-    group.add_argument('command', metavar="COMMAND", nargs=1,
-                        choices=commands, help="Command to use.")
-    group.add_argument('command_args', metavar="ARG", nargs='*',
-                       help="Arguments to COMMAND.")
-
-    ovs.daemon.add_args(parser)
-    args = parser.parse_args()
-    ovs.daemon.handle_args(args)
-
-    command_name = args.command[0]
-    args = args.command_args
-    if command_name not in commands:
-        sys.stderr.write("%s: unknown command \"%s\" "
-                         "(use --help for help)\n" % (argv[0], command_name))
-        sys.exit(1)
-
-    func, n_args = commands[command_name]
-    if type(n_args) == tuple:
-        if len(args) < n_args[0]:
-            sys.stderr.write("%s: \"%s\" requires at least %d arguments but "
-                             "only %d provided\n"
-                             % (argv[0], command_name, n_args, len(args)))
-            sys.exit(1)
-    elif type(n_args) == int:
-        if len(args) != n_args:
-            sys.stderr.write("%s: \"%s\" requires %d arguments but %d "
-                             "provided\n"
-                             % (argv[0], command_name, n_args, len(args)))
-            sys.exit(1)
-    else:
-        assert False
-
-    func(*args)
-
-
-if __name__ == '__main__':
-    main(sys.argv)
diff --git a/tests/test-lib.c b/tests/test-lib.c
deleted file mode 100644
index bcb5bb782..000000000
--- a/tests/test-lib.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2014 Cisco Systems, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include <openvswitch/compiler.h>
-#include <openvswitch/thread.h>
-#include <openvswitch/types.h>
-#include <openvswitch/util.h>
-#include <openvswitch/vconn.h>
-#include <openvswitch/vlog.h>
-
-static void
-show_version(void)
-{
-    printf("%s - %s\n",
-           ovs_get_program_name(), ovs_get_program_version());
-    exit(EXIT_SUCCESS);
-}
-
-static void
-usage(void)
-{
-    printf("%s: Open vSwitch library test utility\n"
-           "usage: %s [OPTIONS] COMMAND [ARG...]\n\n",
-           ovs_get_program_name(), ovs_get_program_name());
-    vlog_usage();
-    exit(EXIT_SUCCESS);
-}
-
-static void
-parse_options(int argc, char *argv[])
-{
-    static const struct option long_options[] = {
-        {"help", no_argument, NULL, 'h'},
-        {"version", no_argument, NULL, 'V'},
-        {"verbose", optional_argument, NULL, 'v'},
-        {NULL, 0, NULL, 0},
-    };
-    char *short_options = "hVv";
-
-    for (;;) {
-        int c;
-
-        c = getopt_long(argc, argv, short_options, long_options, NULL);
-        if (c == -1) {
-            break;
-        }
-
-        switch (c) {
-        case 'V':
-            show_version();
-            break;
-
-        case 'h':
-            usage();
-            break;
-
-        case 'v':
-            vlog_set_verbosity(optarg);
-            break;
-
-        case '?':
-            exit(EXIT_FAILURE);
-
-        default:
-            abort();
-        }
-    }
-}
-
-int
-main(int argc, char *argv[])
-{
-    ovs_set_program_name(argv[0], "1.0");
-    parse_options(argc, argv);
-
-    return 0;
-}
diff --git a/tests/test-list.c b/tests/test-list.c
deleted file mode 100644
index 6f1fb059b..000000000
--- a/tests/test-list.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 2010, 2011, 2014 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* A non-exhaustive test for some of the functions and macros declared in
- * openvswitch/list.h. */
-
-#include <config.h>
-#undef NDEBUG
-#include "openvswitch/list.h"
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include "ovstest.h"
-
-/* Sample list element. */
-struct element {
-    int value;
-    struct ovs_list node;
-};
-
-/* Puts the 'n' values in 'values' into 'elements', and then puts those
- * elements in order into 'list'. */
-static void
-make_list(struct ovs_list *list, struct element elements[],
-          int values[], size_t n)
-{
-    size_t i;
-
-    ovs_list_init(list);
-    for (i = 0; i < n; i++) {
-        elements[i].value = i;
-        ovs_list_push_back(list, &elements[i].node);
-        values[i] = i;
-    }
-}
-
-/* Verifies that 'list' contains exactly the 'n' values in 'values', in the
- * specified order. */
-static void
-check_list(struct ovs_list *list, const int values[], size_t n)
-{
-    struct element *e;
-    size_t i;
-
-    i = 0;
-    LIST_FOR_EACH (e, node, list) {
-        assert(i < n);
-        assert(e->value == values[i]);
-        i++;
-    }
-    assert(&e->node == list);
-    assert(i == n);
-
-    i = 0;
-    LIST_FOR_EACH_REVERSE (e, node, list) {
-        assert(i < n);
-        assert(e->value == values[n - i - 1]);
-        i++;
-    }
-    assert(&e->node == list);
-    assert(i == n);
-
-    assert(ovs_list_is_empty(list) == !n);
-    assert(ovs_list_is_singleton(list) == (n == 1));
-    assert(ovs_list_is_short(list) == (n < 2));
-    assert(ovs_list_size(list) == n);
-}
-
-#if 0
-/* Prints the values in 'list', plus 'name' as a title. */
-static void
-print_list(const char *name, struct ovs_list *list)
-{
-    struct element *e;
-
-    printf("%s:", name);
-    LIST_FOR_EACH (e, node, list) {
-        printf(" %d", e->value);
-    }
-    printf("\n");
-}
-#endif
-
-/* Tests basic list construction. */
-static void
-test_list_construction(void)
-{
-    enum { MAX_ELEMS = 100 };
-    size_t n;
-
-    for (n = 0; n <= MAX_ELEMS; n++) {
-        struct element elements[MAX_ELEMS];
-        int values[MAX_ELEMS];
-        struct ovs_list list;
-
-        make_list(&list, elements, values, n);
-        check_list(&list, values, n);
-    }
-}
-
-/* Tests that LIST_FOR_EACH_SAFE properly allows for deletion of the current
- * element of a list.  */
-static void
-test_list_for_each_safe(void)
-{
-    enum { MAX_ELEMS = 10 };
-    size_t n;
-    unsigned long int pattern;
-
-    for (n = 0; n <= MAX_ELEMS; n++) {
-        for (pattern = 0; pattern < 1ul << n; pattern++) {
-            struct element elements[MAX_ELEMS];
-            int values[MAX_ELEMS];
-            struct ovs_list list;
-            struct element *e, *next;
-            size_t values_idx, n_remaining;
-            int i;
-
-            make_list(&list, elements, values, n);
-
-            i = 0;
-            values_idx = 0;
-            n_remaining = n;
-            LIST_FOR_EACH_SAFE (e, next, node, &list) {
-                assert(i < n);
-                if (pattern & (1ul << i)) {
-                    ovs_list_remove(&e->node);
-                    n_remaining--;
-                    memmove(&values[values_idx], &values[values_idx + 1],
-                            sizeof *values * (n_remaining - values_idx));
-                } else {
-                    values_idx++;
-                }
-                check_list(&list, values, n_remaining);
-                i++;
-            }
-            assert(i == n);
-            assert(&e->node == &list);
-
-            for (i = 0; i < n; i++) {
-                if (pattern & (1ul << i)) {
-                    n_remaining++;
-                }
-            }
-            assert(n == n_remaining);
-        }
-    }
-}
-
-/* Tests that LIST_FOR_EACH_POP removes the elements of a list.  */
-static void
-test_list_for_each_pop(void)
-{
-    enum { MAX_ELEMS = 10 };
-    size_t n;
-
-    for (n = 0; n <= MAX_ELEMS; n++) {
-        struct element elements[MAX_ELEMS];
-        int values[MAX_ELEMS];
-        struct ovs_list list;
-        struct element *e;
-        size_t n_remaining;
-
-        make_list(&list, elements, values, n);
-
-        n_remaining = n;
-        LIST_FOR_EACH_POP (e, node, &list) {
-            n_remaining--;
-            memmove(values, values + 1, sizeof *values * n_remaining);
-            check_list(&list, values, n_remaining);
-        }
-    }
-}
-
-/* Tests the transplant of one list into another  */
-static void
-test_list_push_back_all(void)
-{
-    struct ovs_list list_a, list_b;
-    struct element a, b, c, d;
-
-    a.value = 0;
-    b.value = 1;
-    c.value = 2;
-    d.value = 3;
-
-    ovs_list_init(&list_a);
-    ovs_list_init(&list_b);
-
-    ovs_list_insert(&list_a, &a.node);
-    ovs_list_insert(&list_a, &b.node);
-    ovs_list_insert(&list_b, &c.node);
-    ovs_list_insert(&list_b, &d.node);
-
-    /* Check test preconditions */
-    assert(2 == ovs_list_size(&list_a));
-    assert(2 == ovs_list_size(&list_b));
-
-    /* Perform transplant */
-    ovs_list_push_back_all(&list_a, &list_b);
-
-    /* Check expected result */
-    assert(4 == ovs_list_size(&list_a));
-    assert(0 == ovs_list_size(&list_b));
-
-    struct element *node;
-    int n = 0;
-    LIST_FOR_EACH(node, node, &list_a) {
-        assert(n == node->value);
-        n++;
-    }
-    assert(n == 4);
-}
-
-static void
-run_test(void (*function)(void))
-{
-    function();
-    printf(".");
-}
-
-static void
-test_list_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    run_test(test_list_construction);
-    run_test(test_list_for_each_safe);
-    run_test(test_list_for_each_pop);
-    run_test(test_list_push_back_all);
-    printf("\n");
-}
-
-OVSTEST_REGISTER("test-list", test_list_main);
diff --git a/tests/test-lockfile.c b/tests/test-lockfile.c
deleted file mode 100644
index d0c8dc480..000000000
--- a/tests/test-lockfile.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 2011, 2012, 2014 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "lockfile.h"
-#include <errno.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include "ovstest.h"
-#include "process.h"
-#include "timeval.h"
-#include "util.h"
-#include "openvswitch/vlog.h"
-
-struct test {
-    const char *name;
-    void (*function)(void);
-};
-
-static void run_help(void);
-
-#define CHECK(A, B) check(A, B, #A, #B, __FILE__, __LINE__)
-static void
-check(int a, int b,
-      const char *a_string, const char *b_string, const char *file, int line)
-{
-    if (a != b) {
-        fprintf(stderr, "%s:%d: expected %s == %s but %d != %d\n",
-                file, line, a_string, b_string, a, b);
-        fflush(stderr);
-        abort();
-    }
-}
-
-static void
-run_lock_and_unlock(void)
-{
-    struct lockfile *lockfile;
-
-    CHECK(lockfile_lock("file", &lockfile), 0);
-    lockfile_unlock(lockfile);
-}
-
-static void
-run_lock_and_unlock_twice(void)
-{
-    struct lockfile *lockfile;
-
-    CHECK(lockfile_lock("file", &lockfile), 0);
-    lockfile_unlock(lockfile);
-
-    CHECK(lockfile_lock("file", &lockfile), 0);
-    lockfile_unlock(lockfile);
-}
-
-static void
-run_lock_blocks_same_process(void)
-{
-    struct lockfile *lockfile;
-
-    CHECK(lockfile_lock("file", &lockfile), 0);
-    CHECK(lockfile_lock("file", &lockfile), EDEADLK);
-    lockfile_unlock(lockfile);
-}
-
-static void
-run_lock_blocks_same_process_twice(void)
-{
-    struct lockfile *lockfile;
-
-    CHECK(lockfile_lock("file", &lockfile), 0);
-    CHECK(lockfile_lock("file", &lockfile), EDEADLK);
-    CHECK(lockfile_lock("file", &lockfile), EDEADLK);
-    lockfile_unlock(lockfile);
-}
-
-#ifndef _WIN32
-static enum { PARENT, CHILD }
-do_fork(void)
-{
-    switch (fork()) {
-    case 0:
-        lockfile_postfork();
-        return CHILD;
-
-    default:
-        return PARENT;
-
-    case -1:
-        /* Error. */
-        ovs_fatal(errno, "fork failed");
-    }
-}
-
-static void
-run_lock_blocks_other_process(void)
-{
-    /* Making this static prevents a memory leak warning from valgrind for the
-     * parent process, which cannot easily unlock (and free) 'lockfile' because
-     * it can only do so after the child has exited, and it's the caller of
-     * this function that does the wait() call. */
-    static struct lockfile *lockfile;
-
-    CHECK(lockfile_lock("file", &lockfile), 0);
-    if (do_fork() == CHILD) {
-        lockfile_unlock(lockfile);
-        CHECK(lockfile_lock("file", &lockfile), EAGAIN);
-        exit(11);
-    }
-}
-
-static void
-run_lock_twice_blocks_other_process(void)
-{
-    struct lockfile *lockfile, *dummy;
-
-    CHECK(lockfile_lock("file", &lockfile), 0);
-    CHECK(lockfile_lock("file", &dummy), EDEADLK);
-    if (do_fork() == CHILD) {
-        CHECK(lockfile_lock("file", &dummy), EAGAIN);
-        exit(11);
-    }
-}
-
-static void
-run_lock_and_unlock_allows_other_process(void)
-{
-    struct lockfile *lockfile;
-
-    CHECK(lockfile_lock("file", &lockfile), 0);
-    lockfile_unlock(lockfile);
-
-    if (do_fork() == CHILD) {
-        CHECK(lockfile_lock("file", &lockfile), 0);
-        exit(11);
-    }
-}
-
-/* Checks that locking a dangling symlink works OK.  (It used to hang.) */
-static void
-run_lock_symlink(void)
-{
-    struct lockfile *a, *b, *dummy;
-    struct stat s;
-
-    /* Create a symlink .a.~lock~ pointing to .b.~lock~. */
-    CHECK(symlink(".b.~lock~", ".a.~lock~"), 0);
-    CHECK(lstat(".a.~lock~", &s), 0);
-    CHECK(S_ISLNK(s.st_mode) != 0, 1);
-    CHECK(stat(".a.~lock~", &s), -1);
-    CHECK(errno, ENOENT);
-    CHECK(stat(".b.~lock~", &s), -1);
-    CHECK(errno, ENOENT);
-
-    CHECK(lockfile_lock("a", &a), 0);
-    CHECK(lockfile_lock("a", &dummy), EDEADLK);
-    CHECK(lockfile_lock("b", &dummy), EDEADLK);
-    lockfile_unlock(a);
-
-    CHECK(lockfile_lock("b", &b), 0);
-    CHECK(lockfile_lock("b", &dummy), EDEADLK);
-    CHECK(lockfile_lock("a", &dummy), EDEADLK);
-    lockfile_unlock(b);
-
-    CHECK(lstat(".a.~lock~", &s), 0);
-    CHECK(S_ISLNK(s.st_mode) != 0, 1);
-    CHECK(stat(".a.~lock~", &s), 0);
-    CHECK(S_ISREG(s.st_mode) != 0, 1);
-    CHECK(stat(".b.~lock~", &s), 0);
-    CHECK(S_ISREG(s.st_mode) != 0, 1);
-}
-
-/* Checks that locking a file that is itself a symlink yields a lockfile in the
- * directory that the symlink points to, named for the target of the
- * symlink.
- *
- * (That is, if "a" is a symlink to "dir/b", then "a"'s lockfile is named
- * "dir/.b.~lock".) */
-static void
-run_lock_symlink_to_dir(void)
-{
-    struct lockfile *a, *dummy;
-    struct stat s;
-
-    /* Create a symlink "a" pointing to "dir/b". */
-    CHECK(mkdir("dir", 0700), 0);
-    CHECK(symlink("dir/b", "a"), 0);
-    CHECK(lstat("a", &s), 0);
-    CHECK(S_ISLNK(s.st_mode) != 0, 1);
-
-    /* Lock 'a'. */
-    CHECK(lockfile_lock("a", &a), 0);
-    CHECK(lstat("dir/.b.~lock~", &s), 0);
-    CHECK(S_ISREG(s.st_mode) != 0, 1);
-    CHECK(lstat(".a.~lock~", &s), -1);
-    CHECK(errno, ENOENT);
-    CHECK(lockfile_lock("dir/b", &dummy), EDEADLK);
-
-    lockfile_unlock(a);
-}
-#endif /* _WIN32 */
-
-static void
-run_lock_multiple(void)
-{
-    struct lockfile *a, *b, *c, *dummy;
-
-    CHECK(lockfile_lock("a", &a), 0);
-    CHECK(lockfile_lock("b", &b), 0);
-    CHECK(lockfile_lock("c", &c), 0);
-
-    lockfile_unlock(a);
-    CHECK(lockfile_lock("a", &a), 0);
-    CHECK(lockfile_lock("a", &dummy), EDEADLK);
-    lockfile_unlock(a);
-
-    lockfile_unlock(b);
-    CHECK(lockfile_lock("a", &a), 0);
-
-    lockfile_unlock(c);
-    lockfile_unlock(a);
-}
-
-
-static const struct test tests[] = {
-#define TEST(NAME) { #NAME, run_##NAME }
-    TEST(lock_and_unlock),
-    TEST(lock_and_unlock_twice),
-    TEST(lock_blocks_same_process),
-    TEST(lock_blocks_same_process_twice),
-#ifndef _WIN32
-    TEST(lock_blocks_other_process),
-    TEST(lock_twice_blocks_other_process),
-    TEST(lock_and_unlock_allows_other_process),
-    TEST(lock_symlink),
-    TEST(lock_symlink_to_dir),
-#endif /* _WIN32 */
-    TEST(lock_multiple),
-    TEST(help),
-    { NULL, NULL }
-#undef TEST
-};
-
-static void
-run_help(void)
-{
-    size_t i;
-
-    printf("usage: %s TESTNAME\n"
-           "where TESTNAME is one of the following:\n",
-           program_name);
-    for (i = 0; tests[i].name; i++) {
-        fprintf(stderr, "\t%s\n", tests[i].name);
-    }
-}
-
-static void
-test_lockfile_main(int argc, char *argv[])
-{
-    size_t i;
-
-    set_program_name(argv[0]);
-    vlog_set_pattern(VLF_CONSOLE, "%c|%p|%m");
-    vlog_set_levels(NULL, VLF_SYSLOG, VLL_OFF);
-
-    if (argc != 2) {
-        ovs_fatal(0, "exactly one argument required; use \"%s help\" for help",
-                  program_name);
-    }
-
-    for (i = 0; tests[i].name; i++) {
-        if (!strcmp(argv[1], tests[i].name)) {
-            int n_children;
-            int status;
-
-            (tests[i].function)();
-
-            n_children = 0;
-#ifndef _WIN32
-            while (wait(&status) > 0) {
-                if (WIFEXITED(status) && WEXITSTATUS(status) == 11) {
-                    n_children++;
-                } else {
-                    ovs_fatal(0, "child exited in unexpected way: %s",
-                              process_status_msg(status));
-                }
-            }
-            if (errno != ECHILD) {
-                ovs_fatal(errno, "wait");
-            }
-#endif /* _WIN32 */
-
-            printf("%s: success (%d child%s)\n",
-                   tests[i].name, n_children, n_children != 1 ? "ren" : "");
-            exit(0);
-        }
-    }
-    ovs_fatal(0, "unknown test \"%s\"; use \"%s help\" for help",
-              argv[1], program_name);
-}
-
-OVSTEST_REGISTER("test-lockfile", test_lockfile_main);
diff --git a/tests/test-multipath.c b/tests/test-multipath.c
deleted file mode 100644
index 08d2cbaeb..000000000
--- a/tests/test-multipath.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2010, 2012, 2013, 2014 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include <assert.h>
-#include <getopt.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "flow.h"
-#include "multipath.h"
-#include "openvswitch/ofp-actions.h"
-#include "ovstest.h"
-#include "util.h"
-
-static void
-test_multipath_main(int argc, char *argv[])
-{
-    enum { MP_MAX_LINKS = 63 };
-    struct ofpact_multipath mp;
-    bool ok = true;
-    char *error;
-    int n;
-
-    set_program_name(argv[0]);
-
-    if (argc != 2) {
-        ovs_fatal(0, "usage: %s multipath_action", program_name);
-    }
-
-    error = multipath_parse(&mp, argv[1]);
-    if (error) {
-        ovs_fatal(0, "%s", error);
-    }
-
-    for (n = 1; n <= MP_MAX_LINKS; n++) {
-        enum { N_FLOWS = 65536 };
-        double disruption, perfect, distribution;
-        int histogram[MP_MAX_LINKS];
-        double sum_dev2, stddev;
-        int changed;
-        int i;
-
-        changed = 0;
-        memset(histogram, 0, sizeof histogram);
-        for (i = 0; i < N_FLOWS; i++) {
-            int old_link, new_link;
-            struct flow_wildcards wc;
-            struct flow flow;
-
-            flow_random_hash_fields(&flow);
-
-            mp.max_link = n - 1;
-            multipath_execute(&mp, &flow, &wc);
-            old_link = flow.regs[0];
-
-            mp.max_link = n;
-            multipath_execute(&mp, &flow, &wc);
-            new_link = flow.regs[0];
-
-            assert(old_link >= 0 && old_link < n);
-            assert(new_link >= 0 && new_link < n + 1);
-
-            histogram[old_link]++;
-            changed += old_link != new_link;
-        }
-
-        sum_dev2 = 0.0;
-        for (i = 0; i < n; i++) {
-            double mean = (double) N_FLOWS / n;
-            double deviation = histogram[i] - mean;
-
-            sum_dev2 += deviation * deviation;
-        }
-        stddev = sqrt(sum_dev2 / n);
-
-        disruption = (double) changed / N_FLOWS;
-        perfect = 1.0 / (n + 1);
-        distribution = stddev / ((double) N_FLOWS / n);
-        printf("%2d -> %2d: disruption=%.2f (perfect=%.2f); "
-               "stddev/expected=%.4f\n",
-               n, n + 1, disruption, perfect, distribution);
-
-        switch (mp.algorithm) {
-        case NX_MP_ALG_MODULO_N:
-            if (disruption < (n < 2 ? .25 : .5)) {
-                fprintf(stderr, "%d -> %d: disruption=%.2f < .5\n",
-                        n, n + 1, disruption);
-                ok = false;
-            }
-            break;
-
-        case NX_MP_ALG_HASH_THRESHOLD:
-            if (disruption < .48 || disruption > .52) {
-                fprintf(stderr, "%d -> %d: disruption=%.2f not approximately "
-                        ".5\n", n, n + 1, disruption);
-                ok = false;
-            }
-            break;
-
-        case NX_MP_ALG_ITER_HASH:
-            if (!(n & (n - 1))) {
-                break;
-            }
-            /* Fall through. */
-        case NX_MP_ALG_HRW:
-            if (fabs(disruption - perfect) >= .01) {
-                fprintf(stderr, "%d -> %d: disruption=%.5f differs from "
-                        "perfect=%.5f by more than .01\n",
-                        n, n + 1, disruption, perfect);
-                ok = false;
-            }
-            break;
-
-        default:
-            OVS_NOT_REACHED();
-        }
-    }
-
-    exit(ok ? 0 : 1);
-}
-
-OVSTEST_REGISTER("test-multipath", test_multipath_main);
diff --git a/tests/test-netflow.c b/tests/test-netflow.c
deleted file mode 100644
index d2322d450..000000000
--- a/tests/test-netflow.c
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 2013, 2014, 2015, 2017 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "netflow.h"
-#include <errno.h>
-#include <getopt.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include "command-line.h"
-#include "daemon.h"
-#include "openvswitch/dynamic-string.h"
-#include "openvswitch/ofpbuf.h"
-#include "ovstest.h"
-#include "packets.h"
-#include "openvswitch/poll-loop.h"
-#include "socket-util.h"
-#include "unixctl.h"
-#include "util.h"
-#include "openvswitch/vlog.h"
-
-OVS_NO_RETURN static void usage(void);
-static void parse_options(int argc, char *argv[]);
-
-static unixctl_cb_func test_netflow_exit;
-
-static void
-print_netflow(struct ofpbuf *buf)
-{
-    const struct netflow_v5_header *hdr;
-    int i;
-
-    hdr = ofpbuf_try_pull(buf, sizeof *hdr);
-    if (!hdr) {
-        printf("truncated NetFlow packet header\n");
-        return;
-    }
-    printf("header: v%"PRIu16", "
-           "uptime %"PRIu32", "
-           "now %"PRIu32".%09"PRIu32", "
-           "seq %"PRIu32", "
-           "engine %"PRIu8",%"PRIu8,
-           ntohs(hdr->version),
-           ntohl(hdr->sysuptime),
-           ntohl(hdr->unix_secs), ntohl(hdr->unix_nsecs),
-           ntohl(hdr->flow_seq),
-           hdr->engine_type, hdr->engine_id);
-    if (hdr->sampling_interval != htons(0)) {
-        printf(", interval %"PRIu16, ntohs(hdr->sampling_interval));
-    }
-    putchar('\n');
-
-    for (i = 0; i < ntohs(hdr->count); i++) {
-        struct netflow_v5_record *rec;
-
-        rec = ofpbuf_try_pull(buf, sizeof *rec);
-        if (!rec) {
-            printf("truncated NetFlow records\n");
-            return;
-        }
-
-        printf("seq %"PRIu32": "IP_FMT" > "IP_FMT, ntohl(hdr->flow_seq),
-               IP_ARGS(rec->src_addr), IP_ARGS(rec->dst_addr));
-
-        printf(", if %"PRIu16" > %"PRIu16,
-               ntohs(rec->input), ntohs(rec->output));
-
-        printf(", %"PRIu32" pkts, %"PRIu32" bytes",
-               ntohl(rec->packet_count), ntohl(rec->byte_count));
-
-        switch (rec->ip_proto) {
-        case IPPROTO_TCP:
-            printf(", TCP %"PRIu16" > %"PRIu16,
-                   ntohs(rec->src_port), ntohs(rec->dst_port));
-            if (rec->tcp_flags) {
-                struct ds s = DS_EMPTY_INITIALIZER;
-                packet_format_tcp_flags(&s, rec->tcp_flags);
-                printf(" %s", ds_cstr(&s));
-                ds_destroy(&s);
-            }
-            break;
-
-        case IPPROTO_UDP:
-            printf(", UDP %"PRIu16" > %"PRIu16,
-                   ntohs(rec->src_port), ntohs(rec->dst_port));
-            break;
-
-        case IPPROTO_SCTP:
-            printf(", SCTP %"PRIu16" > %"PRIu16,
-                   ntohs(rec->src_port), ntohs(rec->dst_port));
-            break;
-
-        case IPPROTO_ICMP:
-            printf(", ICMP %u:%u",
-                   ntohs(rec->dst_port) >> 8,
-                   ntohs(rec->dst_port) & 0xff);
-            if (rec->src_port != htons(0)) {
-                printf(", src_port=%"PRIu16, ntohs(rec->src_port));
-            }
-            break;
-
-        default:
-            printf(", proto %"PRIu8, rec->ip_proto);
-            break;
-        }
-
-        if (rec->ip_proto != IPPROTO_TCP && rec->tcp_flags != 0) {
-            printf(", flags %"PRIx8, rec->tcp_flags);
-        }
-
-        if (rec->ip_proto != IPPROTO_TCP &&
-            rec->ip_proto != IPPROTO_UDP &&
-            rec->ip_proto != IPPROTO_SCTP &&
-            rec->ip_proto != IPPROTO_ICMP) {
-            if (rec->src_port != htons(0)) {
-                printf(", src_port %"PRIu16, ntohs(rec->src_port));
-            }
-            if (rec->dst_port != htons(0)) {
-                printf(", dst_port %"PRIu16, ntohs(rec->dst_port));
-            }
-        }
-
-        if (rec->ip_tos) {
-            printf(", TOS %"PRIx8, rec->ip_tos);
-        }
-
-        printf(", time %"PRIu32"...%"PRIu32,
-               ntohl(rec->init_time), ntohl(rec->used_time));
-
-        if (rec->nexthop != htonl(0)) {
-            printf(", nexthop "IP_FMT, IP_ARGS(rec->nexthop));
-        }
-        if (rec->src_as != htons(0) || rec->dst_as != htons(0)) {
-            printf(", AS %"PRIu16" > %"PRIu16,
-                   ntohs(rec->src_as), ntohs(rec->dst_as));
-        }
-        if (rec->src_mask != 0 || rec->dst_mask != 0) {
-            printf(", mask %"PRIu8" > %"PRIu8, rec->src_mask, rec->dst_mask);
-        }
-        if (rec->pad1) {
-            printf(", pad1 %"PRIu8, rec->pad1);
-        }
-        if (rec->pad[0] || rec->pad[1]) {
-            printf(", pad %"PRIu8", %"PRIu8, rec->pad[0], rec->pad[1]);
-        }
-        putchar('\n');
-    }
-
-    if (buf->size) {
-        printf("%"PRIu32" extra bytes after last record\n", buf->size);
-    }
-}
-
-static void
-test_netflow_main(int argc, char *argv[])
-{
-    struct unixctl_server *server;
-    enum { MAX_RECV = 1500 };
-    const char *target;
-    struct ofpbuf buf;
-    bool exiting = false;
-    int error;
-    int sock;
-    int n;
-
-    ovs_cmdl_proctitle_init(argc, argv);
-    set_program_name(argv[0]);
-    service_start(&argc, &argv);
-    parse_options(argc, argv);
-
-    if (argc - optind != 1) {
-        ovs_fatal(0, "exactly one non-option argument required "
-                  "(use --help for help)");
-    }
-    target = argv[optind];
-
-    sock = inet_open_passive(SOCK_DGRAM, target, 0, NULL, 0, true);
-    if (sock < 0) {
-        ovs_fatal(0, "%s: failed to open (%s)", argv[1], ovs_strerror(-sock));
-    }
-
-    daemon_save_fd(STDOUT_FILENO);
-    daemonize_start(false);
-
-    error = unixctl_server_create(NULL, &server);
-    if (error) {
-        ovs_fatal(error, "failed to create unixctl server");
-    }
-    unixctl_command_register("exit", "", 0, 0, test_netflow_exit, &exiting);
-
-    daemonize_complete();
-
-    ofpbuf_init(&buf, MAX_RECV);
-    n = 0;
-    for (;;) {
-        int retval;
-
-        unixctl_server_run(server);
-
-        ofpbuf_clear(&buf);
-        do {
-            retval = recv(sock, buf.data, buf.allocated, 0);
-        } while (retval < 0 && errno == EINTR);
-        if (retval > 0) {
-            ofpbuf_put_uninit(&buf, retval);
-            if (n++ > 0) {
-                putchar('\n');
-            }
-            print_netflow(&buf);
-            fflush(stdout);
-        }
-
-        if (exiting) {
-            break;
-        }
-
-        poll_fd_wait(sock, POLLIN);
-        unixctl_server_wait(server);
-        poll_block();
-    }
-
-    ofpbuf_uninit(&buf);
-    unixctl_server_destroy(server);
-}
-
-static void
-parse_options(int argc, char *argv[])
-{
-    enum {
-        DAEMON_OPTION_ENUMS,
-        VLOG_OPTION_ENUMS
-    };
-    static const struct option long_options[] = {
-        {"help", no_argument, NULL, 'h'},
-        DAEMON_LONG_OPTIONS,
-        VLOG_LONG_OPTIONS,
-        {NULL, 0, NULL, 0},
-    };
-    char *short_options = ovs_cmdl_long_options_to_short_options(long_options);
-
-    for (;;) {
-        int c = getopt_long(argc, argv, short_options, long_options, NULL);
-        if (c == -1) {
-            break;
-        }
-
-        switch (c) {
-        case 'h':
-            usage();
-
-        DAEMON_OPTION_HANDLERS
-        VLOG_OPTION_HANDLERS
-
-        case '?':
-            exit(EXIT_FAILURE);
-
-        default:
-            abort();
-        }
-    }
-    free(short_options);
-}
-
-static void
-usage(void)
-{
-    printf("%s: netflow collector test utility\n"
-           "usage: %s [OPTIONS] PORT[:IP]\n"
-           "where PORT is the UDP port to listen on and IP is optionally\n"
-           "the IP address to listen on.\n",
-           program_name, program_name);
-    daemon_usage();
-    vlog_usage();
-    printf("\nOther options:\n"
-           "  -h, --help                  display this help message\n");
-    exit(EXIT_SUCCESS);
-}
-
-static void
-test_netflow_exit(struct unixctl_conn *conn,
-                  int argc OVS_UNUSED, const char *argv[] OVS_UNUSED,
-                  void *exiting_)
-{
-    bool *exiting = exiting_;
-    *exiting = true;
-    unixctl_command_reply(conn, NULL);
-}
-
-OVSTEST_REGISTER("test-netflow", test_netflow_main);
diff --git a/tests/test-netlink-conntrack.c b/tests/test-netlink-conntrack.c
deleted file mode 100644
index 2a62615b2..000000000
--- a/tests/test-netlink-conntrack.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 2015 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-
-#include <stdlib.h>
-#include <linux/netfilter/nfnetlink.h>
-
-#include "ct-dpif.h"
-#include "netlink-conntrack.h"
-#include "netlink-notifier.h"
-#include "ovstest.h"
-#include "openvswitch/poll-loop.h"
-
-/* Monitor command */
-struct test_change {
-    enum nl_ct_event_type type;
-    struct ct_dpif_entry entry;
-};
-
-static int
-event_parse(struct ofpbuf *buf, void *change_)
-{
-    struct test_change *change = change_;
-
-    if (nl_ct_parse_entry(buf, &change->entry, &change->type)) {
-        switch (change->type) {
-        case NL_CT_EVENT_NEW:
-            return NFNLGRP_CONNTRACK_NEW;
-        case NL_CT_EVENT_UPDATE:
-            return NFNLGRP_CONNTRACK_UPDATE;
-        case NL_CT_EVENT_DELETE:
-            return NFNLGRP_CONNTRACK_DESTROY;
-        }
-    }
-    return 0;
-}
-
-static void
-event_print(const void *change_, void *aux OVS_UNUSED)
-{
-    const struct test_change *change = change_;
-
-    if (change) {
-        struct ds ds = DS_EMPTY_INITIALIZER;
-
-        nl_ct_format_event_entry(&change->entry, change->type, &ds, true,
-                                 true);
-        printf("%s\n", ds_cstr(&ds));
-        ds_destroy(&ds);
-    }
-}
-
-static void
-test_nl_ct_monitor(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    int groups [] = {
-        NFNLGRP_CONNTRACK_DESTROY,
-        NFNLGRP_CONNTRACK_NEW,
-        NFNLGRP_CONNTRACK_UPDATE,
-    };
-
-    struct nln *nln;
-    struct nln_notifier *notifiers[ARRAY_SIZE(groups)];
-
-    struct test_change change;
-
-    unsigned i;
-
-    nln = nln_create(NETLINK_NETFILTER, event_parse, &change);
-
-    for (i = 0; i < ARRAY_SIZE(groups); i++) {
-        notifiers[i] = nln_notifier_create(nln, groups[i], event_print, NULL);
-    }
-
-    for (;;) {
-        nln_run(nln);
-        nln_wait(nln);
-        poll_block();
-    }
-
-    for (i = 0; i < ARRAY_SIZE(groups); i++) {
-        nln_notifier_destroy(notifiers[i]);
-    }
-    nln_destroy(nln);
-}
-
-/* Dump command */
-static void
-test_nl_ct_dump(struct ovs_cmdl_context *ctx)
-{
-    struct nl_ct_dump_state *dump;
-    uint16_t zone, *pzone = NULL;
-    struct ct_dpif_entry entry;
-    int err;
-    int tot_bkts;
-
-    if (ctx->argc >= 2) {
-        if (!ovs_scan(ctx->argv[1], "zone=%"SCNu16, &zone)) {
-            ovs_fatal(0, "Error parsing zone= specifier");
-        }
-        pzone = &zone;
-    }
-    err = nl_ct_dump_start(&dump, pzone, &tot_bkts);
-    if (err) {
-        ovs_fatal(err, "Error creating conntrack netlink dump");
-    }
-
-    do {
-        err = nl_ct_dump_next(dump, &entry);
-        if (!err) {
-            struct ds ds = DS_EMPTY_INITIALIZER;
-
-            ct_dpif_format_entry(&entry, &ds, true, true);
-            printf("%s\n", ds_cstr(&ds));
-            ds_destroy(&ds);
-        }
-    } while (!err);
-
-    if (err != EOF) {
-        ovs_fatal(err, "Error dumping conntrack netlink entry");
-    }
-    nl_ct_dump_done(dump);
-}
-
-/* Flush command */
-static void
-test_nl_ct_flush(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    int err;
-
-    if (ctx->argc >= 2) {
-        uint16_t zone;
-
-        if (ovs_scan(ctx->argv[1], "zone=%"SCNu16, &zone)) {
-            err = nl_ct_flush_zone(zone);
-        } else {
-            ovs_fatal(0, "Error parsing zone= specifier");
-        }
-    } else {
-        err = nl_ct_flush();
-    }
-    if (err) {
-        ovs_fatal(err, "Error flushing conntrack netlink");
-    }
-}
-
-static const struct ovs_cmdl_command commands[] = {
-    /* Linux netlink connection tracker interface test. */
-
-    /* Prints all the entries in the connection table and exits. */
-    {"dump", "[zone=zone]", 0, 1, test_nl_ct_dump, OVS_RO},
-    /* Listens to all the connection tracking events and prints them to
-     * standard output until killed. */
-    {"monitor", "", 0, 0, test_nl_ct_monitor, OVS_RO},
-    /* Flushes all the entries from all the tables.. */
-    {"flush", "[zone=zone]", 0, 1, test_nl_ct_flush, OVS_RO},
-
-    {NULL, NULL, 0, 0, NULL, OVS_RO},
-};
-
-static void
-test_netlink_conntrack(int argc, char *argv[])
-{
-    struct ovs_cmdl_context ctx = {
-        .argc = argc - 1,
-        .argv = argv + 1,
-    };
-    set_program_name(argv[0]);
-    ovs_cmdl_run_command(&ctx, commands);
-}
-
-OVSTEST_REGISTER("test-netlink-conntrack", test_netlink_conntrack);
diff --git a/tests/test-odp.c b/tests/test-odp.c
deleted file mode 100644
index 09fec706a..000000000
--- a/tests/test-odp.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 2013, 2014, 2019 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "odp-util.h"
-#include <stdio.h>
-#include "openvswitch/dynamic-string.h"
-#include "flow.h"
-#include "openvswitch/match.h"
-#include "openvswitch/ofpbuf.h"
-#include "ovstest.h"
-#include "util.h"
-#include "openvswitch/ofp-flow.h"
-#include "openvswitch/vlog.h"
-
-static int
-parse_keys(bool wc_keys)
-{
-    int exit_code = 0;
-    struct ds in;
-
-    ds_init(&in);
-    vlog_set_levels_from_string_assert("odp_util:console:dbg");
-    while (!ds_get_test_line(&in, stdin)) {
-        enum odp_key_fitness fitness;
-        struct ofpbuf odp_key;
-        struct ofpbuf odp_mask;
-        struct flow flow;
-        struct ds out;
-        int error;
-
-        /* Convert string to OVS DP key. */
-        ofpbuf_init(&odp_key, 0);
-        ofpbuf_init(&odp_mask, 0);
-        char *error_s;
-        error = odp_flow_from_string(ds_cstr(&in), NULL,
-                                     &odp_key, &odp_mask, &error_s);
-        if (error) {
-            printf("odp_flow_from_string: error (%s)\n", error_s);
-            free(error_s);
-            goto next;
-        }
-
-        if (!wc_keys) {
-            struct odp_flow_key_parms odp_parms = {
-                .flow = &flow,
-                .support = {
-                    .recirc = true,
-                    .ct_state = true,
-                    .ct_zone = true,
-                    .ct_mark = true,
-                    .ct_label = true,
-                    .max_vlan_headers = SIZE_MAX,
-                },
-            };
-
-            /* Convert odp_key to flow. */
-            fitness = odp_flow_key_to_flow(odp_key.data, odp_key.size, &flow,
-                                           &error_s);
-            switch (fitness) {
-                case ODP_FIT_PERFECT:
-                    break;
-
-                case ODP_FIT_TOO_LITTLE:
-                    printf("ODP_FIT_TOO_LITTLE: ");
-                    break;
-
-                case ODP_FIT_TOO_MUCH:
-                    printf("ODP_FIT_TOO_MUCH: ");
-                    break;
-
-                case ODP_FIT_ERROR:
-                    printf("odp_flow_key_to_flow: error (%s)\n", error_s);
-                    free(error_s);
-                    goto next;
-            }
-            /* Convert cls_rule back to odp_key. */
-            ofpbuf_uninit(&odp_key);
-            ofpbuf_init(&odp_key, 0);
-            odp_flow_key_from_flow(&odp_parms, &odp_key);
-
-            if (odp_key.size > ODPUTIL_FLOW_KEY_BYTES) {
-                printf ("too long: %"PRIu32" > %d\n",
-                        odp_key.size, ODPUTIL_FLOW_KEY_BYTES);
-                exit_code = 1;
-            }
-        }
-
-        /* Convert odp_key to string. */
-        ds_init(&out);
-        if (wc_keys) {
-            odp_flow_format(odp_key.data, odp_key.size,
-                            odp_mask.data, odp_mask.size, NULL, &out, false);
-        } else {
-            odp_flow_key_format(odp_key.data, odp_key.size, &out);
-        }
-        puts(ds_cstr(&out));
-        ds_destroy(&out);
-
-    next:
-        ofpbuf_uninit(&odp_key);
-        ofpbuf_uninit(&odp_mask);
-    }
-    ds_destroy(&in);
-
-    return exit_code;
-}
-
-static int
-parse_actions(void)
-{
-    struct ds in;
-
-    ds_init(&in);
-    vlog_set_levels_from_string_assert("odp_util:console:dbg");
-    while (!ds_get_test_line(&in, stdin)) {
-        struct ofpbuf odp_actions;
-        struct ds out;
-        int error;
-
-        /* Convert string to OVS DP actions. */
-        ofpbuf_init(&odp_actions, 0);
-        error = odp_actions_from_string(ds_cstr(&in), NULL, &odp_actions);
-        if (error) {
-            printf("odp_actions_from_string: error\n");
-            goto next;
-        }
-
-        /* Convert odp_actions back to string. */
-        ds_init(&out);
-        format_odp_actions(&out, odp_actions.data, odp_actions.size, NULL);
-        puts(ds_cstr(&out));
-        ds_destroy(&out);
-
-    next:
-        ofpbuf_uninit(&odp_actions);
-    }
-    ds_destroy(&in);
-
-    return 0;
-}
-
-static int
-parse_filter(char *filter_parse)
-{
-    struct ds in;
-    struct flow flow_filter;
-    struct flow_wildcards wc_filter;
-    char *error, *filter = NULL;
-
-    vlog_set_levels_from_string_assert("odp_util:console:dbg");
-    if (filter_parse && !strncmp(filter_parse, "filter=", 7)) {
-        filter = xstrdup(filter_parse + 7);
-        memset(&flow_filter, 0, sizeof(flow_filter));
-        memset(&wc_filter, 0, sizeof(wc_filter));
-
-        error = parse_ofp_exact_flow(&flow_filter, &wc_filter, NULL, filter,
-                                     NULL);
-        if (error) {
-            ovs_fatal(0, "Failed to parse filter (%s)", error);
-        }
-    } else {
-        ovs_fatal(0, "No filter to parse.");
-    }
-
-    ds_init(&in);
-    while (!ds_get_test_line(&in, stdin)) {
-        struct ofpbuf odp_key;
-        struct ofpbuf odp_mask;
-        struct ds out;
-
-        /* Convert string to OVS DP key. */
-        ofpbuf_init(&odp_key, 0);
-        ofpbuf_init(&odp_mask, 0);
-        char *error_s;
-        if (odp_flow_from_string(ds_cstr(&in), NULL, &odp_key, &odp_mask,
-                                 &error_s)) {
-            printf("odp_flow_from_string: error (%s)\n", error_s);
-            free(error_s);
-            goto next;
-        }
-
-        if (filter) {
-            struct flow flow;
-            struct flow_wildcards wc;
-            struct match match, match_filter;
-            struct minimatch minimatch;
-
-            odp_flow_key_to_flow(odp_key.data, odp_key.size, &flow, NULL);
-            odp_flow_key_to_mask(odp_mask.data, odp_mask.size, &wc, &flow,
-                                 NULL);
-            match_init(&match, &flow, &wc);
-
-            match_init(&match_filter, &flow_filter, &wc);
-            match_init(&match_filter, &match_filter.flow, &wc_filter);
-            minimatch_init(&minimatch, &match_filter);
-
-            if (!minimatch_matches_flow(&minimatch, &match.flow)) {
-                minimatch_destroy(&minimatch);
-                goto next;
-            }
-            minimatch_destroy(&minimatch);
-        }
-        /* Convert odp_key to string. */
-        ds_init(&out);
-        odp_flow_format(odp_key.data, odp_key.size,
-                        odp_mask.data, odp_mask.size, NULL, &out, false);
-        puts(ds_cstr(&out));
-        ds_destroy(&out);
-
-    next:
-        ofpbuf_uninit(&odp_key);
-        ofpbuf_uninit(&odp_mask);
-    }
-    ds_destroy(&in);
-
-    free(filter);
-    return 0;
-}
-
-static void
-test_odp_main(int argc, char *argv[])
-{
-    int exit_code = 0;
-
-    set_program_name(argv[0]);
-    if (argc == 2 &&!strcmp(argv[1], "parse-keys")) {
-        exit_code =parse_keys(false);
-    } else if (argc == 2 &&!strcmp(argv[1], "parse-wc-keys")) {
-        exit_code =parse_keys(true);
-    } else if (argc == 2 && !strcmp(argv[1], "parse-actions")) {
-        exit_code = parse_actions();
-    } else if (argc == 3 && !strcmp(argv[1], "parse-filter")) {
-        exit_code =parse_filter(argv[2]);
-    } else {
-        ovs_fatal(0, "usage: %s parse-keys | parse-wc-keys | parse-actions", argv[0]);
-    }
-
-    exit(exit_code);
-}
-
-OVSTEST_REGISTER("test-odp", test_odp_main);
diff --git a/tests/test-ofpbuf.c b/tests/test-ofpbuf.c
deleted file mode 100644
index 3d7fab90f..000000000
--- a/tests/test-ofpbuf.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2015 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include <stdio.h>
-#include "openvswitch/ofpbuf.h"
-#include "ovstest.h"
-#include "util.h"
-
-#define BUF_SIZE 100
-#define HDR_OFS 10
-#define MSG_OFS 50
-
-static void
-test_ofpbuf_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    struct ofpbuf *buf = ofpbuf_new(BUF_SIZE);
-    int exit_code = 0;
-
-    /* Init checks. */
-    ovs_assert(!buf->size);
-    ovs_assert(buf->allocated == BUF_SIZE);
-    ovs_assert(buf->base == buf->data);
-
-    /* Sets 'buf->header' and 'buf->msg'. */
-    buf->header = (char *) buf->base + HDR_OFS;
-    buf->msg = (char *) buf->base + MSG_OFS;
-
-    /* Gets another 'BUF_SIZE' bytes headroom. */
-    ofpbuf_prealloc_headroom(buf, BUF_SIZE);
-    ovs_assert(!buf->size);
-    ovs_assert(buf->allocated == 2 * BUF_SIZE);
-    ovs_assert((char *) buf->base + BUF_SIZE == buf->data);
-    /* Now 'buf->header' and 'buf->msg' must be BUF_SIZE away from
-     * their original offsets. */
-    ovs_assert(buf->header == (char *) buf->base + BUF_SIZE + HDR_OFS);
-    ovs_assert(buf->msg == (char *) buf->base + BUF_SIZE + MSG_OFS);
-
-    /* Gets another 'BUF_SIZE' bytes tailroom. */
-    ofpbuf_prealloc_tailroom(buf, BUF_SIZE);
-    /* Must remain unchanged. */
-    ovs_assert(!buf->size);
-    ovs_assert(buf->allocated == 2 * BUF_SIZE);
-    ovs_assert((char *) buf->base + BUF_SIZE == buf->data);
-    ovs_assert(buf->header == (char *) buf->base + BUF_SIZE + HDR_OFS);
-    ovs_assert(buf->msg == (char *) buf->base + BUF_SIZE + MSG_OFS);
-
-    ofpbuf_delete(buf);
-    exit(exit_code);
-}
-
-OVSTEST_REGISTER("test-ofpbuf", test_ofpbuf_main);
diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c
deleted file mode 100644
index 187eb2867..000000000
--- a/tests/test-ovsdb.c
+++ /dev/null
@@ -1,3139 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2015, 2016, 2017 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-
-#include <fcntl.h>
-#include <getopt.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "byte-order.h"
-#include "command-line.h"
-#include "openvswitch/dynamic-string.h"
-#include "openvswitch/json.h"
-#include "jsonrpc.h"
-#include "ovsdb-data.h"
-#include "ovsdb-error.h"
-#include "ovsdb-idl.h"
-#include "ovsdb-types.h"
-#include "ovsdb/column.h"
-#include "ovsdb/condition.h"
-#include "ovsdb/file.h"
-#include "ovsdb/log.h"
-#include "ovsdb/mutation.h"
-#include "ovsdb/ovsdb.h"
-#include "ovsdb/query.h"
-#include "ovsdb/row.h"
-#include "ovsdb/server.h"
-#include "ovsdb/storage.h"
-#include "ovsdb/table.h"
-#include "ovsdb/transaction.h"
-#include "ovsdb/trigger.h"
-#include "openvswitch/poll-loop.h"
-#include "stream.h"
-#include "svec.h"
-#include "tests/idltest.h"
-#include "timeval.h"
-#include "util.h"
-#include "openvswitch/vlog.h"
-
-struct test_ovsdb_pvt_context {
-    bool track;
-};
-
-/* Magic to pass to ovsdb_log_open(). */
-static const char *magic = OVSDB_MAGIC;
-
-OVS_NO_RETURN static void usage(void);
-static void parse_options(int argc, char *argv[],
-    struct test_ovsdb_pvt_context *pvt);
-static struct ovs_cmdl_command *get_all_commands(void);
-
-int
-main(int argc, char *argv[])
-{
-    struct test_ovsdb_pvt_context pvt = {.track = false};
-    struct ovs_cmdl_context ctx = { .argc = 0, .pvt = &pvt};
-    set_program_name(argv[0]);
-    parse_options(argc, argv, &pvt);
-    ctx.argc = argc - optind;
-    ctx.argv = argv + optind;
-    ovs_cmdl_run_command(&ctx, get_all_commands());
-    return 0;
-}
-
-static void
-parse_options(int argc, char *argv[], struct test_ovsdb_pvt_context *pvt)
-{
-    enum {
-        OPT_MAGIC = CHAR_MAX + 1,
-        OPT_NO_RENAME_OPEN_FILES
-    };
-    static const struct option long_options[] = {
-        {"timeout", required_argument, NULL, 't'},
-        {"verbose", optional_argument, NULL, 'v'},
-        {"change-track", optional_argument, NULL, 'c'},
-        {"magic", required_argument, NULL, OPT_MAGIC},
-        {"no-rename-open-files", no_argument, NULL, OPT_NO_RENAME_OPEN_FILES},
-        {"help", no_argument, NULL, 'h'},
-        {NULL, 0, NULL, 0},
-    };
-    char *short_options = ovs_cmdl_long_options_to_short_options(long_options);
-    unsigned int timeout = 0;
-
-    for (;;) {
-        int c;
-
-        c = getopt_long(argc, argv, short_options, long_options, NULL);
-        if (c == -1) {
-            break;
-        }
-
-        switch (c) {
-        case 't':
-            if (!str_to_uint(optarg, 10, &timeout) || !timeout) {
-                ovs_fatal(0, "value %s on -t or --timeout is invalid", optarg);
-            }
-            break;
-
-        case 'h':
-            usage();
-
-        case 'v':
-            vlog_set_verbosity(optarg);
-            break;
-
-        case 'c':
-            pvt->track = true;
-            break;
-
-        case OPT_MAGIC:
-            magic = optarg;
-            break;
-
-        case OPT_NO_RENAME_OPEN_FILES:
-            ovsdb_log_disable_renaming_open_files();
-            break;
-
-        case '?':
-            exit(EXIT_FAILURE);
-
-        default:
-            abort();
-        }
-    }
-    free(short_options);
-
-    ctl_timeout_setup(timeout);
-}
-
-static void
-usage(void)
-{
-    printf("%s: Open vSwitch database test utility\n"
-           "usage: %s [OPTIONS] COMMAND [ARG...]\n\n"
-           "  [--magic=MAGIC] [--no-rename-open-files] "
-           " log-io FILE FLAGS COMMAND...\n"
-           "    open FILE with FLAGS (and MAGIC), run COMMANDs\n"
-           "  default-atoms\n"
-           "    test ovsdb_atom_default()\n"
-           "  default-data\n"
-           "    test ovsdb_datum_default()\n"
-           "  parse-atomic-type TYPE\n"
-           "    parse TYPE as OVSDB atomic type, and re-serialize\n"
-           "  parse-base-type TYPE\n"
-           "    parse TYPE as OVSDB base type, and re-serialize\n"
-           "  parse-type JSON\n"
-           "    parse JSON as OVSDB type, and re-serialize\n"
-           "  parse-atoms TYPE ATOM...\n"
-           "    parse JSON ATOMs as atoms of TYPE, and re-serialize\n"
-           "  parse-atom-strings TYPE ATOM...\n"
-           "    parse string ATOMs as atoms of given TYPE, and re-serialize\n"
-           "  sort-atoms TYPE ATOM...\n"
-           "    print JSON ATOMs in sorted order\n"
-           "  parse-data TYPE DATUM...\n"
-           "    parse JSON DATUMs as data of given TYPE, and re-serialize\n"
-           "  parse-data-strings TYPE DATUM...\n"
-           "    parse string DATUMs as data of given TYPE, and re-serialize\n"
-           "  parse-column NAME OBJECT\n"
-           "    parse column NAME with info OBJECT, and re-serialize\n"
-           "  parse-table NAME OBJECT [DEFAULT-IS-ROOT]\n"
-           "    parse table NAME with info OBJECT\n"
-           "  parse-row TABLE ROW..., and re-serialize\n"
-           "    parse each ROW of defined TABLE\n"
-           "  compare-row TABLE ROW...\n"
-           "    mutually compare all of the ROWs, print those that are equal\n"
-           "  parse-conditions TABLE CONDITION...\n"
-           "    parse each CONDITION on TABLE, and re-serialize\n"
-           "  evaluate-conditions TABLE [CONDITION,...] [ROW,...]\n"
-           "    test CONDITIONS on TABLE against each ROW, print results\n"
-           "  evaluate-conditions-any TABLE [CONDITION,...] [ROW,...]\n"
-           "    test CONDITIONS to match any of the CONDITONS on TABLE\n"
-           "    against each ROW, print results\n"
-           "  compare-conditions TABLE [CONDITION,...]\n"
-           "    mutually compare all of the CONDITION, print results for\n"
-           "    each pair\n"
-           "  parse-mutations TABLE MUTATION...\n"
-           "    parse each MUTATION on TABLE, and re-serialize\n"
-           "  execute-mutations TABLE [MUTATION,...] [ROW,...]\n"
-           "    execute MUTATIONS on TABLE on each ROW, print results\n"
-           "  query TABLE [ROW,...] [CONDITION,...]\n"
-           "    add each ROW to TABLE, then query and print the rows that\n"
-           "    satisfy each CONDITION.\n"
-           "  query-distinct TABLE [ROW,...] [CONDITION,...] COLUMNS\n"
-           "    add each ROW to TABLE, then query and print the rows that\n"
-           "    satisfy each CONDITION and have distinct COLUMNS.\n"
-           "  parse-schema JSON\n"
-           "    parse JSON as an OVSDB schema, and re-serialize\n"
-           "  transact COMMAND\n"
-           "    execute each specified transactional COMMAND:\n"
-           "      commit\n"
-           "      abort\n"
-           "      insert UUID I J\n"
-           "      delete UUID\n"
-           "      modify UUID I J\n"
-           "      print\n"
-           "  execute SCHEMA TRANSACTION...\n"
-           "    executes each TRANSACTION on an initially empty database\n"
-           "    the specified SCHEMA\n"
-           "  execute-readonly SCHEMA TRANSACTION...\n"
-           "    same as execute, except the TRANSACTION will be executed\n"
-           "    against the database server that is in read only mode\n"
-           "  trigger SCHEMA TRANSACTION...\n"
-           "    executes each TRANSACTION on an initially empty database\n"
-           "    the specified SCHEMA.   A TRANSACTION of the form\n"
-           "    [\"advance\", NUMBER] advances NUMBER milliseconds in\n"
-           "    simulated time, for causing triggers to time out.\n"
-           "  idl SERVER [TRANSACTION...]\n"
-           "    connect to SERVER and dump the contents of the database\n"
-           "    as seen initially by the IDL implementation and after\n"
-           "    executing each TRANSACTION.  (Each TRANSACTION must modify\n"
-           "    the database or this command will hang.)\n"
-           "  idl-partial-update-map-column SERVER \n"
-           "    connect to SERVER and executes different operations to\n"
-           "    test the capacity of updating elements inside a map column\n"
-           "    displaying the table information after each operation.\n"
-           "  idl-partial-update-set-column SERVER \n"
-           "    connect to SERVER and executes different operations to\n"
-           "    test the capacity of updating elements inside a set column\n"
-           "    displaying the table information after each operation.\n"
-           "  idl-compound-index TEST_TO_EXECUTE\n"
-           "    Execute the tests to verify compound-index feature.\n"
-           "    The TEST_TO_EXECUTE are:\n"
-           "        idl_compound_index_single_column:\n"
-           "          test for indexes using one column.\n"
-           "        idl_compound_index_double_column:\n"
-           "            test for indexes using two columns.\n",
-           program_name, program_name);
-    vlog_usage();
-    printf("\nOther options:\n"
-           "  -t, --timeout=SECS          give up after SECS seconds\n"
-           "  -h, --help                  display this help message\n"
-           "  -c, --change-track          used with the 'idl' command to\n"
-           "                              enable tracking of IDL changes\n");
-    exit(EXIT_SUCCESS);
-}
-
-/* Command helper functions. */
-
-static struct json *
-parse_json(const char *s)
-{
-    struct json *json = json_from_string(s);
-    if (json->type == JSON_STRING) {
-        ovs_fatal(0, "\"%s\": %s", s, json->string);
-    }
-    return json;
-}
-
-static struct json *
-unbox_json(struct json *json)
-{
-    if (json->type == JSON_ARRAY && json->array.n == 1) {
-        struct json *inner = json->array.elems[0];
-        json->array.elems[0] = NULL;
-        json_destroy(json);
-        return inner;
-    } else {
-        return json;
-    }
-}
-
-static void
-print_and_free_json(struct json *json)
-{
-    char *string = json_to_string(json, JSSF_SORT);
-    json_destroy(json);
-    puts(string);
-    free(string);
-}
-
-static void
-print_and_free_ovsdb_error(struct ovsdb_error *error)
-{
-    char *string = ovsdb_error_to_string_free(error);
-    puts(string);
-    free(string);
-}
-
-static void
-check_ovsdb_error(struct ovsdb_error *error)
-{
-    if (error) {
-        char *s = ovsdb_error_to_string_free(error);
-        ovs_fatal(0, "%s", s);
-    }
-}
-
-static void
-die_if_error(char *error)
-{
-    if (error) {
-        ovs_fatal(0, "%s", error);
-    }
-}
-
-/* Command implementations. */
-
-static void
-do_log_io(struct ovs_cmdl_context *ctx)
-{
-    const char *name = ctx->argv[1];
-    char *mode_string = ctx->argv[2];
-
-    struct ovsdb_error *error;
-    enum ovsdb_log_open_mode mode;
-    int i;
-
-    if (!strcmp(mode_string, "read-only")) {
-        mode = OVSDB_LOG_READ_ONLY;
-    } else if (!strcmp(mode_string, "read/write")) {
-        mode = OVSDB_LOG_READ_WRITE;
-    } else if (!strcmp(mode_string, "create")) {
-        mode = OVSDB_LOG_CREATE;
-    } else if (!strcmp(mode_string, "create-excl")) {
-        mode = OVSDB_LOG_CREATE_EXCL;
-    } else {
-        ovs_fatal(0, "unknown log-io open mode \"%s\"", mode_string);
-    }
-
-    struct ovsdb_log *log;
-    check_ovsdb_error(ovsdb_log_open(name, magic, mode, -1, &log));
-    printf("%s: open successful\n", name);
-
-    struct ovsdb_log *replacement = NULL;
-
-    for (i = 3; i < ctx->argc; i++) {
-        const char *command = ctx->argv[i];
-
-        struct ovsdb_log *target;
-        const char *target_name;
-        if (!strncmp(command, "old-", 4)) {
-            command += 4;
-            target = log;
-            target_name = name;
-        } else if (!strncmp(command, "new-", 4)) {
-            if (!replacement) {
-                ovs_fatal(0, "%s: can't execute command without "
-                          "replacement log", command);
-            }
-
-            command += 4;
-            target = replacement;
-            target_name = "(temp)";
-        } else {
-            target = log;
-            target_name = name;
-        }
-
-        if (!strcmp(command, "read")) {
-            struct json *json;
-
-            error = ovsdb_log_read(target, &json);
-            if (!error) {
-                printf("%s: read: ", target_name);
-                if (json) {
-                    print_and_free_json(json);
-                } else {
-                    printf("end of log\n");
-                }
-                continue;
-            }
-        } else if (!strncmp(command, "write:", 6)) {
-            struct json *json = parse_json(command + 6);
-            error = ovsdb_log_write_and_free(target, json);
-        } else if (!strcmp(command, "commit")) {
-            error = ovsdb_log_commit_block(target);
-        } else if (!strcmp(command, "replace_start")) {
-            ovs_assert(!replacement);
-            error = ovsdb_log_replace_start(log, &replacement);
-        } else if (!strcmp(command, "replace_commit")) {
-            ovs_assert(replacement);
-            error = ovsdb_log_replace_commit(log, replacement);
-            replacement = NULL;
-        } else if (!strcmp(command, "replace_abort")) {
-            ovs_assert(replacement);
-            ovsdb_log_replace_abort(replacement);
-            replacement = NULL;
-            error = NULL;
-        } else {
-            ovs_fatal(0, "unknown log-io command \"%s\"", command);
-        }
-        if (error) {
-            char *s = ovsdb_error_to_string_free(error);
-            printf("%s: %s failed: %s\n", target_name, command, s);
-            free(s);
-        } else {
-            printf("%s: %s successful\n", target_name, command);
-        }
-    }
-
-    ovsdb_log_close(log);
-}
-
-static void
-do_default_atoms(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    int type;
-
-    for (type = 0; type < OVSDB_N_TYPES; type++) {
-        union ovsdb_atom atom;
-
-        if (type == OVSDB_TYPE_VOID) {
-            continue;
-        }
-
-        printf("%s: ", ovsdb_atomic_type_to_string(type));
-
-        ovsdb_atom_init_default(&atom, type);
-        if (!ovsdb_atom_equals(&atom, ovsdb_atom_default(type), type)) {
-            printf("wrong\n");
-            exit(1);
-        }
-        ovsdb_atom_destroy(&atom, type);
-
-        printf("OK\n");
-    }
-}
-
-static void
-do_default_data(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    unsigned int n_min;
-    int key, value;
-
-    for (n_min = 0; n_min <= 1; n_min++) {
-        for (key = 0; key < OVSDB_N_TYPES; key++) {
-            if (key == OVSDB_TYPE_VOID) {
-                continue;
-            }
-            for (value = 0; value < OVSDB_N_TYPES; value++) {
-                struct ovsdb_datum datum;
-                struct ovsdb_type type;
-
-                ovsdb_base_type_init(&type.key, key);
-                ovsdb_base_type_init(&type.value, value);
-                type.n_min = n_min;
-                type.n_max = 1;
-                ovs_assert(ovsdb_type_is_valid(&type));
-
-                printf("key %s, value %s, n_min %u: ",
-                       ovsdb_atomic_type_to_string(key),
-                       ovsdb_atomic_type_to_string(value), n_min);
-
-                ovsdb_datum_init_default(&datum, &type);
-                if (!ovsdb_datum_equals(&datum, ovsdb_datum_default(&type),
-                                        &type)) {
-                    printf("wrong\n");
-                    exit(1);
-                }
-                ovsdb_datum_destroy(&datum, &type);
-                ovsdb_type_destroy(&type);
-
-                printf("OK\n");
-            }
-        }
-    }
-}
-
-static void
-do_diff_data(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_type type;
-    struct json *json;
-    struct ovsdb_datum new, old, diff, reincarnation;
-
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_type_from_json(&type, json));
-    json_destroy(json);
-
-    /* Arguments in pairs of 'old' and 'new'. */
-    for (int i = 2; i < ctx->argc - 1; i+=2) {
-        struct ovsdb_error *error;
-
-        json = unbox_json(parse_json(ctx->argv[i]));
-        check_ovsdb_error(ovsdb_datum_from_json(&old, &type, json, NULL));
-        json_destroy(json);
-
-        json = unbox_json(parse_json(ctx->argv[i+1]));
-        check_ovsdb_error(ovsdb_transient_datum_from_json(&new, &type, json));
-        json_destroy(json);
-
-        /* Generate the diff.  */
-        ovsdb_datum_diff(&diff, &old, &new, &type);
-
-        /* Apply diff to 'old' to create'reincarnation'. */
-        error = ovsdb_datum_apply_diff(&reincarnation, &old, &diff, &type);
-        if (error) {
-            char *string = ovsdb_error_to_string_free(error);
-            ovs_fatal(0, "%s", string);
-        }
-
-        /* Test to make sure 'new' equals 'reincarnation'.  */
-        if (!ovsdb_datum_equals(&new, &reincarnation, &type)) {
-            ovs_fatal(0, "failed to apply diff");
-        }
-
-        /* Print diff */
-        json = ovsdb_datum_to_json(&diff, &type);
-        printf ("diff: ");
-        print_and_free_json(json);
-
-        /* Print reincarnation */
-        json = ovsdb_datum_to_json(&reincarnation, &type);
-        printf ("apply diff: ");
-        print_and_free_json(json);
-
-        ovsdb_datum_destroy(&new, &type);
-        ovsdb_datum_destroy(&old, &type);
-        ovsdb_datum_destroy(&diff, &type);
-        ovsdb_datum_destroy(&reincarnation, &type);
-
-        printf("OK\n");
-    }
-
-    ovsdb_type_destroy(&type);
-}
-
-static void
-do_parse_atomic_type(struct ovs_cmdl_context *ctx)
-{
-    enum ovsdb_atomic_type type;
-    struct json *json;
-
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_atomic_type_from_json(&type, json));
-    json_destroy(json);
-    print_and_free_json(ovsdb_atomic_type_to_json(type));
-}
-
-static void
-do_parse_base_type(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_base_type base;
-    struct json *json;
-
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_base_type_from_json(&base, json));
-    json_destroy(json);
-    print_and_free_json(ovsdb_base_type_to_json(&base));
-    ovsdb_base_type_destroy(&base);
-}
-
-static void
-do_parse_type(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_type type;
-    struct json *json;
-
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_type_from_json(&type, json));
-    json_destroy(json);
-    print_and_free_json(ovsdb_type_to_json(&type));
-    ovsdb_type_destroy(&type);
-}
-
-static void
-do_parse_atoms(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_base_type base;
-    struct json *json;
-    int i;
-
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_base_type_from_json(&base, json));
-    json_destroy(json);
-
-    for (i = 2; i < ctx->argc; i++) {
-        struct ovsdb_error *error;
-        union ovsdb_atom atom;
-
-        json = unbox_json(parse_json(ctx->argv[i]));
-        error = ovsdb_atom_from_json(&atom, &base, json, NULL);
-        json_destroy(json);
-
-        if (error) {
-            print_and_free_ovsdb_error(error);
-        } else {
-            print_and_free_json(ovsdb_atom_to_json(&atom, base.type));
-            ovsdb_atom_destroy(&atom, base.type);
-        }
-    }
-    ovsdb_base_type_destroy(&base);
-}
-
-static void
-do_parse_atom_strings(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_base_type base;
-    struct json *json;
-    int i;
-
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_base_type_from_json(&base, json));
-    json_destroy(json);
-
-    for (i = 2; i < ctx->argc; i++) {
-        union ovsdb_atom atom, *range_end_atom = NULL;
-        struct ds out;
-
-        die_if_error(ovsdb_atom_from_string(&atom, &range_end_atom, &base,
-                                            ctx->argv[i], NULL));
-
-        ds_init(&out);
-        ovsdb_atom_to_string(&atom, base.type, &out);
-        if (range_end_atom) {
-            struct ds range_end_ds;
-            ds_init(&range_end_ds);
-            ovsdb_atom_to_string(range_end_atom, base.type, &range_end_ds);
-            ds_put_char(&out, '-');
-            ds_put_cstr(&out, ds_cstr(&range_end_ds));;
-            ds_destroy(&range_end_ds);
-        }
-        puts(ds_cstr(&out));
-        ds_destroy(&out);
-
-        ovsdb_atom_destroy(&atom, base.type);
-        if (range_end_atom) {
-            ovsdb_atom_destroy(range_end_atom, base.type);
-            free(range_end_atom);
-        }
-    }
-    ovsdb_base_type_destroy(&base);
-}
-
-static void
-do_parse_data__(int argc, char *argv[],
-                struct ovsdb_error *
-                (*parse)(struct ovsdb_datum *datum,
-                         const struct ovsdb_type *type,
-                         const struct json *json,
-                         struct ovsdb_symbol_table *symtab))
-{
-    struct ovsdb_type type;
-    struct json *json;
-    int i;
-
-    json = unbox_json(parse_json(argv[1]));
-    check_ovsdb_error(ovsdb_type_from_json(&type, json));
-    json_destroy(json);
-
-    for (i = 2; i < argc; i++) {
-        struct ovsdb_datum datum;
-
-        json = unbox_json(parse_json(argv[i]));
-        check_ovsdb_error(parse(&datum, &type, json, NULL));
-        json_destroy(json);
-
-        print_and_free_json(ovsdb_datum_to_json(&datum, &type));
-
-        ovsdb_datum_destroy(&datum, &type);
-    }
-    ovsdb_type_destroy(&type);
-}
-
-static void
-do_parse_data(struct ovs_cmdl_context *ctx)
-{
-    do_parse_data__(ctx->argc, ctx->argv, ovsdb_datum_from_json);
-}
-
-static void
-do_parse_data_strings(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_type type;
-    struct json *json;
-    int i;
-
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_type_from_json(&type, json));
-    json_destroy(json);
-
-    for (i = 2; i < ctx->argc; i++) {
-        struct ovsdb_datum datum;
-        struct ds out;
-
-        die_if_error(ovsdb_datum_from_string(&datum, &type, ctx->argv[i], NULL));
-
-        ds_init(&out);
-        ovsdb_datum_to_string(&datum, &type, &out);
-        puts(ds_cstr(&out));
-        ds_destroy(&out);
-
-        ovsdb_datum_destroy(&datum, &type);
-    }
-    ovsdb_type_destroy(&type);
-}
-
-static enum ovsdb_atomic_type compare_atoms_atomic_type;
-
-static int
-compare_atoms(const void *a_, const void *b_)
-{
-    const union ovsdb_atom *a = a_;
-    const union ovsdb_atom *b = b_;
-
-    return ovsdb_atom_compare_3way(a, b, compare_atoms_atomic_type);
-}
-
-static void
-do_sort_atoms(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_base_type base;
-    union ovsdb_atom *atoms;
-    struct json *json, **json_atoms;
-    size_t n_atoms;
-    int i;
-
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_base_type_from_json(&base, json));
-    json_destroy(json);
-
-    json = unbox_json(parse_json(ctx->argv[2]));
-    if (json->type != JSON_ARRAY) {
-        ovs_fatal(0, "second argument must be array");
-    }
-
-    /* Convert JSON atoms to internal representation. */
-    n_atoms = json->array.n;
-    atoms = xmalloc(n_atoms * sizeof *atoms);
-    for (i = 0; i < n_atoms; i++) {
-        check_ovsdb_error(ovsdb_atom_from_json(&atoms[i], &base,
-                                               json->array.elems[i], NULL));
-    }
-    json_destroy(json);
-
-    /* Sort atoms. */
-    compare_atoms_atomic_type = base.type;
-    qsort(atoms, n_atoms, sizeof *atoms, compare_atoms);
-
-    /* Convert internal representation back to JSON. */
-    json_atoms = xmalloc(n_atoms * sizeof *json_atoms);
-    for (i = 0; i < n_atoms; i++) {
-        json_atoms[i] = ovsdb_atom_to_json(&atoms[i], base.type);
-        ovsdb_atom_destroy(&atoms[i], base.type);
-    }
-    print_and_free_json(json_array_create(json_atoms, n_atoms));
-    free(atoms);
-    ovsdb_base_type_destroy(&base);
-}
-
-static void
-do_parse_column(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_column *column;
-    struct json *json;
-
-    json = parse_json(ctx->argv[2]);
-    check_ovsdb_error(ovsdb_column_from_json(json, ctx->argv[1], &column));
-    json_destroy(json);
-    print_and_free_json(ovsdb_column_to_json(column));
-    ovsdb_column_destroy(column);
-}
-
-static void
-do_parse_table(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_table_schema *ts;
-    bool default_is_root;
-    struct json *json;
-
-    default_is_root = ctx->argc > 3 && !strcmp(ctx->argv[3], "true");
-
-    json = parse_json(ctx->argv[2]);
-    check_ovsdb_error(ovsdb_table_schema_from_json(json, ctx->argv[1], &ts));
-    json_destroy(json);
-    print_and_free_json(ovsdb_table_schema_to_json(ts, default_is_root));
-    ovsdb_table_schema_destroy(ts);
-}
-
-static void
-do_parse_rows(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_column_set all_columns;
-    struct ovsdb_table_schema *ts;
-    struct ovsdb_table *table;
-    struct json *json;
-    int i;
-
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_table_schema_from_json(json, "mytable", &ts));
-    json_destroy(json);
-
-    table = ovsdb_table_create(ts);
-    ovsdb_column_set_init(&all_columns);
-    ovsdb_column_set_add_all(&all_columns, table);
-
-    for (i = 2; i < ctx->argc; i++) {
-        struct ovsdb_column_set columns;
-        struct ovsdb_row *row;
-
-        ovsdb_column_set_init(&columns);
-        row = ovsdb_row_create(table);
-
-        json = unbox_json(parse_json(ctx->argv[i]));
-        check_ovsdb_error(ovsdb_row_from_json(row, json, NULL, &columns));
-        json_destroy(json);
-
-        print_and_free_json(ovsdb_row_to_json(row, &all_columns));
-
-        if (columns.n_columns) {
-            struct svec names;
-            size_t j;
-            char *s;
-
-            svec_init(&names);
-            for (j = 0; j < columns.n_columns; j++) {
-                svec_add(&names, columns.columns[j]->name);
-            }
-            svec_sort(&names);
-            s = svec_join(&names, ", ", "");
-            puts(s);
-            free(s);
-            svec_destroy(&names);
-        } else {
-            printf("<none>\n");
-        }
-
-        ovsdb_column_set_destroy(&columns);
-        ovsdb_row_destroy(row);
-    }
-
-    ovsdb_column_set_destroy(&all_columns);
-    ovsdb_table_destroy(table); /* Also destroys 'ts'. */
-}
-
-static void
-do_compare_rows(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_column_set all_columns;
-    struct ovsdb_table_schema *ts;
-    struct ovsdb_table *table;
-    struct ovsdb_row **rows;
-    struct json *json;
-    char **names;
-    int n_rows;
-    int i, j;
-
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_table_schema_from_json(json, "mytable", &ts));
-    json_destroy(json);
-
-    table = ovsdb_table_create(ts);
-    ovsdb_column_set_init(&all_columns);
-    ovsdb_column_set_add_all(&all_columns, table);
-
-    n_rows = ctx->argc - 2;
-    rows = xmalloc(sizeof *rows * n_rows);
-    names = xmalloc(sizeof *names * n_rows);
-    for (i = 0; i < n_rows; i++) {
-        rows[i] = ovsdb_row_create(table);
-
-        json = parse_json(ctx->argv[i + 2]);
-        if (json->type != JSON_ARRAY || json->array.n != 2
-            || json->array.elems[0]->type != JSON_STRING) {
-            ovs_fatal(0, "\"%s\" does not have expected form "
-                      "[\"name\", {data}]", ctx->argv[i]);
-        }
-        names[i] = xstrdup(json->array.elems[0]->string);
-        check_ovsdb_error(ovsdb_row_from_json(rows[i], json->array.elems[1],
-                                              NULL, NULL));
-        json_destroy(json);
-    }
-    for (i = 0; i < n_rows; i++) {
-        uint32_t i_hash = ovsdb_row_hash_columns(rows[i], &all_columns, 0);
-        for (j = i + 1; j < n_rows; j++) {
-            uint32_t j_hash = ovsdb_row_hash_columns(rows[j], &all_columns, 0);
-            if (ovsdb_row_equal_columns(rows[i], rows[j], &all_columns)) {
-                printf("%s == %s\n", names[i], names[j]);
-                if (i_hash != j_hash) {
-                    printf("but hash(%s) != hash(%s)\n", names[i], names[j]);
-                    abort();
-                }
-            } else if (i_hash == j_hash) {
-                printf("hash(%s) == hash(%s)\n", names[i], names[j]);
-            }
-        }
-    }
-    for (i = 0; i < n_rows; i++) {
-        ovsdb_row_destroy(rows[i]);
-        free(names[i]);
-    }
-    free(rows);
-    free(names);
-
-    ovsdb_column_set_destroy(&all_columns);
-    ovsdb_table_destroy(table); /* Also destroys 'ts'. */
-}
-
-static void
-do_parse_conditions(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_table_schema *ts;
-    struct json *json;
-    int exit_code = 0;
-    int i;
-
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_table_schema_from_json(json, "mytable", &ts));
-    json_destroy(json);
-
-    for (i = 2; i < ctx->argc; i++) {
-        struct ovsdb_condition cnd;
-        struct ovsdb_error *error;
-
-        json = parse_json(ctx->argv[i]);
-        error = ovsdb_condition_from_json(ts, json, NULL, &cnd);
-        if (!error) {
-            print_and_free_json(ovsdb_condition_to_json(&cnd));
-        } else {
-            char *s = ovsdb_error_to_string_free(error);
-            ovs_error(0, "%s", s);
-            free(s);
-            exit_code = 1;
-        }
-        json_destroy(json);
-
-        ovsdb_condition_destroy(&cnd);
-    }
-    ovsdb_table_schema_destroy(ts);
-
-    exit(exit_code);
-}
-
-#define OVSDB_CONDITION_EVERY 0
-#define OVSDB_CONDITION_ANY 1
-
-static void
-do_evaluate_condition__(struct ovs_cmdl_context *ctx, int mode)
-{
-    struct ovsdb_table_schema *ts;
-    struct ovsdb_table *table;
-    struct ovsdb_condition *conditions;
-    size_t n_conditions;
-    struct ovsdb_row **rows;
-    size_t n_rows;
-    struct json *json;
-    size_t i, j;
-
-    /* Parse table schema, create table. */
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_table_schema_from_json(json, "mytable", &ts));
-    json_destroy(json);
-
-    table = ovsdb_table_create(ts);
-
-    /* Parse conditions. */
-    json = parse_json(ctx->argv[2]);
-    if (json->type != JSON_ARRAY) {
-        ovs_fatal(0, "CONDITION argument is not JSON array");
-    }
-    n_conditions = json->array.n;
-    conditions = xmalloc(n_conditions * sizeof *conditions);
-    for (i = 0; i < n_conditions; i++) {
-        check_ovsdb_error(ovsdb_condition_from_json(ts, json->array.elems[i],
-                                                    NULL, &conditions[i]));
-    }
-    json_destroy(json);
-
-    /* Parse rows. */
-    json = parse_json(ctx->argv[3]);
-    if (json->type != JSON_ARRAY) {
-        ovs_fatal(0, "ROW argument is not JSON array");
-    }
-    n_rows = json->array.n;
-    rows = xmalloc(n_rows * sizeof *rows);
-    for (i = 0; i < n_rows; i++) {
-        rows[i] = ovsdb_row_create(table);
-        check_ovsdb_error(ovsdb_row_from_json(rows[i], json->array.elems[i],
-                                              NULL, NULL));
-    }
-    json_destroy(json);
-
-    for (i = 0; i < n_conditions; i++) {
-        printf("condition %2"PRIuSIZE":", i);
-        for (j = 0; j < n_rows; j++) {
-            bool result;
-            if (mode == OVSDB_CONDITION_EVERY) {
-                result = ovsdb_condition_match_every_clause(rows[j],
-                                                  &conditions[i]);
-            } else {
-                result = ovsdb_condition_match_any_clause(rows[j]->fields,
-                                                          &conditions[i],
-                                                          NULL);
-            }
-            if (j % 5 == 0) {
-                putchar(' ');
-            }
-            putchar(result ? 'T' : '-');
-        }
-        printf("\n");
-    }
-
-    for (i = 0; i < n_conditions; i++) {
-        ovsdb_condition_destroy(&conditions[i]);
-    }
-    free(conditions);
-    for (i = 0; i < n_rows; i++) {
-        ovsdb_row_destroy(rows[i]);
-    }
-    free(rows);
-    ovsdb_table_destroy(table); /* Also destroys 'ts'. */
-}
-
-static void
-do_evaluate_conditions(struct ovs_cmdl_context *ctx)
-{
-    do_evaluate_condition__(ctx, OVSDB_CONDITION_EVERY);
-}
-
-static void
-do_evaluate_conditions_any(struct ovs_cmdl_context *ctx)
-{
-    do_evaluate_condition__(ctx, OVSDB_CONDITION_ANY);
-}
-
-static void
-do_compare_conditions(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_table_schema *ts;
-    struct ovsdb_table *table;
-    struct ovsdb_condition *conditions;
-    size_t n_conditions;
-    struct json *json;
-    size_t i;
-
-    /* Parse table schema, create table. */
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_table_schema_from_json(json, "mytable", &ts));
-    json_destroy(json);
-
-    table = ovsdb_table_create(ts);
-
-    /* Parse conditions. */
-    json = parse_json(ctx->argv[2]);
-    if (json->type != JSON_ARRAY) {
-        ovs_fatal(0, "CONDITION argument is not JSON array");
-    }
-    n_conditions = json->array.n;
-    conditions = xmalloc(n_conditions * sizeof *conditions);
-
-    for (i = 0; i < n_conditions; i++) {
-        check_ovsdb_error(ovsdb_condition_from_json(ts, json->array.elems[i],
-                                                    NULL, &conditions[i]));
-    }
-    json_destroy(json);
-
-    for (i = 0; i < n_conditions - 1; i++) {
-        int res = ovsdb_condition_cmp_3way(&conditions[i], &conditions[i + 1]);
-        printf("condition %"PRIuSIZE"-%"PRIuSIZE": %d\n", i, i + 1, res);
-    }
-
-    for (i = 0; i < n_conditions; i++) {
-        ovsdb_condition_destroy(&conditions[i]);
-    }
-    free(conditions);
-    ovsdb_table_destroy(table); /* Also destroys 'ts'. */
-}
-
-static void
-do_parse_mutations(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_table_schema *ts;
-    struct json *json;
-    int exit_code = 0;
-    int i;
-
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_table_schema_from_json(json, "mytable", &ts));
-    json_destroy(json);
-
-    for (i = 2; i < ctx->argc; i++) {
-        struct ovsdb_mutation_set set;
-        struct ovsdb_error *error;
-
-        json = parse_json(ctx->argv[i]);
-        error = ovsdb_mutation_set_from_json(ts, json, NULL, &set);
-        if (!error) {
-            print_and_free_json(ovsdb_mutation_set_to_json(&set));
-        } else {
-            char *s = ovsdb_error_to_string_free(error);
-            ovs_error(0, "%s", s);
-            free(s);
-            exit_code = 1;
-        }
-        json_destroy(json);
-
-        ovsdb_mutation_set_destroy(&set);
-    }
-    ovsdb_table_schema_destroy(ts);
-
-    exit(exit_code);
-}
-
-static void
-do_execute_mutations(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_table_schema *ts;
-    struct ovsdb_table *table;
-    struct ovsdb_mutation_set *sets;
-    size_t n_sets;
-    struct ovsdb_row **rows;
-    size_t n_rows;
-    struct json *json;
-    size_t i, j;
-
-    /* Parse table schema, create table. */
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_table_schema_from_json(json, "mytable", &ts));
-    json_destroy(json);
-
-    table = ovsdb_table_create(ts);
-
-    /* Parse mutations. */
-    json = parse_json(ctx->argv[2]);
-    if (json->type != JSON_ARRAY) {
-        ovs_fatal(0, "MUTATION argument is not JSON array");
-    }
-    n_sets = json->array.n;
-    sets = xmalloc(n_sets * sizeof *sets);
-    for (i = 0; i < n_sets; i++) {
-        check_ovsdb_error(ovsdb_mutation_set_from_json(ts,
-                                                       json->array.elems[i],
-                                                       NULL, &sets[i]));
-    }
-    json_destroy(json);
-
-    /* Parse rows. */
-    json = parse_json(ctx->argv[3]);
-    if (json->type != JSON_ARRAY) {
-        ovs_fatal(0, "ROW argument is not JSON array");
-    }
-    n_rows = json->array.n;
-    rows = xmalloc(n_rows * sizeof *rows);
-    for (i = 0; i < n_rows; i++) {
-        rows[i] = ovsdb_row_create(table);
-        check_ovsdb_error(ovsdb_row_from_json(rows[i], json->array.elems[i],
-                                              NULL, NULL));
-    }
-    json_destroy(json);
-
-    for (i = 0; i < n_sets; i++) {
-        printf("mutation %2"PRIuSIZE":\n", i);
-        for (j = 0; j < n_rows; j++) {
-            struct ovsdb_error *error;
-            struct ovsdb_row *row;
-
-            row = ovsdb_row_clone(rows[j]);
-            error = ovsdb_mutation_set_execute(row, &sets[i]);
-
-            printf("row %"PRIuSIZE": ", j);
-            if (error) {
-                print_and_free_ovsdb_error(error);
-            } else {
-                struct ovsdb_column_set columns;
-                struct shash_node *node;
-
-                ovsdb_column_set_init(&columns);
-                SHASH_FOR_EACH (node, &ts->columns) {
-                    struct ovsdb_column *c = node->data;
-                    if (!ovsdb_datum_equals(&row->fields[c->index],
-                                            &rows[j]->fields[c->index],
-                                            &c->type)) {
-                        ovsdb_column_set_add(&columns, c);
-                    }
-                }
-                if (columns.n_columns) {
-                    print_and_free_json(ovsdb_row_to_json(row, &columns));
-                } else {
-                    printf("no change\n");
-                }
-                ovsdb_column_set_destroy(&columns);
-            }
-            ovsdb_row_destroy(row);
-        }
-        printf("\n");
-    }
-
-    for (i = 0; i < n_sets; i++) {
-        ovsdb_mutation_set_destroy(&sets[i]);
-    }
-    free(sets);
-    for (i = 0; i < n_rows; i++) {
-        ovsdb_row_destroy(rows[i]);
-    }
-    free(rows);
-    ovsdb_table_destroy(table); /* Also destroys 'ts'. */
-}
-
-/* Inserts a row, without bothering to update metadata such as refcounts. */
-static void
-put_row(struct ovsdb_table *table, struct ovsdb_row *row)
-{
-    const struct uuid *uuid = ovsdb_row_get_uuid(row);
-    if (!ovsdb_table_get_row(table, uuid)) {
-        hmap_insert(&table->rows, &row->hmap_node, uuid_hash(uuid));
-    }
-}
-
-struct do_query_cbdata {
-    struct uuid *row_uuids;
-    int *counts;
-    size_t n_rows;
-};
-
-static bool
-do_query_cb(const struct ovsdb_row *row, void *cbdata_)
-{
-    struct do_query_cbdata *cbdata = cbdata_;
-    size_t i;
-
-    for (i = 0; i < cbdata->n_rows; i++) {
-        if (uuid_equals(ovsdb_row_get_uuid(row), &cbdata->row_uuids[i])) {
-            cbdata->counts[i]++;
-        }
-    }
-
-    return true;
-}
-
-static void
-do_query(struct ovs_cmdl_context *ctx)
-{
-    struct do_query_cbdata cbdata;
-    struct ovsdb_table_schema *ts;
-    struct ovsdb_table *table;
-    struct json *json;
-    int exit_code = 0;
-    size_t i;
-
-    /* Parse table schema, create table. */
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_table_schema_from_json(json, "mytable", &ts));
-    json_destroy(json);
-
-    table = ovsdb_table_create(ts);
-
-    /* Parse rows, add to table. */
-    json = parse_json(ctx->argv[2]);
-    if (json->type != JSON_ARRAY) {
-        ovs_fatal(0, "ROW argument is not JSON array");
-    }
-    cbdata.n_rows = json->array.n;
-    cbdata.row_uuids = xmalloc(cbdata.n_rows * sizeof *cbdata.row_uuids);
-    cbdata.counts = xmalloc(cbdata.n_rows * sizeof *cbdata.counts);
-    for (i = 0; i < cbdata.n_rows; i++) {
-        struct ovsdb_row *row = ovsdb_row_create(table);
-        uuid_generate(ovsdb_row_get_uuid_rw(row));
-        check_ovsdb_error(ovsdb_row_from_json(row, json->array.elems[i],
-                                              NULL, NULL));
-        if (ovsdb_table_get_row(table, ovsdb_row_get_uuid(row))) {
-            ovs_fatal(0, "duplicate UUID "UUID_FMT" in table",
-                      UUID_ARGS(ovsdb_row_get_uuid(row)));
-        }
-        cbdata.row_uuids[i] = *ovsdb_row_get_uuid(row);
-        put_row(table, row);
-    }
-    json_destroy(json);
-
-    /* Parse conditions and execute queries. */
-    json = parse_json(ctx->argv[3]);
-    if (json->type != JSON_ARRAY) {
-        ovs_fatal(0, "CONDITION argument is not JSON array");
-    }
-    for (i = 0; i < json->array.n; i++) {
-        struct ovsdb_condition cnd;
-        size_t j;
-
-        check_ovsdb_error(ovsdb_condition_from_json(ts, json->array.elems[i],
-                                                    NULL, &cnd));
-
-        memset(cbdata.counts, 0, cbdata.n_rows * sizeof *cbdata.counts);
-        ovsdb_query(table, &cnd, do_query_cb, &cbdata);
-
-        printf("query %2"PRIuSIZE":", i);
-        for (j = 0; j < cbdata.n_rows; j++) {
-            if (j % 5 == 0) {
-                putchar(' ');
-            }
-            if (cbdata.counts[j]) {
-                printf("%d", cbdata.counts[j]);
-                if (cbdata.counts[j] > 1) {
-                    /* Dup! */
-                    exit_code = 1;
-                }
-            } else {
-                putchar('-');
-            }
-        }
-        putchar('\n');
-
-        ovsdb_condition_destroy(&cnd);
-    }
-    json_destroy(json);
-
-    ovsdb_table_destroy(table); /* Also destroys 'ts'. */
-
-    exit(exit_code);
-}
-
-struct do_query_distinct_class {
-    struct ovsdb_row *example;
-    int count;
-};
-
-struct do_query_distinct_row {
-    struct uuid uuid;
-    struct do_query_distinct_class *class;
-};
-
-static void
-do_query_distinct(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_column_set columns;
-    struct ovsdb_table_schema *ts;
-    struct ovsdb_table *table;
-    struct do_query_distinct_row *rows;
-    size_t n_rows;
-    struct do_query_distinct_class *classes;
-    size_t n_classes;
-    struct json *json;
-    int exit_code = 0;
-    size_t i;
-
-    /* Parse table schema, create table. */
-    json = unbox_json(parse_json(ctx->argv[1]));
-    check_ovsdb_error(ovsdb_table_schema_from_json(json, "mytable", &ts));
-    json_destroy(json);
-
-    table = ovsdb_table_create(ts);
-
-    /* Parse column set. */
-    json = parse_json(ctx->argv[4]);
-    check_ovsdb_error(ovsdb_column_set_from_json(json, table->schema,
-                                                 &columns));
-    json_destroy(json);
-
-    /* Parse rows, add to table. */
-    json = parse_json(ctx->argv[2]);
-    if (json->type != JSON_ARRAY) {
-        ovs_fatal(0, "ROW argument is not JSON array");
-    }
-    n_rows = json->array.n;
-    rows = xmalloc(n_rows * sizeof *rows);
-    classes = xmalloc(n_rows * sizeof *classes);
-    n_classes = 0;
-    for (i = 0; i < n_rows; i++) {
-        struct ovsdb_row *row;
-        size_t j;
-
-        /* Parse row. */
-        row = ovsdb_row_create(table);
-        uuid_generate(ovsdb_row_get_uuid_rw(row));
-        check_ovsdb_error(ovsdb_row_from_json(row, json->array.elems[i],
-                                              NULL, NULL));
-
-        /* Initialize row and find equivalence class. */
-        rows[i].uuid = *ovsdb_row_get_uuid(row);
-        rows[i].class = NULL;
-        for (j = 0; j < n_classes; j++) {
-            if (ovsdb_row_equal_columns(row, classes[j].example, &columns)) {
-                rows[i].class = &classes[j];
-                break;
-            }
-        }
-        if (!rows[i].class) {
-            rows[i].class = &classes[n_classes];
-            classes[n_classes].example = ovsdb_row_clone(row);
-            n_classes++;
-        }
-
-        /* Add row to table. */
-        if (ovsdb_table_get_row(table, ovsdb_row_get_uuid(row))) {
-            ovs_fatal(0, "duplicate UUID "UUID_FMT" in table",
-                      UUID_ARGS(ovsdb_row_get_uuid(row)));
-        }
-        put_row(table, row);
-
-    }
-    json_destroy(json);
-
-    /* Parse conditions and execute queries. */
-    json = parse_json(ctx->argv[3]);
-    if (json->type != JSON_ARRAY) {
-        ovs_fatal(0, "CONDITION argument is not JSON array");
-    }
-    for (i = 0; i < json->array.n; i++) {
-        struct ovsdb_row_set results;
-        struct ovsdb_condition cnd;
-        size_t j;
-
-        check_ovsdb_error(ovsdb_condition_from_json(ts, json->array.elems[i],
-                                                    NULL, &cnd));
-
-        for (j = 0; j < n_classes; j++) {
-            classes[j].count = 0;
-        }
-        ovsdb_row_set_init(&results);
-        ovsdb_query_distinct(table, &cnd, &columns, &results);
-        for (j = 0; j < results.n_rows; j++) {
-            size_t k;
-
-            for (k = 0; k < n_rows; k++) {
-                if (uuid_equals(ovsdb_row_get_uuid(results.rows[j]),
-                                &rows[k].uuid)) {
-                    rows[k].class->count++;
-                }
-            }
-        }
-        ovsdb_row_set_destroy(&results);
-
-        printf("query %2"PRIuSIZE":", i);
-        for (j = 0; j < n_rows; j++) {
-            int count = rows[j].class->count;
-
-            if (j % 5 == 0) {
-                putchar(' ');
-            }
-            if (count > 1) {
-                /* Dup! */
-                printf("%d", count);
-                exit_code = 1;
-            } else if (count == 1) {
-                putchar("abcdefghijklmnopqrstuvwxyz"[rows[j].class - classes]);
-            } else {
-                putchar('-');
-            }
-        }
-        putchar('\n');
-
-        ovsdb_condition_destroy(&cnd);
-    }
-    json_destroy(json);
-
-    for (i = 0; i < n_classes; i++) {
-        ovsdb_row_destroy(classes[i].example);
-    }
-
-    ovsdb_table_destroy(table); /* Also destroys 'ts'. */
-
-    free(rows);
-    free(classes);
-    exit(exit_code);
-}
-
-static void
-do_parse_schema(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_schema *schema;
-    struct json *json;
-
-    json = parse_json(ctx->argv[1]);
-    check_ovsdb_error(ovsdb_schema_from_json(json, &schema));
-    json_destroy(json);
-    print_and_free_json(ovsdb_schema_to_json(schema));
-    ovsdb_schema_destroy(schema);
-}
-
-static void
-do_execute__(struct ovs_cmdl_context *ctx, bool ro)
-{
-    struct ovsdb_schema *schema;
-    struct json *json;
-    struct ovsdb *db;
-    int i;
-
-    /* Create database. */
-    json = parse_json(ctx->argv[1]);
-    check_ovsdb_error(ovsdb_schema_from_json(json, &schema));
-    json_destroy(json);
-    db = ovsdb_create(schema, ovsdb_storage_create_unbacked());
-
-    for (i = 2; i < ctx->argc; i++) {
-        struct json *params, *result;
-        char *s;
-
-        params = parse_json(ctx->argv[i]);
-        result = ovsdb_execute(db, NULL, params, ro,  NULL, NULL, 0, NULL);
-        s = json_to_string(result, JSSF_SORT);
-        printf("%s\n", s);
-        free(s);
-        json_destroy(params);
-        json_destroy(result);
-    }
-
-    ovsdb_destroy(db);
-}
-
-static void
-do_execute_ro(struct ovs_cmdl_context *ctx)
-{
-    do_execute__(ctx, true);
-}
-
-static void
-do_execute(struct ovs_cmdl_context *ctx)
-{
-    do_execute__(ctx, false);
-}
-
-struct test_trigger {
-    struct ovsdb_trigger trigger;
-    int number;
-};
-
-static void
-do_trigger_dump(struct test_trigger *t, long long int now, const char *title)
-{
-    struct jsonrpc_msg *reply;
-    char *s;
-
-    reply = ovsdb_trigger_steal_reply(&t->trigger);
-    s = json_to_string(reply->result, JSSF_SORT);
-    printf("t=%lld: trigger %d (%s): %s\n", now, t->number, title, s);
-    free(s);
-    jsonrpc_msg_destroy(reply);
-    ovsdb_trigger_destroy(&t->trigger);
-    free(t);
-}
-
-static void
-do_trigger(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_schema *schema;
-    struct ovsdb_session session;
-    struct ovsdb_server server;
-    struct json *json;
-    struct ovsdb *db;
-    long long int now;
-    int number;
-    int i;
-
-    /* Create database. */
-    json = parse_json(ctx->argv[1]);
-    check_ovsdb_error(ovsdb_schema_from_json(json, &schema));
-    json_destroy(json);
-    db = ovsdb_create(schema, ovsdb_storage_create_unbacked());
-
-    ovsdb_server_init(&server);
-    ovsdb_server_add_db(&server, db);
-    ovsdb_session_init(&session, &server);
-
-    now = 0;
-    number = 0;
-    for (i = 2; i < ctx->argc; i++) {
-        struct json *params = parse_json(ctx->argv[i]);
-        if (params->type == JSON_ARRAY
-            && json_array(params)->n == 2
-            && json_array(params)->elems[0]->type == JSON_STRING
-            && !strcmp(json_string(json_array(params)->elems[0]), "advance")
-            && json_array(params)->elems[1]->type == JSON_INTEGER) {
-            now += json_integer(json_array(params)->elems[1]);
-            json_destroy(params);
-        } else {
-            struct test_trigger *t = xmalloc(sizeof *t);
-            ovsdb_trigger_init(&session, db, &t->trigger,
-                               jsonrpc_create_request("transact", params,
-                                                      NULL),
-                               now, false, NULL, NULL);
-            t->number = number++;
-            if (ovsdb_trigger_is_complete(&t->trigger)) {
-                do_trigger_dump(t, now, "immediate");
-            } else {
-                printf("t=%lld: new trigger %d\n", now, t->number);
-            }
-        }
-
-        ovsdb_trigger_run(db, now);
-
-        struct test_trigger *t;
-        LIST_FOR_EACH_POP (t, trigger.node, &session.completions) {
-            do_trigger_dump(t, now, "delayed");
-            ovsdb_trigger_run(db, now);
-        }
-
-        ovsdb_trigger_wait(db, now);
-        poll_immediate_wake();
-        poll_block();
-    }
-
-    ovsdb_server_destroy(&server);
-    ovsdb_destroy(db);
-}
-
-static void
-do_help(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    usage();
-}
-
-/* "transact" command. */
-
-static struct ovsdb *do_transact_db;
-static struct ovsdb_txn *do_transact_txn;
-static struct ovsdb_table *do_transact_table;
-
-static void
-do_transact_commit(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    ovsdb_error_destroy(ovsdb_txn_replay_commit(do_transact_txn));
-    do_transact_txn = NULL;
-}
-
-static void
-do_transact_abort(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    ovsdb_txn_abort(do_transact_txn);
-    do_transact_txn = NULL;
-}
-
-static void
-uuid_from_integer(int integer, struct uuid *uuid)
-{
-    uuid_zero(uuid);
-    uuid->parts[3] = integer;
-}
-
-static const struct ovsdb_row *
-do_transact_find_row(const char *uuid_string)
-{
-    const struct ovsdb_row *row;
-    struct uuid uuid;
-
-    uuid_from_integer(atoi(uuid_string), &uuid);
-    row = ovsdb_table_get_row(do_transact_table, &uuid);
-    if (!row) {
-        ovs_fatal(0, "table does not contain row with UUID "UUID_FMT,
-                  UUID_ARGS(&uuid));
-    }
-    return row;
-}
-
-static void
-do_transact_set_integer(struct ovsdb_row *row, const char *column_name,
-                        int integer)
-{
-    if (integer != -1) {
-        const struct ovsdb_column *column;
-
-        column = ovsdb_table_schema_get_column(do_transact_table->schema,
-                                               column_name);
-        row->fields[column->index].keys[0].integer = integer;
-    }
-}
-
-static int
-do_transact_get_integer(const struct ovsdb_row *row, const char *column_name)
-{
-    const struct ovsdb_column *column;
-
-    column = ovsdb_table_schema_get_column(do_transact_table->schema,
-                                           column_name);
-    return row->fields[column->index].keys[0].integer;
-}
-
-static void
-do_transact_set_i_j(struct ovsdb_row *row,
-                    const char *i_string, const char *j_string)
-{
-    do_transact_set_integer(row, "i", atoi(i_string));
-    do_transact_set_integer(row, "j", atoi(j_string));
-}
-
-static void
-do_transact_insert(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_row *row;
-    struct uuid *uuid;
-
-    row = ovsdb_row_create(do_transact_table);
-
-    /* Set UUID. */
-    uuid = ovsdb_row_get_uuid_rw(row);
-    uuid_from_integer(atoi(ctx->argv[1]), uuid);
-    if (ovsdb_table_get_row(do_transact_table, uuid)) {
-        ovs_fatal(0, "table already contains row with UUID "UUID_FMT,
-                  UUID_ARGS(uuid));
-    }
-
-    do_transact_set_i_j(row, ctx->argv[2], ctx->argv[3]);
-
-    /* Insert row. */
-    ovsdb_txn_row_insert(do_transact_txn, row);
-}
-
-static void
-do_transact_delete(struct ovs_cmdl_context *ctx)
-{
-    const struct ovsdb_row *row = do_transact_find_row(ctx->argv[1]);
-    ovsdb_txn_row_delete(do_transact_txn, row);
-}
-
-static void
-do_transact_modify(struct ovs_cmdl_context *ctx)
-{
-    const struct ovsdb_row *row_ro;
-    struct ovsdb_row *row_rw;
-
-    row_ro = do_transact_find_row(ctx->argv[1]);
-    row_rw = ovsdb_txn_row_modify(do_transact_txn, row_ro);
-    do_transact_set_i_j(row_rw, ctx->argv[2], ctx->argv[3]);
-}
-
-static int
-compare_rows_by_uuid(const void *a_, const void *b_)
-{
-    struct ovsdb_row *const *ap = a_;
-    struct ovsdb_row *const *bp = b_;
-
-    return uuid_compare_3way(ovsdb_row_get_uuid(*ap), ovsdb_row_get_uuid(*bp));
-}
-
-static void
-do_transact_print(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    const struct ovsdb_row **rows;
-    const struct ovsdb_row *row;
-    size_t n_rows;
-    size_t i;
-
-    n_rows = hmap_count(&do_transact_table->rows);
-    rows = xmalloc(n_rows * sizeof *rows);
-    i = 0;
-    HMAP_FOR_EACH (row, hmap_node, &do_transact_table->rows) {
-        rows[i++] = row;
-    }
-    ovs_assert(i == n_rows);
-
-    qsort(rows, n_rows, sizeof *rows, compare_rows_by_uuid);
-
-    for (i = 0; i < n_rows; i++) {
-        printf("\n%"PRId32": i=%d, j=%d",
-               ovsdb_row_get_uuid(rows[i])->parts[3],
-               do_transact_get_integer(rows[i], "i"),
-               do_transact_get_integer(rows[i], "j"));
-    }
-
-    free(rows);
-}
-
-static void
-do_transact(struct ovs_cmdl_context *ctx)
-{
-    static const struct ovs_cmdl_command do_transact_commands[] = {
-        { "commit", NULL, 0, 0, do_transact_commit, OVS_RO },
-        { "abort", NULL, 0, 0, do_transact_abort, OVS_RO },
-        { "insert", NULL, 2, 3, do_transact_insert, OVS_RO },
-        { "delete", NULL, 1, 1, do_transact_delete, OVS_RO },
-        { "modify", NULL, 2, 3, do_transact_modify, OVS_RO },
-        { "print", NULL, 0, 0, do_transact_print, OVS_RO },
-        { NULL, NULL, 0, 0, NULL, OVS_RO },
-    };
-
-    struct ovsdb_schema *schema;
-    struct json *json;
-    int i;
-
-    /* Create table. */
-    json = parse_json("{\"name\": \"testdb\", "
-                      " \"tables\": "
-                      "  {\"mytable\": "
-                      "    {\"columns\": "
-                      "      {\"i\": {\"type\": \"integer\"}, "
-                      "       \"j\": {\"type\": \"integer\"}}}}}");
-    check_ovsdb_error(ovsdb_schema_from_json(json, &schema));
-    json_destroy(json);
-    do_transact_db = ovsdb_create(schema, ovsdb_storage_create_unbacked());
-    do_transact_table = ovsdb_get_table(do_transact_db, "mytable");
-    ovs_assert(do_transact_table != NULL);
-
-    for (i = 1; i < ctx->argc; i++) {
-        struct json *command;
-        size_t n_args;
-        char **args;
-        int j;
-        struct ovs_cmdl_context transact_ctx = { .argc = 0, };
-
-        command = parse_json(ctx->argv[i]);
-        if (command->type != JSON_ARRAY) {
-            ovs_fatal(0, "transaction %d must be JSON array "
-                      "with at least 1 element", i);
-        }
-
-        n_args = command->array.n;
-        args = xmalloc((n_args + 1) * sizeof *args);
-        for (j = 0; j < n_args; j++) {
-            struct json *s = command->array.elems[j];
-            if (s->type != JSON_STRING) {
-                ovs_fatal(0, "transaction %d argument %d must be JSON string",
-                          i, j);
-            }
-            args[j] = xstrdup(json_string(s));
-        }
-        args[n_args] = NULL;
-
-        if (!do_transact_txn) {
-            do_transact_txn = ovsdb_txn_create(do_transact_db);
-        }
-
-        for (j = 0; j < n_args; j++) {
-            if (j) {
-                putchar(' ');
-            }
-            fputs(args[j], stdout);
-        }
-        fputs(":", stdout);
-        transact_ctx.argc = n_args;
-        transact_ctx.argv = args;
-        ovs_cmdl_run_command(&transact_ctx, do_transact_commands);
-        putchar('\n');
-
-        for (j = 0; j < n_args; j++) {
-            free(args[j]);
-        }
-        free(args);
-        json_destroy(command);
-    }
-    ovsdb_txn_abort(do_transact_txn);
-    ovsdb_destroy(do_transact_db); /* Also destroys 'schema'. */
-}
-
-static int
-compare_link1(const void *a_, const void *b_)
-{
-    const struct idltest_link1 *const *ap = a_;
-    const struct idltest_link1 *const *bp = b_;
-    const struct idltest_link1 *a = *ap;
-    const struct idltest_link1 *b = *bp;
-
-    return a->i < b->i ? -1 : a->i > b->i;
-}
-
-static void
-print_idl_row_updated_simple(const struct idltest_simple *s, int step)
-{
-    size_t i;
-    bool updated = false;
-
-    for (i = 0; i < IDLTEST_SIMPLE_N_COLUMNS; i++) {
-        if (idltest_simple_is_updated(s, i)) {
-            if (!updated) {
-                printf("%03d: updated columns:", step);
-                updated = true;
-            }
-            printf(" %s", idltest_simple_columns[i].name);
-        }
-    }
-    if (updated) {
-        printf("\n");
-    }
-}
-
-static void
-print_idl_row_updated_link1(const struct idltest_link1 *l1, int step)
-{
-    size_t i;
-    bool updated = false;
-
-    for (i = 0; i < IDLTEST_LINK1_N_COLUMNS; i++) {
-        if (idltest_link1_is_updated(l1, i)) {
-            if (!updated) {
-                printf("%03d: updated columns:", step);
-                updated = true;
-            }
-            printf(" %s", idltest_link1_columns[i].name);
-        }
-    }
-    if (updated) {
-        printf("\n");
-    }
-}
-
-static void
-print_idl_row_updated_link2(const struct idltest_link2 *l2, int step)
-{
-    size_t i;
-    bool updated = false;
-
-    for (i = 0; i < IDLTEST_LINK2_N_COLUMNS; i++) {
-        if (idltest_link2_is_updated(l2, i)) {
-            if (!updated) {
-                printf("%03d: updated columns:", step);
-                updated = true;
-            }
-            printf(" %s", idltest_link2_columns[i].name);
-        }
-    }
-    if (updated) {
-        printf("\n");
-    }
-}
-
-static void
-print_idl_row_updated_singleton(const struct idltest_singleton *sng, int step)
-{
-    size_t i;
-    bool updated = false;
-
-    for (i = 0; i < IDLTEST_SINGLETON_N_COLUMNS; i++) {
-        if (idltest_singleton_is_updated(sng, i)) {
-            if (!updated) {
-                printf("%03d: updated columns:", step);
-                updated = true;
-            }
-            printf(" %s", idltest_singleton_columns[i].name);
-        }
-    }
-    if (updated) {
-        printf("\n");
-    }
-}
-
-static void
-print_idl_row_simple(const struct idltest_simple *s, int step)
-{
-    size_t i;
-
-    printf("%03d: i=%"PRId64" r=%g b=%s s=%s u="UUID_FMT" ia=[",
-           step, s->i, s->r, s->b ? "true" : "false",
-           s->s, UUID_ARGS(&s->u));
-    for (i = 0; i < s->n_ia; i++) {
-        printf("%s%"PRId64, i ? " " : "", s->ia[i]);
-    }
-    printf("] ra=[");
-    for (i = 0; i < s->n_ra; i++) {
-        printf("%s%g", i ? " " : "", s->ra[i]);
-    }
-    printf("] ba=[");
-    for (i = 0; i < s->n_ba; i++) {
-        printf("%s%s", i ? " " : "", s->ba[i] ? "true" : "false");
-    }
-    printf("] sa=[");
-    for (i = 0; i < s->n_sa; i++) {
-        printf("%s%s", i ? " " : "", s->sa[i]);
-    }
-    printf("] ua=[");
-    for (i = 0; i < s->n_ua; i++) {
-        printf("%s"UUID_FMT, i ? " " : "", UUID_ARGS(&s->ua[i]));
-    }
-    printf("] uuid="UUID_FMT"\n", UUID_ARGS(&s->header_.uuid));
-    print_idl_row_updated_simple(s, step);
-}
-
-static void
-print_idl_row_link1(const struct idltest_link1 *l1, int step)
-{
-    struct idltest_link1 **links;
-    size_t i;
-
-    printf("%03d: i=%"PRId64" k=", step, l1->i);
-    if (l1->k) {
-        printf("%"PRId64, l1->k->i);
-    }
-    printf(" ka=[");
-    links = xmemdup(l1->ka, l1->n_ka * sizeof *l1->ka);
-    qsort(links, l1->n_ka, sizeof *links, compare_link1);
-    for (i = 0; i < l1->n_ka; i++) {
-        printf("%s%"PRId64, i ? " " : "", links[i]->i);
-    }
-    free(links);
-    printf("] l2=");
-    if (l1->l2) {
-        printf("%"PRId64, l1->l2->i);
-    }
-    printf(" uuid="UUID_FMT"\n", UUID_ARGS(&l1->header_.uuid));
-    print_idl_row_updated_link1(l1, step);
-}
-
-static void
-print_idl_row_link2(const struct idltest_link2 *l2, int step)
-{
-    printf("%03d: i=%"PRId64" l1=", step, l2->i);
-    if (l2->l1) {
-        printf("%"PRId64, l2->l1->i);
-    }
-    printf(" uuid="UUID_FMT"\n", UUID_ARGS(&l2->header_.uuid));
-    print_idl_row_updated_link2(l2, step);
-}
-
-static void
-print_idl_row_singleton(const struct idltest_singleton *sng, int step)
-{
-    printf("%03d: name=%s", step, sng->name);
-    printf(" uuid="UUID_FMT"\n", UUID_ARGS(&sng->header_.uuid));
-    print_idl_row_updated_singleton(sng, step);
-}
-
-static void
-print_idl(struct ovsdb_idl *idl, int step)
-{
-    const struct idltest_simple *s;
-    const struct idltest_link1 *l1;
-    const struct idltest_link2 *l2;
-    const struct idltest_singleton *sng;
-    int n = 0;
-
-    IDLTEST_SIMPLE_FOR_EACH (s, idl) {
-        print_idl_row_simple(s, step);
-        n++;
-    }
-    IDLTEST_LINK1_FOR_EACH (l1, idl) {
-        print_idl_row_link1(l1, step);
-        n++;
-    }
-    IDLTEST_LINK2_FOR_EACH (l2, idl) {
-        print_idl_row_link2(l2, step);
-        n++;
-    }
-    IDLTEST_SINGLETON_FOR_EACH (sng, idl) {
-        print_idl_row_singleton(sng, step);
-        n++;
-    }
-    if (!n) {
-        printf("%03d: empty\n", step);
-    }
-}
-
-static void
-print_idl_track(struct ovsdb_idl *idl, int step, unsigned int seqno)
-{
-    const struct idltest_simple *s;
-    const struct idltest_link1 *l1;
-    const struct idltest_link2 *l2;
-    int n = 0;
-
-    IDLTEST_SIMPLE_FOR_EACH_TRACKED (s, idl) {
-        if (idltest_simple_row_get_seqno(s, OVSDB_IDL_CHANGE_DELETE) >= seqno) {
-            printf("%03d: ##deleted## uuid="UUID_FMT"\n", step, UUID_ARGS(&s->header_.uuid));
-        } else {
-            print_idl_row_simple(s, step);
-        }
-        n++;
-    }
-    IDLTEST_LINK1_FOR_EACH_TRACKED (l1, idl) {
-        if (idltest_simple_row_get_seqno(s, OVSDB_IDL_CHANGE_DELETE) >= seqno) {
-            printf("%03d: ##deleted## uuid="UUID_FMT"\n", step, UUID_ARGS(&s->header_.uuid));
-        } else {
-            print_idl_row_link1(l1, step);
-        }
-        n++;
-    }
-    IDLTEST_LINK2_FOR_EACH_TRACKED (l2, idl) {
-        if (idltest_simple_row_get_seqno(s, OVSDB_IDL_CHANGE_DELETE) >= seqno) {
-            printf("%03d: ##deleted## uuid="UUID_FMT"\n", step, UUID_ARGS(&s->header_.uuid));
-        } else {
-            print_idl_row_link2(l2, step);
-        }
-        n++;
-    }
-    if (!n) {
-        printf("%03d: empty\n", step);
-    }
-}
-
-static void
-parse_uuids(const struct json *json, struct ovsdb_symbol_table *symtab,
-            size_t *n)
-{
-    struct uuid uuid;
-
-    if (json->type == JSON_STRING && uuid_from_string(&uuid, json->string)) {
-        char *name = xasprintf("#%"PRIuSIZE"#", *n);
-        fprintf(stderr, "%s = "UUID_FMT"\n", name, UUID_ARGS(&uuid));
-        ovsdb_symbol_table_put(symtab, name, &uuid, false);
-        free(name);
-        *n += 1;
-    } else if (json->type == JSON_ARRAY) {
-        size_t i;
-
-        for (i = 0; i < json->array.n; i++) {
-            parse_uuids(json->array.elems[i], symtab, n);
-        }
-    } else if (json->type == JSON_OBJECT) {
-        const struct shash_node *node;
-
-        SHASH_FOR_EACH (node, json_object(json)) {
-            parse_uuids(node->data, symtab, n);
-        }
-    }
-}
-
-static void
-substitute_uuids(struct json *json, const struct ovsdb_symbol_table *symtab)
-{
-    if (json->type == JSON_STRING) {
-        const struct ovsdb_symbol *symbol;
-
-        symbol = ovsdb_symbol_table_get(symtab, json->string);
-        if (symbol) {
-            free(json->string);
-            json->string = xasprintf(UUID_FMT, UUID_ARGS(&symbol->uuid));
-        }
-    } else if (json->type == JSON_ARRAY) {
-        size_t i;
-
-        for (i = 0; i < json->array.n; i++) {
-            substitute_uuids(json->array.elems[i], symtab);
-        }
-    } else if (json->type == JSON_OBJECT) {
-        const struct shash_node *node;
-
-        SHASH_FOR_EACH (node, json_object(json)) {
-            substitute_uuids(node->data, symtab);
-        }
-    }
-}
-
-static const struct idltest_simple *
-idltest_find_simple(struct ovsdb_idl *idl, int i)
-{
-    const struct idltest_simple *s;
-
-    IDLTEST_SIMPLE_FOR_EACH (s, idl) {
-        if (s->i == i) {
-            return s;
-        }
-    }
-    return NULL;
-}
-
-static void
-idl_set(struct ovsdb_idl *idl, char *commands, int step)
-{
-    char *cmd, *save_ptr1 = NULL;
-    struct ovsdb_idl_txn *txn;
-    enum ovsdb_idl_txn_status status;
-    bool increment = false;
-
-    txn = ovsdb_idl_txn_create(idl);
-    ovsdb_idl_check_consistency(idl);
-    for (cmd = strtok_r(commands, ",", &save_ptr1); cmd;
-         cmd = strtok_r(NULL, ",", &save_ptr1)) {
-        char *save_ptr2 = NULL;
-        char *name, *arg1, *arg2, *arg3;
-
-        name = strtok_r(cmd, " ", &save_ptr2);
-        arg1 = strtok_r(NULL, " ", &save_ptr2);
-        arg2 = strtok_r(NULL, " ", &save_ptr2);
-        arg3 = strtok_r(NULL, " ", &save_ptr2);
-
-        if (!strcmp(name, "set")) {
-            const struct idltest_simple *s;
-
-            if (!arg3) {
-                ovs_fatal(0, "\"set\" command requires 3 arguments");
-            }
-
-            s = idltest_find_simple(idl, atoi(arg1));
-            if (!s) {
-                ovs_fatal(0, "\"set\" command asks for nonexistent "
-                          "i=%d", atoi(arg1));
-            }
-
-            if (!strcmp(arg2, "b")) {
-                idltest_simple_set_b(s, atoi(arg3));
-            } else if (!strcmp(arg2, "s")) {
-                idltest_simple_set_s(s, arg3);
-            } else if (!strcmp(arg2, "u")) {
-                struct uuid uuid;
-                if (!uuid_from_string(&uuid, arg3)) {
-                    ovs_fatal(0, "\"%s\" is not a valid UUID", arg3);
-                }
-                idltest_simple_set_u(s, uuid);
-            } else if (!strcmp(arg2, "r")) {
-                idltest_simple_set_r(s, atof(arg3));
-            } else {
-                ovs_fatal(0, "\"set\" command asks for unknown column %s",
-                          arg2);
-            }
-        } else if (!strcmp(name, "insert")) {
-            struct idltest_simple *s;
-
-            if (!arg1 || arg2) {
-                ovs_fatal(0, "\"insert\" command requires 1 argument");
-            }
-
-            s = idltest_simple_insert(txn);
-            idltest_simple_set_i(s, atoi(arg1));
-        } else if (!strcmp(name, "delete")) {
-            const struct idltest_simple *s;
-
-            if (!arg1 || arg2) {
-                ovs_fatal(0, "\"delete\" command requires 1 argument");
-            }
-
-            s = idltest_find_simple(idl, atoi(arg1));
-            if (!s) {
-                ovs_fatal(0, "\"delete\" command asks for nonexistent "
-                          "i=%d", atoi(arg1));
-            }
-            idltest_simple_delete(s);
-        } else if (!strcmp(name, "verify")) {
-            const struct idltest_simple *s;
-
-            if (!arg2 || arg3) {
-                ovs_fatal(0, "\"verify\" command requires 2 arguments");
-            }
-
-            s = idltest_find_simple(idl, atoi(arg1));
-            if (!s) {
-                ovs_fatal(0, "\"verify\" command asks for nonexistent "
-                          "i=%d", atoi(arg1));
-            }
-
-            if (!strcmp(arg2, "i")) {
-                idltest_simple_verify_i(s);
-            } else if (!strcmp(arg2, "b")) {
-                idltest_simple_verify_b(s);
-            } else if (!strcmp(arg2, "s")) {
-                idltest_simple_verify_s(s);
-            } else if (!strcmp(arg2, "u")) {
-                idltest_simple_verify_s(s);
-            } else if (!strcmp(arg2, "r")) {
-                idltest_simple_verify_r(s);
-            } else {
-                ovs_fatal(0, "\"verify\" command asks for unknown column %s",
-                          arg2);
-            }
-        } else if (!strcmp(name, "increment")) {
-            const struct idltest_simple *s;
-
-            if (!arg1 || arg2) {
-                ovs_fatal(0, "\"increment\" command requires 1 argument");
-            }
-
-            s = idltest_find_simple(idl, atoi(arg1));
-            if (!s) {
-                ovs_fatal(0, "\"set\" command asks for nonexistent "
-                          "i=%d", atoi(arg1));
-            }
-
-            ovsdb_idl_txn_increment(txn, &s->header_, &idltest_simple_col_i,
-                                    false);
-            increment = true;
-        } else if (!strcmp(name, "abort")) {
-            ovsdb_idl_txn_abort(txn);
-            ovsdb_idl_check_consistency(idl);
-            break;
-        } else if (!strcmp(name, "destroy")) {
-            printf("%03d: destroy\n", step);
-            ovsdb_idl_txn_destroy(txn);
-            ovsdb_idl_check_consistency(idl);
-            return;
-        } else {
-            ovs_fatal(0, "unknown command %s", name);
-        }
-        ovsdb_idl_check_consistency(idl);
-    }
-
-    status = ovsdb_idl_txn_commit_block(txn);
-    printf("%03d: commit, status=%s",
-           step, ovsdb_idl_txn_status_to_string(status));
-    if (increment) {
-        printf(", increment=%"PRId64,
-               ovsdb_idl_txn_get_increment_new_value(txn));
-    }
-    putchar('\n');
-    ovsdb_idl_txn_destroy(txn);
-    ovsdb_idl_check_consistency(idl);
-}
-
-static const struct ovsdb_idl_table_class *
-find_table_class(const char *name)
-{
-    if (!strcmp(name, "simple")) {
-        return &idltest_table_simple;
-    } else if (!strcmp(name, "link1")) {
-        return &idltest_table_link1;
-    } else if (!strcmp(name, "link2")) {
-        return &idltest_table_link2;
-    }
-    return NULL;
-}
-
-static void
-parse_simple_json_clause(struct ovsdb_idl_condition *cond,
-                         enum ovsdb_function function,
-                         const char *column, const struct json *arg)
-{
-    if (!strcmp(column, "b")) {
-        idltest_simple_add_clause_b(cond, function, json_boolean(arg));
-    } else if (!strcmp(column, "i")) {
-         idltest_simple_add_clause_i(cond, function, json_integer(arg));
-    } else if (!strcmp(column, "s")) {
-        idltest_simple_add_clause_s(cond, function, json_string(arg));
-    } else if (!strcmp(column, "u")) {
-        struct uuid uuid;
-        if (!uuid_from_string(&uuid, json_string(arg))) {
-            ovs_fatal(0, "\"%s\" is not a valid UUID", json_string(arg));
-        }
-        idltest_simple_add_clause_u(cond, function, uuid);
-    } else if (!strcmp(column, "r")) {
-        idltest_simple_add_clause_r(cond, function, json_real(arg));
-    } else {
-        ovs_fatal(0, "Unsupported columns name %s", column);
-    }
-}
-
-static void
-parse_link1_json_clause(struct ovsdb_idl_condition *cond,
-                        enum ovsdb_function function,
-                        const char *column, const struct json *arg)
-{
-    if (!strcmp(column, "i")) {
-        idltest_link1_add_clause_i(cond, function, json_integer(arg));
-    } else {
-        ovs_fatal(0, "Unsupported columns name %s", column);
-    }
-}
-
-static void
-parse_link2_json_clause(struct ovsdb_idl_condition *cond,
-                        enum ovsdb_function function,
-                        const char *column, const struct json *arg)
-{
-    if (!strcmp(column, "i")) {
-        idltest_link2_add_clause_i(cond, function, json_integer(arg));
-    } else {
-        ovs_fatal(0, "Unsupported columns name %s", column);
-    }
-}
-
-static void
-update_conditions(struct ovsdb_idl *idl, char *commands)
-{
-    char *cmd, *save_ptr1 = NULL;
-    const struct ovsdb_idl_table_class *tc;
-
-    for (cmd = strtok_r(commands, ";", &save_ptr1); cmd;
-         cmd = strtok_r(NULL, ";", &save_ptr1)) {
-        char *save_ptr2 = NULL;
-        char *table_name = strtok_r(cmd, " ", &save_ptr2);
-        struct json *json = parse_json(save_ptr2);
-        int i;
-
-        if (json->type != JSON_ARRAY) {
-            ovs_fatal(0, "condition should be an array");
-        }
-
-        tc = find_table_class(table_name);
-        if (!tc) {
-            ovs_fatal(0, "Table %s does not exist", table_name);
-        }
-
-        struct ovsdb_idl_condition cond = OVSDB_IDL_CONDITION_INIT(&cond);
-        for (i = 0; i < json->array.n; i++) {
-            const struct json *clause = json->array.elems[i];
-            if (clause->type == JSON_TRUE) {
-                ovsdb_idl_condition_add_clause_true(&cond);
-            } else if (clause->type != JSON_ARRAY || clause->array.n != 3
-                       || clause->array.elems[0]->type != JSON_STRING
-                       || clause->array.elems[1]->type != JSON_STRING) {
-                ovs_fatal(0, "Error parsing condition");
-            } else {
-                enum ovsdb_function function;
-                const char *function_s = json_string(clause->array.elems[1]);
-                struct ovsdb_error *error = ovsdb_function_from_string(
-                    function_s, &function);
-                if (error) {
-                    ovs_fatal(0, "unknown clause function %s", function_s);
-                }
-
-                const char *column = json_string(clause->array.elems[0]);
-                const struct json *arg = clause->array.elems[2];
-                if (!strcmp(table_name, "simple")) {
-                    parse_simple_json_clause(&cond, function, column, arg);
-                } else if (!strcmp(table_name, "link1")) {
-                    parse_link1_json_clause(&cond, function, column, arg);
-                } else if (!strcmp(table_name, "link2")) {
-                    parse_link2_json_clause(&cond, function, column, arg);
-                }
-            }
-        }
-
-        unsigned int seqno = ovsdb_idl_get_condition_seqno(idl);
-        unsigned int next_seqno = ovsdb_idl_set_condition(idl, tc, &cond);
-        if (seqno == next_seqno ) {
-            ovs_fatal(0, "condition unchanged");
-        }
-        ovsdb_idl_condition_destroy(&cond);
-        json_destroy(json);
-    }
-}
-
-static void
-do_idl(struct ovs_cmdl_context *ctx)
-{
-    struct jsonrpc *rpc;
-    struct ovsdb_idl *idl;
-    unsigned int seqno = 0;
-    struct ovsdb_symbol_table *symtab;
-    size_t n_uuids = 0;
-    int step = 0;
-    int error;
-    int i;
-    bool track;
-
-    track = ((struct test_ovsdb_pvt_context *)(ctx->pvt))->track;
-
-    idl = ovsdb_idl_create(ctx->argv[1], &idltest_idl_class, true, true);
-    if (ctx->argc > 2) {
-        struct stream *stream;
-
-        error = stream_open_block(jsonrpc_stream_open(ctx->argv[1], &stream,
-                                  DSCP_DEFAULT), -1, &stream);
-        if (error) {
-            ovs_fatal(error, "failed to connect to \"%s\"", ctx->argv[1]);
-        }
-        rpc = jsonrpc_open(stream);
-    } else {
-        rpc = NULL;
-    }
-
-    if (track) {
-        ovsdb_idl_track_add_all(idl);
-    }
-
-    setvbuf(stdout, NULL, _IONBF, 0);
-
-    symtab = ovsdb_symbol_table_create();
-    const char cond_s[] = "condition ";
-    if (ctx->argc > 2 && strstr(ctx->argv[2], cond_s)) {
-        update_conditions(idl, ctx->argv[2] + strlen(cond_s));
-        printf("%03d: change conditions\n", step++);
-        i = 3;
-    } else {
-        i = 2;
-    }
-    for (; i < ctx->argc; i++) {
-        char *arg = ctx->argv[i];
-        struct jsonrpc_msg *request, *reply;
-
-        if (*arg == '+') {
-            /* The previous transaction didn't change anything. */
-            arg++;
-        } else {
-            /* Wait for update. */
-            for (;;) {
-                ovsdb_idl_run(idl);
-                ovsdb_idl_check_consistency(idl);
-                if (ovsdb_idl_get_seqno(idl) != seqno) {
-                    break;
-                }
-                jsonrpc_run(rpc);
-
-                ovsdb_idl_wait(idl);
-                jsonrpc_wait(rpc);
-                poll_block();
-            }
-
-            /* Print update. */
-            if (track) {
-                print_idl_track(idl, step++, ovsdb_idl_get_seqno(idl));
-                ovsdb_idl_track_clear(idl);
-            } else {
-                print_idl(idl, step++);
-            }
-        }
-        seqno = ovsdb_idl_get_seqno(idl);
-
-        if (!strcmp(arg, "reconnect")) {
-            printf("%03d: reconnect\n", step++);
-            ovsdb_idl_force_reconnect(idl);
-        }  else if (!strncmp(arg, cond_s, strlen(cond_s))) {
-            update_conditions(idl, arg + strlen(cond_s));
-            printf("%03d: change conditions\n", step++);
-        } else if (arg[0] != '[') {
-            idl_set(idl, arg, step++);
-        } else {
-            struct json *json = parse_json(arg);
-            substitute_uuids(json, symtab);
-            request = jsonrpc_create_request("transact", json, NULL);
-            error = jsonrpc_transact_block(rpc, request, &reply);
-            if (error || reply->error) {
-                ovs_fatal(error, "jsonrpc transaction failed");
-            }
-            printf("%03d: ", step++);
-            if (reply->result) {
-                parse_uuids(reply->result, symtab, &n_uuids);
-            }
-            json_destroy(reply->id);
-            reply->id = NULL;
-            print_and_free_json(jsonrpc_msg_to_json(reply));
-        }
-    }
-    ovsdb_symbol_table_destroy(symtab);
-
-    if (rpc) {
-        jsonrpc_close(rpc);
-    }
-    for (;;) {
-        ovsdb_idl_run(idl);
-        ovsdb_idl_check_consistency(idl);
-        if (ovsdb_idl_get_seqno(idl) != seqno) {
-            break;
-        }
-        ovsdb_idl_wait(idl);
-        poll_block();
-    }
-    print_idl(idl, step++);
-    ovsdb_idl_track_clear(idl);
-    ovsdb_idl_destroy(idl);
-    printf("%03d: done\n", step);
-}
-
-static void
-print_idl_row_simple2(const struct idltest_simple2 *s, int step)
-{
-    size_t i;
-    const struct ovsdb_datum *smap, *imap;
-
-    smap = idltest_simple2_get_smap(s, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
-    imap = idltest_simple2_get_imap(s, OVSDB_TYPE_INTEGER, OVSDB_TYPE_STRING);
-    printf("%03d: name=%s smap=[",
-           step, s->name);
-    for (i = 0; i < smap->n; i++) {
-        printf("[%s : %s]%s", smap->keys[i].string, smap->values[i].string,
-                i < smap->n-1? ",": "");
-    }
-    printf("] imap=[");
-    for (i = 0; i < imap->n; i++) {
-        printf("[%"PRId64" : %s]%s", imap->keys[i].integer, imap->values[i].string,
-                i < imap->n-1? ",":"");
-    }
-    printf("]\n");
-}
-
-static void
-dump_simple2(struct ovsdb_idl *idl,
-             const struct idltest_simple2 *myRow,
-             int step)
-{
-    IDLTEST_SIMPLE2_FOR_EACH(myRow, idl) {
-        print_idl_row_simple2(myRow, step);
-    }
-}
-
-static void
-do_idl_partial_update_map_column(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_idl *idl;
-    struct ovsdb_idl_txn *myTxn;
-    const struct idltest_simple2 *myRow;
-    const struct ovsdb_datum *smap, *imap OVS_UNUSED;
-    int step = 0;
-    char key_to_delete[100];
-
-    idl = ovsdb_idl_create(ctx->argv[1], &idltest_idl_class, false, true);
-    ovsdb_idl_add_table(idl, &idltest_table_simple2);
-    ovsdb_idl_add_column(idl, &idltest_simple2_col_name);
-    ovsdb_idl_add_column(idl, &idltest_simple2_col_smap);
-    ovsdb_idl_add_column(idl, &idltest_simple2_col_imap);
-    ovsdb_idl_get_initial_snapshot(idl);
-    setvbuf(stdout, NULL, _IONBF, 0);
-    ovsdb_idl_run(idl);
-
-    /* Display original data in table. */
-    myRow = NULL;
-    printf("%03d: Getting records\n", step++);
-    dump_simple2(idl, myRow, step++);
-
-    /* Insert new elements in different map columns. */
-    myRow = idltest_simple2_first(idl);
-    myTxn = ovsdb_idl_txn_create(idl);
-    idltest_simple2_get_smap(myRow, OVSDB_TYPE_STRING,
-                                    OVSDB_TYPE_STRING);
-    idltest_simple2_update_smap_setkey(myRow, "key1", "myList1");
-    imap = idltest_simple2_get_imap(myRow, OVSDB_TYPE_INTEGER,
-                                    OVSDB_TYPE_STRING);
-    idltest_simple2_update_imap_setkey(myRow, 3, "myids2");
-    idltest_simple2_set_name(myRow, "String2");
-    ovsdb_idl_txn_commit_block(myTxn);
-    ovsdb_idl_txn_destroy(myTxn);
-    ovsdb_idl_get_initial_snapshot(idl);
-    printf("%03d: After insert element\n", step++);
-    dump_simple2(idl, myRow, step++);
-
-    /* Insert duplicate element. */
-    myTxn = ovsdb_idl_txn_create(idl);
-    idltest_simple2_update_smap_setkey(myRow, "key1", "myList1");
-    ovsdb_idl_txn_commit_block(myTxn);
-    ovsdb_idl_txn_destroy(myTxn);
-    ovsdb_idl_get_initial_snapshot(idl);
-    printf("%03d: After insert duplicated element\n", step++);
-    dump_simple2(idl, myRow, step++);
-
-    /* Deletes an element of a map column. */
-    myRow = idltest_simple2_first(idl);
-    myTxn = ovsdb_idl_txn_create(idl);
-    smap = idltest_simple2_get_smap(myRow, OVSDB_TYPE_STRING,
-                                    OVSDB_TYPE_STRING);
-    strcpy(key_to_delete, smap->keys[0].string);
-    idltest_simple2_update_smap_delkey(myRow, smap->keys[0].string);
-    ovsdb_idl_txn_commit_block(myTxn);
-    ovsdb_idl_txn_destroy(myTxn);
-    ovsdb_idl_get_initial_snapshot(idl);
-    printf("%03d: After delete element\n", step++);
-    dump_simple2(idl, myRow, step++);
-
-    /* Try to delete a deleted element of a map column. */
-    myTxn = ovsdb_idl_txn_create(idl);
-    idltest_simple2_update_smap_delkey(myRow, key_to_delete);
-    ovsdb_idl_txn_commit_block(myTxn);
-    ovsdb_idl_txn_destroy(myTxn);
-    ovsdb_idl_get_initial_snapshot(idl);
-    printf("%03d: After trying to delete a deleted element\n", step++);
-    dump_simple2(idl, myRow, step++);
-
-    ovsdb_idl_destroy(idl);
-    printf("%03d: End test\n", step);
-}
-
-static void
-print_idl_row_simple3(const struct idltest_simple3 *s, int step)
-{
-    size_t i;
-    const struct ovsdb_datum *uset;
-    const struct ovsdb_datum *uref;
-
-    uset = idltest_simple3_get_uset(s, OVSDB_TYPE_UUID);
-    printf("%03d: name=%s uset=[",
-           step, s->name);
-    for (i = 0; i < uset->n; i++) {
-        printf("["UUID_FMT"]%s", UUID_ARGS(&(uset->keys[i].uuid)), i < uset->n-1? ",": "");
-    }
-    uref = idltest_simple3_get_uref(s, OVSDB_TYPE_UUID);
-    printf("] uref=[");
-    for (i = 0; i < uref->n; i++) {
-        printf("["UUID_FMT"]%s", UUID_ARGS(&(uref->keys[i].uuid)), i < uref->n-1? ",": "");
-    }
-    printf("]\n");
-}
-
-static void
-dump_simple3(struct ovsdb_idl *idl,
-             const struct idltest_simple3 *myRow,
-             int step)
-{
-    IDLTEST_SIMPLE3_FOR_EACH(myRow, idl) {
-        print_idl_row_simple3(myRow, step);
-    }
-}
-
-static void
-do_idl_partial_update_set_column(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_idl *idl;
-    struct ovsdb_idl_txn *myTxn;
-    const struct idltest_simple3 *myRow;
-    struct idltest_simple4 *myRow2;
-    const struct ovsdb_datum *uset OVS_UNUSED;
-    const struct ovsdb_datum *uref OVS_UNUSED;
-    int step = 0;
-
-    idl = ovsdb_idl_create(ctx->argv[1], &idltest_idl_class, false, true);
-    ovsdb_idl_add_table(idl, &idltest_table_simple3);
-    ovsdb_idl_add_column(idl, &idltest_simple3_col_name);
-    ovsdb_idl_add_column(idl, &idltest_simple3_col_uset);
-    ovsdb_idl_add_column(idl, &idltest_simple3_col_uref);
-    ovsdb_idl_add_table(idl, &idltest_table_simple4);
-    ovsdb_idl_add_column(idl, &idltest_simple4_col_name);
-    ovsdb_idl_get_initial_snapshot(idl);
-    setvbuf(stdout, NULL, _IONBF, 0);
-    ovsdb_idl_run(idl);
-
-    /* Display original data in table. */
-    myRow = NULL;
-    printf("%03d: Getting records\n", step++);
-    dump_simple3(idl, myRow, step++);
-
-    /* Insert new elements in different map columns. */
-    myRow = idltest_simple3_first(idl);
-    myTxn = ovsdb_idl_txn_create(idl);
-    idltest_simple3_get_uset(myRow, OVSDB_TYPE_UUID);
-    struct uuid uuid_to_add;
-    uuid_from_string(&uuid_to_add, "001e43d2-dd3f-4616-ab6a-83a490bb0991");
-    idltest_simple3_update_uset_addvalue(myRow, uuid_to_add);
-    idltest_simple3_set_name(myRow, "String2");
-    ovsdb_idl_txn_commit_block(myTxn);
-    ovsdb_idl_txn_destroy(myTxn);
-    ovsdb_idl_get_initial_snapshot(idl);
-    printf("%03d: After rename+add new value\n", step++);
-    dump_simple3(idl, myRow, step++);
-
-    /* Insert duplicate element. */
-    myTxn = ovsdb_idl_txn_create(idl);
-    struct uuid uuid_to_add2;
-    uuid_from_string(&uuid_to_add2, "0026b3ba-571b-4729-8227-d860a5210ab8");
-    idltest_simple3_update_uset_addvalue(myRow, uuid_to_add2);
-    ovsdb_idl_txn_commit_block(myTxn);
-    ovsdb_idl_txn_destroy(myTxn);
-    ovsdb_idl_get_initial_snapshot(idl);
-    printf("%03d: After add new value\n", step++);
-    dump_simple3(idl, myRow, step++);
-
-    /* Deletes an element of a set column. */
-    myRow = idltest_simple3_first(idl);
-    myTxn = ovsdb_idl_txn_create(idl);
-    uset = idltest_simple3_get_uset(myRow, OVSDB_TYPE_UUID);
-    idltest_simple3_update_uset_delvalue(myRow, uuid_to_add);
-    ovsdb_idl_txn_commit_block(myTxn);
-    ovsdb_idl_txn_destroy(myTxn);
-    ovsdb_idl_get_initial_snapshot(idl);
-    printf("%03d: After delete value\n", step++);
-    dump_simple3(idl, myRow, step++);
-
-    /* Try to delete a deleted element of a map column.  */
-    myRow = idltest_simple3_first(idl);
-    myTxn = ovsdb_idl_txn_create(idl);
-    idltest_simple3_update_uset_delvalue(myRow, uuid_to_add);
-    ovsdb_idl_txn_commit_block(myTxn);
-    ovsdb_idl_txn_destroy(myTxn);
-    ovsdb_idl_get_initial_snapshot(idl);
-    printf("%03d: After trying to delete a deleted value\n", step++);
-    dump_simple3(idl, myRow, step++);
-
-    /* Adds to a table and update a strong reference in another table. */
-    myRow = idltest_simple3_first(idl);
-    myTxn = ovsdb_idl_txn_create(idl);
-    myRow2 = idltest_simple4_insert(myTxn);
-    idltest_simple4_set_name(myRow2, "test");
-    idltest_simple3_update_uref_addvalue(myRow, myRow2);
-    ovsdb_idl_txn_commit_block(myTxn);
-    ovsdb_idl_txn_destroy(myTxn);
-    ovsdb_idl_get_initial_snapshot(idl);
-    printf("%03d: After add to other table + set of strong ref\n", step++);
-    dump_simple3(idl, myRow, step++);
-    ovsdb_idl_destroy(idl);
-    printf("%03d: End test\n", step);
-}
-
-static void
-do_idl_compound_index_with_ref(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_idl *idl;
-    struct ovsdb_idl_txn *myTxn;
-    const struct idltest_simple3 *myRow;
-    struct idltest_simple4 *myRow2;
-    const struct ovsdb_datum *uset OVS_UNUSED;
-    const struct ovsdb_datum *uref OVS_UNUSED;
-    int step = 0;
-
-    idl = ovsdb_idl_create(ctx->argv[1], &idltest_idl_class, false, true);
-    ovsdb_idl_add_table(idl, &idltest_table_simple3);
-    ovsdb_idl_add_column(idl, &idltest_simple3_col_name);
-    ovsdb_idl_add_column(idl, &idltest_simple3_col_uset);
-    ovsdb_idl_add_column(idl, &idltest_simple3_col_uref);
-    ovsdb_idl_add_table(idl, &idltest_table_simple4);
-    ovsdb_idl_add_column(idl, &idltest_simple4_col_name);
-
-    struct ovsdb_idl_index *index = ovsdb_idl_index_create1(
-        idl, &idltest_simple3_col_uref);
-
-    ovsdb_idl_get_initial_snapshot(idl);
-
-    setvbuf(stdout, NULL, _IONBF, 0);
-    ovsdb_idl_run(idl);
-
-    /* Adds to a table and update a strong reference in another table. */
-    myTxn = ovsdb_idl_txn_create(idl);
-    myRow = idltest_simple3_insert(myTxn);
-    myRow2 = idltest_simple4_insert(myTxn);
-    idltest_simple4_set_name(myRow2, "test");
-    idltest_simple3_update_uref_addvalue(myRow, myRow2);
-    ovsdb_idl_txn_commit_block(myTxn);
-    ovsdb_idl_txn_destroy(myTxn);
-    ovsdb_idl_get_initial_snapshot(idl);
-    printf("%03d: After add to other table + set of strong ref\n", step++);
-    dump_simple3(idl, myRow, step++);
-
-    myRow2 = (struct idltest_simple4 *) idltest_simple4_first(idl);
-    printf("%03d: check simple4: %s\n", step++,
-           myRow2 ? "not empty" : "empty");
-
-    /* Use index to query the row with reference */
-
-    struct idltest_simple3 *equal = idltest_simple3_index_init_row(index);
-    myRow2 = (struct idltest_simple4 *) idltest_simple4_first(idl);
-    idltest_simple3_index_set_uref(equal, &myRow2, 1);
-    printf("%03d: Query using index with reference\n", step++);
-    IDLTEST_SIMPLE3_FOR_EACH_EQUAL (myRow, equal, index) {
-        print_idl_row_simple3(myRow, step++);
-    }
-    idltest_simple3_index_destroy_row(equal);
-
-    /* Delete the row with reference */
-    myTxn = ovsdb_idl_txn_create(idl);
-    myRow = idltest_simple3_first(idl);
-    idltest_simple3_delete(myRow);
-    ovsdb_idl_txn_commit_block(myTxn);
-    ovsdb_idl_txn_destroy(myTxn);
-    ovsdb_idl_get_initial_snapshot(idl);
-    printf("%03d: After delete\n", step++);
-    dump_simple3(idl, myRow, step++);
-
-    myRow2 = (struct idltest_simple4 *) idltest_simple4_first(idl);
-    printf("%03d: check simple4: %s\n", step++,
-           myRow2 ? "not empty" : "empty");
-
-    ovsdb_idl_destroy(idl);
-    printf("%03d: End test\n", step);
-}
-
-
-static int
-test_idl_compound_index_single_column(struct ovsdb_idl *idl,
-                                      struct ovsdb_idl_index *s_index,
-                                      struct ovsdb_idl_index *i_index)
-{
-    const struct idltest_simple *myRow;
-    struct ovsdb_idl_txn *txn;
-    int step = 0;
-
-    /* Display records by string index. */
-    ++step;
-    IDLTEST_SIMPLE_FOR_EACH_BYINDEX (myRow, s_index) {
-        printf("%03d: s=%s i=%"PRId64" b=%s r=%f\n", step, myRow->s,
-               myRow->i, myRow->b?"True":"False", myRow->r);
-    }
-    /* Display records by integer index. */
-    ++step;
-    IDLTEST_SIMPLE_FOR_EACH_BYINDEX (myRow, i_index) {
-        printf("%03d: i=%"PRId64" s=%s b=%s r=%f\n", step,  myRow->i,
-               myRow->s, myRow->b?"True":"False", myRow->r);
-    }
-    /* Display records by string index -> s_index with filtering
-     * where s=\"List001\
-     */
-    ++step;
-    struct idltest_simple *equal = idltest_simple_index_init_row(s_index);
-    idltest_simple_index_set_s(equal, "List001");
-    ovs_assert(strcmp(equal->s, "List001") == 0);
-    IDLTEST_SIMPLE_FOR_EACH_EQUAL (myRow, equal, s_index) {
-        printf("%03d: s=%s i=%"PRId64" b=%s r=%f\n", step, myRow->s,
-               myRow->i, myRow->b?"True":"False", myRow->r);
-    }
-    /* Display records by integer index -> i_index with filtering where i=5 */
-    ++step;
-    idltest_simple_index_set_i(equal, 5);
-    ovs_assert(equal->i == 5);
-    IDLTEST_SIMPLE_FOR_EACH_EQUAL (myRow, equal, i_index) {
-        printf("%03d: i=%"PRId64" s=%s b=%s r=%f\n", step,  myRow->i,
-               myRow->s, myRow->b?"True":"False", myRow->r);
-    }
-    /* Display records by integer index -> i_index in range i=[3,7] */
-    ++step;
-    struct idltest_simple *from, *to;
-    from = idltest_simple_index_init_row(i_index);
-    idltest_simple_index_set_i(from, 3);
-    ovs_assert(from->i == 3);
-    to = idltest_simple_index_init_row(i_index);
-    idltest_simple_index_set_i(to, 7);
-    ovs_assert(to->i == 7);
-    IDLTEST_SIMPLE_FOR_EACH_RANGE (myRow, from, to, i_index) {
-        printf("%03d: i=%"PRId64" s=%s b=%s r=%f\n", step,  myRow->i,
-               myRow->s, myRow->b?"True":"False", myRow->r);
-    }
-    /* Delete record i=4 and insert i=54 by integer index -> i_index */
-    ++step;
-    struct idltest_simple *toDelete, *toInsert;
-    toDelete = idltest_simple_index_init_row(i_index);
-    idltest_simple_index_set_i(toDelete, 4);
-    ovs_assert(toDelete->i == 4);
-    myRow = idltest_simple_index_find(i_index, toDelete);
-    ovs_assert(myRow);
-    ovs_assert(myRow->i == 4);
-    txn = ovsdb_idl_txn_create(idl);
-    idltest_simple_delete(myRow);
-    myRow = idltest_simple_index_find(i_index, toDelete);
-    ovs_assert(!myRow);
-    myRow = idltest_simple_insert(txn);
-    idltest_simple_set_i(myRow, 54);
-    idltest_simple_set_s(myRow, "Lista054");
-    toInsert = idltest_simple_index_init_row(i_index);
-    idltest_simple_index_set_i(toInsert, 54);
-    myRow = idltest_simple_index_find(i_index, toInsert);
-    ovs_assert(myRow);
-    ovs_assert(myRow->i == 54);
-    ovs_assert(!strcmp(myRow->s, "Lista054"));
-    ovsdb_idl_txn_commit_block(txn);
-    ovsdb_idl_txn_destroy(txn);
-    idltest_simple_index_set_i(to, 60);
-    printf("Expected 60, stored %"PRId64"\n", to->i);
-    ovs_assert(to->i == 60);
-    IDLTEST_SIMPLE_FOR_EACH_RANGE (myRow, from, to, i_index) {
-        printf("%03d: i=%"PRId64" s=%s b=%s r=%f\n", step,  myRow->i,
-               myRow->s, myRow->b?"True":"False", myRow->r);
-    }
-
-    /* Update record i=10 to i=30, make sure index is updated accordingly */
-    ++step;
-    struct idltest_simple *toUpdate;
-    toUpdate = idltest_simple_index_init_row(i_index);
-    idltest_simple_index_set_i(toUpdate, 10);
-    ovs_assert(toUpdate->i == 10);
-    myRow = idltest_simple_index_find(i_index, toUpdate);
-    ovs_assert(myRow);
-    ovs_assert(myRow->i == 10);
-    txn = ovsdb_idl_txn_create(idl);
-    idltest_simple_set_i(myRow, 30);
-    myRow = idltest_simple_index_find(i_index, toUpdate);
-    ovs_assert(!myRow);
-    ovsdb_idl_txn_commit_block(txn);
-    ovsdb_idl_txn_destroy(txn);
-    idltest_simple_index_set_i(to, 60);
-    printf("Expected 60, stored %"PRId64"\n", to->i);
-    ovs_assert(to->i == 60);
-    IDLTEST_SIMPLE_FOR_EACH_RANGE (myRow, from, to, i_index) {
-        printf("%03d: i=%"PRId64" s=%s b=%s r=%f\n", step,  myRow->i,
-               myRow->s, myRow->b?"True":"False", myRow->r);
-    }
-
-    /* Test special-case range, "from" and "to" are both NULL,
-     * which is interpreted as the range from -infinity to +infinity. */
-    ++step;
-    IDLTEST_SIMPLE_FOR_EACH_RANGE (myRow, NULL, NULL, i_index) {
-        printf("%03d: i=%"PRId64" s=%s b=%s r=%f\n", step,  myRow->i,
-               myRow->s, myRow->b?"True":"False", myRow->r);
-    }
-
-    /* Free the temporal rows */
-    idltest_simple_index_destroy_row(from);
-    idltest_simple_index_destroy_row(to);
-    idltest_simple_index_destroy_row(equal);
-    idltest_simple_index_destroy_row(toDelete);
-    idltest_simple_index_destroy_row(toInsert);
-    idltest_simple_index_destroy_row(toUpdate);
-    return step;
-}
-
-static int
-test_idl_compound_index_double_column(struct ovsdb_idl_index *si_index,
-                                      struct ovsdb_idl_index *sid_index,
-                                      struct ovsdb_idl_index *is_index,
-                                      struct ovsdb_idl_index *ids_index)
-{
-    const struct idltest_simple *myRow;
-    int step = 0;
-
-    /* Display records by string-integer index -> si_index */
-    step++;
-    IDLTEST_SIMPLE_FOR_EACH_BYINDEX (myRow, si_index) {
-        printf("%03d: s=%s i=%"PRId64" b=%s r=%f\n", step, myRow->s, myRow->i,
-               myRow->b?"True":"False", myRow->r);
-    }
-    /* Display records by string-integer(down order) index -> sid_index */
-    step++;
-    IDLTEST_SIMPLE_FOR_EACH_BYINDEX (myRow, sid_index) {
-        printf("%03d: s=%s i=%"PRId64" b=%s r=%f\n", step, myRow->s, myRow->i,
-               myRow->b?"True":"False", myRow->r);
-    }
-    /* Display records by string-integer index -> si_index with filtering
-     * where s="List000" and i=10
-     */
-    step++;
-    struct idltest_simple *equal = idltest_simple_index_init_row(si_index);
-    idltest_simple_index_set_s(equal, "List000");
-    ovs_assert(strcmp(equal->s, "List000") == 0);
-    idltest_simple_index_set_i(equal, 10);
-    ovs_assert(equal->i == 10);
-    IDLTEST_SIMPLE_FOR_EACH_EQUAL (myRow, equal, si_index) {
-        printf("%03d: s=%s i=%"PRId64" b=%s r=%f\n", step, myRow->s, myRow->i,
-               myRow->b?"True":"False", myRow->r);
-    }
-    /* Display records by string-integer index -> si_index in range i=[0,100]
-     * and s=[\"List002\",\"List003\"]
-     */
-    step++;
-    struct idltest_simple *from = idltest_simple_index_init_row(si_index);
-    struct idltest_simple *to = idltest_simple_index_init_row(si_index);
-    idltest_simple_index_set_i(from, 0);
-    ovs_assert(from->i == 0);
-    idltest_simple_index_set_s(from, "List001");
-    ovs_assert(strcmp(from->s, "List001") == 0);
-    idltest_simple_index_set_i(to, 100);
-    ovs_assert(to->i == 100);
-    idltest_simple_index_set_s(to, "List005");
-    ovs_assert(strcmp(to->s, "List005")==0);
-    IDLTEST_SIMPLE_FOR_EACH_RANGE (myRow, from, to, si_index) {
-        printf("%03d: s=%s i=%"PRId64" b=%s r=%f\n", step, myRow->s, myRow->i,
-               myRow->b?"True":"False", myRow->r);
-    }
-    /* Display records using integer-string index. */
-    step++;
-    IDLTEST_SIMPLE_FOR_EACH_BYINDEX (myRow, is_index) {
-        printf("%03d: i=%"PRId64" s=%s b=%s r=%f\n", step, myRow->i, myRow->s,
-               myRow->b?"True":"False", myRow->r);
-    }
-    /* Display records using integer(descend)-string index. */
-    step++;
-    IDLTEST_SIMPLE_FOR_EACH_BYINDEX (myRow, ids_index) {
-        printf("%03d: i=%"PRId64" s=%s b=%s r=%f\n", step, myRow->i, myRow->s,
-               myRow->b?"True":"False", myRow->r);
-    }
-
-    idltest_simple_index_destroy_row(to);
-    idltest_simple_index_destroy_row(from);
-    idltest_simple_index_destroy_row(equal);
-    return step;
-}
-
-static void
-do_idl_compound_index(struct ovs_cmdl_context *ctx)
-{
-    struct ovsdb_idl *idl;
-    enum TESTS { IDL_COMPOUND_INDEX_WITH_SINGLE_COLUMN,
-            IDL_COMPOUND_INDEX_WITH_DOUBLE_COLUMN
-    };
-    int step = 0;
-    int i;
-
-    idl = ovsdb_idl_create(ctx->argv[1], &idltest_idl_class, false, true);
-
-    /* Add tables/columns and initialize index data needed for tests */
-    ovsdb_idl_add_table(idl, &idltest_table_simple);
-    ovsdb_idl_add_column(idl, &idltest_simple_col_s);
-    ovsdb_idl_add_column(idl, &idltest_simple_col_i);
-    ovsdb_idl_add_column(idl, &idltest_simple_col_r);
-    ovsdb_idl_add_column(idl, &idltest_simple_col_b);
-
-    struct ovsdb_idl_index *s_index
-        = ovsdb_idl_index_create1(idl, &idltest_simple_col_s);
-
-    struct ovsdb_idl_index *i_index
-        = ovsdb_idl_index_create1(idl, &idltest_simple_col_i);
-
-    struct ovsdb_idl_index *si_index
-        = ovsdb_idl_index_create2(idl, &idltest_simple_col_s,
-                                  &idltest_simple_col_i);
-
-    const struct ovsdb_idl_index_column sid_columns[] = {
-        { .column = &idltest_simple_col_s },
-        { .column = &idltest_simple_col_i, .order = OVSDB_INDEX_DESC },
-    };
-    struct ovsdb_idl_index *sid_index
-        = ovsdb_idl_index_create(idl, sid_columns, ARRAY_SIZE(sid_columns));
-
-    struct ovsdb_idl_index *is_index
-        = ovsdb_idl_index_create2(idl, &idltest_simple_col_i,
-                                  &idltest_simple_col_s);
-
-    const struct ovsdb_idl_index_column ids_columns[] = {
-        { .column = &idltest_simple_col_i, .order = OVSDB_INDEX_DESC },
-        { .column = &idltest_simple_col_s },
-    };
-    struct ovsdb_idl_index *ids_index
-        = ovsdb_idl_index_create(idl, ids_columns, ARRAY_SIZE(sid_columns));
-
-    /* wait for replica to be updated */
-    ovsdb_idl_get_initial_snapshot(idl);
-
-    setvbuf(stdout, NULL, _IONBF, 0);
-    int test_to_run = -1;
-    for (i = 2; i < ctx->argc; i++) {
-        char *arg = ctx->argv[i];
-
-        if (strcmp(arg,"idl_compound_index_single_column") == 0) {
-            test_to_run = IDL_COMPOUND_INDEX_WITH_SINGLE_COLUMN;
-        } else if (strcmp(arg, "idl_compound_index_double_column") == 0) {
-            test_to_run = IDL_COMPOUND_INDEX_WITH_DOUBLE_COLUMN;
-        }
-
-        switch (test_to_run) {
-            case IDL_COMPOUND_INDEX_WITH_SINGLE_COLUMN:
-                test_idl_compound_index_single_column(idl, s_index, i_index);
-                break;
-            case IDL_COMPOUND_INDEX_WITH_DOUBLE_COLUMN:
-                test_idl_compound_index_double_column(si_index, sid_index,
-                                                      is_index, ids_index);
-                break;
-            default:
-                printf("%03d: Test %s not implemented.\n", step++, arg);
-        }
-    }
-    ovsdb_idl_destroy(idl);
-    printf("%03d: done\n", step);
-}
-
-static struct ovs_cmdl_command all_commands[] = {
-    { "log-io", NULL, 2, INT_MAX, do_log_io, OVS_RO },
-    { "default-atoms", NULL, 0, 0, do_default_atoms, OVS_RO },
-    { "default-data", NULL, 0, 0, do_default_data, OVS_RO },
-    { "diff-data", NULL, 3, INT_MAX, do_diff_data, OVS_RO },
-    { "parse-atomic-type", NULL, 1, 1, do_parse_atomic_type, OVS_RO },
-    { "parse-base-type", NULL, 1, 1, do_parse_base_type, OVS_RO },
-    { "parse-type", NULL, 1, 1, do_parse_type, OVS_RO },
-    { "parse-atoms", NULL, 2, INT_MAX, do_parse_atoms, OVS_RO },
-    { "parse-atom-strings", NULL, 2, INT_MAX, do_parse_atom_strings, OVS_RO },
-    { "parse-data", NULL, 2, INT_MAX, do_parse_data, OVS_RO },
-    { "parse-data-strings", NULL, 2, INT_MAX, do_parse_data_strings, OVS_RO },
-    { "sort-atoms", NULL, 2, 2, do_sort_atoms, OVS_RO },
-    { "parse-column", NULL, 2, 2, do_parse_column, OVS_RO },
-    { "parse-table", NULL, 2, 3, do_parse_table, OVS_RO },
-    { "parse-rows", NULL, 2, INT_MAX, do_parse_rows, OVS_RO },
-    { "compare-rows", NULL, 2, INT_MAX, do_compare_rows, OVS_RO },
-    { "parse-conditions", NULL, 2, INT_MAX, do_parse_conditions, OVS_RO },
-    { "evaluate-conditions", NULL, 3, 3, do_evaluate_conditions, OVS_RO },
-    { "evaluate-conditions-any", NULL, 3, 3, do_evaluate_conditions_any, OVS_RO },
-    { "compare-conditions", NULL, 2, 2, do_compare_conditions, OVS_RO },
-    { "parse-mutations", NULL, 2, INT_MAX, do_parse_mutations, OVS_RO },
-    { "execute-mutations", NULL, 3, 3, do_execute_mutations, OVS_RO },
-    { "query", NULL, 3, 3, do_query, OVS_RO },
-    { "query-distinct", NULL, 4, 4, do_query_distinct, OVS_RO },
-    { "transact", NULL, 1, INT_MAX, do_transact, OVS_RO },
-    { "parse-schema", NULL, 1, 1, do_parse_schema, OVS_RO },
-    { "execute", NULL, 2, INT_MAX, do_execute, OVS_RO },
-    { "execute-readonly", NULL, 2, INT_MAX, do_execute_ro, OVS_RO },
-    { "trigger", NULL, 2, INT_MAX, do_trigger, OVS_RO },
-    { "idl", NULL, 1, INT_MAX, do_idl, OVS_RO },
-    { "idl-compound-index", NULL, 2, 2, do_idl_compound_index, OVS_RW },
-    { "idl-compound-index-with-ref", NULL, 1, INT_MAX,
-        do_idl_compound_index_with_ref, OVS_RO },
-    { "idl-partial-update-map-column", NULL, 1, INT_MAX,
-        do_idl_partial_update_map_column, OVS_RO },
-    { "idl-partial-update-set-column", NULL, 1, INT_MAX,
-        do_idl_partial_update_set_column, OVS_RO },
-    { "help", NULL, 0, INT_MAX, do_help, OVS_RO },
-    { NULL, NULL, 0, 0, NULL, OVS_RO },
-};
-
-static struct ovs_cmdl_command *
-get_all_commands(void)
-{
-    return all_commands;
-}
diff --git a/tests/test-ovsdb.py b/tests/test-ovsdb.py
deleted file mode 100644
index 422321a4c..000000000
--- a/tests/test-ovsdb.py
+++ /dev/null
@@ -1,965 +0,0 @@
-# Copyright (c) 2009, 2010, 2011, 2012, 2016 Nicira, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from __future__ import print_function
-
-import getopt
-import os
-import re
-import sys
-import uuid
-
-import ovs.db.idl
-import ovs.db.schema
-import ovs.db.types
-import ovs.ovsuuid
-import ovs.poller
-import ovs.stream
-import ovs.util
-import ovs.vlog
-from ovs.db import data
-from ovs.db import error
-from ovs.fatal_signal import signal_alarm
-
-import six
-
-vlog = ovs.vlog.Vlog("test-ovsdb")
-vlog.set_levels_from_string("console:dbg")
-vlog.init(None)
-
-
-def unbox_json(json):
-    if type(json) == list and len(json) == 1:
-        return json[0]
-    else:
-        return json
-
-
-def do_default_atoms():
-    for type_ in ovs.db.types.ATOMIC_TYPES:
-        if type_ == ovs.db.types.VoidType:
-            continue
-
-        sys.stdout.write("%s: " % type_.to_string())
-
-        atom = data.Atom.default(type_)
-        if atom != data.Atom.default(type_):
-            sys.stdout.write("wrong\n")
-            sys.exit(1)
-
-        sys.stdout.write("OK\n")
-
-
-def do_default_data():
-    any_errors = False
-    for n_min in 0, 1:
-        for key in ovs.db.types.ATOMIC_TYPES:
-            if key == ovs.db.types.VoidType:
-                continue
-            for value in ovs.db.types.ATOMIC_TYPES:
-                if value == ovs.db.types.VoidType:
-                    valueBase = None
-                else:
-                    valueBase = ovs.db.types.BaseType(value)
-                type_ = ovs.db.types.Type(ovs.db.types.BaseType(key),
-                                          valueBase, n_min, 1)
-                assert type_.is_valid()
-
-                sys.stdout.write("key %s, value %s, n_min %d: "
-                                 % (key.to_string(), value.to_string(), n_min))
-
-                datum = data.Datum.default(type_)
-                if datum != data.Datum.default(type_):
-                    sys.stdout.write("wrong\n")
-                    any_errors = True
-                else:
-                    sys.stdout.write("OK\n")
-    if any_errors:
-        sys.exit(1)
-
-
-def do_parse_atomic_type(type_string):
-    type_json = unbox_json(ovs.json.from_string(type_string))
-    atomic_type = ovs.db.types.AtomicType.from_json(type_json)
-    print(ovs.json.to_string(atomic_type.to_json(), sort_keys=True))
-
-
-def do_parse_base_type(type_string):
-    type_json = unbox_json(ovs.json.from_string(type_string))
-    base_type = ovs.db.types.BaseType.from_json(type_json)
-    print(ovs.json.to_string(base_type.to_json(), sort_keys=True))
-
-
-def do_parse_type(type_string):
-    type_json = unbox_json(ovs.json.from_string(type_string))
-    type_ = ovs.db.types.Type.from_json(type_json)
-    print(ovs.json.to_string(type_.to_json(), sort_keys=True))
-
-
-def do_parse_atoms(type_string, *atom_strings):
-    type_json = unbox_json(ovs.json.from_string(type_string))
-    base = ovs.db.types.BaseType.from_json(type_json)
-    for atom_string in atom_strings:
-        atom_json = unbox_json(ovs.json.from_string(atom_string))
-        try:
-            atom = data.Atom.from_json(base, atom_json)
-            print(ovs.json.to_string(atom.to_json()))
-        except error.Error as e:
-            print(e.args[0])
-
-
-def do_parse_data(type_string, *data_strings):
-    type_json = unbox_json(ovs.json.from_string(type_string))
-    type_ = ovs.db.types.Type.from_json(type_json)
-    for datum_string in data_strings:
-        datum_json = unbox_json(ovs.json.from_string(datum_string))
-        datum = data.Datum.from_json(type_, datum_json)
-        print(ovs.json.to_string(datum.to_json()))
-
-
-def do_sort_atoms(type_string, atom_strings):
-    type_json = unbox_json(ovs.json.from_string(type_string))
-    base = ovs.db.types.BaseType.from_json(type_json)
-    atoms = [data.Atom.from_json(base, atom_json)
-             for atom_json in unbox_json(ovs.json.from_string(atom_strings))]
-    print(ovs.json.to_string([data.Atom.to_json(atom)
-                              for atom in sorted(atoms)]))
-
-
-def do_parse_column(name, column_string):
-    column_json = unbox_json(ovs.json.from_string(column_string))
-    column = ovs.db.schema.ColumnSchema.from_json(column_json, name)
-    print(ovs.json.to_string(column.to_json(), sort_keys=True))
-
-
-def do_parse_table(name, table_string, default_is_root_string='false'):
-    default_is_root = default_is_root_string == 'true'
-    table_json = unbox_json(ovs.json.from_string(table_string))
-    table = ovs.db.schema.TableSchema.from_json(table_json, name)
-    print(ovs.json.to_string(table.to_json(default_is_root), sort_keys=True))
-
-
-def do_parse_schema(schema_string):
-    schema_json = unbox_json(ovs.json.from_string(schema_string))
-    schema = ovs.db.schema.DbSchema.from_json(schema_json)
-    print(ovs.json.to_string(schema.to_json(), sort_keys=True))
-
-
-def get_simple_printable_row_string(row, columns):
-    s = ""
-    for column in columns:
-        if hasattr(row, column) and not (type(getattr(row, column))
-                                         is ovs.db.data.Atom):
-            value = getattr(row, column)
-            if isinstance(value, dict):
-                value = sorted(value.items())
-            s += "%s=%s " % (column, value)
-    s = s.strip()
-    s = re.sub('""|,|u?\'', "", s)
-    s = re.sub(r'UUID\(([^)]+)\)', r'\1', s)
-    s = re.sub('False', 'false', s)
-    s = re.sub('True', 'true', s)
-    s = re.sub(r'(ba)=([^[][^ ]*) ', r'\1=[\2] ', s)
-    return s
-
-
-def get_simple_table_printable_row(row):
-    simple_columns = ["i", "r", "b", "s", "u", "ia",
-                      "ra", "ba", "sa", "ua", "uuid"]
-    return get_simple_printable_row_string(row, simple_columns)
-
-
-def get_simple2_table_printable_row(row):
-    simple2_columns = ["name", "smap", "imap"]
-    return get_simple_printable_row_string(row, simple2_columns)
-
-
-def get_simple3_table_printable_row(row):
-    simple3_columns = ["name", "uset"]
-    return get_simple_printable_row_string(row, simple3_columns)
-
-
-def print_idl(idl, step):
-    n = 0
-    if "simple" in idl.tables:
-        simple = idl.tables["simple"].rows
-        for row in six.itervalues(simple):
-            s = "%03d: " % step
-            s += get_simple_table_printable_row(row)
-            print(s)
-            n += 1
-
-    if "simple2" in idl.tables:
-        simple2 = idl.tables["simple2"].rows
-        for row in six.itervalues(simple2):
-            s = "%03d: " % step
-            s += get_simple2_table_printable_row(row)
-            print(s)
-            n += 1
-
-    if "simple3" in idl.tables:
-        simple3 = idl.tables["simple3"].rows
-        for row in six.itervalues(simple3):
-            s = "%03d: " % step
-            s += get_simple3_table_printable_row(row)
-            print(s)
-            n += 1
-
-    if "link1" in idl.tables:
-        l1 = idl.tables["link1"].rows
-        for row in six.itervalues(l1):
-            s = ["%03d: i=%s k=" % (step, row.i)]
-            if hasattr(row, "k") and row.k:
-                s.append(str(row.k.i))
-            if hasattr(row, "ka"):
-                s.append(" ka=[")
-                s.append(' '.join(sorted(str(ka.i) for ka in row.ka)))
-                s.append("] l2=")
-            if hasattr(row, "l2") and row.l2:
-                s.append(str(row.l2[0].i))
-            if hasattr(row, "uuid"):
-                s.append(" uuid=%s" % row.uuid)
-            print(''.join(s))
-            n += 1
-
-    if "link2" in idl.tables:
-        l2 = idl.tables["link2"].rows
-        for row in six.itervalues(l2):
-            s = ["%03d:" % step]
-            s.append(" i=%s l1=" % row.i)
-            if hasattr(row, "l1") and row.l1:
-                s.append(str(row.l1[0].i))
-            if hasattr(row, "uuid"):
-                s.append(" uuid=%s" % row.uuid)
-            print(''.join(s))
-            n += 1
-
-    if "singleton" in idl.tables:
-        sng = idl.tables["singleton"].rows
-        for row in six.itervalues(sng):
-            s = ["%03d:" % step]
-            s.append(" name=%s" % row.name)
-            if hasattr(row, "uuid"):
-                s.append(" uuid=%s" % row.uuid)
-            print(''.join(s))
-            n += 1
-
-    if not n:
-        print("%03d: empty" % step)
-    sys.stdout.flush()
-
-
-def substitute_uuids(json, symtab):
-    if isinstance(json, six.string_types):
-        symbol = symtab.get(json)
-        if symbol:
-            return str(symbol)
-    elif type(json) == list:
-        return [substitute_uuids(element, symtab) for element in json]
-    elif type(json) == dict:
-        d = {}
-        for key, value in six.iteritems(json):
-            d[key] = substitute_uuids(value, symtab)
-        return d
-    return json
-
-
-def parse_uuids(json, symtab):
-    if (isinstance(json, six.string_types)
-            and ovs.ovsuuid.is_valid_string(json)):
-        name = "#%d#" % len(symtab)
-        sys.stderr.write("%s = %s\n" % (name, json))
-        symtab[name] = json
-    elif type(json) == list:
-        for element in json:
-            parse_uuids(element, symtab)
-    elif type(json) == dict:
-        for value in six.itervalues(json):
-            parse_uuids(value, symtab)
-
-
-def idltest_find_simple(idl, i):
-    for row in six.itervalues(idl.tables["simple"].rows):
-        if row.i == i:
-            return row
-    return None
-
-
-def idltest_find_simple2(idl, i):
-    for row in six.itervalues(idl.tables["simple2"].rows):
-        if row.name == i:
-            return row
-    return None
-
-
-def idltest_find_simple3(idl, i):
-    return next(idl.index_equal("simple3", "simple3_by_name", i), None)
-
-
-def idl_set(idl, commands, step):
-    txn = ovs.db.idl.Transaction(idl)
-    increment = False
-    fetch_cmds = []
-    events = []
-    for command in commands.split(','):
-        words = command.split()
-        name = words[0]
-        args = words[1:]
-
-        if name == "notifytest":
-            name = args[0]
-            args = args[1:]
-            old_notify = idl.notify
-
-            def notify(event, row, updates=None):
-                if updates:
-                    upcol = list(updates._data.keys())[0]
-                else:
-                    upcol = None
-                events.append("%s|%s|%s" % (event, row.i, upcol))
-                idl.notify = old_notify
-
-            idl.notify = notify
-
-        if name == "set":
-            if len(args) != 3:
-                sys.stderr.write('"set" command requires 3 arguments\n')
-                sys.exit(1)
-
-            s = idltest_find_simple(idl, int(args[0]))
-            if not s:
-                sys.stderr.write('"set" command asks for nonexistent i=%d\n'
-                                 % int(args[0]))
-                sys.exit(1)
-
-            if args[1] == "b":
-                s.b = args[2] == "1"
-            elif args[1] == "s":
-                if six.PY2:
-                    s.s = args[2].decode('utf-8')
-                else:
-                    s.s = args[2].encode(sys.getfilesystemencoding(),
-                                         'surrogateescape') \
-                                 .decode('utf-8', 'replace')
-            elif args[1] == "u":
-                s.u = uuid.UUID(args[2])
-            elif args[1] == "r":
-                s.r = float(args[2])
-            else:
-                sys.stderr.write('"set" comamnd asks for unknown column %s\n'
-                                 % args[2])
-                sys.stderr.exit(1)
-        elif name == "insert":
-            if len(args) != 1:
-                sys.stderr.write('"set" command requires 1 argument\n')
-                sys.exit(1)
-
-            s = txn.insert(idl.tables["simple"])
-            s.i = int(args[0])
-        elif name == "delete":
-            if len(args) != 1:
-                sys.stderr.write('"delete" command requires 1 argument\n')
-                sys.exit(1)
-
-            s = idltest_find_simple(idl, int(args[0]))
-            if not s:
-                sys.stderr.write('"delete" command asks for nonexistent i=%d\n'
-                                 % int(args[0]))
-                sys.exit(1)
-            s.delete()
-        elif name == "verify":
-            if len(args) != 2:
-                sys.stderr.write('"verify" command requires 2 arguments\n')
-                sys.exit(1)
-
-            s = idltest_find_simple(idl, int(args[0]))
-            if not s:
-                sys.stderr.write('"verify" command asks for nonexistent i=%d\n'
-                                 % int(args[0]))
-                sys.exit(1)
-
-            if args[1] in ("i", "b", "s", "u", "r"):
-                s.verify(args[1])
-            else:
-                sys.stderr.write('"verify" command asks for unknown column '
-                                 '"%s"\n' % args[1])
-                sys.exit(1)
-        elif name == "fetch":
-            if len(args) != 2:
-                sys.stderr.write('"fetch" command requires 2 argument\n')
-                sys.exit(1)
-
-            row = idltest_find_simple(idl, int(args[0]))
-            if not row:
-                sys.stderr.write('"fetch" command asks for nonexistent i=%d\n'
-                                 % int(args[0]))
-                sys.exit(1)
-
-            column = args[1]
-            row.fetch(column)
-            fetch_cmds.append([row, column])
-        elif name == "increment":
-            if len(args) != 1:
-                sys.stderr.write('"increment" command requires 1 argument\n')
-                sys.exit(1)
-
-            s = idltest_find_simple(idl, int(args[0]))
-            if not s:
-                sys.stderr.write('"set" command asks for nonexistent i=%d\n'
-                                 % int(args[0]))
-                sys.exit(1)
-
-            s.increment("i")
-            increment = True
-        elif name == "abort":
-            txn.abort()
-            break
-        elif name == "destroy":
-            print("%03d: destroy" % step)
-            sys.stdout.flush()
-            txn.abort()
-            return
-        elif name == "linktest":
-            l1_0 = txn.insert(idl.tables["link1"])
-            l1_0.i = 1
-            l1_0.k = [l1_0]
-            l1_0.ka = [l1_0]
-            l1_1 = txn.insert(idl.tables["link1"])
-            l1_1.i = 2
-            l1_1.k = [l1_0]
-            l1_1.ka = [l1_0, l1_1]
-        elif name == 'getattrtest':
-            l1 = txn.insert(idl.tables["link1"])
-            i = getattr(l1, 'i', 1)
-            assert i == 1
-            l1.i = 2
-            i = getattr(l1, 'i', 1)
-            assert i == 2
-            l1.k = [l1]
-        elif name == 'partialmapinsertelement':
-            row = idltest_find_simple2(idl, 'myString1')
-            len_smap = len(getattr(row, 'smap'))
-            row.setkey('smap', 'key1', 'myList1')
-            len_imap = len(getattr(row, 'imap'))
-            row.setkey('imap', 3, 'myids2')
-            row.__setattr__('name', 'String2')
-            assert len(getattr(row, 'smap')) == len_smap
-            assert len(getattr(row, 'imap')) == len_imap + 1
-        elif name == 'partialmapinsertmultipleelements':
-            row = idltest_find_simple2(idl, 'String2')
-            len_smap = len(getattr(row, 'smap'))
-            row.setkey('smap', 'key2', 'myList2')
-            row.setkey('smap', 'key3', 'myList3')
-            row.setkey('smap', 'key4', 'myList4')
-            assert len(getattr(row, 'smap')) == len_smap + 2
-        elif name == 'partialmapdelelements':
-            row = idltest_find_simple2(idl, 'String2')
-            len_smap = len(getattr(row, 'smap'))
-            row.delkey('smap', 'key1', 'myList1')
-            row.delkey('smap', 'key2', 'wrongvalue')
-            row.delkey('smap', 'key3')
-            row.delkey('smap', 'key4')
-            assert len(getattr(row, 'smap')) == len_smap - 3
-        elif name == 'partialmapmutatenew':
-            new_row2 = txn.insert(idl.tables["simple2"])
-            setattr(new_row2, 'name', 'String2New')
-            new_row2.setkey('smap', 'key1', 'newList1')
-            assert len(getattr(new_row2, 'smap')) == 1
-            new_row2.setkey('smap', 'key2', 'newList2')
-            assert len(getattr(new_row2, 'smap')) == 2
-        elif name == 'partialrenamesetadd':
-            row = idltest_find_simple3(idl, 'mySet1')
-            old_size = len(getattr(row, 'uset', []))
-            row.addvalue('uset',
-                         uuid.UUID("001e43d2-dd3f-4616-ab6a-83a490bb0991"))
-            row.__setattr__('name', 'String2')
-            assert len(getattr(row, 'uset', [])) == old_size + 1
-        elif name == 'partialduplicateadd':
-            row = idltest_find_simple3(idl, 'String2')
-            old_size = len(getattr(row, 'uset', []))
-            row.addvalue('uset',
-                         uuid.UUID("0026b3ba-571b-4729-8227-d860a5210ab8"))
-            row.addvalue('uset',
-                         uuid.UUID("0026b3ba-571b-4729-8227-d860a5210ab8"))
-            assert len(getattr(row, 'uset', [])) == old_size + 1
-        elif name == 'partialsetdel':
-            row = idltest_find_simple3(idl, 'String2')
-            old_size = len(getattr(row, 'uset', []))
-            row.delvalue('uset',
-                         uuid.UUID("001e43d2-dd3f-4616-ab6a-83a490bb0991"))
-            assert len(getattr(row, 'uset', [])) == old_size - 1
-        elif name == 'partialsetref':
-            new_row = txn.insert(idl.tables["simple4"])
-            new_row.__setattr__('name', 'test')
-            row = idltest_find_simple3(idl, 'String2')
-            old_size = len(getattr(row, 'uref', []))
-            row.addvalue('uref', new_row.uuid)
-            assert len(getattr(row, 'uref', [])) == old_size + 1
-        elif name == 'partialsetoverrideops':
-            row = idltest_find_simple3(idl, 'String2')
-            row.addvalue('uset',
-                         uuid.UUID("579e978d-776c-4f19-a225-268e5890e670"))
-            row.delvalue('uset',
-                         uuid.UUID("0026b3ba-571b-4729-8227-d860a5210ab8"))
-            row.__setattr__('uset',
-                [uuid.UUID("0026b3ba-571b-4729-8227-d860a5210ab8")])
-            assert len(getattr(row, 'uset', [])) == 1
-        elif name == 'partialsetadddelete':
-            row = idltest_find_simple3(idl, 'String2')
-            row.addvalue('uset',
-                         uuid.UUID('b6272353-af9c-40b7-90fe-32a43e6518a1'))
-            row.addvalue('uset',
-                         uuid.UUID('1d6a71a2-dffb-426e-b2fa-b727091f9901'))
-            row.delvalue('uset',
-                         uuid.UUID('0026b3ba-571b-4729-8227-d860a5210ab8'))
-            assert len(getattr(row, 'uset', [])) == 2
-        elif name == 'partialsetmutatenew':
-            new_row41 = txn.insert(idl.tables["simple4"])
-            new_row41.__setattr__('name', 'new_row41')
-            new_row3 = txn.insert(idl.tables["simple3"])
-            setattr(new_row3, 'name', 'String3')
-            new_row3.addvalue('uset', new_row41.uuid)
-            assert len(getattr(new_row3, 'uset', [])) == 1
-        else:
-            sys.stderr.write("unknown command %s\n" % name)
-            sys.exit(1)
-
-    status = txn.commit_block()
-    sys.stdout.write("%03d: commit, status=%s"
-                     % (step, ovs.db.idl.Transaction.status_to_string(status)))
-    if increment and status == ovs.db.idl.Transaction.SUCCESS:
-        sys.stdout.write(", increment=%d" % txn.get_increment_new_value())
-    if events:
-        # Event notifications from operations in a single transaction are
-        # not in a gauranteed order due to update messages being dicts
-        sys.stdout.write(", events=" + ", ".join(sorted(events)))
-    sys.stdout.write("\n")
-    sys.stdout.flush()
-
-
-def update_condition(idl, commands):
-    commands = commands[len("condition "):].split(";")
-    for command in commands:
-        command = command.split(" ")
-        if(len(command) != 2):
-            sys.stderr.write("Error parsing condition %s\n" % command)
-            sys.exit(1)
-
-        table = command[0]
-        cond = ovs.json.from_string(command[1])
-
-        idl.cond_change(table, cond)
-
-
-def do_idl(schema_file, remote, *commands):
-    schema_helper = ovs.db.idl.SchemaHelper(schema_file)
-    track_notify = False
-
-    if remote.startswith("ssl:"):
-        if len(commands) < 3:
-            sys.stderr.write("SSL connection requires private key, "
-                             "certificate for private key, and peer CA "
-                             "certificate as arguments\n")
-            sys.exit(1)
-        ovs.stream.Stream.ssl_set_private_key_file(commands[0])
-        ovs.stream.Stream.ssl_set_certificate_file(commands[1])
-        ovs.stream.Stream.ssl_set_ca_cert_file(commands[2])
-        commands = commands[3:]
-
-    if commands and commands[0] == "track-notify":
-        commands = commands[1:]
-        track_notify = True
-
-    if commands and commands[0].startswith("?"):
-        readonly = {}
-        for x in commands[0][1:].split("?"):
-            readonly = []
-            table, columns = x.split(":")
-            columns = columns.split(",")
-            for index, column in enumerate(columns):
-                if column[-1] == '!':
-                    columns[index] = columns[index][:-1]
-                    readonly.append(columns[index])
-            schema_helper.register_columns(table, columns, readonly)
-        commands = commands[1:]
-    else:
-        schema_helper.register_all()
-    idl = ovs.db.idl.Idl(remote, schema_helper)
-    if "simple3" in idl.tables:
-        idl.index_create("simple3", "simple3_by_name")
-
-    if commands:
-        remotes = remote.split(',')
-        stream = None
-        for r in remotes:
-            error, stream = ovs.stream.Stream.open_block(
-                ovs.stream.Stream.open(r), 2000)
-            if not error and stream:
-                break
-            stream = None
-
-        if not stream:
-            sys.stderr.write("failed to connect to \"%s\"" % remote)
-            sys.exit(1)
-        rpc = ovs.jsonrpc.Connection(stream)
-    else:
-        rpc = None
-
-    symtab = {}
-    seqno = 0
-    step = 0
-
-    def mock_notify(event, row, updates=None):
-        output = "%03d: " % step
-        output += "event:" + str(event) + ", row={"
-        output += get_simple_table_printable_row(row) + "}, updates="
-        if updates is None:
-            output += "None"
-        else:
-            output += "{" + get_simple_table_printable_row(updates) + "}"
-
-        output += '\n'
-        sys.stdout.write(output)
-        sys.stdout.flush()
-
-    if track_notify and "simple" in idl.tables:
-        idl.notify = mock_notify
-
-    commands = list(commands)
-    if len(commands) >= 1 and "condition" in commands[0]:
-        update_condition(idl, commands.pop(0))
-        sys.stdout.write("%03d: change conditions\n" % step)
-        sys.stdout.flush()
-        step += 1
-
-    for command in commands:
-        if command.startswith("+"):
-            # The previous transaction didn't change anything.
-            command = command[1:]
-        else:
-            # Wait for update.
-            while idl.change_seqno == seqno and not idl.run():
-                rpc.run()
-
-                poller = ovs.poller.Poller()
-                idl.wait(poller)
-                rpc.wait(poller)
-                poller.block()
-
-            print_idl(idl, step)
-            step += 1
-
-        seqno = idl.change_seqno
-
-        if command == "reconnect":
-            print("%03d: reconnect" % step)
-            sys.stdout.flush()
-            step += 1
-            idl.force_reconnect()
-        elif "condition" in command:
-            update_condition(idl, command)
-            sys.stdout.write("%03d: change conditions\n" % step)
-            sys.stdout.flush()
-            step += 1
-        elif not command.startswith("["):
-            idl_set(idl, command, step)
-            step += 1
-        else:
-            json = ovs.json.from_string(command)
-            if isinstance(json, six.string_types):
-                sys.stderr.write("\"%s\": %s\n" % (command, json))
-                sys.exit(1)
-            json = substitute_uuids(json, symtab)
-            request = ovs.jsonrpc.Message.create_request("transact", json)
-            error, reply = rpc.transact_block(request)
-            if error:
-                sys.stderr.write("jsonrpc transaction failed: %s\n"
-                                 % os.strerror(error))
-                sys.exit(1)
-            elif reply.error is not None:
-                sys.stderr.write("jsonrpc transaction failed: %s\n"
-                                 % reply.error)
-                sys.exit(1)
-
-            sys.stdout.write("%03d: " % step)
-            sys.stdout.flush()
-            step += 1
-            if reply.result is not None:
-                parse_uuids(reply.result, symtab)
-            reply.id = None
-            sys.stdout.write("%s\n" % ovs.json.to_string(reply.to_json()))
-            sys.stdout.flush()
-
-    if rpc:
-        rpc.close()
-    while idl.change_seqno == seqno and not idl.run():
-        poller = ovs.poller.Poller()
-        idl.wait(poller)
-        poller.block()
-    print_idl(idl, step)
-    step += 1
-    idl.close()
-    print("%03d: done" % step)
-
-
-def do_idl_passive(schema_file, remote, *commands):
-    symtab = {}
-    step = 0
-    schema_helper = ovs.db.idl.SchemaHelper(schema_file)
-    schema_helper.register_all()
-    idl = ovs.db.idl.Idl(remote, schema_helper)
-
-    while idl._session.rpc is None:
-        idl.run()
-
-    rpc = idl._session.rpc
-
-    print_idl(idl, step)
-    step += 1
-
-    for command in commands:
-        json = ovs.json.from_string(command)
-        if isinstance(json, six.string_types):
-            sys.stderr.write("\"%s\": %s\n" % (command, json))
-            sys.exit(1)
-        json = substitute_uuids(json, symtab)
-        request = ovs.jsonrpc.Message.create_request("transact", json)
-        error, reply = rpc.transact_block(request)
-        if error:
-            sys.stderr.write("jsonrpc transaction failed: %s\n"
-                             % os.strerror(error))
-            sys.exit(1)
-        elif reply.error is not None:
-            sys.stderr.write("jsonrpc transaction failed: %s\n"
-                             % reply.error)
-            sys.exit(1)
-
-        sys.stdout.write("%03d: " % step)
-        sys.stdout.flush()
-        step += 1
-        if reply.result is not None:
-            parse_uuids(reply.result, symtab)
-        reply.id = None
-        sys.stdout.write("%s\n" % ovs.json.to_string(reply.to_json()))
-        sys.stdout.flush()
-
-    idl.close()
-    print("%03d: done" % step)
-
-
-def do_idl_cluster(schema_file, remote, pid, *commands):
-    schema_helper = ovs.db.idl.SchemaHelper(schema_file)
-
-    if remote.startswith("ssl:"):
-        if len(commands) < 3:
-            sys.stderr.write("SSL connection requires private key, "
-                             "certificate for private key, and peer CA "
-                             "certificate as arguments\n")
-            sys.exit(1)
-        ovs.stream.Stream.ssl_set_private_key_file(commands[0])
-        ovs.stream.Stream.ssl_set_certificate_file(commands[1])
-        ovs.stream.Stream.ssl_set_ca_cert_file(commands[2])
-        commands = commands[3:]
-
-    schema_helper.register_all()
-    idl = ovs.db.idl.Idl(remote, schema_helper)
-
-    step = 0
-    seqno = 0
-    commands = list(commands)
-    for command in commands:
-        if command.startswith("+"):
-            # The previous transaction didn't change anything.
-            command = command[1:]
-        else:
-            # Wait for update.
-            while idl.change_seqno == seqno and not idl.run():
-                poller = ovs.poller.Poller()
-                idl.wait(poller)
-                poller.block()
-            step += 1
-
-        seqno = idl.change_seqno
-
-        if command == "reconnect":
-            print("%03d: reconnect" % step)
-            sys.stdout.flush()
-            step += 1
-            idl.force_reconnect()
-        elif command == "remote":
-            print("%03d: %s" % (step, idl.session_name()))
-            sys.stdout.flush()
-            step += 1
-        elif command == "remotestop":
-            r = idl.session_name()
-            remotes = remote.split(',')
-            i = remotes.index(r)
-            pids = pid.split(',')
-            command = None
-            try:
-                command = "kill %s" % pids[i]
-            except ValueError as error:
-                sys.stderr.write("Cannot find pid of remote: %s\n"
-                                 % os.strerror(error))
-                sys.exit(1)
-            os.popen(command)
-            print("%03d: stop %s" % (step, pids[i]))
-            sys.stdout.flush()
-            step += 1
-
-    idl.close()
-    print("%03d: done" % step)
-
-
-def usage():
-    print("""\
-%(program_name)s: test utility for Open vSwitch database Python bindings
-usage: %(program_name)s [OPTIONS] COMMAND ARG...
-
-The following commands are supported:
-default-atoms
-  test ovsdb_atom_default()
-default-data
-  test ovsdb_datum_default()
-parse-atomic-type TYPE
-  parse TYPE as OVSDB atomic type, and re-serialize
-parse-base-type TYPE
-  parse TYPE as OVSDB base type, and re-serialize
-parse-type JSON
-  parse JSON as OVSDB type, and re-serialize
-parse-atoms TYPE ATOM...
-  parse JSON ATOMs as atoms of TYPE, and re-serialize
-parse-atom-strings TYPE ATOM...
-  parse string ATOMs as atoms of given TYPE, and re-serialize
-sort-atoms TYPE ATOM...
-  print JSON ATOMs in sorted order
-parse-data TYPE DATUM...
-  parse JSON DATUMs as data of given TYPE, and re-serialize
-parse-column NAME OBJECT
-  parse column NAME with info OBJECT, and re-serialize
-parse-table NAME OBJECT [DEFAULT-IS-ROOT]
-  parse table NAME with info OBJECT
-parse-schema JSON
-  parse JSON as an OVSDB schema, and re-serialize
-idl SCHEMA SERVER [?T1:C1,C2...[?T2:C1,C2,...]...] [TRANSACTION...]
-  connect to SERVER (which has the specified SCHEMA) and dump the
-  contents of the database as seen initially by the IDL implementation
-  and after executing each TRANSACTION.  (Each TRANSACTION must modify
-  the database or this command will hang.)
-  By default, all columns of all tables are monitored. The "?" option
-  can be used to monitor specific Table:Column(s). The table and their
-  columns are listed as a string of the form starting with "?":
-      ?<table-name>:<column-name>,<column-name>,...
-  e.g.:
-      ?simple:b - Monitor column "b" in table "simple"
-  Entries for multiple tables are seperated by "?":
-      ?<table-name>:<column-name>,...?<table-name>:<column-name>,...
-  e.g.:
-      ?simple:b?link1:i,k - Monitor column "b" in table "simple",
-                            and column "i", "k" in table "link1"
-  Readonly columns: Suffixing a "!" after a column indicates that the
-  column is to be registered "readonly".
-  e.g.:
-      ?simple:i,b!  - Register interest in column "i" (monitoring) and
-                      column "b" (readonly).
-
-
-The following options are also available:
-  -t, --timeout=SECS          give up after SECS seconds
-  -h, --help                  display this help message\
-""" % {'program_name': ovs.util.PROGRAM_NAME})
-    sys.exit(0)
-
-
-def main(argv):
-    try:
-        options, args = getopt.gnu_getopt(argv[1:], 't:h',
-                                          ['timeout',
-                                           'help'])
-    except getopt.GetoptError as geo:
-        sys.stderr.write("%s: %s\n" % (ovs.util.PROGRAM_NAME, geo.msg))
-        sys.exit(1)
-
-    timeout = None
-    for key, value in options:
-        if key in ['-h', '--help']:
-            usage()
-        elif key in ['-t', '--timeout']:
-            try:
-                timeout = int(value)
-                if timeout < 1:
-                    raise TypeError
-            except TypeError:
-                raise error.Error("value %s on -t or --timeout is not at "
-                                  "least 1" % value)
-        else:
-            sys.exit(0)
-
-    signal_alarm(timeout)
-
-    if not args:
-        sys.stderr.write("%s: missing command argument "
-                         "(use --help for help)\n" % ovs.util.PROGRAM_NAME)
-        sys.exit(1)
-
-    commands = {"default-atoms": (do_default_atoms, 0),
-                "default-data": (do_default_data, 0),
-                "parse-atomic-type": (do_parse_atomic_type, 1),
-                "parse-base-type": (do_parse_base_type, 1),
-                "parse-type": (do_parse_type, 1),
-                "parse-atoms": (do_parse_atoms, (2,)),
-                "parse-data": (do_parse_data, (2,)),
-                "sort-atoms": (do_sort_atoms, 2),
-                "parse-column": (do_parse_column, 2),
-                "parse-table": (do_parse_table, (2, 3)),
-                "parse-schema": (do_parse_schema, 1),
-                "idl": (do_idl, (2,)),
-                "idl_passive": (do_idl_passive, (2,)),
-                "idl-cluster": (do_idl_cluster, (3,))}
-
-    command_name = args[0]
-    args = args[1:]
-    if command_name not in commands:
-        sys.stderr.write("%s: unknown command \"%s\" "
-                         "(use --help for help)\n" % (ovs.util.PROGRAM_NAME,
-                                                      command_name))
-        sys.exit(1)
-
-    func, n_args = commands[command_name]
-    if type(n_args) == tuple:
-        if len(args) < n_args[0]:
-            sys.stderr.write("%s: \"%s\" requires at least %d arguments but "
-                             "only %d provided\n"
-                             % (ovs.util.PROGRAM_NAME, command_name,
-                                n_args[0], len(args)))
-            sys.exit(1)
-    elif type(n_args) == int:
-        if len(args) != n_args:
-            sys.stderr.write("%s: \"%s\" requires %d arguments but %d "
-                             "provided\n"
-                             % (ovs.util.PROGRAM_NAME, command_name,
-                                n_args, len(args)))
-            sys.exit(1)
-    else:
-        assert False
-
-    func(*args)
-
-
-if __name__ == '__main__':
-    try:
-        main(sys.argv)
-    except error.Error as e:
-        sys.stderr.write("%s\n" % e)
-        sys.exit(1)
diff --git a/tests/test-packets.c b/tests/test-packets.c
deleted file mode 100644
index da074f74d..000000000
--- a/tests/test-packets.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 2011, 2014, 2017 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "packets.h"
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "ovstest.h"
-
-static void
-test_ipv4_cidr(void)
-{
-    assert(ip_is_cidr(htonl(0x00000000)));
-    assert(ip_is_cidr(htonl(0x80000000)));
-    assert(ip_is_cidr(htonl(0xf0000000)));
-    assert(ip_is_cidr(htonl(0xffffffe0)));
-    assert(ip_is_cidr(htonl(0xffffffff)));
-
-    assert(!ip_is_cidr(htonl(0x00000001)));
-    assert(!ip_is_cidr(htonl(0x40000000)));
-    assert(!ip_is_cidr(htonl(0x0fffffff)));
-    assert(!ip_is_cidr(htonl(0xffffffd0)));
-}
-
-static void
-test_ipv6_static_masks(void)
-{
-    /* The 'exact' and 'any' addresses should be identical to
-     * 'in6addr_exact' and  'in6addr_any' definitions, but we redefine
-     * them here since the pre-defined ones are used in the functions
-     * we're testing. */
-    struct in6_addr exact   = {{{ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, \
-                                  0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }}};
-
-    struct in6_addr any     = {{{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \
-                                  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }}};
-
-    struct in6_addr neither = {{{ 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, \
-                                  0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef }}};
-
-    assert(ipv6_mask_is_exact(&exact));
-    assert(!ipv6_mask_is_exact(&any));
-    assert(!ipv6_mask_is_exact(&neither));
-
-    assert(!ipv6_mask_is_any(&exact));
-    assert(ipv6_mask_is_any(&any));
-    assert(!ipv6_mask_is_any(&neither));
-
-}
-
-static void
-test_ipv6_cidr(void)
-{
-    struct in6_addr dest;
-
-    struct in6_addr src   = {{{ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, \
-                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }}};
-
-    dest = ipv6_create_mask(0);
-    assert(ipv6_mask_is_any(&dest));
-    assert(ipv6_count_cidr_bits(&dest) == 0);
-    assert(ipv6_is_cidr(&dest));
-
-    dest = ipv6_create_mask(128);
-    assert(ipv6_mask_is_exact(&dest));
-    assert(ipv6_count_cidr_bits(&dest) == 128);
-    assert(ipv6_is_cidr(&dest));
-
-    dest = ipv6_create_mask(1);
-    assert(ipv6_count_cidr_bits(&dest) == 1);
-    assert(ipv6_is_cidr(&dest));
-
-    dest = ipv6_create_mask(13);
-    assert(ipv6_count_cidr_bits(&dest) == 13);
-    assert(ipv6_is_cidr(&dest));
-
-    dest = ipv6_create_mask(64);
-    assert(ipv6_count_cidr_bits(&dest) == 64);
-    assert(ipv6_is_cidr(&dest));
-
-    dest = ipv6_create_mask(95);
-    assert(ipv6_count_cidr_bits(&dest) == 95);
-    assert(ipv6_is_cidr(&dest));
-
-    dest = ipv6_create_mask(96);
-    assert(ipv6_count_cidr_bits(&dest) == 96);
-    assert(ipv6_is_cidr(&dest));
-
-    dest = ipv6_create_mask(97);
-    assert(ipv6_count_cidr_bits(&dest) == 97);
-    assert(ipv6_is_cidr(&dest));
-
-    dest = ipv6_create_mask(127);
-    assert(ipv6_count_cidr_bits(&dest) == 127);
-    assert(ipv6_is_cidr(&dest));
-
-    src.s6_addr[8] = 0xf0;
-    assert(ipv6_is_cidr(&src));
-    assert(ipv6_count_cidr_bits(&src) == 68);
-
-    src.s6_addr[15] = 0x01;
-    assert(!ipv6_is_cidr(&src));
-    src.s6_addr[15] = 0x00;
-    assert(ipv6_is_cidr(&src));
-
-    src.s6_addr[8] = 0x0f;
-    assert(!ipv6_is_cidr(&src));
-}
-
-
-static void
-test_ipv6_masking(void)
-{
-    struct in6_addr dest;
-    struct in6_addr mask;
-
-    mask = ipv6_create_mask(0);
-    dest = ipv6_addr_bitand(&in6addr_exact, &mask);
-    assert(ipv6_count_cidr_bits(&dest) == 0);
-
-    mask = ipv6_create_mask(1);
-    dest = ipv6_addr_bitand(&in6addr_exact, &mask);
-    assert(ipv6_count_cidr_bits(&dest) == 1);
-
-    mask = ipv6_create_mask(13);
-    dest = ipv6_addr_bitand(&in6addr_exact, &mask);
-    assert(ipv6_count_cidr_bits(&dest) == 13);
-
-    mask = ipv6_create_mask(127);
-    dest = ipv6_addr_bitand(&in6addr_exact, &mask);
-    assert(ipv6_count_cidr_bits(&dest) == 127);
-
-    mask = ipv6_create_mask(128);
-    dest = ipv6_addr_bitand(&in6addr_exact, &mask);
-    assert(ipv6_count_cidr_bits(&dest) == 128);
-}
-
-static void
-test_ipv6_parsing(void)
-{
-    struct in6_addr o_ipv6, p_ipv6;
-    struct in6_addr mask;
-
-    inet_pton(AF_INET6, "2001:db8:0:0:0:0:2:1", &o_ipv6);
-
-    assert(!ipv6_parse_masked("2001:db8:0:0:0:0:2:1/64", &p_ipv6, &mask));
-    assert(ipv6_addr_equals(&o_ipv6, &p_ipv6));
-    assert(ipv6_count_cidr_bits(&mask) == 64);
-
-    assert(!ipv6_parse_masked("2001:db8:0:0:0:0:2:1/ffff:ffff:ffff:ffff::",
-                              &p_ipv6, &mask));
-    assert(ipv6_addr_equals(&o_ipv6, &p_ipv6));
-    assert(ipv6_count_cidr_bits(&mask) == 64);
-
-    assert(!ipv6_parse_masked("2001:db8:0:0:0:0:2:1", &p_ipv6, &mask));
-    assert(ipv6_addr_equals(&o_ipv6, &p_ipv6));
-    assert(ipv6_count_cidr_bits(&mask) == 128);
-}
-
-static void
-test_packets_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    test_ipv4_cidr();
-    test_ipv6_static_masks();
-    test_ipv6_cidr();
-    test_ipv6_masking();
-    test_ipv6_parsing();
-}
-
-OVSTEST_REGISTER("test-packets", test_packets_main);
diff --git a/tests/test-random.c b/tests/test-random.c
deleted file mode 100644
index 542a49823..000000000
--- a/tests/test-random.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 2010, 2014 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "random.h"
-#include <stdio.h>
-#include <string.h>
-#include "ovstest.h"
-
-static void
-test_random_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    enum { N_ROUNDS = 10000 };
-    unsigned long long int total;
-    int hist16[8][16];
-    int hist2[32];
-    int i;
-
-    random_set_seed(1);
-
-    total = 0;
-    memset(hist2, 0, sizeof hist2);
-    memset(hist16, 0, sizeof hist16);
-    for (i = 0; i < N_ROUNDS; i++) {
-        uint32_t x;
-        int j;
-
-        x = random_uint32();
-
-        total += x;
-
-        for (j = 0; j < 32; j++) {
-            if (x & (1u << j)) {
-                hist2[j]++;
-            }
-        }
-
-        for (j = 0; j < 8; j++) {
-            hist16[j][(x >> (j * 4)) & 15]++;
-        }
-    }
-
-    printf("average=%08llx\n", total / N_ROUNDS);
-
-    printf("\nbit      0     1\n");
-    for (i = 0; i < 32; i++) {
-        printf("%3d %5d %5d\n", i, N_ROUNDS - hist2[i], hist2[i]);
-    }
-    printf("(expected values are %d)\n", N_ROUNDS / 2);
-
-    printf("\nnibble   0   1   2   3   4   5   6   7   8   9  10  11  12  "
-           "13  14  15\n");
-    for (i = 0; i < 8; i++) {
-        int j;
-
-        printf("%6d", i);
-        for (j = 0; j < 16; j++) {
-            printf(" %3d", hist16[i][j]);
-        }
-        printf("\n");
-    }
-    printf("(expected values are %d)\n", N_ROUNDS / 16);
-}
-
-OVSTEST_REGISTER("test-random", test_random_main);
diff --git a/tests/test-rcu.c b/tests/test-rcu.c
deleted file mode 100644
index 965f3c49f..000000000
--- a/tests/test-rcu.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2016 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "fatal-signal.h"
-#include "ovs-rcu.h"
-#include "ovs-thread.h"
-#include "ovstest.h"
-#include "util.h"
-
-static void *
-quiescer_main(void *aux OVS_UNUSED)
-{
-    /* A new thread must be not be quiescent */
-    ovs_assert(!ovsrcu_is_quiescent());
-    ovsrcu_quiesce_start();
-    /* After the above call it must be quiescent */
-    ovs_assert(ovsrcu_is_quiescent());
-
-    return NULL;
-}
-
-static void
-test_rcu_quiesce(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    pthread_t quiescer;
-
-    quiescer = ovs_thread_create("quiescer", quiescer_main, NULL);
-
-    /* This is the main thread of the process. After spawning its first
-     * thread it must not be quiescent. */
-    ovs_assert(!ovsrcu_is_quiescent());
-
-    xpthread_join(quiescer, NULL);
-}
-
-OVSTEST_REGISTER("test-rcu-quiesce", test_rcu_quiesce);
diff --git a/tests/test-reconnect.c b/tests/test-reconnect.c
deleted file mode 100644
index 5a14e7fe5..000000000
--- a/tests/test-reconnect.c
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 2011, 2012, 2014, 2016 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "reconnect.h"
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "command-line.h"
-#include "compiler.h"
-#include "ovstest.h"
-#include "svec.h"
-#include "util.h"
-#include "openvswitch/vlog.h"
-
-static struct reconnect *reconnect;
-static int now;
-
-static void diff_stats(const struct reconnect_stats *old,
-                       const struct reconnect_stats *new,
-                       int delta);
-static const struct ovs_cmdl_command *get_all_commands(void);
-
-static void
-test_reconnect_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    struct reconnect_stats prev;
-    unsigned int old_max_tries;
-    int old_time;
-    char line[128];
-
-    vlog_set_levels_from_string_assert("reconnect:off");
-
-    now = 1000;
-    reconnect = reconnect_create(now);
-    reconnect_set_name(reconnect, "remote");
-    reconnect_get_stats(reconnect, now, &prev);
-    printf("### t=%d ###\n", now);
-    old_time = now;
-    old_max_tries = reconnect_get_max_tries(reconnect);
-    while (fgets(line, sizeof line, stdin)) {
-        struct reconnect_stats cur;
-        struct svec args;
-
-        fputs(line, stdout);
-        if (line[0] == '#') {
-            continue;
-        }
-
-        svec_init(&args);
-        svec_parse_words(&args, line);
-        svec_terminate(&args);
-        if (!svec_is_empty(&args)) {
-            struct ovs_cmdl_context ctx = {
-                .argc = args.n,
-                .argv = args.names,
-            };
-            ovs_cmdl_run_command(&ctx, get_all_commands());
-        }
-        svec_destroy(&args);
-
-        if (old_time != now) {
-            printf("\n### t=%d ###\n", now);
-        }
-
-        reconnect_get_stats(reconnect, now, &cur);
-        diff_stats(&prev, &cur, now - old_time);
-        prev = cur;
-        if (reconnect_get_max_tries(reconnect) != old_max_tries) {
-            old_max_tries = reconnect_get_max_tries(reconnect);
-            printf("  %u tries left\n", old_max_tries);
-        }
-
-        old_time = now;
-    }
-}
-
-static void
-do_enable(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    reconnect_enable(reconnect, now);
-}
-
-static void
-do_disable(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    reconnect_disable(reconnect, now);
-}
-
-static void
-do_force_reconnect(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    reconnect_force_reconnect(reconnect, now);
-}
-
-static int
-error_from_string(const char *s)
-{
-    if (!s) {
-        return 0;
-    } else if (!strcmp(s, "ECONNREFUSED")) {
-        return ECONNREFUSED;
-    } else if (!strcmp(s, "EOF")) {
-        return EOF;
-    } else {
-        ovs_fatal(0, "unknown error '%s'", s);
-    }
-}
-
-static void
-do_disconnected(struct ovs_cmdl_context *ctx)
-{
-    reconnect_disconnected(reconnect, now, error_from_string(ctx->argv[1]));
-}
-
-static void
-do_connecting(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    reconnect_connecting(reconnect, now);
-}
-
-static void
-do_connect_failed(struct ovs_cmdl_context *ctx)
-{
-    reconnect_connect_failed(reconnect, now, error_from_string(ctx->argv[1]));
-}
-
-static void
-do_connected(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    reconnect_connected(reconnect, now);
-}
-
-static void
-do_activity(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    reconnect_activity(reconnect, now);
-}
-
-static void
-do_run(struct ovs_cmdl_context *ctx)
-{
-    enum reconnect_action action;
-
-    if (ctx->argc > 1) {
-        now += atoi(ctx->argv[1]);
-    }
-
-    action = reconnect_run(reconnect, now);
-    switch (action) {
-    default:
-        if (action != 0) {
-            OVS_NOT_REACHED();
-        }
-        break;
-
-    case RECONNECT_CONNECT:
-        printf("  should connect\n");
-        break;
-
-    case RECONNECT_DISCONNECT:
-        printf("  should disconnect\n");
-        break;
-
-    case RECONNECT_PROBE:
-        printf("  should send probe\n");
-        break;
-    }
-}
-
-static void
-do_advance(struct ovs_cmdl_context *ctx)
-{
-    now += atoi(ctx->argv[1]);
-}
-
-static void
-do_timeout(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    int timeout = reconnect_timeout(reconnect, now);
-    if (timeout >= 0) {
-        printf("  advance %d ms\n", timeout);
-        now += timeout;
-    } else {
-        printf("  no timeout\n");
-    }
-}
-
-static void
-do_set_max_tries(struct ovs_cmdl_context *ctx)
-{
-    reconnect_set_max_tries(reconnect, atoi(ctx->argv[1]));
-}
-
-static void
-do_set_backoff_free_tries(struct ovs_cmdl_context *ctx)
-{
-    reconnect_set_backoff_free_tries(reconnect, atoi(ctx->argv[1]));
-}
-
-static void
-diff_stats(const struct reconnect_stats *old,
-           const struct reconnect_stats *new,
-           int delta)
-{
-    if (old->state != new->state
-        || old->state_elapsed != new->state_elapsed
-        || old->backoff != new->backoff) {
-        printf("  in %s for %u ms (%d ms backoff)\n",
-               new->state, new->state_elapsed, new->backoff);
-    }
-    if (old->creation_time != new->creation_time
-        || old->last_activity != new->last_activity
-        || old->last_connected != new->last_connected) {
-        printf("  created %lld, last activity %lld, last connected %lld\n",
-               new->creation_time, new->last_activity, new->last_connected);
-    }
-    if (old->n_successful_connections != new->n_successful_connections
-        || old->n_attempted_connections != new->n_attempted_connections
-        || old->seqno != new->seqno) {
-        printf("  %u successful connections out of %u attempts, seqno %u\n",
-               new->n_successful_connections, new->n_attempted_connections,
-               new->seqno);
-    }
-    if (old->is_connected != new->is_connected) {
-        printf("  %sconnected\n", new->is_connected ? "" : "dis");
-    }
-    if (old->last_connected != new->last_connected
-        || (old->msec_since_connect != new->msec_since_connect - delta
-            && !(old->msec_since_connect == UINT_MAX
-                 && new->msec_since_connect == UINT_MAX))
-        || (old->total_connected_duration != new->total_connected_duration - delta
-            && !(old->total_connected_duration == 0
-                 && new->total_connected_duration == 0))) {
-        printf("  last connected %u ms ago, connected %u ms total\n",
-               new->msec_since_connect, new->total_connected_duration);
-    }
-    if (old->last_disconnected != new->last_disconnected
-        || (old->msec_since_disconnect != new->msec_since_disconnect - delta
-            && !(old->msec_since_disconnect == UINT_MAX
-                 && new->msec_since_disconnect == UINT_MAX))) {
-        printf("  disconnected at %llu ms (%u ms ago)\n",
-               new->last_disconnected, new->msec_since_disconnect);
-    }
-}
-
-static void
-do_set_passive(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    reconnect_set_passive(reconnect, true, now);
-}
-
-static void
-do_listening(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    reconnect_listening(reconnect, now);
-}
-
-static void
-do_listen_error(struct ovs_cmdl_context *ctx)
-{
-    reconnect_listen_error(reconnect, now, atoi(ctx->argv[1]));
-}
-
-static const struct ovs_cmdl_command all_commands[] = {
-    { "enable", NULL, 0, 0, do_enable, OVS_RO },
-    { "disable", NULL, 0, 0, do_disable, OVS_RO },
-    { "force-reconnect", NULL, 0, 0, do_force_reconnect, OVS_RO },
-    { "disconnected", NULL, 0, 1, do_disconnected, OVS_RO },
-    { "connecting", NULL, 0, 0, do_connecting, OVS_RO },
-    { "connect-failed", NULL, 0, 1, do_connect_failed, OVS_RO },
-    { "connected", NULL, 0, 0, do_connected, OVS_RO },
-    { "activity", NULL, 0, 0, do_activity, OVS_RO },
-    { "run", NULL, 0, 1, do_run, OVS_RO },
-    { "advance", NULL, 1, 1, do_advance, OVS_RO },
-    { "timeout", NULL, 0, 0, do_timeout, OVS_RO },
-    { "set-max-tries", NULL, 1, 1, do_set_max_tries, OVS_RO },
-    { "set-backoff-free-tries", NULL, 1, 1, do_set_backoff_free_tries,
-      OVS_RO },
-    { "passive", NULL, 0, 0, do_set_passive, OVS_RO },
-    { "listening", NULL, 0, 0, do_listening, OVS_RO },
-    { "listen-error", NULL, 1, 1, do_listen_error, OVS_RO },
-    { NULL, NULL, 0, 0, NULL, OVS_RO },
-};
-
-static const struct ovs_cmdl_command *
-get_all_commands(void)
-{
-    return all_commands;
-}
-
-OVSTEST_REGISTER("test-reconnect", test_reconnect_main);
diff --git a/tests/test-reconnect.py b/tests/test-reconnect.py
deleted file mode 100644
index 6cd052878..000000000
--- a/tests/test-reconnect.py
+++ /dev/null
@@ -1,231 +0,0 @@
-# Copyright (c) 2009, 2010, 2012 Nicira, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from __future__ import print_function
-
-import errno
-import sys
-
-import ovs.reconnect
-
-now = 0
-r = None
-
-
-def do_enable(_):
-    r.enable(now)
-
-
-def do_disable(_):
-    r.disable(now)
-
-
-def do_force_reconnect(_):
-    r.force_reconnect(now)
-
-
-def error_from_string(s):
-    if not s:
-        return 0
-    elif s == "ECONNREFUSED":
-        return errno.ECONNREFUSED
-    elif s == "EOF":
-        return ovs.reconnect.EOF
-    else:
-        sys.stderr.write("unknown error '%s'\n" % s)
-        sys.exit(1)
-
-
-def do_disconnected(arg):
-    r.disconnected(now, error_from_string(arg))
-
-
-def do_connecting(_):
-    r.connecting(now)
-
-
-def do_connect_failed(arg):
-    r.connect_failed(now, error_from_string(arg))
-
-
-def do_connected(_):
-    r.connected(now)
-
-
-def do_activity(_):
-    r.activity(now)
-
-
-def do_run(arg):
-    global now
-    if arg is not None:
-        now += int(arg)
-
-    action = r.run(now)
-    if action is None:
-        pass
-    elif action == ovs.reconnect.CONNECT:
-        print("  should connect")
-    elif action == ovs.reconnect.DISCONNECT:
-        print("  should disconnect")
-    elif action == ovs.reconnect.PROBE:
-        print("  should send probe")
-    else:
-        assert False
-
-
-def do_advance(arg):
-    global now
-    now += int(arg)
-
-
-def do_timeout(_):
-    global now
-    timeout = r.timeout(now)
-    if timeout is not None and timeout >= 0:
-        print("  advance %d ms" % timeout)
-        now += timeout
-    else:
-        print("  no timeout")
-
-
-def do_set_max_tries(arg):
-    r.set_max_tries(int(arg))
-
-
-def do_set_backoff_free_tries(arg):
-    r.set_backoff_free_tries(int(arg))
-
-
-def diff_stats(old, new, delta):
-    if (old.state != new.state or
-        old.state_elapsed != new.state_elapsed or
-        old.backoff != new.backoff):
-        print("  in %s for %d ms (%d ms backoff)"
-              % (new.state, new.state_elapsed, new.backoff))
-
-    if (old.creation_time != new.creation_time or
-        old.last_activity != new.last_activity or
-        old.last_connected != new.last_connected):
-        print("  created %d, last activity %d, last connected %d"
-              % (new.creation_time, new.last_activity, new.last_connected))
-
-    if (old.n_successful_connections != new.n_successful_connections or
-        old.n_attempted_connections != new.n_attempted_connections or
-        old.seqno != new.seqno):
-        print("  %d successful connections out of %d attempts, seqno %d"
-              % (new.n_successful_connections, new.n_attempted_connections,
-                 new.seqno))
-
-    if (old.is_connected != new.is_connected):
-        if new.is_connected:
-            negate = ""
-        else:
-            negate = "dis"
-        print("  %sconnected" % negate)
-
-    if (old.last_connected != new.last_connected or
-        (new.msec_since_connect is not None and
-         old.msec_since_connect != new.msec_since_connect - delta) or
-        (old.total_connected_duration != new.total_connected_duration - delta
-            and not (old.total_connected_duration == 0 and
-                new.total_connected_duration == 0))):
-        print("  last connected %d ms ago, connected %d ms total"
-              % (new.msec_since_connect, new.total_connected_duration))
-
-    if (old.last_disconnected != new.last_disconnected or
-        (new.msec_since_disconnect is not None and
-         old.msec_since_disconnect != new.msec_since_disconnect - delta)):
-        print("  disconnected at %d ms (%d ms ago)"
-              % (new.last_disconnected, new.msec_since_disconnect))
-
-
-def do_set_passive(_):
-    r.set_passive(True, now)
-
-
-def do_listening(_):
-    r.listening(now)
-
-
-def do_listen_error(arg):
-    r.listen_error(now, int(arg))
-
-
-def main():
-    commands = {
-        "enable": do_enable,
-        "disable": do_disable,
-        "force-reconnect": do_force_reconnect,
-        "disconnected": do_disconnected,
-        "connecting": do_connecting,
-        "connect-failed": do_connect_failed,
-        "connected": do_connected,
-        "activity": do_activity,
-        "run": do_run,
-        "advance": do_advance,
-        "timeout": do_timeout,
-        "set-max-tries": do_set_max_tries,
-        "set-backoff-free-tries": do_set_backoff_free_tries,
-        "passive": do_set_passive,
-        "listening": do_listening,
-        "listen-error": do_listen_error
-    }
-
-    global now
-    global r
-
-    now = 1000
-    r = ovs.reconnect.Reconnect(now)
-    r.set_name("remote")
-    prev = r.get_stats(now)
-    print("### t=%d ###" % now)
-    old_time = now
-    old_max_tries = r.get_max_tries()
-    while True:
-        line = sys.stdin.readline()
-        if line == "":
-            break
-
-        print(line[:-1])
-        if line[0] == "#":
-            continue
-
-        args = line.split()
-        if len(args) == 0:
-            continue
-
-        command = args[0]
-        if len(args) > 1:
-            op = args[1]
-        else:
-            op = None
-        commands[command](op)
-
-        if old_time != now:
-            print()
-            print("### t=%d ###" % now)
-
-        cur = r.get_stats(now)
-        diff_stats(prev, cur, now - old_time)
-        prev = cur
-        if r.get_max_tries() != old_max_tries:
-            old_max_tries = r.get_max_tries()
-            print("  %d tries left" % old_max_tries)
-
-        old_time = now
-
-
-if __name__ == '__main__':
-    main()
diff --git a/tests/test-rstp.c b/tests/test-rstp.c
deleted file mode 100644
index 01aeaf847..000000000
--- a/tests/test-rstp.c
+++ /dev/null
@@ -1,715 +0,0 @@
-#include <config.h>
-#undef NDEBUG
-#include "rstp-common.h"
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <inttypes.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include "openvswitch/ofpbuf.h"
-#include "ovstest.h"
-#include "dp-packet.h"
-#include "packets.h"
-#include "openvswitch/vlog.h"
-
-#define MAX_PORTS 10
-
-struct bpdu {
-    int port_no;
-    void *data;
-    size_t size;
-};
-
-struct bridge {
-    struct test_case *tc;
-    int id;
-    bool reached;
-
-    struct rstp *rstp;
-
-    struct lan *ports[RSTP_MAX_PORTS];
-    int n_ports;
-    int n_active_ports;
-
-#define RXQ_SIZE 16
-    struct bpdu rxq[RXQ_SIZE];
-    int rxq_head, rxq_tail;
-};
-
-struct lan_conn {
-    struct bridge *bridge;
-    int port_no;
-};
-
-struct lan {
-    struct test_case *tc;
-    const char *name;
-    bool reached;
-    struct lan_conn conns[16];
-    int n_conns;
-};
-
-struct test_case {
-    struct bridge *bridges[16];
-    int n_bridges;
-    struct lan *lans[26];
-    int n_lans;
-};
-
-static const char *file_name;
-static int line_number;
-static char line[128];
-static char *pos, *token;
-static int n_warnings;
-
-static struct test_case *
-new_test_case(void)
-{
-    struct test_case *tc = xmalloc(sizeof *tc);
-
-    tc->n_bridges = 0;
-    tc->n_lans = 0;
-    return tc;
-}
-
-/* This callback is called with rstp_mutex held. */
-static void
-send_bpdu(struct dp_packet *pkt, void *port_, void *b_)
-    OVS_REQUIRES(rstp_mutex)
-{
-    struct bridge *b = b_;
-    struct lan *lan;
-    const struct rstp_port *port = port_;
-    uint16_t port_no = port->port_number;
-
-    assert(port_no < b->n_ports);
-    lan = b->ports[port_no];
-    if (lan) {
-        const void *data = dp_packet_l3(pkt);
-        size_t size = (char *) dp_packet_tail(pkt) - (char *) data;
-        int i;
-
-        for (i = 0; i < lan->n_conns; i++) {
-            struct lan_conn *conn = &lan->conns[i];
-
-            if (conn->bridge != b || conn->port_no != port_no) {
-                struct bridge *dst = conn->bridge;
-                struct bpdu *bpdu = &dst->rxq[dst->rxq_head++ % RXQ_SIZE];
-
-                assert(dst->rxq_head - dst->rxq_tail <= RXQ_SIZE);
-                bpdu->data = xmemdup(data, size);
-                bpdu->size = size;
-                bpdu->port_no = conn->port_no;
-            }
-        }
-    }
-    dp_packet_delete(pkt);
-}
-
-static struct bridge *
-new_bridge(struct test_case *tc, int id)
-{
-    struct bridge *b = xmalloc(sizeof *b);
-    char name[16];
-    struct rstp_port *p;
-    int i;
-
-    b->tc = tc;
-    b->id = id;
-    snprintf(name, sizeof name, "rstp%x", id);
-    b->rstp = rstp_create(name, id, send_bpdu, b);
-    for (i = 1; i < MAX_PORTS; i++) {
-        p = rstp_add_port(b->rstp);
-        rstp_port_set_aux(p, p);
-        rstp_port_set_state(p, RSTP_DISABLED);
-        rstp_port_set_mac_operational(p, true);
-    }
-
-    assert(tc->n_bridges < ARRAY_SIZE(tc->bridges));
-    b->n_ports = 1;
-    b->n_active_ports = 1;
-    b->rxq_head = b->rxq_tail = 0;
-    tc->bridges[tc->n_bridges++] = b;
-    return b;
-}
-
-static struct lan *
-new_lan(struct test_case *tc, const char *name)
-{
-    struct lan *lan = xmalloc(sizeof *lan);
-    lan->tc = tc;
-    lan->name = xstrdup(name);
-    lan->n_conns = 0;
-    assert(tc->n_lans < ARRAY_SIZE(tc->lans));
-    tc->lans[tc->n_lans++] = lan;
-    return lan;
-}
-
-static void
-reconnect_port(struct bridge *b, int port_no, struct lan *new_lan)
-{
-    struct lan *old_lan;
-    int j;
-
-    assert(port_no < b->n_ports);
-    old_lan = b->ports[port_no];
-    if (old_lan == new_lan) {
-        return;
-    }
-
-    /* Disconnect from old_lan. */
-    if (old_lan) {
-        for (j = 0; j < old_lan->n_conns; j++) {
-            struct lan_conn *c = &old_lan->conns[j];
-
-            if (c->bridge == b && c->port_no == port_no) {
-                memmove(c, c + 1, sizeof *c * (old_lan->n_conns - j - 1));
-                old_lan->n_conns--;
-                break;
-            }
-        }
-    }
-
-    /* Connect to new_lan. */
-    b->ports[port_no] = new_lan;
-    if (new_lan) {
-        int conn_no = new_lan->n_conns++;
-
-        assert(conn_no < ARRAY_SIZE(new_lan->conns));
-        new_lan->conns[conn_no].bridge = b;
-        new_lan->conns[conn_no].port_no = port_no;
-    }
-}
-
-static void
-new_port(struct bridge *b, struct lan *lan, uint32_t path_cost)
-{
-    int port_no = b->n_ports++;
-    struct rstp_port *p = rstp_get_port(b->rstp, port_no);
-
-    assert(port_no < ARRAY_SIZE(b->ports));
-    b->ports[port_no] = NULL;
-    /* Enable port. */
-    reinitialize_port(p);
-    rstp_port_set_path_cost(p, path_cost);
-    rstp_port_set_state(p, RSTP_DISCARDING);
-    rstp_port_set_mac_operational(p, true);
-    reconnect_port(b, port_no, lan);
-}
-
-static void
-dump(struct test_case *tc)
-{
-    int i;
-
-    for (i = 0; i < tc->n_bridges; i++) {
-        struct bridge *b = tc->bridges[i];
-        struct rstp *rstp = b->rstp;
-        int j;
-
-        printf("%s:", rstp_get_name(rstp));
-        if (rstp_is_root_bridge(rstp)) {
-            printf(" root");
-        }
-        printf("\n");
-        for (j = 0; j < b->n_ports; j++) {
-            struct rstp_port *p = rstp_get_port(rstp, j);
-            enum rstp_state state = rstp_port_get_state(p);
-
-            printf("\tport %d", j);
-            if (b->ports[j]) {
-                printf(" (lan %s)", b->ports[j]->name);
-            } else {
-                printf(" (disconnected)");
-            }
-            printf(": %s", rstp_state_name(state));
-            if (p == rstp_get_root_port(rstp)) {
-                printf(" (root port, root_path_cost=%u)",
-                       rstp_get_root_path_cost(rstp));
-            }
-            printf("\n");
-        }
-    }
-}
-
-static void dump_lan_tree(struct test_case *, struct lan *, int level);
-
-static void
-dump_bridge_tree(struct test_case *tc, struct bridge *b, int level)
-{
-    int i;
-
-    if (b->reached) {
-        return;
-    }
-    b->reached = true;
-    for (i = 0; i < level; i++) {
-        printf("\t");
-    }
-    printf("%s\n", rstp_get_name(b->rstp));
-    for (i = 0; i < b->n_ports; i++) {
-        struct lan *lan = b->ports[i];
-        struct rstp_port *p = rstp_get_port(b->rstp, i);
-
-        if (rstp_port_get_state(p) == RSTP_FORWARDING && lan) {
-            dump_lan_tree(tc, lan, level + 1);
-        }
-    }
-}
-
-static void
-dump_lan_tree(struct test_case *tc, struct lan *lan, int level)
-{
-    int i;
-
-    if (lan->reached) {
-        return;
-    }
-    lan->reached = true;
-    for (i = 0; i < level; i++) {
-        printf("\t");
-    }
-    printf("%s\n", lan->name);
-    for (i = 0; i < lan->n_conns; i++) {
-        struct bridge *b = lan->conns[i].bridge;
-
-        dump_bridge_tree(tc, b, level + 1);
-    }
-}
-
-static void
-tree(struct test_case *tc)
-{
-    int i;
-
-    for (i = 0; i < tc->n_bridges; i++) {
-        struct bridge *b = tc->bridges[i];
-
-        b->reached = false;
-    }
-    for (i = 0; i < tc->n_lans; i++) {
-        struct lan *lan = tc->lans[i];
-
-        lan->reached = false;
-    }
-    for (i = 0; i < tc->n_bridges; i++) {
-        struct bridge *b = tc->bridges[i];
-        struct rstp *rstp = b->rstp;
-
-        if (rstp_is_root_bridge(rstp)) {
-            dump_bridge_tree(tc, b, 0);
-        }
-    }
-}
-
-static void
-simulate(struct test_case *tc, int granularity)
-{
-    int time, i, round_trips;
-
-    for (time = 0; time < 1000 * 180; time += granularity) {
-
-        for (i = 0; i < tc->n_bridges; i++) {
-            rstp_tick_timers(tc->bridges[i]->rstp);
-        }
-        for (round_trips = 0; round_trips < granularity; round_trips++) {
-            bool any = false;
-
-            for (i = 0; i < tc->n_bridges; i++) {
-                struct bridge *b = tc->bridges[i];
-
-                for (; b->rxq_tail != b->rxq_head; b->rxq_tail++) {
-                    struct bpdu *bpdu = &b->rxq[b->rxq_tail % RXQ_SIZE];
-
-                    rstp_port_received_bpdu(rstp_get_port(b->rstp,
-                                                          bpdu->port_no),
-                                            bpdu->data, bpdu->size);
-                    free(bpdu->data);
-                    any = true;
-                }
-            }
-            if (!any) {
-                break;
-            }
-        }
-    }
-}
-
-OVS_NO_RETURN static void
-err(const char *message, ...)
-    OVS_PRINTF_FORMAT(1, 2);
-
-static void
-err(const char *message, ...)
-{
-    va_list args;
-
-    fprintf(stderr, "%s:%d:%"PRIdPTR": ", file_name, line_number, pos - line);
-    va_start(args, message);
-    vfprintf(stderr, message, args);
-    va_end(args);
-    putc('\n', stderr);
-
-    exit(EXIT_FAILURE);
-}
-
-static void
-warn(const char *message, ...)
-    OVS_PRINTF_FORMAT(1, 2);
-
-static void
-warn(const char *message, ...)
-{
-    va_list args;
-
-    fprintf(stderr, "%s:%d: ", file_name, line_number);
-    va_start(args, message);
-    vfprintf(stderr, message, args);
-    va_end(args);
-    putc('\n', stderr);
-
-    n_warnings++;
-}
-
-static bool
-get_token(void)
-{
-    char *start;
-
-    while (isspace((unsigned char) *pos)) {
-        pos++;
-    }
-    if (*pos == '\0') {
-        free(token);
-        token = NULL;
-        return false;
-    }
-
-    start = pos;
-    if (isalpha((unsigned char) *pos)) {
-        while (isalpha((unsigned char) *++pos)) {
-            continue;
-        }
-    } else if (isdigit((unsigned char) *pos)) {
-        if (*pos == '0' && (pos[1] == 'x' || pos[1] == 'X')) {
-            pos += 2;
-            while (isxdigit((unsigned char) *pos)) {
-                pos++;
-            }
-        } else {
-            while (isdigit((unsigned char) *++pos)) {
-                continue;
-            }
-        }
-    } else {
-        pos++;
-    }
-
-    free(token);
-    token = xmemdup0(start, pos - start);
-    return true;
-}
-
-static bool
-get_int(int *intp)
-{
-    char *save_pos = pos;
-
-    if (token && isdigit((unsigned char) *token)) {
-        *intp = strtol(token, NULL, 0);
-        get_token();
-        return true;
-    } else {
-        pos = save_pos;
-        return false;
-    }
-}
-
-static bool
-match(const char *want)
-{
-    if (token && !strcmp(want, token)) {
-        get_token();
-        return true;
-    } else {
-        return false;
-    }
-}
-
-static int
-must_get_int(void)
-{
-    int x;
-
-    if (!get_int(&x)) {
-        err("expected integer");
-    }
-    return x;
-}
-
-static void
-must_match(const char *want)
-{
-    if (!match(want)) {
-        err("expected \"%s\"", want);
-    }
-}
-
-static void
-test_rstp_main(int argc, char *argv[])
-{
-    struct test_case *tc;
-    FILE *input_file;
-    int i;
-
-    vlog_set_pattern(VLF_CONSOLE, "%c|%p|%m");
-    vlog_set_levels(NULL, VLF_SYSLOG, VLL_OFF);
-
-    if (argc != 2) {
-        ovs_fatal(0, "usage: test-rstp INPUT.RSTP");
-    }
-    file_name = argv[1];
-
-    input_file = fopen(file_name, "r");
-    if (!input_file) {
-        ovs_fatal(errno, "error opening \"%s\"", file_name);
-    }
-
-    tc = new_test_case();
-    for (i = 0; i < 26; i++) {
-        char name[2];
-
-        name[0] = 'a' + i;
-        name[1] = '\0';
-        new_lan(tc, name);
-    }
-
-    for (line_number = 1; fgets(line, sizeof line, input_file);
-         line_number++)
-    {
-        char *newline, *hash;
-
-        newline = strchr(line, '\n');
-        if (newline) {
-            *newline = '\0';
-        }
-        hash = strchr(line, '#');
-        if (hash) {
-            *hash = '\0';
-        }
-
-        pos = line;
-        if (!get_token()) {
-            continue;
-        }
-        if (match("bridge")) {
-            struct bridge *bridge;
-            int bridge_no, port_no;
-
-            bridge_no = must_get_int();
-            if (bridge_no < tc->n_bridges) {
-                bridge = tc->bridges[bridge_no];
-            } else if (bridge_no == tc->n_bridges) {
-                bridge = new_bridge(tc, must_get_int());
-            } else {
-                err("bridges must be numbered consecutively from 0");
-            }
-            if (match("^")) {
-                rstp_set_bridge_priority(bridge->rstp, must_get_int());
-            }
-            if (match("=")) {
-                for (port_no = 1; port_no < MAX_PORTS; port_no++) {
-                    struct rstp_port *p = rstp_get_port(bridge->rstp, port_no);
-
-                    if (!token || match("X")) {
-                        /* Disable port. */
-                        reinitialize_port(p);
-                        rstp_port_set_state(p, RSTP_DISABLED);
-                        rstp_port_set_mac_operational(p, false);
-                    } else if (match("_")) {
-                        /* Nothing to do. */
-                    } else {
-                        struct lan *lan;
-                        uint32_t path_cost;
-
-                        if (!strcmp(token, "0")) {
-                            lan = NULL;
-                        } else if (strlen(token) == 1
-                                && islower((unsigned char)*token)) {
-                            lan = tc->lans[*token - 'a'];
-                        } else {
-                            err("%s is not a valid LAN name "
-                                "(0 or a lowercase letter)", token);
-                        }
-                        get_token();
-
-                        path_cost = match(":") ? must_get_int() :
-                                                 RSTP_DEFAULT_PORT_PATH_COST;
-                        if (port_no < bridge->n_ports) {
-                            /* Enable port. */
-                            reinitialize_port(p);
-                            rstp_port_set_path_cost(p, path_cost);
-                            rstp_port_set_state(p, RSTP_DISCARDING);
-                            rstp_port_set_mac_operational(p, true);
-                            reconnect_port(bridge, port_no, lan);
-                        } else if (port_no == bridge->n_ports) {
-                            new_port(bridge, lan, path_cost);
-                            bridge->n_active_ports++;
-                        } else {
-                            err("ports must be numbered consecutively");
-                        }
-                        if (match("^")) {
-                            rstp_port_set_priority(p, must_get_int());
-                        }
-                    }
-                }
-            }
-        } else if (match("run")) {
-            simulate(tc, must_get_int());
-        } else if (match("dump")) {
-            dump(tc);
-        } else if (match("tree")) {
-            tree(tc);
-        } else if (match("check")) {
-            struct bridge *b;
-            struct rstp *rstp;
-            int bridge_no, port_no;
-            uint32_t cost_value;
-
-            bridge_no = must_get_int();
-            if (bridge_no >= tc->n_bridges) {
-                err("no bridge numbered %d", bridge_no);
-            }
-            b = tc->bridges[bridge_no];
-            rstp = b->rstp;
-
-            must_match("=");
-
-            if (match("rootid")) {
-                uint64_t rootid;
-
-                must_match(":");
-                rootid = must_get_int();
-                if (match("^")) {
-                    rootid |= (uint64_t) must_get_int() << 48;
-                } else {
-                    rootid |= UINT64_C(0x8000) << 48;
-                }
-                if (rstp_get_designated_root(rstp) != rootid) {
-                    warn("%s: root "RSTP_ID_FMT", not %"PRIx64,
-                         rstp_get_name(rstp),
-                         RSTP_ID_ARGS(rstp_get_designated_root(rstp)),
-                         rootid);
-                }
-            }
-            cost_value = rstp_get_root_path_cost(rstp);
-            if (match("root")) {
-                if (cost_value != 0) {
-                    warn("%s: root path cost of root is %d instead of 0 \n",
-                         rstp_get_name(rstp), cost_value);
-                }
-                if (!rstp_is_root_bridge(rstp)) {
-                    warn("%s: root is "RSTP_ID_FMT", not "RSTP_ID_FMT"",
-                         rstp_get_name(rstp),
-                         RSTP_ID_ARGS(rstp_get_designated_root(rstp)),
-                         RSTP_ID_ARGS(rstp_get_bridge_id(rstp)));
-                }
-                for (port_no = 1; port_no < b->n_active_ports; port_no++) {
-                    struct rstp_port *p = rstp_get_port(rstp, port_no);
-                    enum rstp_state state = rstp_port_get_state(p);
-
-                    if (state != RSTP_DISABLED && state != RSTP_FORWARDING) {
-                        warn("%s: root port %d in state %s",
-                             rstp_get_name(b->rstp), port_no,
-                             rstp_state_name(state));
-                    }
-                }
-            } else {
-                for (port_no = 1; port_no < b->n_active_ports; port_no++) {
-                    struct rstp_port *p = rstp_get_port(rstp, port_no);
-                    enum rstp_state state;
-
-                    if (token == NULL || match("D")) {
-                        state = RSTP_DISABLED;
-                    } else if (match("Di")) {
-                        state = RSTP_DISCARDING;
-                    } else if (match("Le")) {
-                        state = RSTP_LEARNING;
-                    } else if (match("F")) {
-                        state = RSTP_FORWARDING;
-                    } else if (match("_")) {
-                        continue;
-                    } else {
-                        err("unknown port state %s", token);
-                    }
-                    if (rstp_port_get_state(p) != state) {
-                        warn("%s port %d: state is %s but should be %s",
-                             rstp_get_name(rstp), port_no,
-                             rstp_state_name(rstp_port_get_state(p)),
-                             rstp_state_name(state));
-                    }
-                    if (state == RSTP_FORWARDING) {
-                        struct rstp_port *root_port = rstp_get_root_port(rstp);
-
-                        if (match(":")) {
-                            int root_path_cost = must_get_int();
-
-                            if (p != root_port) {
-                                warn("%s: port %d is not the root port",
-                                     rstp_get_name(rstp), port_no);
-                                if (!root_port) {
-                                    warn("%s: (there is no root port)",
-                                         rstp_get_name(rstp));
-                                } else {
-                                    warn("%s: (port %d is the root port)",
-                                         rstp_get_name(rstp),
-                                         rstp_port_get_number(root_port));
-                                }
-                            } else if (cost_value != root_path_cost) {
-                                warn("%s: root path cost is %d, should be %d",
-                                     rstp_get_name(rstp),
-                                     cost_value,
-                                     root_path_cost);
-                            }
-                        } else if (p == root_port) {
-                            warn("%s: port %d is the root port but "
-                                 "not expected to be",
-                                 rstp_get_name(rstp), port_no);
-                        }
-                    }
-                }
-            }
-            if (n_warnings) {
-                printf("failing because of %d warnings\n", n_warnings);
-                exit(EXIT_FAILURE);
-            }
-        }
-        if (get_token()) {
-            printf("failing because of errors\n");
-            err("trailing garbage on line");
-        }
-    }
-    free(token);
-    fclose(input_file);
-
-    for (i = 0; i < tc->n_lans; i++) {
-        struct lan *lan = tc->lans[i];
-
-        free(CONST_CAST(char *, lan->name));
-        free(lan);
-    }
-    for (i = 0; i < tc->n_bridges; i++) {
-        struct bridge *bridge = tc->bridges[i];
-        int j;
-
-        for (j = 1; j < MAX_PORTS; j++) {
-            rstp_port_unref(rstp_get_port(bridge->rstp, j));
-        }
-        rstp_unref(bridge->rstp);
-        free(bridge);
-    }
-    free(tc);
-}
-
-OVSTEST_REGISTER("test-rstp", test_rstp_main);
diff --git a/tests/test-sflow.c b/tests/test-sflow.c
deleted file mode 100644
index 460d4d6c5..000000000
--- a/tests/test-sflow.c
+++ /dev/null
@@ -1,814 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
- * Copyright (c) 2013 InMon Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "netflow.h"
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <errno.h>
-#include <getopt.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <setjmp.h>
-#include "command-line.h"
-#include "daemon.h"
-#include "openvswitch/dynamic-string.h"
-#include "openvswitch/ofpbuf.h"
-#include "ovstest.h"
-#include "packets.h"
-#include "openvswitch/poll-loop.h"
-#include "socket-util.h"
-#include "unixctl.h"
-#include "util.h"
-#include "openvswitch/vlog.h"
-
-OVS_NO_RETURN static void usage(void);
-static void parse_options(int argc, char *argv[]);
-
-static unixctl_cb_func test_sflow_exit;
-
-/* Datagram. */
-#define SFLOW_VERSION_5 5
-#define SFLOW_MIN_LEN 36
-
-/* Sample tag numbers. */
-#define SFLOW_FLOW_SAMPLE 1
-#define SFLOW_COUNTERS_SAMPLE 2
-#define SFLOW_FLOW_SAMPLE_EXPANDED 3
-#define SFLOW_COUNTERS_SAMPLE_EXPANDED 4
-
-/* Structure element tag numbers. */
-#define SFLOW_TAG_CTR_IFCOUNTERS 1
-#define SFLOW_TAG_CTR_ETHCOUNTERS 2
-#define SFLOW_TAG_CTR_LACPCOUNTERS 7
-#define SFLOW_TAG_CTR_OPENFLOWPORT 1004
-#define SFLOW_TAG_CTR_PORTNAME 1005
-#define SFLOW_TAG_PKT_HEADER 1
-#define SFLOW_TAG_PKT_SWITCH 1001
-#define SFLOW_TAG_PKT_TUNNEL4_OUT 1023
-#define SFLOW_TAG_PKT_TUNNEL4_IN 1024
-#define SFLOW_TAG_PKT_TUNNEL_VNI_OUT 1029
-#define SFLOW_TAG_PKT_TUNNEL_VNI_IN 1030
-#define SFLOW_TAG_PKT_MPLS 1006
-
-/* string sizes */
-#define SFL_MAX_PORTNAME_LEN 255
-
-struct sflow_addr {
-    enum {
-        SFLOW_ADDRTYPE_undefined = 0,
-        SFLOW_ADDRTYPE_IP4,
-        SFLOW_ADDRTYPE_IP6
-    } type;
-
-    union {
-        ovs_be32 ip4;
-        ovs_be32 ip6[4];
-    } a;
-};
-
-struct sflow_xdr {
-    /* Exceptions. */
-    jmp_buf env;
-    int errline;
-
-    /* Cursor. */
-    ovs_be32 *datap;
-    uint32_t i;
-    uint32_t quads;
-
-    /* Agent. */
-    struct sflow_addr agentAddr;
-    char agentIPStr[INET6_ADDRSTRLEN + 2];
-    uint32_t subAgentId;
-    uint32_t uptime_mS;
-
-    /* Datasource. */
-    uint32_t dsClass;
-    uint32_t dsIndex;
-
-    /* Sequence numbers. */
-    uint32_t dgramSeqNo;
-    uint32_t fsSeqNo;
-    uint32_t csSeqNo;
-
-    /* Structure offsets. */
-    struct {
-        uint32_t HEADER;
-        uint32_t SWITCH;
-        uint32_t TUNNEL4_OUT;
-        uint32_t TUNNEL4_IN;
-        uint32_t TUNNEL_VNI_OUT;
-        uint32_t TUNNEL_VNI_IN;
-        uint32_t MPLS;
-        uint32_t IFCOUNTERS;
-        uint32_t ETHCOUNTERS;
-        uint32_t LACPCOUNTERS;
-        uint32_t OPENFLOWPORT;
-        uint32_t PORTNAME;
-    } offset;
-
-    /* Flow sample fields. */
-    uint32_t meanSkipCount;
-    uint32_t samplePool;
-    uint32_t dropEvents;
-    uint32_t inputPortFormat;
-    uint32_t inputPort;
-    uint32_t outputPortFormat;
-    uint32_t outputPort;
-};
-
-#define SFLOWXDR_try(x) ((x->errline = setjmp(x->env)) == 0)
-#define SFLOWXDR_throw(x) longjmp(x->env, __LINE__)
-#define SFLOWXDR_assert(x, t) if (!(t)) SFLOWXDR_throw(x)
-
-static void
-sflowxdr_init(struct sflow_xdr *x, void *buf, size_t len)
-{
-    x->datap = buf;
-    x->quads = len >> 2;
-}
-
-static uint32_t
-sflowxdr_next(struct sflow_xdr *x)
-{
-    return ntohl(x->datap[x->i++]);
-}
-
-static ovs_be32
-sflowxdr_next_n(struct sflow_xdr *x)
-{
-    return x->datap[x->i++];
-}
-
-static bool
-sflowxdr_more(const struct sflow_xdr *x, uint32_t q)
-{
-    return q + x->i <= x->quads;
-}
-
-static void
-sflowxdr_skip(struct sflow_xdr *x, uint32_t q)
-{
-    x->i += q;
-}
-
-static uint32_t
-sflowxdr_mark(const struct sflow_xdr *x, uint32_t q)
-{
-    return x->i + q;
-}
-
-static bool
-sflowxdr_mark_ok(const struct sflow_xdr *x, uint32_t m)
-{
-    return m == x->i;
-}
-
-static void
-sflowxdr_mark_unique(struct sflow_xdr *x, uint32_t *pi)
-{
-    if (*pi) {
-        SFLOWXDR_throw(x);
-    }
-    *pi = x->i;
-}
-
-static void
-sflowxdr_setc(struct sflow_xdr *x, uint32_t j)
-{
-    x->i = j;
-}
-
-static const char *
-sflowxdr_str(const struct sflow_xdr *x)
-{
-    return (const char *) (x->datap + x->i);
-}
-
-static uint64_t
-sflowxdr_next_int64(struct sflow_xdr *x)
-{
-    uint64_t scratch;
-    scratch = sflowxdr_next(x);
-    scratch <<= 32;
-    scratch += sflowxdr_next(x);
-    return scratch;
-}
-
-static void
-process_counter_sample(struct sflow_xdr *x)
-{
-    if (x->offset.IFCOUNTERS) {
-        sflowxdr_setc(x, x->offset.IFCOUNTERS);
-        printf("IFCOUNTERS");
-        printf(" dgramSeqNo=%"PRIu32, x->dgramSeqNo);
-        printf(" ds=%s>%"PRIu32":%"PRIu32,
-               x->agentIPStr, x->dsClass, x->dsIndex);
-        printf(" csSeqNo=%"PRIu32, x->csSeqNo);
-        printf(" ifindex=%"PRIu32, sflowxdr_next(x));
-        printf(" type=%"PRIu32, sflowxdr_next(x));
-        printf(" ifspeed=%"PRIu64, sflowxdr_next_int64(x));
-        printf(" direction=%"PRIu32, sflowxdr_next(x));
-        printf(" status=%"PRIu32, sflowxdr_next(x));
-        printf(" in_octets=%"PRIu64, sflowxdr_next_int64(x));
-        printf(" in_unicasts=%"PRIu32, sflowxdr_next(x));
-        printf(" in_multicasts=%"PRIu32, sflowxdr_next(x));
-        printf(" in_broadcasts=%"PRIu32, sflowxdr_next(x));
-        printf(" in_discards=%"PRIu32, sflowxdr_next(x));
-        printf(" in_errors=%"PRIu32, sflowxdr_next(x));
-        printf(" in_unknownprotos=%"PRIu32, sflowxdr_next(x));
-        printf(" out_octets=%"PRIu64, sflowxdr_next_int64(x));
-        printf(" out_unicasts=%"PRIu32, sflowxdr_next(x));
-        printf(" out_multicasts=%"PRIu32, sflowxdr_next(x));
-        printf(" out_broadcasts=%"PRIu32, sflowxdr_next(x));
-        printf(" out_discards=%"PRIu32, sflowxdr_next(x));
-        printf(" out_errors=%"PRIu32, sflowxdr_next(x));
-        printf(" promiscuous=%"PRIu32, sflowxdr_next(x));
-        printf("\n");
-    }
-    if (x->offset.LACPCOUNTERS) {
-        struct eth_addr *mac;
-        union {
-            ovs_be32 all;
-            struct {
-                uint8_t actorAdmin;
-                uint8_t actorOper;
-                uint8_t partnerAdmin;
-                uint8_t partnerOper;
-            } v;
-        } state;
-
-        sflowxdr_setc(x, x->offset.LACPCOUNTERS);
-        printf("LACPCOUNTERS");
-        mac = (void *)sflowxdr_str(x);
-        printf(" sysID="ETH_ADDR_FMT, ETH_ADDR_ARGS(*mac));
-        sflowxdr_skip(x, 2);
-        mac = (void *)sflowxdr_str(x);
-        printf(" partnerID="ETH_ADDR_FMT, ETH_ADDR_ARGS(*mac));
-        sflowxdr_skip(x, 2);
-        printf(" aggID=%"PRIu32, sflowxdr_next(x));
-        state.all = sflowxdr_next_n(x);
-        printf(" actorAdmin=0x%"PRIx32, state.v.actorAdmin);
-        printf(" actorOper=0x%"PRIx32, state.v.actorOper);
-        printf(" partnerAdmin=0x%"PRIx32, state.v.partnerAdmin);
-        printf(" partnerOper=0x%"PRIx32, state.v.partnerOper);
-        printf(" LACPDUsRx=%"PRIu32, sflowxdr_next(x));
-        printf(" markerPDUsRx=%"PRIu32, sflowxdr_next(x));
-        printf(" markerRespPDUsRx=%"PRIu32, sflowxdr_next(x));
-        printf(" unknownRx=%"PRIu32, sflowxdr_next(x));
-        printf(" illegalRx=%"PRIu32, sflowxdr_next(x));
-        printf(" LACPDUsTx=%"PRIu32, sflowxdr_next(x));
-        printf(" markerPDUsTx=%"PRIu32, sflowxdr_next(x));
-        printf(" markerRespPDUsTx=%"PRIu32, sflowxdr_next(x));
-        printf("\n");
-    }
-    if (x->offset.OPENFLOWPORT) {
-        sflowxdr_setc(x, x->offset.OPENFLOWPORT);
-        printf("OPENFLOWPORT");
-        printf(" datapath_id=%"PRIu64, sflowxdr_next_int64(x));
-        printf(" port_no=%"PRIu32, sflowxdr_next(x));
-        printf("\n");
-    }
-    if (x->offset.PORTNAME) {
-        uint32_t pnLen;
-        const char *pnBytes;
-        char portName[SFL_MAX_PORTNAME_LEN + 1];
-        sflowxdr_setc(x, x->offset.PORTNAME);
-        printf("PORTNAME");
-        pnLen = sflowxdr_next(x);
-        SFLOWXDR_assert(x, (pnLen <= SFL_MAX_PORTNAME_LEN));
-        pnBytes = sflowxdr_str(x);
-        memcpy(portName, pnBytes, pnLen);
-        portName[pnLen] = '\0';
-        printf(" portName=%s", portName);
-        printf("\n");
-    }
-    if (x->offset.ETHCOUNTERS) {
-        sflowxdr_setc(x, x->offset.ETHCOUNTERS);
-        printf("ETHCOUNTERS");
-        printf(" dot3StatsAlignmentErrors=%"PRIu32, sflowxdr_next(x));
-        printf(" dot3StatsFCSErrors=%"PRIu32, sflowxdr_next(x));
-        printf(" dot3StatsSingleCollisionFrames=%"PRIu32, sflowxdr_next(x));
-        printf(" dot3StatsMultipleCollisionFrames=%"PRIu32, sflowxdr_next(x));
-        printf(" dot3StatsSQETestErrors=%"PRIu32, sflowxdr_next(x));
-        printf(" dot3StatsDeferredTransmissions=%"PRIu32, sflowxdr_next(x));
-        printf(" dot3StatsLateCollisions=%"PRIu32, sflowxdr_next(x));
-        printf(" dot3StatsExcessiveCollisions=%"PRIu32, sflowxdr_next(x));
-        printf(" dot3StatsInternalMacTransmitErrors=%"PRIu32,
-               sflowxdr_next(x));
-        printf(" dot3StatsCarrierSenseErrors=%"PRIu32, sflowxdr_next(x));
-        printf(" dot3StatsFrameTooLongs=%"PRIu32, sflowxdr_next(x));
-        printf(" dot3StatsInternalMacReceiveErrors=%"PRIu32, sflowxdr_next(x));
-        printf(" dot3StatsSymbolErrors=%"PRIu32, sflowxdr_next(x));
-        printf("\n");
-    }
-}
-
-static char
-bin_to_hex(int hexit)
-{
-    return "0123456789ABCDEF"[hexit];
-}
-
-static int
-print_hex(const char *a, int len, char *buf, int bufLen)
-{
-    unsigned char nextByte;
-    int b = 0;
-    int i;
-
-    for (i = 0; i < len; i++) {
-        if (b > bufLen - 10) {
-            break;
-        }
-        nextByte = a[i];
-        buf[b++] = bin_to_hex(nextByte >> 4);
-        buf[b++] = bin_to_hex(nextByte & 0x0f);
-        if (i < len - 1) {
-            buf[b++] = '-';
-        }
-    }
-    buf[b] = '\0';
-    return b;
-}
-
-static void
-print_struct_ipv4(struct sflow_xdr *x, const char *prefix)
-{
-    ovs_be32 src, dst;
-
-    printf(" %s_length=%"PRIu32,    prefix, sflowxdr_next(x));
-    printf(" %s_protocol=%"PRIu32,  prefix, sflowxdr_next(x));
-
-    src = sflowxdr_next_n(x);
-    dst = sflowxdr_next_n(x);
-    printf(" %s_src="IP_FMT,        prefix, IP_ARGS(src));
-    printf(" %s_dst="IP_FMT,        prefix, IP_ARGS(dst));
-
-    printf(" %s_src_port=%"PRIu32,  prefix, sflowxdr_next(x));
-    printf(" %s_dst_port=%"PRIu32,  prefix, sflowxdr_next(x));
-    printf(" %s_tcp_flags=%"PRIu32, prefix, sflowxdr_next(x));
-    printf(" %s_tos=%"PRIu32,       prefix, sflowxdr_next(x));
-}
-
-#define SFLOW_HEX_SCRATCH 1024
-
-static void
-process_flow_sample(struct sflow_xdr *x)
-{
-    if (x->offset.HEADER) {
-        uint32_t headerLen;
-        char scratch[SFLOW_HEX_SCRATCH];
-
-        printf("HEADER");
-        printf(" dgramSeqNo=%"PRIu32, x->dgramSeqNo);
-        printf(" ds=%s>%"PRIu32":%"PRIu32,
-               x->agentIPStr, x->dsClass, x->dsIndex);
-        printf(" fsSeqNo=%"PRIu32, x->fsSeqNo);
-
-        if (x->offset.TUNNEL4_IN) {
-            sflowxdr_setc(x, x->offset.TUNNEL4_IN);
-            print_struct_ipv4(x, "tunnel4_in");
-        }
-
-        if (x->offset.TUNNEL4_OUT) {
-            sflowxdr_setc(x, x->offset.TUNNEL4_OUT);
-            print_struct_ipv4(x, "tunnel4_out");
-        }
-
-        if (x->offset.TUNNEL_VNI_IN) {
-            sflowxdr_setc(x, x->offset.TUNNEL_VNI_IN);
-            printf( " tunnel_in_vni=%"PRIu32, sflowxdr_next(x));
-        }
-
-        if (x->offset.TUNNEL_VNI_OUT) {
-            sflowxdr_setc(x, x->offset.TUNNEL_VNI_OUT);
-            printf( " tunnel_out_vni=%"PRIu32, sflowxdr_next(x));
-        }
-
-        if (x->offset.MPLS) {
-            uint32_t addr_type, stack_depth, ii;
-            ovs_be32 mpls_lse;
-            sflowxdr_setc(x, x->offset.MPLS);
-            /* OVS only sets the out_stack. The rest will be blank. */
-            /* skip next hop address */
-            addr_type = sflowxdr_next(x);
-            sflowxdr_skip(x, addr_type == SFLOW_ADDRTYPE_IP6 ? 4 : 1);
-            /* skip in_stack */
-            stack_depth = sflowxdr_next(x);
-            sflowxdr_skip(x, stack_depth);
-            /* print out_stack */
-            stack_depth = sflowxdr_next(x);
-            for(ii = 0; ii < stack_depth; ii++) {
-                mpls_lse=sflowxdr_next_n(x);
-                printf(" mpls_label_%"PRIu32"=%"PRIu32,
-                       ii, mpls_lse_to_label(mpls_lse));
-                printf(" mpls_tc_%"PRIu32"=%"PRIu32,
-                       ii, mpls_lse_to_tc(mpls_lse));
-                printf(" mpls_ttl_%"PRIu32"=%"PRIu32,
-                       ii, mpls_lse_to_ttl(mpls_lse));
-                printf(" mpls_bos_%"PRIu32"=%"PRIu32,
-                       ii, mpls_lse_to_bos(mpls_lse));
-            }
-        }
-
-        if (x->offset.SWITCH) {
-            sflowxdr_setc(x, x->offset.SWITCH);
-            printf(" in_vlan=%"PRIu32, sflowxdr_next(x));
-            printf(" in_priority=%"PRIu32, sflowxdr_next(x));
-            printf(" out_vlan=%"PRIu32, sflowxdr_next(x));
-            printf(" out_priority=%"PRIu32, sflowxdr_next(x));
-        }
-
-        sflowxdr_setc(x, x->offset.HEADER);
-        printf(" meanSkip=%"PRIu32, x->meanSkipCount);
-        printf(" samplePool=%"PRIu32, x->samplePool);
-        printf(" dropEvents=%"PRIu32, x->dropEvents);
-        printf(" in_ifindex=%"PRIu32, x->inputPort);
-        printf(" in_format=%"PRIu32, x->inputPortFormat);
-        printf(" out_ifindex=%"PRIu32, x->outputPort);
-        printf(" out_format=%"PRIu32, x->outputPortFormat);
-        printf(" hdr_prot=%"PRIu32, sflowxdr_next(x));
-        printf(" pkt_len=%"PRIu32, sflowxdr_next(x));
-        printf(" stripped=%"PRIu32, sflowxdr_next(x));
-        headerLen = sflowxdr_next(x);
-        printf(" hdr_len=%"PRIu32, headerLen);
-        print_hex(sflowxdr_str(x), headerLen, scratch, SFLOW_HEX_SCRATCH);
-        printf(" hdr=%s", scratch);
-        printf("\n");
-    }
-}
-
-static void
-process_datagram(struct sflow_xdr *x)
-{
-    uint32_t samples, s;
-
-    SFLOWXDR_assert(x, (sflowxdr_next(x) == SFLOW_VERSION_5));
-
-    /* Read the sFlow header. */
-    x->agentAddr.type = sflowxdr_next(x);
-    switch (x->agentAddr.type) {
-    case SFLOW_ADDRTYPE_IP4:
-        x->agentAddr.a.ip4 = sflowxdr_next_n(x);
-        break;
-
-    case SFLOW_ADDRTYPE_IP6:
-        x->agentAddr.a.ip6[0] = sflowxdr_next_n(x);
-        x->agentAddr.a.ip6[1] = sflowxdr_next_n(x);
-        x->agentAddr.a.ip6[2] = sflowxdr_next_n(x);
-        x->agentAddr.a.ip6[3] = sflowxdr_next_n(x);
-        break;
-
-    case SFLOW_ADDRTYPE_undefined:
-    default:
-        SFLOWXDR_throw(x);
-        break;
-    }
-    x->subAgentId = sflowxdr_next(x);
-    x->dgramSeqNo = sflowxdr_next(x);
-    x->uptime_mS = sflowxdr_next(x);
-
-    /* Store the agent address as a string. */
-    if (x->agentAddr.type == SFLOW_ADDRTYPE_IP6) {
-        char ipstr[INET6_ADDRSTRLEN];
-        inet_ntop(AF_INET6, (const void *) &x->agentAddr.a.ip6,
-                  ipstr, INET6_ADDRSTRLEN);
-        snprintf(x->agentIPStr, sizeof x->agentIPStr, "[%s]", ipstr);
-    } else {
-        snprintf(x->agentIPStr, sizeof x->agentIPStr,
-                 IP_FMT, IP_ARGS(x->agentAddr.a.ip4));
-    }
-
-    /* Array of flow/counter samples. */
-    samples = sflowxdr_next(x);
-    for (s = 0; s < samples; s++) {
-        uint32_t sType = sflowxdr_next(x);
-        uint32_t sQuads = sflowxdr_next(x) >> 2;
-        uint32_t sMark = sflowxdr_mark(x, sQuads);
-        SFLOWXDR_assert(x, sflowxdr_more(x, sQuads));
-
-        switch (sType) {
-        case SFLOW_COUNTERS_SAMPLE_EXPANDED:
-        case SFLOW_COUNTERS_SAMPLE:
-        {
-            uint32_t csElements, e;
-            uint32_t ceTag, ceQuads, ceMark, csEnd;
-
-            x->csSeqNo = sflowxdr_next(x);
-            if (sType == SFLOW_COUNTERS_SAMPLE_EXPANDED) {
-                x->dsClass = sflowxdr_next(x);
-                x->dsIndex = sflowxdr_next(x);
-            } else {
-                uint32_t dsCombined = sflowxdr_next(x);
-                x->dsClass = dsCombined >> 24;
-                x->dsIndex = dsCombined & 0x00FFFFFF;
-            }
-
-            csElements = sflowxdr_next(x);
-            for (e = 0; e < csElements; e++) {
-                SFLOWXDR_assert(x, sflowxdr_more(x,2));
-                ceTag = sflowxdr_next(x);
-                ceQuads = sflowxdr_next(x) >> 2;
-                ceMark = sflowxdr_mark(x, ceQuads);
-                SFLOWXDR_assert(x, sflowxdr_more(x,ceQuads));
-                /* Only care about selected structures.  Just record their
-                 * offsets here. We'll read the fields out later. */
-                switch (ceTag) {
-                case SFLOW_TAG_CTR_IFCOUNTERS:
-                    sflowxdr_mark_unique(x, &x->offset.IFCOUNTERS);
-                    break;
-                case SFLOW_TAG_CTR_ETHCOUNTERS:
-                    sflowxdr_mark_unique(x, &x->offset.ETHCOUNTERS);
-                    break;
-                case SFLOW_TAG_CTR_LACPCOUNTERS:
-                    sflowxdr_mark_unique(x, &x->offset.LACPCOUNTERS);
-                    break;
-                case SFLOW_TAG_CTR_PORTNAME:
-                    sflowxdr_mark_unique(x, &x->offset.PORTNAME);
-                    break;
-                case SFLOW_TAG_CTR_OPENFLOWPORT:
-                    sflowxdr_mark_unique(x, &x->offset.OPENFLOWPORT);
-                    break;
-
-                    /* Add others here... */
-                }
-
-                sflowxdr_skip(x, ceQuads);
-                SFLOWXDR_assert(x, sflowxdr_mark_ok(x, ceMark));
-            }
-
-            csEnd = sflowxdr_mark(x, 0);
-            process_counter_sample(x);
-            /* Make sure we pick up the decoding where we left off. */
-            sflowxdr_setc(x, csEnd);
-
-            /* Clear the offsets for the next sample. */
-            memset(&x->offset, 0, sizeof x->offset);
-        }
-        break;
-
-        case SFLOW_FLOW_SAMPLE:
-        case SFLOW_FLOW_SAMPLE_EXPANDED:
-        {
-            uint32_t fsElements, e;
-            uint32_t feTag, feQuads, feMark, fsEnd;
-            x->fsSeqNo = sflowxdr_next(x);
-            if (sType == SFLOW_FLOW_SAMPLE_EXPANDED) {
-                x->dsClass = sflowxdr_next(x);
-                x->dsIndex = sflowxdr_next(x);
-            } else {
-                uint32_t dsCombined = sflowxdr_next(x);
-                x->dsClass = dsCombined >> 24;
-                x->dsIndex = dsCombined & 0x00FFFFFF;
-            }
-            x->meanSkipCount = sflowxdr_next(x);
-            x->samplePool = sflowxdr_next(x);
-            x->dropEvents = sflowxdr_next(x);
-            if (sType == SFLOW_FLOW_SAMPLE_EXPANDED) {
-                x->inputPortFormat = sflowxdr_next(x);
-                x->inputPort = sflowxdr_next(x);
-                x->outputPortFormat = sflowxdr_next(x);
-                x->outputPort = sflowxdr_next(x);
-            } else {
-                uint32_t inp, outp;
-
-                inp = sflowxdr_next(x);
-                outp = sflowxdr_next(x);
-                x->inputPortFormat = inp >> 30;
-                x->inputPort = inp & 0x3fffffff;
-                x->outputPortFormat = outp >> 30;
-                x->outputPort = outp & 0x3fffffff;
-            }
-            fsElements = sflowxdr_next(x);
-            for (e = 0; e < fsElements; e++) {
-                SFLOWXDR_assert(x, sflowxdr_more(x,2));
-                feTag = sflowxdr_next(x);
-                feQuads = sflowxdr_next(x) >> 2;
-                feMark = sflowxdr_mark(x, feQuads);
-                SFLOWXDR_assert(x, sflowxdr_more(x,feQuads));
-                /* Only care about selected structures.  Just record their
-                 * offsets here. We'll read the fields out below. */
-                switch (feTag) {
-                case SFLOW_TAG_PKT_HEADER:
-                    sflowxdr_mark_unique(x, &x->offset.HEADER);
-                    break;
-
-                case SFLOW_TAG_PKT_SWITCH:
-                    sflowxdr_mark_unique(x, &x->offset.SWITCH);
-                    break;
-
-                case SFLOW_TAG_PKT_TUNNEL4_OUT:
-                    sflowxdr_mark_unique(x, &x->offset.TUNNEL4_OUT);
-                    break;
-
-                case SFLOW_TAG_PKT_TUNNEL4_IN:
-                    sflowxdr_mark_unique(x, &x->offset.TUNNEL4_IN);
-                    break;
-
-                case SFLOW_TAG_PKT_TUNNEL_VNI_OUT:
-                    sflowxdr_mark_unique(x, &x->offset.TUNNEL_VNI_OUT);
-                    break;
-
-                case SFLOW_TAG_PKT_TUNNEL_VNI_IN:
-                    sflowxdr_mark_unique(x, &x->offset.TUNNEL_VNI_IN);
-                    break;
-
-                case SFLOW_TAG_PKT_MPLS:
-                    sflowxdr_mark_unique(x, &x->offset.MPLS);
-                    break;
-
-                    /* Add others here... */
-                }
-
-                sflowxdr_skip(x, feQuads);
-                SFLOWXDR_assert(x, sflowxdr_mark_ok(x, feMark));
-            }
-
-            fsEnd = sflowxdr_mark(x, 0);
-            process_flow_sample(x);
-            /* Make sure we pick up the decoding where we left off. */
-            sflowxdr_setc(x, fsEnd);
-
-            /* Clear the offsets for the next counter/flow sample. */
-            memset(&x->offset, 0, sizeof x->offset);
-        }
-        break;
-
-        default:
-            /* Skip other sample types. */
-            sflowxdr_skip(x, sQuads);
-        }
-        SFLOWXDR_assert(x, sflowxdr_mark_ok(x, sMark));
-    }
-}
-
-static void
-print_sflow(struct ofpbuf *buf)
-{
-    char *dgram_buf;
-    int dgram_len = buf->size;
-    struct sflow_xdr xdrDatagram;
-    struct sflow_xdr *x = &xdrDatagram;
-
-    memset(x, 0, sizeof *x);
-    if (SFLOWXDR_try(x)) {
-        SFLOWXDR_assert(x, (dgram_buf = ofpbuf_try_pull(buf, buf->size)));
-        sflowxdr_init(x, dgram_buf, dgram_len);
-        SFLOWXDR_assert(x, dgram_len >= SFLOW_MIN_LEN);
-        process_datagram(x);
-    } else {
-        // CATCH
-        printf("\n>>>>> ERROR in " __FILE__ " at line %d\n", x->errline);
-    }
-}
-
-static void
-test_sflow_main(int argc, char *argv[])
-{
-    struct unixctl_server *server;
-    enum { MAX_RECV = 1500 };
-    const char *target;
-    struct ofpbuf buf;
-    bool exiting = false;
-    int error;
-    int sock;
-
-    ovs_cmdl_proctitle_init(argc, argv);
-    set_program_name(argv[0]);
-    service_start(&argc, &argv);
-    parse_options(argc, argv);
-
-    if (argc - optind != 1) {
-        ovs_fatal(0, "exactly one non-option argument required "
-                  "(use --help for help)");
-    }
-    target = argv[optind];
-
-    sock = inet_open_passive(SOCK_DGRAM, target, 0, NULL, 0, true);
-    if (sock < 0) {
-        ovs_fatal(0, "%s: failed to open (%s)", target, ovs_strerror(-sock));
-    }
-
-    daemon_save_fd(STDOUT_FILENO);
-    daemonize_start(false);
-
-    error = unixctl_server_create(NULL, &server);
-    if (error) {
-        ovs_fatal(error, "failed to create unixctl server");
-    }
-    unixctl_command_register("exit", "", 0, 0, test_sflow_exit, &exiting);
-
-    daemonize_complete();
-
-    ofpbuf_init(&buf, MAX_RECV);
-    for (;;) {
-        int retval;
-
-        unixctl_server_run(server);
-
-        ofpbuf_clear(&buf);
-        do {
-            retval = recv(sock, buf.data, buf.allocated, 0);
-        } while (retval < 0 && errno == EINTR);
-        if (retval > 0) {
-            ofpbuf_put_uninit(&buf, retval);
-            print_sflow(&buf);
-            fflush(stdout);
-        }
-
-        if (exiting) {
-            break;
-        }
-
-        poll_fd_wait(sock, POLLIN);
-        unixctl_server_wait(server);
-        poll_block();
-    }
-    ofpbuf_uninit(&buf);
-    unixctl_server_destroy(server);
-}
-
-static void
-parse_options(int argc, char *argv[])
-{
-    enum {
-        DAEMON_OPTION_ENUMS,
-        VLOG_OPTION_ENUMS
-    };
-    static const struct option long_options[] = {
-        {"verbose", optional_argument, NULL, 'v'},
-        {"help", no_argument, NULL, 'h'},
-        DAEMON_LONG_OPTIONS,
-        VLOG_LONG_OPTIONS,
-        {NULL, 0, NULL, 0},
-    };
-    char *short_options = ovs_cmdl_long_options_to_short_options(long_options);
-
-    for (;;) {
-        int c = getopt_long(argc, argv, short_options, long_options, NULL);
-        if (c == -1) {
-            break;
-        }
-
-        switch (c) {
-        case 'h':
-            usage();
-
-        DAEMON_OPTION_HANDLERS
-        VLOG_OPTION_HANDLERS
-
-        case '?':
-            exit(EXIT_FAILURE);
-
-        default:
-            abort();
-        }
-    }
-    free(short_options);
-}
-
-static void
-usage(void)
-{
-    printf("%s: sflow collector test utility\n"
-           "usage: %s [OPTIONS] PORT[:IP]\n"
-           "where PORT is the UDP port to listen on and IP is optionally\n"
-           "the IP address to listen on.\n",
-           program_name, program_name);
-    daemon_usage();
-    vlog_usage();
-    printf("\nOther options:\n"
-           "  -h, --help                  display this help message\n");
-    exit(EXIT_SUCCESS);
-}
-
-static void
-test_sflow_exit(struct unixctl_conn *conn,
-                int argc OVS_UNUSED, const char *argv[] OVS_UNUSED,
-                void *exiting_)
-{
-    bool *exiting = exiting_;
-    *exiting = true;
-    unixctl_command_reply(conn, NULL);
-}
-
-OVSTEST_REGISTER("test-sflow", test_sflow_main);
diff --git a/tests/test-sha1.c b/tests/test-sha1.c
deleted file mode 100644
index b7279db6a..000000000
--- a/tests/test-sha1.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 2009, 2011, 2012 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "sha1.h"
-#include <assert.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "ovstest.h"
-#include "random.h"
-#include "util.h"
-
-struct test_vector {
-    char *data;
-    size_t size;
-    const uint8_t output[20];
-};
-
-static const struct test_vector vectors[] = {
-    /* FIPS 180-1. */
-    {
-        "abc", 3,
-        { 0xA9, 0x99, 0x3E, 0x36, 0x47, 0x06, 0x81, 0x6A, 0xBA, 0x3E,
-          0x25, 0x71, 0x78, 0x50, 0xC2, 0x6C, 0x9C, 0xD0, 0xD8, 0x9D }
-    }, {
-        "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", 56,
-        { 0x84, 0x98, 0x3E, 0x44, 0x1C, 0x3B, 0xD2, 0x6E, 0xBA, 0xAE,
-          0x4A, 0xA1, 0xF9, 0x51, 0x29, 0xE5, 0xE5, 0x46, 0x70, 0xF1 },
-    },
-
-    /* RFC 3174. */
-    {
-        "0123456701234567012345670123456701234567012345670123456701234567"
-        "0123456701234567012345670123456701234567012345670123456701234567"
-        "0123456701234567012345670123456701234567012345670123456701234567"
-        "0123456701234567012345670123456701234567012345670123456701234567"
-        "0123456701234567012345670123456701234567012345670123456701234567"
-        "0123456701234567012345670123456701234567012345670123456701234567"
-        "0123456701234567012345670123456701234567012345670123456701234567"
-        "0123456701234567012345670123456701234567012345670123456701234567"
-        "0123456701234567012345670123456701234567012345670123456701234567"
-        "0123456701234567012345670123456701234567012345670123456701234567",
-        64 * 10,
-        { 0xDE, 0xA3, 0x56, 0xA2, 0xCD, 0xDD, 0x90, 0xC7, 0xA7, 0xEC,
-          0xED, 0xC5, 0xEB, 0xB5, 0x63, 0x93, 0x4F, 0x46, 0x04, 0x52 },
-    },
-
-    /* http://www.febooti.com/products/filetweak/members/hash-and-crc/test-vectors/ */
-    {
-        "", 0,
-        { 0xda, 0x39, 0xa3, 0xee, 0x5e, 0x6b, 0x4b, 0x0d, 0x32, 0x55,
-          0xbf, 0xef, 0x95, 0x60, 0x18, 0x90, 0xaf, 0xd8, 0x07, 0x09 }
-    }, {
-        "Test vector from febooti.com", 28,
-        { 0xa7, 0x63, 0x17, 0x95, 0xf6, 0xd5, 0x9c, 0xd6, 0xd1, 0x4e,
-          0xbd, 0x00, 0x58, 0xa6, 0x39, 0x4a, 0x4b, 0x93, 0xd8, 0x68 }
-    },
-
-    /* http://en.wikipedia.org/wiki/SHA_hash_functions */
-    {
-        "The quick brown fox jumps over the lazy dog", 43,
-        { 0x2f, 0xd4, 0xe1, 0xc6, 0x7a, 0x2d, 0x28, 0xfc, 0xed, 0x84,
-          0x9e, 0xe1, 0xbb, 0x76, 0xe7, 0x39, 0x1b, 0x93, 0xeb, 0x12 },
-    }, {
-        "The quick brown fox jumps over the lazy cog", 43,
-        { 0xde, 0x9f, 0x2c, 0x7f, 0xd2, 0x5e, 0x1b, 0x3a, 0xfa, 0xd3,
-          0xe8, 0x5a, 0x0b, 0xd1, 0x7d, 0x9b, 0x10, 0x0d, 0xb4, 0xb3 },
-    },
-
-    /* http://www.hashcash.org/docs/sha1-hashcash.html */
-    {
-        "0:030626:adam at cypherspace.org:6470e06d773e05a8", 46,
-        { 0x00, 0x00, 0x00, 0x00, 0xc7, 0x0d, 0xb7, 0x38, 0x9f, 0x24,
-          0x1b, 0x8f, 0x44, 0x1f, 0xcf, 0x06, 0x8a, 0xea, 0xd3, 0xf0 },
-    },
-};
-
-static void
-test_one(const struct test_vector *vec)
-{
-    uint8_t md[SHA1_DIGEST_SIZE];
-    int i;
-
-    /* All at once. */
-    sha1_bytes(vec->data, vec->size, md);
-    assert(!memcmp(md, vec->output, SHA1_DIGEST_SIZE));
-
-    /* In two pieces. */
-    for (i = 0; i < 20; i++) {
-        int n0 = vec->size ? random_range(vec->size) : 0;
-        int n1 = vec->size - n0;
-        struct sha1_ctx sha1;
-
-        sha1_init(&sha1);
-        sha1_update(&sha1, vec->data, n0);
-        sha1_update(&sha1, vec->data + n0, n1);
-        sha1_final(&sha1, md);
-        assert(!memcmp(md, vec->output, SHA1_DIGEST_SIZE));
-    }
-
-    putchar('.');
-    fflush(stdout);
-}
-
-static void
-test_big_vector(void)
-{
-    enum { SIZE = 1000000 };
-    struct test_vector vec = {
-        NULL, SIZE,
-        { 0x34, 0xAA, 0x97, 0x3C, 0xD4, 0xC4, 0xDA, 0xA4, 0xF6, 0x1E,
-          0xEB, 0x2B, 0xDB, 0xAD, 0x27, 0x31, 0x65, 0x34, 0x01, 0x6F }
-    };
-    size_t i;
-
-    vec.data = xmalloc(SIZE);
-    for (i = 0; i < SIZE; i++) {
-        vec.data[i] = 'a';
-    }
-    test_one(&vec);
-    free(vec.data);
-}
-
-static void
-test_shar1_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    int i;
-
-    for (i = 0; i < ARRAY_SIZE(vectors); i++) {
-        test_one(&vectors[i]);
-    }
-
-    test_big_vector();
-
-    putchar('\n');
-}
-
-OVSTEST_REGISTER("test-sha1", test_shar1_main);
diff --git a/tests/test-skiplist.c b/tests/test-skiplist.c
deleted file mode 100644
index 943d447fa..000000000
--- a/tests/test-skiplist.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/* Copyright (C) 2016 Hewlett Packard Enterprise Development LP
- * All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License. You may obtain
- * a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- */
-
-/* A non-exhaustive test for some of the functions and macros declared in
- * skiplist.h. */
-
-#include <config.h>
-#undef NDEBUG
-#include <stdio.h>
-#include <string.h>
-#include "ovstest.h"
-#include "skiplist.h"
-#include "random.h"
-#include "util.h"
-
-static void
-test_skiplist_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED);
-
-static int test_skiplist_cmp(const void *a, const void *b, const void *conf);
-
-static void test_skiplist_insert(void);
-static void test_skiplist_delete(void);
-static void test_skiplist_find(void);
-static void test_skiplist_forward_to(void);
-static void test_skiplist_random(void);
-
-static int
-test_skiplist_cmp(const void *a, const void *b,
-                  const void *conf OVS_UNUSED)
-{
-    const int *n = (const int *)a;
-    const int *m = (const int *)b;
-    return (*n > *m) - (*n < *m);
-}
-
-static void
-test_skiplist_insert(void)
-{
-    struct skiplist *sl = skiplist_create(test_skiplist_cmp, NULL);
-    int i;
-    int *integer;
-
-    /* Insert a million rows */
-    for (i = 0; i < 1000000; i++) {
-        integer = xmalloc(sizeof(int));
-        *integer = i;
-        skiplist_insert(sl, integer);
-    }
-
-    /* Check that the skiplist maintains the list sorted */
-    struct skiplist_node *node = skiplist_first(sl);
-
-    for (i = 0; i < 1000000; i++) {
-        integer = (int *)skiplist_get_data(node);
-        ovs_assert(i == *integer);
-        node = skiplist_next(node);
-    }
-
-    skiplist_destroy(sl, free);
-}
-
-static void
-test_skiplist_delete(void)
-{
-    struct skiplist *sl = skiplist_create(test_skiplist_cmp, NULL);
-    int a, b, c;
-    a = 1;
-    b = 2;
-    c = 3;
-    /* Insert rows */
-    skiplist_insert(sl, &a);
-    skiplist_insert(sl, &c);
-    skiplist_insert(sl, &b);
-
-    /* Check that the items exists */
-    ovs_assert(a == *(int *)skiplist_get_data(skiplist_find(sl, &a)));
-    ovs_assert(b == *(int *)skiplist_get_data(skiplist_find(sl, &b)));
-    ovs_assert(c == *(int *)skiplist_get_data(skiplist_find(sl, &c)));
-
-    /* Delete b*/
-    skiplist_delete(sl, &b);
-
-    /* Check that the items doesn't exists */
-    ovs_assert(a == *(int *)skiplist_get_data(skiplist_find(sl, &a)));
-    ovs_assert(NULL == skiplist_get_data(skiplist_find(sl, &b)));
-    ovs_assert(c == *(int *)skiplist_get_data(skiplist_find(sl, &c)));
-
-    skiplist_destroy(sl, NULL);
-}
-
-static void
-test_skiplist_find(void)
-{
-    struct skiplist *sl = skiplist_create(test_skiplist_cmp, NULL);
-
-    int i;
-    int *integer;
-    /* Insert a many rows */
-    for (i = 0; i < 1000000; i++) {
-        integer = xmalloc(sizeof(int));
-        *integer = i;
-        skiplist_insert(sl, integer);
-    }
-
-    /* Seek all the items */
-    for (i = 0; i < 1000000; i++) {
-        integer = (int *)skiplist_get_data(skiplist_find(sl, &i));
-        ovs_assert(i == *integer);
-    }
-
-    skiplist_destroy(sl, free);
-}
-
-static void
-test_skiplist_forward_to(void)
-{
-    struct skiplist *sl = skiplist_create(test_skiplist_cmp, NULL);
-    int a, b, c, d, x;
-    a = 1;
-    b = 3;
-    c = 7;
-    d = 10;
-    /* Insert rows */
-    skiplist_insert(sl, &a);
-    skiplist_insert(sl, &c);
-    skiplist_insert(sl, &b);
-    skiplist_insert(sl, &d);
-
-    /* Check that forward_to returns the expected value */
-    x = a;
-    ovs_assert(a == *(int *)skiplist_get_data(skiplist_forward_to(sl, &x)));
-
-    x = 2;
-    ovs_assert(b == *(int *)skiplist_get_data(skiplist_forward_to(sl, &x)));
-
-    x = 5;
-    ovs_assert(c == *(int *)skiplist_get_data(skiplist_forward_to(sl, &x)));
-
-    x = 8;
-    ovs_assert(d == *(int *)skiplist_get_data(skiplist_forward_to(sl, &x)));
-
-    x = 15;
-    ovs_assert(NULL == (int *)skiplist_get_data(skiplist_forward_to(sl, &x)));
-
-    /* Destroy skiplist */
-    skiplist_destroy(sl, NULL);
-}
-
-static void
-test_skiplist_random(void)
-{
-    struct skiplist *sl = skiplist_create(test_skiplist_cmp, NULL);
-    int total_numbers = 50;
-    int expected_count = 0;
-    int *numbers = xmalloc(sizeof(int) * total_numbers);
-    int i, op, element;
-    for (i = 0; i < total_numbers; i++) {
-        numbers[i] = i;
-    }
-    random_init();
-    for (i = 0; i < total_numbers * 1000; i++) {
-        op = random_uint32() % 2;
-        element = random_range(total_numbers);
-        if (op == 0) {
-            if (!skiplist_find(sl, &numbers[element])) {
-                expected_count++;
-            }
-            skiplist_insert(sl, &numbers[element]);
-        } else {
-            if (skiplist_find(sl, &numbers[element])) {
-                expected_count--;
-            }
-            skiplist_delete(sl, &numbers[element]);
-        }
-        ovs_assert(expected_count == skiplist_get_size(sl));
-    }
-
-    skiplist_destroy(sl, NULL);
-    free(numbers);
-}
-
-static void
-test_skiplist_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    printf("skiplist insert\n");
-    test_skiplist_insert();
-    printf("skiplist delete\n");
-    test_skiplist_delete();
-    printf("skiplist find\n");
-    test_skiplist_find();
-    printf("skiplist forward_to\n");
-    test_skiplist_forward_to();
-    printf("skiplist random\n");
-    test_skiplist_random();
-    printf("\n");
-}
-
-OVSTEST_REGISTER("test-skiplist", test_skiplist_main);
diff --git a/tests/test-stopwatch.c b/tests/test-stopwatch.c
deleted file mode 100644
index 1270cd936..000000000
--- a/tests/test-stopwatch.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 2018 Red Hat, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "stopwatch.h"
-#include <assert.h>
-#include <math.h>
-#include <stdio.h>
-#include "ovstest.h"
-#include "util.h"
-
-#define MAX_SAMPLES 100
-#define UNIT SW_MS
-
-struct test_data {
-    const char *name;
-    unsigned long long samples[MAX_SAMPLES];
-    size_t num_samples;
-    struct stopwatch_stats expected_stats;
-};
-
-static struct test_data data_sets[] = {
-    {
-        .name = "1-interval-zero-length",
-        .samples = { 0, 0 },
-        .num_samples = 2,
-        .expected_stats = {
-            .count = 1,
-            .unit = UNIT,
-            .max = 0,
-            .min = 0,
-            .pctl_95 = 0,
-            .ewma_50 = 0,
-            .ewma_1 = 0,
-        },
-    },
-    {
-        .name = "1-interval-unit-length",
-        .samples = { 0, 1 },
-        .num_samples = 2,
-        .expected_stats = {
-            .count = 1,
-            .unit = UNIT,
-            .max = 1,
-            .min = 1,
-            .pctl_95 = 0,
-            .ewma_50 = 1,
-            .ewma_1 = 1,
-        },
-    },
-    {
-        .name = "10-intervals-unit-length",
-        .samples = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
-        .num_samples = 11,
-        .expected_stats = {
-            .count = 10,
-            .unit = UNIT,
-            .max = 1,
-            .min = 1,
-            .pctl_95 = 1,
-            .ewma_50 = 1,
-            .ewma_1 = 1,
-        },
-    },
-    {
-        .name = "10-intervals-linear-growth",
-        .samples = { 1, 2, 4, 7, 11, 16, 22, 29, 37, 46, 56 },
-        .num_samples = 11,
-        .expected_stats = {
-            .count = 10,
-            .unit = UNIT,
-            .max = 10,
-            .min = 1,
-            .pctl_95 = 10.0,
-            .ewma_50 = 9.0,
-            .ewma_1 = 1.4,
-        },
-    },
-    {
-        .name = "60-intervals-unit-length",
-        .samples = { 1,  2,  3,  4,  5,  6,  7,  8,  9, 10,
-                    11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
-                    21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
-                    31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
-                    41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
-                    51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
-                    61, },
-        .num_samples = 61,
-        .expected_stats = {
-            .count = 60,
-            .unit = UNIT,
-            .max = 1,
-            .min = 1,
-            .pctl_95 = 1,
-            .ewma_50 = 1,
-            .ewma_1 = 1,
-        },
-    },
-    {
-        .name = "60-intervals-linear-growth",
-        .samples = {   1,    2,    4,    7,   11,   16,   22,   29,   37,   46,
-                      56,   67,   79,   92,  106,  121,  137,  154,  172,  191,
-                     211,  232,  254,  277,  301,  326,  352,  379,  407,  436,
-                     466,  497,  529,  562,  596,  631,  667,  704,  742,  781,
-                     821,  862,  904,  947,  991, 1036, 1082, 1129, 1177, 1226,
-                    1276, 1327, 1379, 1432, 1486, 1541, 1597, 1654, 1712, 1771,
-                    1831, },
-        .num_samples = 61,
-        .expected_stats = {
-            .count = 60,
-            .unit = UNIT,
-            .max = 60,
-            .min = 1,
-            /* 95th percentile is actually closer to 57, but the estimate is
-             * pretty dang close */
-            .pctl_95 = 56,
-            .ewma_50 = 59,
-            .ewma_1 = 15.7,
-        },
-    },
-};
-
-#define ASSERT_MSG(COND, MSG, ...)                  \
-    if (!(COND)) {                                  \
-        fprintf(stderr, MSG "\n", ##__VA_ARGS__);   \
-        assert(COND);                               \
-    }
-
-#define ASSERT_ULL_EQ(a, b)                                 \
-    ASSERT_MSG(a == b,                                      \
-               "Assertion '%s == %s' failed: %llu == %llu", \
-               #a, #b, a, b)
-
-#define ASSERT_DOUBLE_EQ(a, b, eps)                                 \
-    ASSERT_MSG(fabs(a - b) < eps,                                   \
-               "Assertion '|%s - %s| < %s' failed: |%g - %g| < %g", \
-               #a, #b, #eps, a, b, eps)
-
-#define ASSERT_STATS_EQ(a, b)                               \
-    do {                                                    \
-        ASSERT_ULL_EQ((a)->count, (b)->count);              \
-        ASSERT_ULL_EQ((a)->max, (b)->max);                  \
-        ASSERT_ULL_EQ((a)->min, (b)->min);                  \
-        ASSERT_DOUBLE_EQ((a)->pctl_95, (b)->pctl_95, 1e-1); \
-        ASSERT_DOUBLE_EQ((a)->ewma_50, (b)->ewma_50, 1e-1); \
-        ASSERT_DOUBLE_EQ((a)->ewma_1, (b)->ewma_1, 1e-1);   \
-    } while (0)
-
-static void
-test_stopwatch_calculate_stats(void)
-{
-    struct test_data *d;
-
-    for (size_t i = 0; i < ARRAY_SIZE(data_sets); i++) {
-        d = &data_sets[i];
-
-        fprintf(stderr, "TEST '%s'\n", d->name);
-
-        stopwatch_create(d->name, UNIT);
-        for (size_t j = 0; j < d->num_samples - 1; j ++) {
-            stopwatch_start(d->name, d->samples[j]);
-            stopwatch_stop(d->name, d->samples[j + 1]);
-        }
-        stopwatch_sync();
-
-        struct stopwatch_stats stats = { .unit = UNIT };
-        stopwatch_get_stats(d->name, &stats);
-        ASSERT_STATS_EQ(&stats, &d->expected_stats);
-
-        printf(".");
-    }
-}
-
-static void
-test_stopwatch_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
-{
-    test_stopwatch_calculate_stats();
-    printf("\n");
-}
-
-OVSTEST_REGISTER("test-stopwatch", test_stopwatch_main);
diff --git a/tests/test-stp.c b/tests/test-stp.c
deleted file mode 100644
index c85c99d67..000000000
--- a/tests/test-stp.c
+++ /dev/null
@@ -1,672 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 2010, 2012, 2013, 2014 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "stp.h"
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <inttypes.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include "dp-packet.h"
-#include "openvswitch/ofpbuf.h"
-#include "ovstest.h"
-#include "packets.h"
-#include "openvswitch/vlog.h"
-
-struct bpdu {
-    int port_no;
-    void *data;
-    size_t size;
-};
-
-struct bridge {
-    struct test_case *tc;
-    int id;
-    bool reached;
-
-    struct stp *stp;
-
-    struct lan *ports[STP_MAX_PORTS];
-    int n_ports;
-
-#define RXQ_SIZE 16
-    struct bpdu rxq[RXQ_SIZE];
-    int rxq_head, rxq_tail;
-};
-
-struct lan_conn {
-    struct bridge *bridge;
-    int port_no;
-};
-
-struct lan {
-    struct test_case *tc;
-    const char *name;
-    bool reached;
-    struct lan_conn conns[16];
-    int n_conns;
-};
-
-struct test_case {
-    struct bridge *bridges[16];
-    int n_bridges;
-    struct lan *lans[26];
-    int n_lans;
-};
-
-static const char *file_name;
-static int line_number;
-static char line[128];
-static char *pos, *token;
-static int n_warnings;
-
-static struct test_case *
-new_test_case(void)
-{
-    struct test_case *tc = xmalloc(sizeof *tc);
-    tc->n_bridges = 0;
-    tc->n_lans = 0;
-    return tc;
-}
-
-static void
-send_bpdu(struct dp_packet *pkt, int port_no, void *b_)
-{
-    struct bridge *b = b_;
-    struct lan *lan;
-
-    assert(port_no < b->n_ports);
-    lan = b->ports[port_no];
-    if (lan) {
-        const void *data = dp_packet_l3(pkt);
-        size_t size = (char *) dp_packet_tail(pkt) - (char *) data;
-        int i;
-
-        for (i = 0; i < lan->n_conns; i++) {
-            struct lan_conn *conn = &lan->conns[i];
-            if (conn->bridge != b || conn->port_no != port_no) {
-                struct bridge *dst = conn->bridge;
-                struct bpdu *bpdu = &dst->rxq[dst->rxq_head++ % RXQ_SIZE];
-                assert(dst->rxq_head - dst->rxq_tail <= RXQ_SIZE);
-                bpdu->data = xmemdup(data, size);
-                bpdu->size = size;
-                bpdu->port_no = conn->port_no;
-            }
-        }
-    }
-    dp_packet_delete(pkt);
-}
-
-static struct bridge *
-new_bridge(struct test_case *tc, int id)
-{
-    struct bridge *b = xmalloc(sizeof *b);
-    char name[16];
-    b->tc = tc;
-    b->id = id;
-    snprintf(name, sizeof name, "stp%x", id);
-    b->stp = stp_create(name, id, send_bpdu, b);
-    assert(tc->n_bridges < ARRAY_SIZE(tc->bridges));
-    b->n_ports = 0;
-    b->rxq_head = b->rxq_tail = 0;
-    tc->bridges[tc->n_bridges++] = b;
-    return b;
-}
-
-static struct lan *
-new_lan(struct test_case *tc, const char *name)
-{
-    struct lan *lan = xmalloc(sizeof *lan);
-    lan->tc = tc;
-    lan->name = xstrdup(name);
-    lan->n_conns = 0;
-    assert(tc->n_lans < ARRAY_SIZE(tc->lans));
-    tc->lans[tc->n_lans++] = lan;
-    return lan;
-}
-
-static void
-reconnect_port(struct bridge *b, int port_no, struct lan *new_lan)
-{
-    struct lan *old_lan;
-    int j;
-
-    assert(port_no < b->n_ports);
-    old_lan = b->ports[port_no];
-    if (old_lan == new_lan) {
-        return;
-    }
-
-    /* Disconnect from old_lan. */
-    if (old_lan) {
-        for (j = 0; j < old_lan->n_conns; j++) {
-            struct lan_conn *c = &old_lan->conns[j];
-            if (c->bridge == b && c->port_no == port_no) {
-                memmove(c, c + 1, sizeof *c * (old_lan->n_conns - j - 1));
-                old_lan->n_conns--;
-                break;
-            }
-        }
-    }
-
-    /* Connect to new_lan. */
-    b->ports[port_no] = new_lan;
-    if (new_lan) {
-        int conn_no = new_lan->n_conns++;
-        assert(conn_no < ARRAY_SIZE(new_lan->conns));
-        new_lan->conns[conn_no].bridge = b;
-        new_lan->conns[conn_no].port_no = port_no;
-    }
-}
-
-static void
-new_port(struct bridge *b, struct lan *lan, int path_cost)
-{
-    int port_no = b->n_ports++;
-    struct stp_port *p = stp_get_port(b->stp, port_no);
-    assert(port_no < ARRAY_SIZE(b->ports));
-    b->ports[port_no] = NULL;
-    stp_port_set_path_cost(p, path_cost);
-    stp_port_enable(p);
-    reconnect_port(b, port_no, lan);
-}
-
-static void
-dump(struct test_case *tc)
-{
-    int i;
-
-    for (i = 0; i < tc->n_bridges; i++) {
-        struct bridge *b = tc->bridges[i];
-        struct stp *stp = b->stp;
-        int j;
-
-        printf("%s:", stp_get_name(stp));
-        if (stp_is_root_bridge(stp)) {
-            printf(" root");
-        }
-        printf("\n");
-        for (j = 0; j < b->n_ports; j++) {
-            struct stp_port *p = stp_get_port(stp, j);
-            enum stp_state state = stp_port_get_state(p);
-
-            printf("\tport %d", j);
-            if (b->ports[j]) {
-                printf(" (lan %s)", b->ports[j]->name);
-            } else {
-                printf(" (disconnected)");
-            }
-            printf(": %s", stp_state_name(state));
-            if (p == stp_get_root_port(stp)) {
-                printf(" (root port, root_path_cost=%u)", stp_get_root_path_cost(stp));
-            }
-            printf("\n");
-        }
-    }
-}
-
-static void dump_lan_tree(struct test_case *, struct lan *, int level);
-
-static void
-dump_bridge_tree(struct test_case *tc, struct bridge *b, int level)
-{
-    int i;
-
-    if (b->reached) {
-        return;
-    }
-    b->reached = true;
-    for (i = 0; i < level; i++) {
-        printf("\t");
-    }
-    printf("%s\n", stp_get_name(b->stp));
-    for (i = 0; i < b->n_ports; i++) {
-        struct lan *lan = b->ports[i];
-        struct stp_port *p = stp_get_port(b->stp, i);
-        if (stp_port_get_state(p) == STP_FORWARDING && lan) {
-            dump_lan_tree(tc, lan, level + 1);
-        }
-    }
-}
-
-static void
-dump_lan_tree(struct test_case *tc, struct lan *lan, int level)
-{
-    int i;
-
-    if (lan->reached) {
-        return;
-    }
-    lan->reached = true;
-    for (i = 0; i < level; i++) {
-        printf("\t");
-    }
-    printf("%s\n", lan->name);
-    for (i = 0; i < lan->n_conns; i++) {
-        struct bridge *b = lan->conns[i].bridge;
-        dump_bridge_tree(tc, b, level + 1);
-    }
-}
-
-static void
-tree(struct test_case *tc)
-{
-    int i;
-
-    for (i = 0; i < tc->n_bridges; i++) {
-        struct bridge *b = tc->bridges[i];
-        b->reached = false;
-    }
-    for (i = 0; i < tc->n_lans; i++) {
-        struct lan *lan = tc->lans[i];
-        lan->reached = false;
-    }
-    for (i = 0; i < tc->n_bridges; i++) {
-        struct bridge *b = tc->bridges[i];
-        struct stp *stp = b->stp;
-        if (stp_is_root_bridge(stp)) {
-            dump_bridge_tree(tc, b, 0);
-        }
-    }
-}
-
-static void
-simulate(struct test_case *tc, int granularity)
-{
-    int time;
-
-    for (time = 0; time < 1000 * 180; time += granularity) {
-        int round_trips;
-        int i;
-
-        for (i = 0; i < tc->n_bridges; i++) {
-            stp_tick(tc->bridges[i]->stp, granularity);
-        }
-        for (round_trips = 0; round_trips < granularity; round_trips++) {
-            bool any = false;
-            for (i = 0; i < tc->n_bridges; i++) {
-                struct bridge *b = tc->bridges[i];
-                for (; b->rxq_tail != b->rxq_head; b->rxq_tail++) {
-                    struct bpdu *bpdu = &b->rxq[b->rxq_tail % RXQ_SIZE];
-                    stp_received_bpdu(stp_get_port(b->stp, bpdu->port_no),
-                                      bpdu->data, bpdu->size);
-                    free(bpdu->data);
-                    any = true;
-                }
-            }
-            if (!any) {
-                break;
-            }
-        }
-    }
-}
-
-OVS_NO_RETURN static void
-err(const char *message, ...)
-    OVS_PRINTF_FORMAT(1, 2);
-
-static void
-err(const char *message, ...)
-{
-    va_list args;
-
-    fprintf(stderr, "%s:%d:%"PRIdPTR": ", file_name, line_number, pos - line);
-    va_start(args, message);
-    vfprintf(stderr, message, args);
-    va_end(args);
-    putc('\n', stderr);
-
-    exit(EXIT_FAILURE);
-}
-
-static void
-warn(const char *message, ...)
-    OVS_PRINTF_FORMAT(1, 2);
-
-static void
-warn(const char *message, ...)
-{
-    va_list args;
-
-    fprintf(stderr, "%s:%d: ", file_name, line_number);
-    va_start(args, message);
-    vfprintf(stderr, message, args);
-    va_end(args);
-    putc('\n', stderr);
-
-    n_warnings++;
-}
-
-static bool
-get_token(void)
-{
-    char *start;
-
-    while (isspace((unsigned char) *pos)) {
-        pos++;
-    }
-    if (*pos == '\0') {
-        free(token);
-        token = NULL;
-        return false;
-    }
-
-    start = pos;
-    if (isalpha((unsigned char) *pos)) {
-        while (isalpha((unsigned char) *++pos)) {
-            continue;
-        }
-    } else if (isdigit((unsigned char) *pos)) {
-        if (*pos == '0' && (pos[1] == 'x' || pos[1] == 'X')) {
-            pos += 2;
-            while (isxdigit((unsigned char) *pos)) {
-                pos++;
-            }
-        } else {
-            while (isdigit((unsigned char) *++pos)) {
-                continue;
-            }
-        }
-    } else {
-        pos++;
-    }
-
-    free(token);
-    token = xmemdup0(start, pos - start);
-    return true;
-}
-
-static bool
-get_int(int *intp)
-{
-    char *save_pos = pos;
-    if (token && isdigit((unsigned char) *token)) {
-        *intp = strtol(token, NULL, 0);
-        get_token();
-        return true;
-    } else {
-        pos = save_pos;
-        return false;
-    }
-}
-
-static bool
-match(const char *want)
-{
-    if (token && !strcmp(want, token)) {
-        get_token();
-        return true;
-    } else {
-        return false;
-    }
-}
-
-static int
-must_get_int(void)
-{
-    int x;
-    if (!get_int(&x)) {
-        err("expected integer");
-    }
-    return x;
-}
-
-static void
-must_match(const char *want)
-{
-    if (!match(want)) {
-        err("expected \"%s\"", want);
-    }
-}
-
-static void
-test_stp_main(int argc, char *argv[])
-{
-    struct test_case *tc;
-    FILE *input_file;
-    int i;
-
-    vlog_set_pattern(VLF_CONSOLE, "%c|%p|%m");
-    vlog_set_levels(NULL, VLF_SYSLOG, VLL_OFF);
-
-    if (argc != 2) {
-        ovs_fatal(0, "usage: test-stp INPUT.STP");
-    }
-    file_name = argv[1];
-
-    input_file = fopen(file_name, "r");
-    if (!input_file) {
-        ovs_fatal(errno, "error opening \"%s\"", file_name);
-    }
-
-    tc = new_test_case();
-    for (i = 0; i < 26; i++) {
-        char name[2];
-        name[0] = 'a' + i;
-        name[1] = '\0';
-        new_lan(tc, name);
-    }
-
-    for (line_number = 1; fgets(line, sizeof line, input_file);
-         line_number++)
-    {
-        char *newline, *hash;
-
-        newline = strchr(line, '\n');
-        if (newline) {
-            *newline = '\0';
-        }
-        hash = strchr(line, '#');
-        if (hash) {
-            *hash = '\0';
-        }
-
-        pos = line;
-        if (!get_token()) {
-            continue;
-        }
-        if (match("bridge")) {
-            struct bridge *bridge;
-            int bridge_no, port_no;
-
-            bridge_no = must_get_int();
-            if (bridge_no < tc->n_bridges) {
-                bridge = tc->bridges[bridge_no];
-            } else if (bridge_no == tc->n_bridges) {
-                bridge = new_bridge(tc, must_get_int());
-            } else {
-                err("bridges must be numbered consecutively from 0");
-            }
-            if (match("^")) {
-                stp_set_bridge_priority(bridge->stp, must_get_int());
-            }
-
-            if (match("=")) {
-                for (port_no = 0; port_no < STP_MAX_PORTS; port_no++) {
-                    struct stp_port *p = stp_get_port(bridge->stp, port_no);
-                    if (!token || match("X")) {
-                        stp_port_disable(p);
-                    } else if (match("_")) {
-                        /* Nothing to do. */
-                    } else {
-                        struct lan *lan;
-                        int path_cost;
-
-                        if (!strcmp(token, "0")) {
-                            lan = NULL;
-                        } else if (strlen(token) == 1
-                                && islower((unsigned char)*token)) {
-                            lan = tc->lans[*token - 'a'];
-                        } else {
-                            err("%s is not a valid LAN name "
-                                "(0 or a lowercase letter)", token);
-                        }
-                        get_token();
-
-                        path_cost = match(":") ? must_get_int() : 10;
-                        if (port_no < bridge->n_ports) {
-                            stp_port_set_path_cost(p, path_cost);
-                            stp_port_enable(p);
-                            reconnect_port(bridge, port_no, lan);
-                        } else if (port_no == bridge->n_ports) {
-                            new_port(bridge, lan, path_cost);
-                        } else {
-                            err("ports must be numbered consecutively");
-                        }
-                        if (match("^")) {
-                            stp_port_set_priority(p, must_get_int());
-                        }
-                    }
-                }
-            }
-        } else if (match("run")) {
-            simulate(tc, must_get_int());
-        } else if (match("dump")) {
-            dump(tc);
-        } else if (match("tree")) {
-            tree(tc);
-        } else if (match("check")) {
-            struct bridge *b;
-            struct stp *stp;
-            int bridge_no, port_no;
-
-            bridge_no = must_get_int();
-            if (bridge_no >= tc->n_bridges) {
-                err("no bridge numbered %d", bridge_no);
-            }
-            b = tc->bridges[bridge_no];
-            stp = b->stp;
-
-            must_match("=");
-
-            if (match("rootid")) {
-                uint64_t rootid;
-                must_match(":");
-                rootid = must_get_int();
-                if (match("^")) {
-                    rootid |= (uint64_t) must_get_int() << 48;
-                } else {
-                    rootid |= UINT64_C(0x8000) << 48;
-                }
-                if (stp_get_designated_root(stp) != rootid) {
-                    warn("%s: root %"PRIx64", not %"PRIx64,
-                         stp_get_name(stp), stp_get_designated_root(stp),
-                         rootid);
-                }
-            }
-
-            if (match("root")) {
-                if (stp_get_root_path_cost(stp)) {
-                    warn("%s: root path cost of root is %u but should be 0",
-                         stp_get_name(stp), stp_get_root_path_cost(stp));
-                }
-                if (!stp_is_root_bridge(stp)) {
-                    warn("%s: root is %"PRIx64", not %"PRIx64,
-                         stp_get_name(stp),
-                         stp_get_designated_root(stp), stp_get_bridge_id(stp));
-                }
-                for (port_no = 0; port_no < b->n_ports; port_no++) {
-                    struct stp_port *p = stp_get_port(stp, port_no);
-                    enum stp_state state = stp_port_get_state(p);
-                    if (!(state & (STP_DISABLED | STP_FORWARDING))) {
-                        warn("%s: root port %d in state %s",
-                             stp_get_name(b->stp), port_no,
-                             stp_state_name(state));
-                    }
-                }
-            } else {
-                for (port_no = 0; port_no < STP_MAX_PORTS; port_no++) {
-                    struct stp_port *p = stp_get_port(stp, port_no);
-                    enum stp_state state;
-                    if (token == NULL || match("D")) {
-                        state = STP_DISABLED;
-                    } else if (match("B")) {
-                        state = STP_BLOCKING;
-                    } else if (match("Li")) {
-                        state = STP_LISTENING;
-                    } else if (match("Le")) {
-                        state = STP_LEARNING;
-                    } else if (match("F")) {
-                        state = STP_FORWARDING;
-                    } else if (match("_")) {
-                        continue;
-                    } else {
-                        err("unknown port state %s", token);
-                    }
-                    if (stp_port_get_state(p) != state) {
-                        warn("%s port %d: state is %s but should be %s",
-                             stp_get_name(stp), port_no,
-                             stp_state_name(stp_port_get_state(p)),
-                             stp_state_name(state));
-                    }
-                    if (state == STP_FORWARDING) {
-                        struct stp_port *root_port = stp_get_root_port(stp);
-                        if (match(":")) {
-                            int root_path_cost = must_get_int();
-                            if (p != root_port) {
-                                warn("%s: port %d is not the root port",
-                                     stp_get_name(stp), port_no);
-                                if (!root_port) {
-                                    warn("%s: (there is no root port)",
-                                         stp_get_name(stp));
-                                } else {
-                                    warn("%s: (port %d is the root port)",
-                                         stp_get_name(stp),
-                                         stp_port_no(root_port));
-                                }
-                            } else if (root_path_cost
-                                       != stp_get_root_path_cost(stp)) {
-                                warn("%s: root path cost is %u, should be %d",
-                                     stp_get_name(stp),
-                                     stp_get_root_path_cost(stp),
-                                     root_path_cost);
-                            }
-                        } else if (p == root_port) {
-                            warn("%s: port %d is the root port but "
-                                 "not expected to be",
-                                 stp_get_name(stp), port_no);
-                        }
-                    }
-                }
-            }
-            if (n_warnings) {
-                exit(EXIT_FAILURE);
-            }
-        }
-        if (get_token()) {
-            err("trailing garbage on line");
-        }
-    }
-    free(token);
-
-    for (i = 0; i < tc->n_lans; i++) {
-        struct lan *lan = tc->lans[i];
-        free(CONST_CAST(char *, lan->name));
-        free(lan);
-    }
-    for (i = 0; i < tc->n_bridges; i++) {
-        struct bridge *bridge = tc->bridges[i];
-        stp_unref(bridge->stp);
-        free(bridge);
-    }
-    free(tc);
-    fclose(input_file);
-}
-
-OVSTEST_REGISTER("test-stp", test_stp_main);
diff --git a/tests/test-stream.c b/tests/test-stream.c
deleted file mode 100644
index 4af44200e..000000000
--- a/tests/test-stream.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2018 Ilya Maximets <i.maximets at samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-
-#include "fatal-signal.h"
-#include "openvswitch/vlog.h"
-#include "stream.h"
-#include "util.h"
-
-VLOG_DEFINE_THIS_MODULE(test_stream);
-
-int
-main(int argc, char *argv[])
-{
-    int error;
-    struct stream *stream;
-
-    fatal_ignore_sigpipe();
-    set_program_name(argv[0]);
-
-    if (argc < 2) {
-        ovs_fatal(0, "usage: %s REMOTE", argv[0]);
-    }
-
-    error = stream_open_block(stream_open(argv[1], &stream, DSCP_DEFAULT),
-                              10000, &stream);
-    if (error) {
-        VLOG_ERR("stream_open_block(%s) failure: %s",
-                 argv[1], ovs_strerror(error));
-    }
-    return (error || !stream) ? 1 : 0;
-}
diff --git a/tests/test-stream.py b/tests/test-stream.py
deleted file mode 100644
index 93d63c019..000000000
--- a/tests/test-stream.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright (c) 2018, Red Hat Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import sys
-
-import ovs.stream
-
-
-def main(argv):
-    remote = argv[1]
-    err, stream = ovs.stream.Stream.open_block(
-            ovs.stream.Stream.open(remote), 10000)
-
-    if err or stream is None:
-        sys.exit(1)
-
-    sys.exit(0)
-
-
-if __name__ == '__main__':
-    main(sys.argv)
diff --git a/tests/test-strtok_r.c b/tests/test-strtok_r.c
deleted file mode 100644
index 105a72adb..000000000
--- a/tests/test-strtok_r.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2010 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#include <stdio.h>
-#include <string.h>
-
-/* Some versions of glibc 2.7 has a bug in strtok_r when with optimization that
- * can cause segfaults:
- *      http://sources.redhat.com/bugzilla/show_bug.cgi?id=5614.
- *
- * Open vSwitch works around this problem by supplying a replacement string.h.
- * This test program verifies that the workaround is in place.
- */
-int
-main(void)
-{
-    char string[] = ":::";
-    char *save_ptr = (char *) 0xc0ffee;
-    char *token1, *token2;
-    token1 = strtok_r(string, ":", &save_ptr);
-    token2 = strtok_r(NULL, ":", &save_ptr);
-    printf ("%s %s\n", token1 ? token1 : "NULL", token2 ? token2 : "NULL");
-    return 0;
-}
diff --git a/tests/test-type-props.c b/tests/test-type-props.c
deleted file mode 100644
index 092c53ec6..000000000
--- a/tests/test-type-props.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 2011, 2015 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#include "openvswitch/type-props.h"
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define MUST_SUCCEED(EXPRESSION)                    \
-    if (!(EXPRESSION)) {                            \
-        fprintf(stderr, "%s:%d: %s failed\n",       \
-                __FILE__, __LINE__, #EXPRESSION);   \
-        exit(EXIT_FAILURE);                         \
-    }
-
-#define TEST_TYPE(type, minimum, maximum, is_signed)    \
-    MUST_SUCCEED(TYPE_IS_INTEGER(type));                \
-    MUST_SUCCEED(TYPE_IS_SIGNED(type) == is_signed);    \
-    MUST_SUCCEED(TYPE_MAXIMUM(type) == maximum);        \
-    MUST_SUCCEED(TYPE_MINIMUM(type) == minimum);        \
-    sprintf(max_s, "%"PRIuMAX, (uintmax_t) (maximum));  \
-    MUST_SUCCEED(strlen(max_s) <= INT_STRLEN(type));    \
-    sprintf(min_s, "%"PRIdMAX, (intmax_t) (minimum));   \
-    MUST_SUCCEED(strlen(min_s) <= INT_STRLEN(type));
-
-int
-main (void)
-{
-    char max_s[128];
-    char min_s[128];
-
-#ifndef __CHECKER__             /* sparse hates sizeof(bool). */
-    TEST_TYPE(_Bool, 0, 1, 0);
-#endif
-
-    TEST_TYPE(char, CHAR_MIN, CHAR_MAX, (CHAR_MIN < 0));
-
-    TEST_TYPE(signed char, SCHAR_MIN, SCHAR_MAX, 1);
-    TEST_TYPE(short int, SHRT_MIN, SHRT_MAX, 1);
-    TEST_TYPE(int, INT_MIN, INT_MAX, 1);
-    TEST_TYPE(long int, LONG_MIN, LONG_MAX, 1);
-    TEST_TYPE(long long int, LLONG_MIN, LLONG_MAX, 1);
-
-    TEST_TYPE(unsigned char, 0, UCHAR_MAX, 0);
-    TEST_TYPE(unsigned short int, 0, USHRT_MAX, 0);
-    TEST_TYPE(unsigned int, 0, UINT_MAX, 0);
-    TEST_TYPE(unsigned long int, 0, ULONG_MAX, 0);
-    TEST_TYPE(unsigned long long int, 0, ULLONG_MAX, 0);
-
-    MUST_SUCCEED(!(TYPE_IS_INTEGER(float)));
-    MUST_SUCCEED(!(TYPE_IS_INTEGER(double)));
-    MUST_SUCCEED(!(TYPE_IS_INTEGER(long double)));
-
-    return 0;
-}
diff --git a/tests/test-unix-socket.c b/tests/test-unix-socket.c
deleted file mode 100644
index 3175e8aff..000000000
--- a/tests/test-unix-socket.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2010, 2012, 2014 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "socket-util.h"
-#include <errno.h>
-#include <signal.h>
-#include <unistd.h>
-#include "ovstest.h"
-#include "util.h"
-
-static void
-test_unix_socket_main(int argc, char *argv[])
-{
-    const char *sockname1;
-    const char *sockname2;
-    int sock1, sock2;
-
-    set_program_name(argv[0]);
-
-    if (argc != 2 && argc != 3) {
-        ovs_fatal(0, "usage: %s SOCKETNAME1 [SOCKETNAME2]", argv[0]);
-    }
-    sockname1 = argv[1];
-    sockname2 = argc > 2 ? argv[2] : sockname1;
-
-    signal(SIGALRM, SIG_DFL);
-    alarm(5);
-
-    /* Create a listening socket under name 'sockname1'. */
-    sock1 = make_unix_socket(SOCK_STREAM, false, sockname1, NULL);
-    if (sock1 < 0) {
-        ovs_fatal(-sock1, "%s: bind failed", sockname1);
-    }
-    if (listen(sock1, 1)) {
-        ovs_fatal(errno, "%s: listen failed", sockname1);
-    }
-
-    /* Connect to 'sockname2' (which should be the same file, perhaps under a
-     * different name). */
-    sock2 = make_unix_socket(SOCK_STREAM, false, NULL, sockname2);
-    if (sock2 < 0) {
-        ovs_fatal(-sock2, "%s: connect failed", sockname2);
-    }
-
-    close(sock1);
-    close(sock2);
-}
-
-OVSTEST_REGISTER("test-unix-socket", test_unix_socket_main);
diff --git a/tests/test-unix-socket.py b/tests/test-unix-socket.py
deleted file mode 100644
index c80fb13d2..000000000
--- a/tests/test-unix-socket.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Copyright (c) 2010, 2012, 2013 Nicira, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import os
-import signal
-import socket
-import sys
-
-import ovs.socket_util
-from ovs.fatal_signal import signal_alarm
-
-
-def main(argv):
-    if len(argv) not in (2, 3):
-        sys.stderr.write("usage: %s SOCKETNAME1 [SOCKETNAME2]", argv[0])
-        sys.exit(1)
-
-    sockname1 = argv[1]
-    if len(argv) > 2:
-        sockname2 = argv[2]
-    else:
-        sockname2 = sockname1
-
-    signal.signal(signal.SIGALRM, signal.SIG_DFL)
-    signal_alarm(5)
-
-    # Create a listening socket under name 'sockname1'.
-    error, sock1 = ovs.socket_util.make_unix_socket(socket.SOCK_STREAM, False,
-                                                    sockname1, None)
-    if error:
-        sys.stderr.write("%s: bind failed (%s)" % (sockname1,
-                                                   os.strerror(error)))
-        sys.exit(1)
-    sock1.listen(1)
-
-    # Connect to 'sockname2' (which should be the same file, perhaps under a
-    # different name).
-    error, sock2 = ovs.socket_util.make_unix_socket(socket.SOCK_STREAM, False,
-                                                    None, sockname2)
-    if error:
-        sys.stderr.write("%s: connect failed (%s)" % (sockname2,
-                                                      os.strerror(error)))
-        sys.exit(1)
-
-
-if __name__ == '__main__':
-    main(sys.argv)
diff --git a/tests/test-unixctl.c b/tests/test-unixctl.c
deleted file mode 100644
index 3eadf54cd..000000000
--- a/tests/test-unixctl.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/* Copyright (c) 2015 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-
-#include <getopt.h>
-
-#include "command-line.h"
-#include "daemon.h"
-#include "fatal-signal.h"
-#include "openvswitch/vlog.h"
-#include "ovstest.h"
-#include "openvswitch/poll-loop.h"
-#include "unixctl.h"
-#include "util.h"
-
-VLOG_DEFINE_THIS_MODULE(test_unixctl);
-
-static void parse_options(int *argc, char **argvp[], char **unixctl_pathp);
-OVS_NO_RETURN static void usage(void);
-
-static void
-test_unixctl_exit(struct unixctl_conn *conn, int argc OVS_UNUSED,
-                  const char *argv[] OVS_UNUSED, void *exiting_)
-{
-    bool *exiting = exiting_;
-    *exiting = true;
-    unixctl_command_reply(conn, NULL);
-}
-
-static void
-test_unixctl_echo(struct unixctl_conn *conn, int argc OVS_UNUSED,
-                  const char *argv[], void *aux OVS_UNUSED)
-{
-    unixctl_command_reply(conn, argv[1]);
-}
-
-static void
-test_unixctl_echo_error(struct unixctl_conn *conn, int argc OVS_UNUSED,
-                        const char *argv[], void *aux OVS_UNUSED)
-{
-    unixctl_command_reply_error(conn, argv[1]);
-}
-
-static void
-test_unixctl_log(struct unixctl_conn *conn, int argc OVS_UNUSED,
-                  const char *argv[], void *aux OVS_UNUSED)
-{
-    VLOG_INFO("%s", argv[1]);
-    unixctl_command_reply(conn, NULL);
-}
-
-static void
-test_unixctl_block(struct unixctl_conn *conn OVS_UNUSED, int argc OVS_UNUSED,
-                   const char *argv[] OVS_UNUSED, void *aux OVS_UNUSED)
-{
-    VLOG_INFO("%s", argv[1]);
-    unixctl_command_reply(conn, NULL);
-}
-
-static int
-test_unixctl_main(int argc, char *argv[])
-{
-    char *unixctl_path = NULL;
-    struct unixctl_server *unixctl;
-    bool exiting = false;
-
-    ovs_cmdl_proctitle_init(argc, argv);
-    set_program_name(argv[0]);
-    service_start(&argc, &argv);
-    fatal_ignore_sigpipe();
-    parse_options(&argc, &argv, &unixctl_path);
-
-    daemonize_start(false);
-    int retval = unixctl_server_create(unixctl_path, &unixctl);
-    if (retval) {
-        exit(EXIT_FAILURE);
-    }
-    unixctl_command_register("exit", "", 0, 0, test_unixctl_exit, &exiting);
-    unixctl_command_register("echo", "ARG", 1, 1, test_unixctl_echo, NULL);
-    unixctl_command_register("echo_error", "ARG", 1, 1,
-                             test_unixctl_echo_error, NULL);
-    unixctl_command_register("log", "ARG", 1, 1, test_unixctl_log, NULL);
-    unixctl_command_register("block", "", 0, 0, test_unixctl_block, NULL);
-    daemonize_complete();
-
-    VLOG_INFO("Entering run loop.");
-    while (!exiting) {
-        unixctl_server_run(unixctl);
-        unixctl_server_wait(unixctl);
-        if (exiting) {
-            poll_immediate_wake();
-        }
-        poll_block();
-    }
-    unixctl_server_destroy(unixctl);
-
-    service_stop();
-    return 0;
-}
-
-static void
-parse_options(int *argcp, char **argvp[], char **unixctl_pathp)
-{
-    enum {
-        OPT_REMOTE = UCHAR_MAX + 1,
-        OPT_UNIXCTL,
-        VLOG_OPTION_ENUMS,
-        DAEMON_OPTION_ENUMS
-    };
-    static const struct option long_options[] = {
-        {"unixctl",     required_argument, NULL, OPT_UNIXCTL},
-        {"help",        no_argument, NULL, 'h'},
-        {"version",     no_argument, NULL, 'V'},
-        DAEMON_LONG_OPTIONS,
-        VLOG_LONG_OPTIONS,
-        {NULL, 0, NULL, 0},
-    };
-    char *short_options = ovs_cmdl_long_options_to_short_options(long_options);
-    int argc = *argcp;
-    char **argv = *argvp;
-
-    for (;;) {
-        int c;
-
-        c = getopt_long(argc, argv, short_options, long_options, NULL);
-        if (c == -1) {
-            break;
-        }
-
-        switch (c) {
-        case OPT_UNIXCTL:
-            *unixctl_pathp = optarg;
-            break;
-
-        case 'h':
-            usage();
-
-        case 'V':
-            ovs_print_version(0, 0);
-            exit(EXIT_SUCCESS);
-
-        VLOG_OPTION_HANDLERS
-        DAEMON_OPTION_HANDLERS
-
-        case '?':
-            exit(EXIT_FAILURE);
-
-        default:
-            abort();
-        }
-    }
-    free(short_options);
-
-    *argcp -= optind;
-    *argvp += optind;
-}
-
-static void
-usage(void)
-{
-    printf("%s: Open vSwitch unixctl test program\n"
-           "usage: %s [OPTIONS]\n",
-           program_name, program_name);
-    daemon_usage();
-    vlog_usage();
-    printf("\nOther options:\n"
-           "  --unixctl=SOCKET        override default control socket name\n"
-           "  -h, --help              display this help message\n"
-           "  -V, --version           display version information\n");
-    exit(EXIT_SUCCESS);
-}
-
-OVSTEST_REGISTER("test-unixctl", test_unixctl_main);
diff --git a/tests/test-unixctl.py b/tests/test-unixctl.py
deleted file mode 100644
index 4fa27b09f..000000000
--- a/tests/test-unixctl.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright (c) 2012 Nicira, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import argparse
-
-import ovs.daemon
-import ovs.unixctl
-import ovs.unixctl.server
-
-vlog = ovs.vlog.Vlog("test-unixctl")
-exiting = False
-
-
-def unixctl_exit(conn, unused_argv, aux):
-    assert aux == "aux_exit"
-    global exiting
-
-    exiting = True
-    conn.reply(None)
-
-
-def unixctl_echo(conn, argv, aux):
-    assert aux == "aux_echo"
-    conn.reply(str(argv))
-
-
-def unixctl_echo_error(conn, argv, aux):
-    assert aux == "aux_echo_error"
-    conn.reply_error(str(argv))
-
-
-def unixctl_log(conn, argv, unused_aux):
-    vlog.info(str(argv[0]))
-    conn.reply(None)
-
-
-def unixctl_block(conn, unused_argv, unused_aux):
-    pass
-
-
-def main():
-    parser = argparse.ArgumentParser(
-        description="Open vSwitch unixctl test program for Python")
-    parser.add_argument("--unixctl", help="UNIXCTL socket location or 'none'.")
-
-    ovs.daemon.add_args(parser)
-    ovs.vlog.add_args(parser)
-    args = parser.parse_args()
-    ovs.daemon.handle_args(args)
-    ovs.vlog.handle_args(args)
-
-    ovs.daemon.daemonize_start()
-    error, server = ovs.unixctl.server.UnixctlServer.create(args.unixctl)
-    if error:
-        ovs.util.ovs_fatal(error, "could not create unixctl server at %s"
-                           % args.unixctl, vlog)
-
-    ovs.unixctl.command_register("exit", "", 0, 0, unixctl_exit, "aux_exit")
-    ovs.unixctl.command_register("echo", "[arg ...]", 1, 2, unixctl_echo,
-                                 "aux_echo")
-    ovs.unixctl.command_register("log", "[arg ...]", 1, 2, unixctl_log, None)
-    ovs.unixctl.command_register("echo_error", "[arg ...]", 1, 2,
-                                 unixctl_echo_error, "aux_echo_error")
-    ovs.unixctl.command_register("block", "", 0, 0, unixctl_block, None)
-    ovs.daemon.daemonize_complete()
-
-    vlog.info("Entering run loop.")
-    poller = ovs.poller.Poller()
-    while not exiting:
-        server.run()
-        server.wait(poller)
-        if exiting:
-            poller.immediate_wake()
-        poller.block()
-    server.close()
-
-
-if __name__ == '__main__':
-    main()
diff --git a/tests/test-util.c b/tests/test-util.c
deleted file mode 100644
index 9222355ec..000000000
--- a/tests/test-util.c
+++ /dev/null
@@ -1,1230 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "util.h"
-#include <assert.h>
-#include <getopt.h>
-#include <inttypes.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "byte-order.h"
-#include "command-line.h"
-#include "ovstest.h"
-#include "random.h"
-#include "openvswitch/vlog.h"
-
-static void
-check_log_2_floor(uint32_t x, int n)
-{
-    if (log_2_floor(x) != n) {
-        fprintf(stderr, "log_2_floor(%"PRIu32") is %d but should be %d\n",
-                x, log_2_floor(x), n);
-        abort();
-    }
-}
-
-static void
-test_log_2_floor(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    int n;
-
-    for (n = 0; n < 32; n++) {
-        /* Check minimum x such that f(x) == n. */
-        check_log_2_floor(1 << n, n);
-
-        /* Check maximum x such that f(x) == n. */
-        check_log_2_floor((1 << n) | ((1 << n) - 1), n);
-
-        /* Check a random value in the middle. */
-        check_log_2_floor((random_uint32() & ((1 << n) - 1)) | (1 << n), n);
-    }
-
-    /* log_2_floor(0) is undefined, so don't check it. */
-}
-
-static void
-check_ctz32(uint32_t x, int n)
-{
-    if (ctz32(x) != n) {
-        fprintf(stderr, "ctz32(%"PRIu32") is %d but should be %d\n",
-                x, ctz32(x), n);
-        abort();
-    }
-}
-
-static void
-check_ctz64(uint64_t x, int n)
-{
-    if (ctz64(x) != n) {
-        fprintf(stderr, "ctz64(%"PRIu64") is %d but should be %d\n",
-                x, ctz64(x), n);
-        abort();
-    }
-}
-
-static void
-test_ctz(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    int n;
-
-    for (n = 0; n < 32; n++) {
-        /* Check minimum x such that f(x) == n. */
-        check_ctz32(1 << n, n);
-
-        /* Check maximum x such that f(x) == n. */
-        check_ctz32(UINT32_MAX << n, n);
-
-        /* Check a random value in the middle. */
-        check_ctz32((random_uint32() | 1) << n, n);
-    }
-
-
-    for (n = 0; n < 64; n++) {
-        /* Check minimum x such that f(x) == n. */
-        check_ctz64(UINT64_C(1) << n, n);
-
-        /* Check maximum x such that f(x) == n. */
-        check_ctz64(UINT64_MAX << n, n);
-
-        /* Check a random value in the middle. */
-        check_ctz64((random_uint64() | UINT64_C(1)) << n, n);
-    }
-
-    /* Check ctz(0). */
-    check_ctz32(0, 32);
-    check_ctz64(0, 64);
-}
-
-static void
-check_clz32(uint32_t x, int n)
-{
-    if (clz32(x) != n) {
-        fprintf(stderr, "clz32(%"PRIu32") is %d but should be %d\n",
-                x, clz32(x), n);
-        abort();
-    }
-}
-
-static void
-check_clz64(uint64_t x, int n)
-{
-    if (clz64(x) != n) {
-        fprintf(stderr, "clz64(%"PRIu64") is %d but should be %d\n",
-                x, clz64(x), n);
-        abort();
-    }
-}
-
-static void
-test_clz(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    int n;
-
-    for (n = 0; n < 32; n++) {
-        /* Check minimum x such that f(x) == n. */
-        check_clz32((1u << 31) >> n, n);
-
-        /* Check maximum x such that f(x) == n. */
-        check_clz32(UINT32_MAX >> n, n);
-
-        /* Check a random value in the middle. */
-        check_clz32((random_uint32() | 1u << 31) >> n, n);
-    }
-
-    for (n = 0; n < 64; n++) {
-        /* Check minimum x such that f(x) == n. */
-        check_clz64((UINT64_C(1) << 63) >> n, n);
-
-        /* Check maximum x such that f(x) == n. */
-        check_clz64(UINT64_MAX >> n, n);
-
-        /* Check a random value in the middle. */
-        check_clz64((random_uint64() | UINT64_C(1) << 63) >> n, n);
-    }
-
-    /* Check clz(0). */
-    check_clz32(0, 32);
-    check_clz64(0, 64);
-}
-
-/* Returns a random number in the range 'min'...'max' inclusive. */
-static uint32_t
-random_in_range(uint32_t min, uint32_t max)
-{
-    return min == max ? min : min + random_range(max - min + 1);
-}
-
-static void
-check_rup2(uint32_t x, int n)
-{
-    uint32_t rup2 = ROUND_UP_POW2(x);
-    if (rup2 != n) {
-        fprintf(stderr, "ROUND_UP_POW2(%#"PRIx32") is %#"PRIx32" "
-                "but should be %#"PRIx32"\n", x, rup2, n);
-        abort();
-    }
-}
-
-static void
-test_round_up_pow2(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    int n;
-
-    for (n = 0; n < 32; n++) {
-        /* Min, max value for which ROUND_UP_POW2 should yield (1 << n). */
-        uint32_t min = ((1u << n) >> 1) + 1;
-        uint32_t max = 1u << n;
-
-        check_rup2(min, 1u << n);
-        check_rup2(max, 1u << n);
-        check_rup2(random_in_range(min, max), 1u << n);
-    }
-    check_rup2(0, 0);
-}
-
-static void
-check_rdp2(uint32_t x, int n)
-{
-    uint32_t rdp2 = ROUND_DOWN_POW2(x);
-    if (rdp2 != n) {
-        fprintf(stderr, "ROUND_DOWN_POW2(%#"PRIx32") is %#"PRIx32" "
-                "but should be %#"PRIx32"\n", x, rdp2, n);
-        abort();
-    }
-}
-
-static void
-test_round_down_pow2(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    int n;
-
-    for (n = 0; n < 32; n++) {
-        /* Min, max value for which ROUND_DOWN_POW2 should yield (1 << n). */
-        uint32_t min = 1u << n;
-        uint32_t max = ((1u << n) << 1) - 1;
-
-        check_rdp2(min, 1u << n);
-        check_rdp2(max, 1u << n);
-        check_rdp2(random_in_range(min, max), 1u << n);
-    }
-    check_rdp2(0, 0);
-}
-
-static void
-shuffle(uint64_t *p, size_t n)
-{
-    for (; n > 1; n--, p++) {
-        uint64_t *q = &p[random_range(n)];
-        uint64_t tmp = *p;
-        *p = *q;
-        *q = tmp;
-    }
-}
-
-static void
-check_count_1bits(uint64_t x, int n)
-{
-    if (count_1bits(x) != n) {
-        fprintf(stderr, "count_1bits(%#"PRIx64") is %d but should be %d\n",
-                x, count_1bits(x), n);
-        abort();
-    }
-}
-
-static void
-test_count_1bits(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    uint64_t bits[64];
-    int i;
-
-    for (i = 0; i < ARRAY_SIZE(bits); i++) {
-        bits[i] = UINT64_C(1) << i;
-    }
-
-    check_count_1bits(0, 0);
-
-    for (i = 0; i < 1000; i++) {
-        uint64_t x = 0;
-        int j;
-
-        shuffle(bits, ARRAY_SIZE(bits));
-        for (j = 0; j < 64; j++) {
-            x |= bits[j];
-            check_count_1bits(x, j + 1);
-        }
-        assert(x == UINT64_MAX);
-
-        shuffle(bits, ARRAY_SIZE(bits));
-        for (j = 63; j >= 0; j--) {
-            x &= ~bits[j];
-            check_count_1bits(x, j);
-        }
-        assert(x == 0);
-    }
-}
-
-/* Returns the sum of the squares of the first 'n' positive integers. */
-static unsigned int
-sum_of_squares(int n)
-{
-    return n * (n + 1) * (2 * n + 1) / 6;
-}
-
-static void
-test_bitwise_copy(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    unsigned int n_loops;
-    int src_ofs;
-    int dst_ofs;
-    int n_bits;
-
-    n_loops = 0;
-    for (n_bits = 0; n_bits <= 64; n_bits++) {
-        for (src_ofs = 0; src_ofs < 64 - n_bits; src_ofs++) {
-            for (dst_ofs = 0; dst_ofs < 64 - n_bits; dst_ofs++) {
-                ovs_be64 src = htonll(random_uint64());
-                ovs_be64 dst = htonll(random_uint64());
-                ovs_be64 orig_dst = dst;
-                ovs_be64 expect;
-
-                if (n_bits == 64) {
-                    expect = dst;
-                } else {
-                    uint64_t mask = (UINT64_C(1) << n_bits) - 1;
-                    expect = orig_dst & ~htonll(mask << dst_ofs);
-                    expect |= htonll(((ntohll(src) >> src_ofs) & mask)
-                                     << dst_ofs);
-                }
-
-                bitwise_copy(&src, sizeof src, src_ofs,
-                             &dst, sizeof dst, dst_ofs,
-                             n_bits);
-                if (expect != dst) {
-                    fprintf(stderr,"copy_bits(0x%016"PRIx64",8,%d, "
-                            "0x%016"PRIx64",8,%d, %d) yielded 0x%016"PRIx64" "
-                            "instead of the expected 0x%016"PRIx64"\n",
-                            ntohll(src), src_ofs,
-                            ntohll(orig_dst), dst_ofs,
-                            n_bits,
-                            ntohll(dst), ntohll(expect));
-                    abort();
-                }
-
-                n_loops++;
-            }
-        }
-    }
-
-    if (n_loops != sum_of_squares(64)) {
-        abort();
-    }
-}
-
-static void
-test_bitwise_zero(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    unsigned int n_loops;
-    int dst_ofs;
-    int n_bits;
-
-    n_loops = 0;
-    for (n_bits = 0; n_bits <= 64; n_bits++) {
-        for (dst_ofs = 0; dst_ofs < 64 - n_bits; dst_ofs++) {
-            ovs_be64 dst = htonll(random_uint64());
-            ovs_be64 orig_dst = dst;
-            ovs_be64 expect;
-
-            if (n_bits == 64) {
-                expect = htonll(0);
-            } else {
-                uint64_t mask = (UINT64_C(1) << n_bits) - 1;
-                expect = orig_dst & ~htonll(mask << dst_ofs);
-            }
-
-            bitwise_zero(&dst, sizeof dst, dst_ofs, n_bits);
-            if (expect != dst) {
-                fprintf(stderr,"bitwise_zero(0x%016"PRIx64",8,%d, %d) "
-                        "yielded 0x%016"PRIx64" "
-                        "instead of the expected 0x%016"PRIx64"\n",
-                        ntohll(orig_dst), dst_ofs,
-                        n_bits,
-                        ntohll(dst), ntohll(expect));
-                abort();
-            }
-
-            n_loops++;
-        }
-    }
-
-    if (n_loops != 64 * (64 + 1) / 2) {
-        abort();
-    }
-}
-
-static void
-test_bitwise_one(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    unsigned int n_loops;
-    int dst_ofs;
-    int n_bits;
-
-    n_loops = 0;
-    for (n_bits = 0; n_bits <= 64; n_bits++) {
-        for (dst_ofs = 0; dst_ofs < 64 - n_bits; dst_ofs++) {
-            ovs_be64 dst = htonll(random_uint64());
-            ovs_be64 orig_dst = dst;
-            ovs_be64 expect;
-
-            if (n_bits == 64) {
-                expect = OVS_BE64_MAX;
-            } else {
-                uint64_t mask = (UINT64_C(1) << n_bits) - 1;
-                expect = orig_dst | htonll(mask << dst_ofs);
-            }
-
-            bitwise_one(&dst, sizeof dst, dst_ofs, n_bits);
-            if (expect != dst) {
-                fprintf(stderr,"bitwise_one(0x%016"PRIx64",8,%d, %d) "
-                        "yielded 0x%016"PRIx64" "
-                        "instead of the expected 0x%016"PRIx64"\n",
-                        ntohll(orig_dst), dst_ofs,
-                        n_bits,
-                        ntohll(dst), ntohll(expect));
-                abort();
-            }
-
-            n_loops++;
-        }
-    }
-
-    if (n_loops != 64 * (64 + 1) / 2) {
-        abort();
-    }
-}
-
-static void
-test_bitwise_is_all_zeros(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    int n_loops;
-
-    for (n_loops = 0; n_loops < 100; n_loops++) {
-        ovs_be64 x = htonll(0);
-        int i;
-
-        for (i = 0; i < 64; i++) {
-            ovs_be64 bit;
-            int ofs, n;
-
-            /* Change a random 0-bit into a 1-bit. */
-            do {
-                bit = htonll(UINT64_C(1) << (random_range(64)));
-            } while (x & bit);
-            x |= bit;
-
-            for (ofs = 0; ofs < 64; ofs++) {
-                for (n = 0; n <= 64 - ofs; n++) {
-                    bool expect;
-                    bool answer;
-
-                    expect = (n == 64
-                              ? x == 0
-                              : !(x & htonll(((UINT64_C(1) << n) - 1)
-                                             << ofs)));
-                    answer = bitwise_is_all_zeros(&x, sizeof x, ofs, n);
-                    if (expect != answer) {
-                        fprintf(stderr,
-                                "bitwise_is_all_zeros(0x%016"PRIx64",8,%d,%d "
-                                "returned %s instead of %s\n",
-                                ntohll(x), ofs, n,
-                                answer ? "true" : "false",
-                                expect ? "true" : "false");
-                        abort();
-                    }
-                }
-            }
-        }
-    }
-}
-
-static int
-trivial_bitwise_rscan(const void *p, unsigned int len, bool target,
-                      int start, int end)
-{
-    int ofs;
-
-    for (ofs = start; ofs > end; ofs--) {
-        if (bitwise_get_bit(p, len, ofs) == target) {
-            break;
-        }
-    }
-    return ofs;
-}
-
-static void
-test_bitwise_rscan(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    /* All 1s */
-    uint8_t s1[3] = {0xff, 0xff, 0xff};
-    /* Target is the first bit */
-    ovs_assert(23 == bitwise_rscan(s1, 3, 1, 23, -1));
-    /* Target is not found, return -1 */
-    ovs_assert(-1 == bitwise_rscan(s1, 3, 0, 23, -1));
-    /* Target is not found and end != -1, return end */
-    ovs_assert(20 == bitwise_rscan(s1, 3, 0, 23, 20));
-
-    /* bit 20 - 23 are 0s */
-    uint8_t s2[3] = {0x0f, 0xff, 0xff};
-    /* Target is in the first byte but not the first bit */
-    ovs_assert(19 == bitwise_rscan(s2, 3, 1, 23, -1));
-    /* Target exists before the start postion */
-    ovs_assert(18 == bitwise_rscan(s2, 3, 1, 18, -1));
-    /* Target exists after the end postion, return end */
-    ovs_assert(20 == bitwise_rscan(s2, 3, 1, 23, 20));
-    /* Target is at the end postion, return end */
-    ovs_assert(19 == bitwise_rscan(s2, 3, 1, 23, 19));
-    /* start == end, target at start */
-    ovs_assert(19 == bitwise_rscan(s2, 3, 1, 19, 19));
-    /* start == end, target not at start */
-    ovs_assert(20 == bitwise_rscan(s2, 3, 1, 20, 20));
-    /* Target is 0 ... */
-    ovs_assert(22 == bitwise_rscan(s2, 3, 0, 22, -1));
-
-    /* bit 4 - 23 are 0s */
-    uint8_t s3[3] = {0x00, 0x00, 0x0f};
-    /* Target is in the end byte */
-    ovs_assert(3 == bitwise_rscan(s3, 3, 1, 16, -1));
-    /* Target exists after the end byte, return end */
-    ovs_assert(15 == bitwise_rscan(s3, 3, 1, 23, 15));
-    /* Target exists in end byte but after the end bit, return end */
-    ovs_assert(4 == bitwise_rscan(s3, 3, 1, 23, 4));
-    /* Target is 0 ... */
-    ovs_assert(12 == bitwise_rscan(s3, 3, 0, 12, -1));
-
-    /* All 0s */
-    uint8_t s4[3] = {0x00, 0x00, 0x00};
-    /* Target not found */
-    ovs_assert(-1 == bitwise_rscan(s4, 3, 1, 23, -1));
-    /* Target is 0 ..., start is 0 */
-    ovs_assert(0 == bitwise_rscan(s4, 3, 0, 0, -1));
-
-    int n_loops;
-    for (n_loops = 0; n_loops < 100; n_loops++) {
-        ovs_be64 x = htonll(0);
-        int i;
-
-        for (i = 0; i < 64; i++) {
-            ovs_be64 bit;
-
-            /* Change a random 0-bit into a 1-bit. */
-            do {
-                bit = htonll(UINT64_C(1) << (random_range(64)));
-            } while (x & bit);
-            x |= bit;
-
-            for (int end = -1; end <= 63; end++) {
-                for (int start = end; start <= 63; start++) {
-                    for (int target = 0; target < 2; target++) {
-                        bool expect = trivial_bitwise_rscan(
-                            &x, sizeof x, target, start, end);
-                        bool answer = bitwise_rscan(
-                            &x, sizeof x, target, start, end);
-                        if (expect != answer) {
-                            fprintf(stderr,
-                                    "bitwise_rscan(0x%016"PRIx64",8,%s,%d,%d) "
-                                    "returned %s instead of %s\n",
-                                    ntohll(x),
-                                    target ? "true" : "false",
-                                    start, end,
-                                    answer ? "true" : "false",
-                                    expect ? "true" : "false");
-                            abort();
-                        }
-                    }
-                }
-            }
-        }
-    }
-}
-
-static void
-test_follow_symlinks(struct ovs_cmdl_context *ctx)
-{
-    int i;
-
-    for (i = 1; i < ctx->argc; i++) {
-        char *target = follow_symlinks(ctx->argv[i]);
-        puts(target);
-        free(target);
-    }
-}
-
-static void
-test_assert(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    ovs_assert(false);
-}
-
-static void
-test_ovs_scan(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    char str[16], str2[16], str3[16];
-    long double ld, ld2;
-    long long ll, ll2;
-    signed char c, c2;
-    ptrdiff_t pd, pd2;
-    intmax_t im, im2;
-    size_t sz, sz2;
-    int n, n2, n3;
-    double d, d2;
-    short s, s2;
-    float f, f2;
-    long l, l2;
-    int i, i2;
-
-    ovs_assert(ovs_scan("", " "));
-    ovs_assert(ovs_scan(" ", " "));
-    ovs_assert(ovs_scan("  ", " "));
-    ovs_assert(ovs_scan(" \t ", " "));
-
-    ovs_assert(ovs_scan("xyzzy", "xyzzy"));
-    ovs_assert(ovs_scan("xy%zzy", "xy%%zzy"));
-    ovs_assert(!ovs_scan(" xy%zzy", "xy%%zzy"));
-    ovs_assert(ovs_scan("    xy%\tzzy", " xy%% zzy"));
-
-    ovs_assert(ovs_scan("123", "%d", &i));
-    ovs_assert(i == 123);
-    ovs_assert(ovs_scan("0", "%d", &i));
-    ovs_assert(i == 0);
-    ovs_assert(!ovs_scan("123", "%d%d", &i, &i2));
-    ovs_assert(ovs_scan("+123", "%d", &i));
-    ovs_assert(i == 123);
-    ovs_assert(ovs_scan("-123", "%d", &i));
-    ovs_assert(i == -123);
-    ovs_assert(ovs_scan("0123", "%d", &i));
-    ovs_assert(i == 123);
-    ovs_assert(ovs_scan(" 123", "%d", &i));
-    ovs_assert(i == 123);
-    ovs_assert(ovs_scan("0x123", "%d", &i));
-    ovs_assert(i == 0);
-    ovs_assert(ovs_scan("123", "%2d %d", &i, &i2));
-    ovs_assert(i == 12);
-    ovs_assert(i2 == 3);
-    ovs_assert(ovs_scan("+123", "%2d %d", &i, &i2));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 23);
-    ovs_assert(ovs_scan("-123", "%2d %d", &i, &i2));
-    ovs_assert(i == -1);
-    ovs_assert(i2 == 23);
-    ovs_assert(ovs_scan("0123", "%2d %d", &i, &i2));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 23);
-    ovs_assert(ovs_scan("123", "%*2d %d", &i));
-    ovs_assert(i == 3);
-    ovs_assert(ovs_scan("+123", "%2d %*d", &i));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 23);
-    ovs_assert(ovs_scan("-123", "%*2d %*d"));
-
-    ovs_assert(ovs_scan("123", "%u", &i));
-    ovs_assert(i == 123);
-    ovs_assert(ovs_scan("0", "%u", &i));
-    ovs_assert(i == 0);
-    ovs_assert(!ovs_scan("123", "%u%u", &i, &i2));
-    ovs_assert(ovs_scan("+123", "%u", &i));
-    ovs_assert(i == 123);
-    ovs_assert(ovs_scan("-123", "%u", &i));
-    ovs_assert(i == -123);
-    ovs_assert(ovs_scan("0123", "%u", &i));
-    ovs_assert(i == 123);
-    ovs_assert(ovs_scan(" 123", "%u", &i));
-    ovs_assert(i == 123);
-    ovs_assert(ovs_scan("0x123", "%u", &i));
-    ovs_assert(i == 0);
-    ovs_assert(ovs_scan("123", "%2u %u", &i, &i2));
-    ovs_assert(i == 12);
-    ovs_assert(i2 == 3);
-    ovs_assert(ovs_scan("+123", "%2u %u", &i, &i2));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 23);
-    ovs_assert(ovs_scan("-123", "%2u %u", &i, &i2));
-    ovs_assert(i == -1);
-    ovs_assert(i2 == 23);
-    ovs_assert(ovs_scan("0123", "%2u %u", &i, &i2));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 23);
-    ovs_assert(ovs_scan("123", "%*2u %u", &i));
-    ovs_assert(i == 3);
-    ovs_assert(ovs_scan("+123", "%2u %*u", &i));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 23);
-    ovs_assert(ovs_scan("-123", "%*2u %*u"));
-
-    ovs_assert(ovs_scan("123", "%i", &i));
-    ovs_assert(i == 123);
-    ovs_assert(ovs_scan("0", "%i", &i));
-    ovs_assert(i == 0);
-    ovs_assert(!ovs_scan("123", "%i%i", &i, &i2));
-    ovs_assert(ovs_scan("+123", "%i", &i));
-    ovs_assert(i == 123);
-    ovs_assert(ovs_scan("-123", "%i", &i));
-    ovs_assert(i == -123);
-    ovs_assert(ovs_scan("0123", "%i", &i));
-    ovs_assert(i == 0123);
-    ovs_assert(ovs_scan(" 123", "%i", &i));
-    ovs_assert(i == 123);
-    ovs_assert(ovs_scan("0x123", "%i", &i));
-    ovs_assert(i == 0x123);
-    ovs_assert(ovs_scan("123", "%2i %i", &i, &i2));
-    ovs_assert(i == 12);
-    ovs_assert(i2 == 3);
-    ovs_assert(ovs_scan("+123", "%2i %i", &i, &i2));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 23);
-    ovs_assert(ovs_scan("-123", "%2i %i", &i, &i2));
-    ovs_assert(i == -1);
-    ovs_assert(i2 == 23);
-    ovs_assert(ovs_scan("0123", "%2i %i", &i, &i2));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 23);
-    ovs_assert(ovs_scan("123", "%*2i %i", &i));
-    ovs_assert(i == 3);
-    ovs_assert(ovs_scan("+123", "%2i %*i", &i));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 23);
-    ovs_assert(ovs_scan("-123", "%*2i %*i"));
-
-    ovs_assert(ovs_scan("123", "%o", &i));
-    ovs_assert(i == 0123);
-    ovs_assert(ovs_scan("0", "%o", &i));
-    ovs_assert(i == 0);
-    ovs_assert(!ovs_scan("123", "%o%o", &i, &i2));
-    ovs_assert(ovs_scan("+123", "%o", &i));
-    ovs_assert(i == 0123);
-    ovs_assert(ovs_scan("-123", "%o", &i));
-    ovs_assert(i == -0123);
-    ovs_assert(ovs_scan("0123", "%o", &i));
-    ovs_assert(i == 0123);
-    ovs_assert(ovs_scan(" 123", "%o", &i));
-    ovs_assert(i == 0123);
-    ovs_assert(ovs_scan("0x123", "%o", &i));
-    ovs_assert(i == 0);
-    ovs_assert(ovs_scan("123", "%2o %o", &i, &i2));
-    ovs_assert(i == 012);
-    ovs_assert(i2 == 3);
-    ovs_assert(ovs_scan("+123", "%2o %o", &i, &i2));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 023);
-    ovs_assert(ovs_scan("-123", "%2o %o", &i, &i2));
-    ovs_assert(i == -1);
-    ovs_assert(i2 == 023);
-    ovs_assert(ovs_scan("0123", "%2o %o", &i, &i2));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 023);
-    ovs_assert(ovs_scan("123", "%*2o %o", &i));
-    ovs_assert(i == 3);
-    ovs_assert(ovs_scan("+123", "%2o %*o", &i));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 023);
-    ovs_assert(ovs_scan("-123", "%*2o %*o"));
-
-    ovs_assert(ovs_scan("123", "%x", &i));
-    ovs_assert(i == 0x123);
-    ovs_assert(ovs_scan("0", "%x", &i));
-    ovs_assert(i == 0);
-    ovs_assert(!ovs_scan("123", "%x%x", &i, &i2));
-    ovs_assert(ovs_scan("+123", "%x", &i));
-    ovs_assert(i == 0x123);
-    ovs_assert(ovs_scan("-123", "%x", &i));
-    ovs_assert(i == -0x123);
-    ovs_assert(ovs_scan("0123", "%x", &i));
-    ovs_assert(i == 0x123);
-    ovs_assert(ovs_scan(" 123", "%x", &i));
-    ovs_assert(i == 0x123);
-    ovs_assert(ovs_scan("0x123", "%x", &i));
-    ovs_assert(i == 0x123);
-    ovs_assert(ovs_scan("123", "%2x %x", &i, &i2));
-    ovs_assert(i == 0x12);
-    ovs_assert(i2 == 3);
-    ovs_assert(ovs_scan("+123", "%2x %x", &i, &i2));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 0x23);
-    ovs_assert(ovs_scan("-123", "%2x %x", &i, &i2));
-    ovs_assert(i == -1);
-    ovs_assert(i2 == 0x23);
-    ovs_assert(ovs_scan("0123", "%2x %x", &i, &i2));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 0x23);
-    ovs_assert(ovs_scan("123", "%*2x %x", &i));
-    ovs_assert(i == 3);
-    ovs_assert(ovs_scan("+123", "%2x %*x", &i));
-    ovs_assert(i == 1);
-    ovs_assert(i2 == 0x23);
-    ovs_assert(ovs_scan("-123", "%*2x %*x"));
-
-    ovs_assert(ovs_scan("123", "%hd", &s));
-    ovs_assert(s == 123);
-    ovs_assert(!ovs_scan("123", "%hd%hd", &s, &s2));
-    ovs_assert(ovs_scan("+123", "%hd", &s));
-    ovs_assert(s == 123);
-    ovs_assert(ovs_scan("-123", "%hd", &s));
-    ovs_assert(s == -123);
-    ovs_assert(ovs_scan("0123", "%hd", &s));
-    ovs_assert(s == 123);
-    ovs_assert(ovs_scan(" 123", "%hd", &s));
-    ovs_assert(s == 123);
-    ovs_assert(ovs_scan("0x123", "%hd", &s));
-    ovs_assert(s == 0);
-    ovs_assert(ovs_scan("123", "%2hd %hd", &s, &s2));
-    ovs_assert(s == 12);
-    ovs_assert(s2 == 3);
-    ovs_assert(ovs_scan("+123", "%2hd %hd", &s, &s2));
-    ovs_assert(s == 1);
-    ovs_assert(s2 == 23);
-    ovs_assert(ovs_scan("-123", "%2hd %hd", &s, &s2));
-    ovs_assert(s == -1);
-    ovs_assert(s2 == 23);
-    ovs_assert(ovs_scan("0123", "%2hd %hd", &s, &s2));
-    ovs_assert(s == 1);
-    ovs_assert(s2 == 23);
-
-    ovs_assert(ovs_scan("123", "%hhd", &c));
-    ovs_assert(c == 123);
-    ovs_assert(ovs_scan("0", "%hhd", &c));
-    ovs_assert(c == 0);
-    ovs_assert(!ovs_scan("123", "%hhd%hhd", &c, &c2));
-    ovs_assert(ovs_scan("+123", "%hhd", &c));
-    ovs_assert(c == 123);
-    ovs_assert(ovs_scan("-123", "%hhd", &c));
-    ovs_assert(c == -123);
-    ovs_assert(ovs_scan("0123", "%hhd", &c));
-    ovs_assert(c == 123);
-    ovs_assert(ovs_scan(" 123", "%hhd", &c));
-    ovs_assert(c == 123);
-    ovs_assert(ovs_scan("0x123", "%hhd", &c));
-    ovs_assert(c == 0);
-    ovs_assert(ovs_scan("123", "%2hhd %hhd", &c, &c2));
-    ovs_assert(c == 12);
-    ovs_assert(c2 == 3);
-    ovs_assert(ovs_scan("+123", "%2hhd %hhd", &c, &c2));
-    ovs_assert(c == 1);
-    ovs_assert(c2 == 23);
-    ovs_assert(ovs_scan("-123", "%2hhd %hhd", &c, &c2));
-    ovs_assert(c == -1);
-    ovs_assert(c2 == 23);
-    ovs_assert(ovs_scan("0123", "%2hhd %hhd", &c, &c2));
-    ovs_assert(c == 1);
-    ovs_assert(c2 == 23);
-
-    ovs_assert(ovs_scan("123", "%ld", &l));
-    ovs_assert(l == 123);
-    ovs_assert(ovs_scan("0", "%ld", &l));
-    ovs_assert(l == 0);
-    ovs_assert(!ovs_scan("123", "%ld%ld", &l, &l2));
-    ovs_assert(ovs_scan("+123", "%ld", &l));
-    ovs_assert(l == 123);
-    ovs_assert(ovs_scan("-123", "%ld", &l));
-    ovs_assert(l == -123);
-    ovs_assert(ovs_scan("0123", "%ld", &l));
-    ovs_assert(l == 123);
-    ovs_assert(ovs_scan(" 123", "%ld", &l));
-    ovs_assert(l == 123);
-    ovs_assert(ovs_scan("0x123", "%ld", &l));
-    ovs_assert(l == 0);
-    ovs_assert(ovs_scan("123", "%2ld %ld", &l, &l2));
-    ovs_assert(l == 12);
-    ovs_assert(l2 == 3);
-    ovs_assert(ovs_scan("+123", "%2ld %ld", &l, &l2));
-    ovs_assert(l == 1);
-    ovs_assert(l2 == 23);
-    ovs_assert(ovs_scan("-123", "%2ld %ld", &l, &l2));
-    ovs_assert(l == -1);
-    ovs_assert(l2 == 23);
-    ovs_assert(ovs_scan("0123", "%2ld %ld", &l, &l2));
-    ovs_assert(l == 1);
-    ovs_assert(l2 == 23);
-
-    ovs_assert(ovs_scan("123", "%lld", &ll));
-    ovs_assert(ll == 123);
-    ovs_assert(ovs_scan("0", "%lld", &ll));
-    ovs_assert(ll == 0);
-    ovs_assert(!ovs_scan("123", "%lld%lld", &ll, &ll2));
-    ovs_assert(ovs_scan("+123", "%lld", &ll));
-    ovs_assert(ll == 123);
-    ovs_assert(ovs_scan("-123", "%lld", &ll));
-    ovs_assert(ll == -123);
-    ovs_assert(ovs_scan("0123", "%lld", &ll));
-    ovs_assert(ll == 123);
-    ovs_assert(ovs_scan(" 123", "%lld", &ll));
-    ovs_assert(ll == 123);
-    ovs_assert(ovs_scan("0x123", "%lld", &ll));
-    ovs_assert(ll == 0);
-    ovs_assert(ovs_scan("123", "%2lld %lld", &ll, &ll2));
-    ovs_assert(ll == 12);
-    ovs_assert(ll2 == 3);
-    ovs_assert(ovs_scan("+123", "%2lld %lld", &ll, &ll2));
-    ovs_assert(ll == 1);
-    ovs_assert(ll2 == 23);
-    ovs_assert(ovs_scan("-123", "%2lld %lld", &ll, &ll2));
-    ovs_assert(ll == -1);
-    ovs_assert(ll2 == 23);
-    ovs_assert(ovs_scan("0123", "%2lld %lld", &ll, &ll2));
-    ovs_assert(ll == 1);
-    ovs_assert(ll2 == 23);
-
-    ovs_assert(ovs_scan("123", "%jd", &im));
-    ovs_assert(im == 123);
-    ovs_assert(ovs_scan("0", "%jd", &im));
-    ovs_assert(im == 0);
-    ovs_assert(!ovs_scan("123", "%jd%jd", &im, &im2));
-    ovs_assert(ovs_scan("+123", "%jd", &im));
-    ovs_assert(im == 123);
-    ovs_assert(ovs_scan("-123", "%jd", &im));
-    ovs_assert(im == -123);
-    ovs_assert(ovs_scan("0123", "%jd", &im));
-    ovs_assert(im == 123);
-    ovs_assert(ovs_scan(" 123", "%jd", &im));
-    ovs_assert(im == 123);
-    ovs_assert(ovs_scan("0x123", "%jd", &im));
-    ovs_assert(im == 0);
-    ovs_assert(ovs_scan("123", "%2jd %jd", &im, &im2));
-    ovs_assert(im == 12);
-    ovs_assert(im2 == 3);
-    ovs_assert(ovs_scan("+123", "%2jd %jd", &im, &im2));
-    ovs_assert(im == 1);
-    ovs_assert(im2 == 23);
-    ovs_assert(ovs_scan("-123", "%2jd %jd", &im, &im2));
-    ovs_assert(im == -1);
-    ovs_assert(im2 == 23);
-    ovs_assert(ovs_scan("0123", "%2jd %jd", &im, &im2));
-    ovs_assert(im == 1);
-    ovs_assert(im2 == 23);
-
-    ovs_assert(ovs_scan("123", "%td", &pd));
-    ovs_assert(pd == 123);
-    ovs_assert(ovs_scan("0", "%td", &pd));
-    ovs_assert(pd == 0);
-    ovs_assert(!ovs_scan("123", "%td%td", &pd, &pd2));
-    ovs_assert(ovs_scan("+123", "%td", &pd));
-    ovs_assert(pd == 123);
-    ovs_assert(ovs_scan("-123", "%td", &pd));
-    ovs_assert(pd == -123);
-    ovs_assert(ovs_scan("0123", "%td", &pd));
-    ovs_assert(pd == 123);
-    ovs_assert(ovs_scan(" 123", "%td", &pd));
-    ovs_assert(pd == 123);
-    ovs_assert(ovs_scan("0x123", "%td", &pd));
-    ovs_assert(pd == 0);
-    ovs_assert(ovs_scan("123", "%2td %td", &pd, &pd2));
-    ovs_assert(pd == 12);
-    ovs_assert(pd2 == 3);
-    ovs_assert(ovs_scan("+123", "%2td %td", &pd, &pd2));
-    ovs_assert(pd == 1);
-    ovs_assert(pd2 == 23);
-    ovs_assert(ovs_scan("-123", "%2td %td", &pd, &pd2));
-    ovs_assert(pd == -1);
-    ovs_assert(pd2 == 23);
-    ovs_assert(ovs_scan("0123", "%2td %td", &pd, &pd2));
-    ovs_assert(pd == 1);
-    ovs_assert(pd2 == 23);
-
-    ovs_assert(ovs_scan("123", "%zd", &sz));
-    ovs_assert(sz == 123);
-    ovs_assert(ovs_scan("0", "%zd", &sz));
-    ovs_assert(sz == 0);
-    ovs_assert(!ovs_scan("123", "%zd%zd", &sz, &sz2));
-    ovs_assert(ovs_scan("+123", "%zd", &sz));
-    ovs_assert(sz == 123);
-    ovs_assert(ovs_scan("-123", "%zd", &sz));
-    ovs_assert(sz == -123);
-    ovs_assert(ovs_scan("0123", "%zd", &sz));
-    ovs_assert(sz == 123);
-    ovs_assert(ovs_scan(" 123", "%zd", &sz));
-    ovs_assert(sz == 123);
-    ovs_assert(ovs_scan("0x123", "%zd", &sz));
-    ovs_assert(sz == 0);
-    ovs_assert(ovs_scan("123", "%2zd %zd", &sz, &sz2));
-    ovs_assert(sz == 12);
-    ovs_assert(sz2 == 3);
-    ovs_assert(ovs_scan("+123", "%2zd %zd", &sz, &sz2));
-    ovs_assert(sz == 1);
-    ovs_assert(sz2 == 23);
-    ovs_assert(ovs_scan("-123", "%2zd %zd", &sz, &sz2));
-    ovs_assert(sz == -1);
-    ovs_assert(sz2 == 23);
-    ovs_assert(ovs_scan("0123", "%2zd %zd", &sz, &sz2));
-    ovs_assert(sz == 1);
-    ovs_assert(sz2 == 23);
-
-    ovs_assert(ovs_scan("0.25", "%f", &f));
-    ovs_assert(f == 0.25);
-    ovs_assert(ovs_scan("1.0", "%f", &f));
-    ovs_assert(f == 1.0);
-    ovs_assert(ovs_scan("-5", "%f", &f));
-    ovs_assert(f == -5.0);
-    ovs_assert(ovs_scan("+6", "%f", &f));
-    ovs_assert(f == 6.0);
-    ovs_assert(ovs_scan("-1e5", "%f", &f));
-    ovs_assert(f == -1e5);
-    ovs_assert(ovs_scan("-.25", "%f", &f));
-    ovs_assert(f == -.25);
-    ovs_assert(ovs_scan("+123.e1", "%f", &f));
-    ovs_assert(f == 1230.0);
-    ovs_assert(ovs_scan("25e-2", "%f", &f));
-    ovs_assert(f == 0.25);
-    ovs_assert(ovs_scan("0.25", "%1f %f", &f, &f2));
-    ovs_assert(f == 0);
-    ovs_assert(f2 == 0.25);
-    ovs_assert(ovs_scan("1.0", "%2f %f", &f, &f2));
-    ovs_assert(f == 1.0);
-    ovs_assert(f2 == 0.0);
-    ovs_assert(!ovs_scan("-5", "%1f", &f));
-    ovs_assert(!ovs_scan("+6", "%1f", &f));
-    ovs_assert(!ovs_scan("-1e5", "%2f %*f", &f));
-    ovs_assert(f == -1);
-    ovs_assert(!ovs_scan("-.25", "%2f", &f));
-    ovs_assert(!ovs_scan("+123.e1", "%6f", &f));
-    ovs_assert(!ovs_scan("25e-2", "%4f", &f));
-
-    ovs_assert(ovs_scan("0.25", "%lf", &d));
-    ovs_assert(d == 0.25);
-    ovs_assert(ovs_scan("1.0", "%lf", &d));
-    ovs_assert(d == 1.0);
-    ovs_assert(ovs_scan("-5", "%lf", &d));
-    ovs_assert(d == -5.0);
-    ovs_assert(ovs_scan("+6", "%lf", &d));
-    ovs_assert(d == 6.0);
-    ovs_assert(ovs_scan("-1e5", "%lf", &d));
-    ovs_assert(d == -1e5);
-    ovs_assert(ovs_scan("-.25", "%lf", &d));
-    ovs_assert(d == -.25);
-    ovs_assert(ovs_scan("+123.e1", "%lf", &d));
-    ovs_assert(d == 1230.0);
-    ovs_assert(ovs_scan("25e-2", "%lf", &d));
-    ovs_assert(d == 0.25);
-    ovs_assert(ovs_scan("0.25", "%1lf %lf", &d, &d2));
-    ovs_assert(d == 0);
-    ovs_assert(d2 == 0.25);
-    ovs_assert(ovs_scan("1.0", "%2lf %lf", &d, &d2));
-    ovs_assert(d == 1.0);
-    ovs_assert(d2 == 0.0);
-    ovs_assert(!ovs_scan("-5", "%1lf", &d));
-    ovs_assert(!ovs_scan("+6", "%1lf", &d));
-    ovs_assert(!ovs_scan("-1e5", "%2lf %*f", &d));
-    ovs_assert(d == -1);
-    ovs_assert(!ovs_scan("-.25", "%2lf", &d));
-    ovs_assert(!ovs_scan("+123.e1", "%6lf", &d));
-    ovs_assert(!ovs_scan("25e-2", "%4lf", &d));
-
-    ovs_assert(ovs_scan("0.25", "%Lf", &ld));
-    ovs_assert(ld == 0.25);
-    ovs_assert(ovs_scan("1.0", "%Lf", &ld));
-    ovs_assert(ld == 1.0);
-    ovs_assert(ovs_scan("-5", "%Lf", &ld));
-    ovs_assert(ld == -5.0);
-    ovs_assert(ovs_scan("+6", "%Lf", &ld));
-    ovs_assert(ld == 6.0);
-    ovs_assert(ovs_scan("-1e5", "%Lf", &ld));
-    ovs_assert(ld == -1e5);
-    ovs_assert(ovs_scan("-.25", "%Lf", &ld));
-    ovs_assert(ld == -.25);
-    ovs_assert(ovs_scan("+123.e1", "%Lf", &ld));
-    ovs_assert(ld == 1230.0);
-    ovs_assert(ovs_scan("25e-2", "%Lf", &ld));
-    ovs_assert(ld == 0.25);
-    ovs_assert(ovs_scan("0.25", "%1Lf %Lf", &ld, &ld2));
-    ovs_assert(ld == 0);
-    ovs_assert(ld2 == 0.25);
-    ovs_assert(ovs_scan("1.0", "%2Lf %Lf", &ld, &ld2));
-    ovs_assert(ld == 1.0);
-    ovs_assert(ld2 == 0.0);
-    ovs_assert(!ovs_scan("-5", "%1Lf", &ld));
-    ovs_assert(!ovs_scan("+6", "%1Lf", &ld));
-    ovs_assert(!ovs_scan("-1e5", "%2Lf %*f", &ld));
-    ovs_assert(ld == -1);
-    ovs_assert(!ovs_scan("-.25", "%2Lf", &ld));
-    ovs_assert(!ovs_scan("+123.e1", "%6Lf", &ld));
-    ovs_assert(!ovs_scan("25e-2", "%4Lf", &ld));
-
-    ovs_assert(ovs_scan(" Hello,\tworld ", "%*s%n%*s%n", &n, &n2));
-    ovs_assert(n == 7);
-    ovs_assert(n2 == 13);
-    ovs_assert(!ovs_scan(" Hello,\tworld ", "%*s%*s%*s"));
-    ovs_assert(ovs_scan(" Hello,\tworld ", "%6s%n%5s%n", str, &n, str2, &n2));
-    ovs_assert(!strcmp(str, "Hello,"));
-    ovs_assert(n == 7);
-    ovs_assert(!strcmp(str2, "world"));
-    ovs_assert(n2 == 13);
-    ovs_assert(ovs_scan(" Hello,\tworld ", "%5s%5s%5s", str, str2, str3));
-    ovs_assert(!strcmp(str, "Hello"));
-    ovs_assert(!strcmp(str2, ","));
-    ovs_assert(!strcmp(str3, "world"));
-    ovs_assert(!ovs_scan(" ", "%*s"));
-
-    ovs_assert(ovs_scan(" Hello,\tworld ", "%*c%n%*c%n%c%n",
-                        &n, &n2, &c, &n3));
-    ovs_assert(n == 1);
-    ovs_assert(n2 == 2);
-    ovs_assert(c == 'e');
-    ovs_assert(n3 == 3);
-    ovs_assert(ovs_scan(" Hello,\tworld ", "%*5c%5c", str));
-    ovs_assert(!memcmp(str, "o,\two", 5));
-    ovs_assert(!ovs_scan(" Hello,\tworld ", "%*15c"));
-
-    ovs_assert(ovs_scan("0x1234xyzzy", "%9[x0-9a-fA-F]%n", str, &n));
-    ovs_assert(!strcmp(str, "0x1234x"));
-    ovs_assert(n == 7);
-    ovs_assert(ovs_scan("foo:bar=baz", "%5[^:=]%n:%5[^:=]%n=%5[^:=]%n",
-                        str, &n, str2, &n2, str3, &n3));
-    ovs_assert(!strcmp(str, "foo"));
-    ovs_assert(n == 3);
-    ovs_assert(!strcmp(str2, "bar"));
-    ovs_assert(n2 == 7);
-    ovs_assert(!strcmp(str3, "baz"));
-    ovs_assert(n3 == 11);
-    ovs_assert(!ovs_scan(" ", "%*[0-9]"));
-    ovs_assert(ovs_scan("0x123a]4xyzzy-", "%[]x0-9a-fA-F]", str));
-    ovs_assert(!strcmp(str, "0x123a]4x"));
-    ovs_assert(ovs_scan("abc]xyz","%[^]xyz]", str));
-    ovs_assert(!strcmp(str, "abc"));
-    ovs_assert(!ovs_scan("0x123a]4xyzzy-", "%[x0-9]a-fA-F]", str));
-    ovs_assert(ovs_scan("0x12-3]xyz", "%[x0-9a-f-]", str));
-    ovs_assert(!strcmp(str, "0x12-3"));
-    ovs_assert(ovs_scan("0x12-3]xyz", "%[^a-f-]", str));
-    ovs_assert(!strcmp(str, "0x12"));
-    ovs_assert(sscanf("0x12-3]xyz", "%[^-a-f]", str));
-    ovs_assert(!strcmp(str, "0x12"));
-}
-
-static void
-test_snprintf(struct ovs_cmdl_context *ctx OVS_UNUSED)
-{
-    char s[16];
-
-#if __GNUC__ >= 7
-    /* GCC 7+ warns about the following calls that truncate a string using
-     * snprintf().  We're testing that truncation works properly, so
-     * temporarily disable the warning. */
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-truncation"
-#endif
-    ovs_assert(snprintf(s, 4, "abcde") == 5);
-    ovs_assert(!strcmp(s, "abc"));
-
-    ovs_assert(snprintf(s, 5, "abcde") == 5);
-    ovs_assert(!strcmp(s, "abcd"));
-#if __GNUC__ >= 7
-#pragma GCC diagnostic pop
-#endif
-
-    ovs_assert(snprintf(s, 6, "abcde") == 5);
-    ovs_assert(!strcmp(s, "abcde"));
-
-    ovs_assert(snprintf(NULL, 0, "abcde") == 5);
-}
-
-#ifndef _WIN32
-static void
-test_file_name(struct ovs_cmdl_context *ctx)
-{
-    int i;
-
-    for (i = 1; i < ctx->argc; i++) {
-        char *dir, *base;
-
-        dir = dir_name(ctx->argv[i]);
-        puts(dir);
-        free(dir);
-
-        base = base_name(ctx->argv[i]);
-        puts(base);
-        free(base);
-    }
-}
-#endif /* _WIN32 */
-
-static const struct ovs_cmdl_command commands[] = {
-    {"ctz", NULL, 0, 0, test_ctz, OVS_RO},
-    {"clz", NULL, 0, 0, test_clz, OVS_RO},
-    {"round_up_pow2", NULL, 0, 0, test_round_up_pow2, OVS_RO},
-    {"round_down_pow2", NULL, 0, 0, test_round_down_pow2, OVS_RO},
-    {"count_1bits", NULL, 0, 0, test_count_1bits, OVS_RO},
-    {"log_2_floor", NULL, 0, 0, test_log_2_floor, OVS_RO},
-    {"bitwise_copy", NULL, 0, 0, test_bitwise_copy, OVS_RO},
-    {"bitwise_zero", NULL, 0, 0, test_bitwise_zero, OVS_RO},
-    {"bitwise_one", NULL, 0, 0, test_bitwise_one, OVS_RO},
-    {"bitwise_is_all_zeros", NULL, 0, 0, test_bitwise_is_all_zeros, OVS_RO},
-    {"bitwise_rscan", NULL, 0, 0, test_bitwise_rscan, OVS_RO},
-    {"follow-symlinks", NULL, 1, INT_MAX, test_follow_symlinks, OVS_RO},
-    {"assert", NULL, 0, 0, test_assert, OVS_RO},
-    {"ovs_scan", NULL, 0, 0, test_ovs_scan, OVS_RO},
-    {"snprintf", NULL, 0, 0, test_snprintf, OVS_RO},
-#ifndef _WIN32
-    {"file_name", NULL, 1, INT_MAX, test_file_name, OVS_RO},
-#endif
-    {NULL, NULL, 0, 0, NULL, OVS_RO},
-};
-
-static void
-parse_options(int argc, char *argv[])
-{
-    enum {
-        VLOG_OPTION_ENUMS
-    };
-    static const struct option long_options[] = {
-        VLOG_LONG_OPTIONS,
-        {NULL, 0, NULL, 0},
-    };
-    char *short_options = ovs_cmdl_long_options_to_short_options(long_options);
-
-    for (;;) {
-        int c = getopt_long(argc, argv, short_options, long_options, NULL);
-        if (c == -1) {
-            break;
-        }
-
-        switch (c) {
-        VLOG_OPTION_HANDLERS
-
-        case '?':
-            exit(EXIT_FAILURE);
-
-        default:
-            abort();
-        }
-    }
-    free(short_options);
-}
-
-static void
-test_util_main(int argc, char *argv[])
-{
-    struct ovs_cmdl_context ctx = { .argc = 0, };
-    set_program_name(argv[0]);
-    parse_options(argc, argv);
-    /* On Windows, stderr is fully buffered if connected to a pipe.
-     * Make it _IONBF so that an abort does not miss log contents.
-     * POSIX doesn't define the circumstances in which stderr is
-     * fully buffered either. */
-    setvbuf(stderr, NULL, _IONBF, 0);
-    ctx.argc = argc - optind;
-    ctx.argv = argv + optind;
-    ovs_cmdl_run_command(&ctx, commands);
-}
-
-OVSTEST_REGISTER("test-util", test_util_main);
diff --git a/tests/test-uuid.c b/tests/test-uuid.c
deleted file mode 100644
index 3b47ab616..000000000
--- a/tests/test-uuid.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2009, 2014 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include "util.h"
-#include "uuid.h"
-#include <stdio.h>
-#include "ovstest.h"
-
-static void
-test_uuid_main(int argc, char *argv[])
-{
-    struct uuid uuid;
-
-    if (argc == 1) {
-        uuid_generate(&uuid);
-    } else if (argc == 2) {
-        if (!uuid_from_string(&uuid, argv[1])) {
-            ovs_fatal(0, "\"%s\" is not a valid UUID", argv[1]);
-        }
-    } else {
-        ovs_fatal(0, "usage: %s [UUID]", argv[0]);
-    }
-
-    printf(UUID_FMT"\n", UUID_ARGS(&uuid));
-}
-
-OVSTEST_REGISTER("test-uuid", test_uuid_main);
diff --git a/tests/test-vconn.c b/tests/test-vconn.c
deleted file mode 100644
index 73ef9a958..000000000
--- a/tests/test-vconn.c
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2017 Nicira, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#undef NDEBUG
-#include <assert.h>
-#include <errno.h>
-#include <inttypes.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include "command-line.h"
-#include "fatal-signal.h"
-#include "openflow/openflow.h"
-#include "openvswitch/ofp-msgs.h"
-#include "openvswitch/ofpbuf.h"
-#include "openvswitch/vconn.h"
-#include "openvswitch/vlog.h"
-#include "ovstest.h"
-#include "openvswitch/poll-loop.h"
-#include "socket-util.h"
-#include "stream.h"
-#include "stream-ssl.h"
-#include "timeval.h"
-#include "util.h"
-
-#define TIMEOUT 10
-
-struct fake_pvconn {
-    const char *type;
-    char *pvconn_name;
-    char *vconn_name;
-    struct pstream *pstream;
-};
-
-static void
-check(int a, int b, const char *as, const char *file, int line)
-{
-    if (a != b) {
-        ovs_fatal(0, "%s:%d: %s is %d but should be %d", file, line, as, a, b);
-    }
-}
-
-
-#define CHECK(A, B) check(A, B, #A, __FILE__, __LINE__)
-
-static void
-check_errno(int a, int b, const char *as, const char *file, int line)
-{
-    if (a != b) {
-        char *str_b = xstrdup(ovs_strerror(abs(b)));
-        ovs_fatal(0, "%s:%d: %s is %d (%s) but should be %d (%s)",
-                  file, line, as, a, ovs_strerror(abs(a)), b, str_b);
-    }
-}
-
-#define CHECK_ERRNO(A, B) check_errno(A, B, #A, __FILE__, __LINE__)
-
-static void
-fpv_create(const char *type, struct fake_pvconn *fpv)
-{
-#ifdef HAVE_OPENSSL
-    if (!strcmp(type, "ssl")) {
-        stream_ssl_set_private_key_file("testpki-privkey.pem");
-        stream_ssl_set_certificate_file("testpki-cert.pem");
-        stream_ssl_set_ca_cert_file("testpki-cacert.pem", false);
-    }
-#endif
-
-    fpv->type = type;
-    if (!strcmp(type, "unix")) {
-        static int unix_count = 0;
-        char *bind_path;
-
-        bind_path = xasprintf("fake-pvconn.%d", unix_count++);
-        fpv->pvconn_name = xasprintf("punix:%s", bind_path);
-        fpv->vconn_name = xasprintf("unix:%s", bind_path);
-        CHECK_ERRNO(pstream_open(fpv->pvconn_name, &fpv->pstream,
-                                 DSCP_DEFAULT), 0);
-        free(bind_path);
-    } else if (!strcmp(type, "tcp") || !strcmp(type, "ssl")) {
-        char *s, *port, *save_ptr = NULL;
-        char *open_name;
-
-        open_name = xasprintf("p%s:0:127.0.0.1", type);
-        CHECK_ERRNO(pstream_open(open_name, &fpv->pstream, DSCP_DEFAULT), 0);
-
-        /* Extract bound port number from pstream name. */
-        s = xstrdup(pstream_get_name(fpv->pstream));
-        strtok_r(s, ":", &save_ptr);
-        port = strtok_r(NULL, ":", &save_ptr);
-
-        /* Save info. */
-        fpv->pvconn_name = xstrdup(pstream_get_name(fpv->pstream));
-        fpv->vconn_name = xasprintf("%s:127.0.0.1:%s", type, port);
-
-        free(open_name);
-        free(s);
-    } else {
-        abort();
-    }
-}
-
-static struct stream *
-fpv_accept(struct fake_pvconn *fpv)
-{
-    struct stream *stream;
-
-    CHECK_ERRNO(pstream_accept_block(fpv->pstream, &stream), 0);
-
-    return stream;
-}
-
-static void
-fpv_close(struct fake_pvconn *fpv)
-{
-    pstream_close(fpv->pstream);
-    fpv->pstream = NULL;
-}
-
-static void
-fpv_destroy(struct fake_pvconn *fpv)
-{
-    fpv_close(fpv);
-    free(fpv->pvconn_name);
-    free(fpv->vconn_name);
-}
-
-/* Connects to a fake_pvconn with vconn_open(), then closes the listener and
- * verifies that vconn_connect() reports 'expected_error'. */
-static void
-test_refuse_connection(struct ovs_cmdl_context *ctx)
-{
-    const char *type = ctx->argv[1];
-    struct fake_pvconn fpv;
-    struct vconn *vconn;
-    int error;
-
-    fpv_create(type, &fpv);
-    CHECK_ERRNO(vconn_open(fpv.vconn_name, 0, DSCP_DEFAULT, &vconn), 0);
-    fpv_close(&fpv);
-    vconn_run(vconn);
-
-    error = vconn_connect_block(vconn, (TIMEOUT - 2) * 1000);
-    if (!strcmp(type, "tcp")) {
-        if (error != ECONNRESET && error != EPIPE && error != ETIMEDOUT
-#ifdef _WIN32
-            && error != WSAECONNRESET
-#endif
-            ) {
-            ovs_fatal(0, "unexpected vconn_connect() return value %d (%s)",
-                      error, ovs_strerror(error));
-        }
-    } else if (!strcmp(type, "unix")) {
-        CHECK_ERRNO(error, EPIPE);
-    } else if (!strcmp(type, "ssl")) {
-        if (error != EPROTO && error != ECONNRESET && error != ETIMEDOUT) {
-            ovs_fatal(0, "unexpected vconn_connect() return value %d (%s)",
-                      error, ovs_strerror(error));
-        }
-    } else {
-        ovs_fatal(0, "invalid connection type %s", type);
-    }
-
-    vconn_close(vconn);
-    fpv_destroy(&fpv);
-}
-
-/* Connects to a fake_pvconn with vconn_open(), accepts that connection and
- * closes it immediately, and verifies that vconn_connect() reports
- * 'expected_error'. */
-static void
-test_accept_then_close(struct ovs_cmdl_context *ctx)
-{
-    const char *type = ctx->argv[1];
-    struct fake_pvconn fpv;
-    struct vconn *vconn;
-    int error;
-
-    fpv_create(type, &fpv);
-    CHECK_ERRNO(vconn_open(fpv.vconn_name, 0, DSCP_DEFAULT, &vconn), 0);
-    vconn_run(vconn);
-    stream_close(fpv_accept(&fpv));
-    fpv_close(&fpv);
-
-    error = vconn_connect_block(vconn, -1);
-    if (!strcmp(type, "tcp") || !strcmp(type, "unix")) {
-        if (error != ECONNRESET && error != EPIPE
-#ifdef _WIN32
-            && error != WSAECONNRESET
-#endif
-            ) {
-            ovs_fatal(0, "unexpected vconn_connect() return value %d (%s)",
-                      error, ovs_strerror(error));
-        }
-    } else {
-        CHECK_ERRNO(error, EPROTO);
-    }
-
-    vconn_close(vconn);
-    fpv_destroy(&fpv);
-}
-
-/* Connects to a fake_pvconn with vconn_open(), accepts that connection and
- * reads the hello message from it, then closes the connection and verifies
- * that vconn_connect() reports 'expected_error'. */
-static void
-test_read_hello(struct ovs_cmdl_context *ctx)
-{
-    const char *type = ctx->argv[1];
-    struct fake_pvconn fpv;
-    struct vconn *vconn;
-    struct stream *stream;
-    int error;
-
-    fpv_create(type, &fpv);
-    CHECK_ERRNO(vconn_open(fpv.vconn_name, 0, DSCP_DEFAULT, &vconn), 0);
-    vconn_run(vconn);
-    stream = fpv_accept(&fpv);
-    fpv_destroy(&fpv);
-    for (;;) {
-       struct ofp_header hello;
-       int retval;
-
-       retval = stream_recv(stream, &hello, sizeof hello);
-       if (retval == sizeof hello) {
-           enum ofpraw raw;
-
-           CHECK(hello.version, OFP14_VERSION);
-           CHECK(ofpraw_decode_partial(&raw, &hello, sizeof hello), 0);
-           CHECK(raw, OFPRAW_OFPT_HELLO);
-           CHECK(ntohs(hello.length), sizeof hello);
-           break;
-       } else {
-           CHECK_ERRNO(retval, -EAGAIN);
-       }
-
-       vconn_run(vconn);
-       CHECK_ERRNO(vconn_connect(vconn), EAGAIN);
-       vconn_run_wait(vconn);
-       vconn_connect_wait(vconn);
-       stream_recv_wait(stream);
-       poll_block();
-    }
-    stream_close(stream);
-    error = vconn_connect_block(vconn, -1);
-    if (error != ECONNRESET && error != EPIPE) {
-        ovs_fatal(0, "unexpected vconn_connect() return value %d (%s)",
-                  error, ovs_strerror(error));
-    }
-    vconn_close(vconn);
-}
-
-/* Connects to a fake_pvconn with vconn_open(), accepts that connection and
- * sends the 'out' bytes in 'out_size' to it (presumably an OFPT_HELLO
- * message), then verifies that vconn_connect() reports
- * 'expect_connect_error'. */
-static void
-test_send_hello(const char *type, const void *out, size_t out_size,
-                int expect_connect_error)
-{
-    struct fake_pvconn fpv;
-    struct vconn *vconn;
-    bool read_hello, connected;
-    struct ofpbuf *msg;
-    struct stream *stream;
-    size_t n_sent;
-
-    fpv_create(type, &fpv);
-    CHECK_ERRNO(vconn_open(fpv.vconn_name, 0, DSCP_DEFAULT, &vconn), 0);
-    vconn_run(vconn);
-    stream = fpv_accept(&fpv);
-    fpv_destroy(&fpv);
-
-    n_sent = 0;
-    while (n_sent < out_size) {
-        int retval;
-
-        retval = stream_send(stream, (char *) out + n_sent, out_size - n_sent);
-        if (retval > 0) {
-            n_sent += retval;
-        } else if (retval == -EAGAIN) {
-            stream_run(stream);
-            vconn_run(vconn);
-            stream_recv_wait(stream);
-            vconn_connect_wait(vconn);
-            vconn_run_wait(vconn);
-            poll_block();
-        } else {
-            ovs_fatal(0, "stream_send returned unexpected value %d", retval);
-        }
-    }
-
-    read_hello = connected = false;
-    for (;;) {
-       if (!read_hello) {
-           struct ofp_header hello;
-           int retval = stream_recv(stream, &hello, sizeof hello);
-           if (retval == sizeof hello) {
-               enum ofpraw raw;
-
-               CHECK(hello.version, OFP14_VERSION);
-               CHECK(ofpraw_decode_partial(&raw, &hello, sizeof hello), 0);
-               CHECK(raw, OFPRAW_OFPT_HELLO);
-               CHECK(ntohs(hello.length), sizeof hello);
-               read_hello = true;
-           } else {
-               CHECK_ERRNO(retval, -EAGAIN);
-           }
-       }
-
-       vconn_run(vconn);
-       if (!connected) {
-           int error = vconn_connect(vconn);
-           if (error == expect_connect_error) {
-               if (!error) {
-                   connected = true;
-               } else {
-                   stream_close(stream);
-                   vconn_close(vconn);
-                   return;
-               }
-           } else {
-               CHECK_ERRNO(error, EAGAIN);
-           }
-       }
-
-       if (read_hello && connected) {
-           break;
-       }
-
-       vconn_run_wait(vconn);
-       if (!connected) {
-           vconn_connect_wait(vconn);
-       }
-       if (!read_hello) {
-           stream_recv_wait(stream);
-       }
-       poll_block();
-    }
-    stream_close(stream);
-    CHECK_ERRNO(vconn_recv_block(vconn, &msg), EOF);
-    vconn_close(vconn);
-}
-
-/* Try connecting and sending a normal hello, which should succeed. */
-static void
-test_send_plain_hello(struct ovs_cmdl_context *ctx)
-{
-    const char *type = ctx->argv[1];
-    struct ofpbuf *hello;
-
-    hello = ofpraw_alloc_xid(OFPRAW_OFPT_HELLO, OFP14_VERSION,
-                             htonl(0x12345678), 0);
-    test_send_hello(type, hello->data, hello->size, 0);
-    ofpbuf_delete(hello);
-}
-
-/* Try connecting and sending an extra-long hello, which should succeed (since
- * the specification says that implementations must accept and ignore extra
- * data). */
-static void
-test_send_long_hello(struct ovs_cmdl_context *ctx)
-{
-    const char *type = ctx->argv[1];
-    struct ofpbuf *hello;
-    enum { EXTRA_BYTES = 8 };
-
-    hello = ofpraw_alloc_xid(OFPRAW_OFPT_HELLO, OFP14_VERSION,
-                             htonl(0x12345678), EXTRA_BYTES);
-    ofpbuf_put_zeros(hello, EXTRA_BYTES);
-    ofpmsg_update_length(hello);
-    test_send_hello(type, hello->data, hello->size, 0);
-    ofpbuf_delete(hello);
-}
-
-/* Try connecting and sending an echo request instead of a hello, which should
- * fail with EPROTO. */
-static void
-test_send_echo_hello(struct ovs_cmdl_context *ctx)
-{
-    const char *type = ctx->argv[1];
-    struct ofpbuf *echo;
-
-    echo = ofpraw_alloc_xid(OFPRAW_OFPT_ECHO_REQUEST, OFP14_VERSION,
-                             htonl(0x12345678), 0);
-    test_send_hello(type, echo->data, echo->size, EPROTO);
-    ofpbuf_delete(echo);
-}
-
-/* Try connecting and sending a hello packet that has its length field as 0,
- * which should fail with EPROTO. */
-static void
-test_send_short_hello(struct ovs_cmdl_context *ctx)
-{
-    const char *type = ctx->argv[1];
-    struct ofp_header hello;
-
-    memset(&hello, 0, sizeof hello);
-    test_send_hello(type, &hello, sizeof hello, EPROTO);
-}
-
-/* Try connecting and sending a hello packet that has a bad version, which
- * should fail with EPROTO. */
-static void
-test_send_invalid_version_hello(struct ovs_cmdl_context *ctx)
-{
-    const char *type = ctx->argv[1];
-    struct ofpbuf *hello;
-
-    hello = ofpraw_alloc_xid(OFPRAW_OFPT_HELLO, OFP14_VERSION,
-                             htonl(0x12345678), 0);
-    ((struct ofp_header *) hello->data)->version = 0;
-    test_send_hello(type, hello->data, hello->size, EPROTO);
-    ofpbuf_delete(hello);
-}
-
-static const struct ovs_cmdl_command commands[] = {
-    {"refuse-connection", NULL, 1, 1, test_refuse_connection, OVS_RO},
-    {"accept-then-close", NULL, 1, 1, test_accept_then_close, OVS_RO},
-    {"read-hello", NULL, 1, 1, test_read_hello, OVS_RO},
-    {"send-plain-hello", NULL, 1, 1, test_send_plain_hello, OVS_RO},
-    {"send-long-hello", NULL, 1, 1, test_send_long_hello, OVS_RO},
-    {"send-echo-hello", NULL, 1, 1, test_send_echo_hello, OVS_RO},
-    {"send-short-hello", NULL, 1, 1, test_send_short_hello, OVS_RO},
-    {"send-invalid-version-hello", NULL, 1, 1, test_send_invalid_version_hello, OVS_RO},
-    {NULL, NULL, 0, 0, NULL, OVS_RO},
-};
-
-static void
-test_vconn_main(int argc, char *argv[])
-{
-    struct ovs_cmdl_context ctx = {
-        .argc = argc - 1,
-        .argv = argv + 1,
-    };
-
-    set_program_name(argv[0]);
-    vlog_set_levels(NULL, VLF_ANY_DESTINATION, VLL_EMER);
-    vlog_set_levels(NULL, VLF_CONSOLE, VLL_DBG);
-    fatal_ignore_sigpipe();
-
-    time_alarm(TIMEOUT);
-
-    ovs_cmdl_run_command(&ctx, commands);
-}
-
-OVSTEST_REGISTER("test-vconn", test_vconn_main);
diff --git a/tests/test-vlog.py b/tests/test-vlog.py
deleted file mode 100644
index d711e0b66..000000000
--- a/tests/test-vlog.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (c) 2011 Nicira, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import argparse
-
-import ovs.vlog
-
-from six.moves import range
-
-
-def main():
-    modules = [ovs.vlog.Vlog("module_%d" % i) for i in range(3)]
-
-    parser = argparse.ArgumentParser(description="Vlog Module Tester")
-    ovs.vlog.add_args(parser)
-    args = parser.parse_args()
-    ovs.vlog.handle_args(args)
-
-    for m in modules:
-        m.emer("emergency")
-        m.err("error")
-        m.warn("warning")
-        m.info("information")
-        m.dbg("debug")
-
-        try:
-            fail = False  # Silence pychecker warning.
-            assert fail
-        except AssertionError:
-            m.emer("emergency exception", exc_info=True)
-            m.err("error exception", exc_info=True)
-            m.warn("warn exception", exc_info=True)
-            m.info("information exception", exc_info=True)
-            m.dbg("debug exception", exc_info=True)
-            m.exception("exception")
-
-
-if __name__ == '__main__':
-    main()
diff --git a/tests/testsuite.at b/tests/testsuite.at
index b840dbfa7..ecb75f95f 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -20,65 +20,9 @@ m4_include([tests/ovs-macros.at])
 m4_include([tests/ovsdb-macros.at])
 m4_include([tests/ofproto-macros.at])
 
-m4_include([tests/completion.at])
-m4_include([tests/checkpatch.at])
-m4_include([tests/bfd.at])
-m4_include([tests/cfm.at])
-m4_include([tests/lacp.at])
-m4_include([tests/library.at])
-m4_include([tests/heap.at])
-m4_include([tests/bundle.at])
-m4_include([tests/classifier.at])
-m4_include([tests/check-structs.at])
-m4_include([tests/daemon.at])
-m4_include([tests/daemon-py.at])
-m4_include([tests/ofp-actions.at])
-m4_include([tests/ofp-print.at])
-m4_include([tests/ofp-util.at])
-m4_include([tests/ofp-errors.at])
-m4_include([tests/ovs-ofctl.at])
-m4_include([tests/fuzz-regression.at])
-m4_include([tests/odp.at])
-m4_include([tests/mpls-xlate.at])
-m4_include([tests/multipath.at])
-m4_include([tests/learn.at])
-m4_include([tests/vconn.at])
-m4_include([tests/file_name.at])
-m4_include([tests/aes128.at])
-m4_include([tests/unixctl-py.at])
-m4_include([tests/uuid.at])
-m4_include([tests/json.at])
-m4_include([tests/jsonrpc.at])
-m4_include([tests/jsonrpc-py.at])
-m4_include([tests/tunnel.at])
-m4_include([tests/tunnel-push-pop.at])
-m4_include([tests/tunnel-push-pop-ipv6.at])
-m4_include([tests/ovs-router.at])
-m4_include([tests/lockfile.at])
-m4_include([tests/reconnect.at])
-m4_include([tests/ovs-vswitchd.at])
-m4_include([tests/ofproto.at])
-m4_include([tests/dpif-netdev.at])
-m4_include([tests/pmd.at])
-m4_include([tests/dpctl.at])
-m4_include([tests/ofproto-dpif.at])
-m4_include([tests/bridge.at])
-m4_include([tests/netdev-type.at])
-m4_include([tests/ovsdb.at])
-m4_include([tests/ovs-vsctl.at])
-m4_include([tests/ovs-xapi-sync.at])
-m4_include([tests/interface-reconfigure.at])
-m4_include([tests/stp.at])
-m4_include([tests/rstp.at])
-m4_include([tests/vlog.at])
-m4_include([tests/vtep-ctl.at])
-m4_include([tests/auto-attach.at])
 m4_include([tests/ovn.at])
 m4_include([tests/ovn-northd.at])
 m4_include([tests/ovn-nbctl.at])
 m4_include([tests/ovn-sbctl.at])
 m4_include([tests/ovn-controller.at])
 m4_include([tests/ovn-controller-vtep.at])
-m4_include([tests/mcast-snooping.at])
-m4_include([tests/packet-type-aware.at])
-m4_include([tests/nsh.at])
diff --git a/tests/tunnel-push-pop-ipv6.at b/tests/tunnel-push-pop-ipv6.at
deleted file mode 100644
index cbdd5a32f..000000000
--- a/tests/tunnel-push-pop-ipv6.at
+++ /dev/null
@@ -1,394 +0,0 @@
-AT_BANNER([tunnel_push_pop_ipv6])
-
-AT_SETUP([tunnel_push_pop_ipv6 - ip6erspan])
-
-OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 other-config:hwaddr=aa:55:aa:55:00:00])
-AT_CHECK([ovs-vsctl add-br int-br -- set bridge int-br datapath_type=dummy], [0])
-AT_CHECK([ovs-vsctl add-port int-br t2 -- set Interface t2 type=ip6erspan \
-                       options:remote_ip=2001:cafe::92 options:key=123 \
-                       options:erspan_ver=1 options:erspan_idx=3 ofport_request=2\
-                 -- add-port int-br t3 -- set Interface t3 type=ip6erspan \
-                       options:remote_ip=2001:cafe::93 options:key=567 \
-                       options:erspan_ver=2 options:erspan_dir=1 options:erspan_hwid=0x7 \
-                       ofport_request=3\
-                       ], [0])
-
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p0 1/1: (dummy)
-  int-br:
-    int-br 65534/2: (dummy-internal)
-    t2 2/6: (ip6erspan: erspan_idx=0x3, erspan_ver=1, key=123, remote_ip=2001:cafe::92)
-    t3 3/6: (ip6erspan: erspan_dir=1, erspan_hwid=0x7, erspan_ver=2, key=567, remote_ip=2001:cafe::93)
-])
-
-dnl First setup dummy interface IP address, then add the route
-dnl so that tnl-port table can get valid IP address for the device.
-AT_CHECK([ovs-appctl netdev-dummy/ip6addr br0 2001:cafe::88/24], [0], [OK
-])
-AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 1.1.2.88/24], [0], [OK
-])
-AT_CHECK([ovs-appctl ovs/route/add 2001:cafe::92/24 br0], [0], [OK
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-
-dnl Check Neighbour discovery.
-AT_CHECK([ovs-vsctl -- set Interface p0 options:pcap=p0.pcap])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive int-br 'in_port(2),eth(src=aa:55:aa:55:00:00,dst=f8:bc:12:ff:ff:ff),eth_type(0x0800),ipv4(src=1.1.3.92,dst=1.1.3.88,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)'])
-AT_CHECK([ovs-pcap p0.pcap > p0.pcap.txt 2>&1])
-
-AT_CHECK([cat p0.pcap.txt | grep 92aa55aa55000086dd6000000000203aff2001cafe | uniq], [0], [dnl
-3333ff000092aa55aa55000086dd6000000000203aff2001cafe000000000000000000000088ff0200000000000000000001ff00009287004d48000000002001cafe0000000000000000000000920101aa55aa550000
-])
-AT_CHECK([cat p0.pcap.txt | grep 93aa55aa55000086dd6000000000203aff2001cafe | uniq], [0], [dnl
-3333ff000093aa55aa55000086dd6000000000203aff2001cafe000000000000000000000088ff0200000000000000000001ff00009387004d46000000002001cafe0000000000000000000000930101aa55aa550000
-])
-
-
-dnl
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x86dd),ipv6(src=2001:cafe::92,dst=2001:cafe::88,label=0,proto=58,tclass=0,hlimit=255,frag=no),icmpv6(type=136,code=0),nd(target=2001:cafe::92,sll=00:00:00:00:00:00,tll=f8:bc:12:44:34:b6)'])
-dnl
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=f8:bc:12:44:34:b7,dst=aa:55:aa:55:00:00),eth_type(0x86dd),ipv6(src=2001:cafe::93,dst=2001:cafe::88,label=0,proto=58,tclass=0,hlimit=255,frag=no),icmpv6(type=136,code=0),nd(target=2001:cafe::93,sll=00:00:00:00:00:00,tll=f8:bc:12:44:34:b7)'])
-
-dnl Check ARP Snoop
-dnl AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x86dd),ipv6(src=2001:cafe::92,dst=2001:cafe::94,label=0,proto=58,tclass=0,hlimit=255,frag=no),icmpv6(type=136,code=0),nd(target=2001:cafe::92,sll=00:00:00:00:00:00,tll=f8:bc:12:44:34:b6)'])
-
-dnl AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=f8:bc:12:44:34:b7,dst=aa:55:aa:55:00:00),eth_type(0x86dd),ipv6(src=2001:cafe::93,dst=2001:cafe::94,label=0,proto=58,tclass=0,hlimit=255,frag=no),icmpv6(type=136,code=0),nd(target=2001:cafe::93,sll=00:00:00:00:00:00,tll=f8:bc:12:44:34:b7)'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl tnl/arp/show | tail -n+3 | sort], [0], [dnl
-2001:cafe::92                                 f8:bc:12:44:34:b6   br0
-2001:cafe::93                                 f8:bc:12:44:34:b7   br0
-])
-
-AT_CHECK([ovs-appctl tnl/ports/show |sort], [0], [dnl
-Listening ports:
-ip6erspan_sys (6) ref_cnt=2
-])
-
-dnl Check ERSPAN tunnel pop
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x86dd),ipv6(src=2001:cafe::92,dst=2001:cafe::88,label=0,proto=47,tclass=0x0,hlimit=64)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: tnl_pop(6)
-])
-
-dnl Check ERSPAN v1 tunnel push
-AT_CHECK([ovs-ofctl add-flow int-br action=2])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:01),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(6),header(size=70,type=108,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::92,label=0,proto=47,tclass=0x0,hlimit=64),erspan(ver=1,sid=0x7b,idx=0x3)),out_port(100)),1)
-])
-
-dnl Check ERSPAN v2 tunnel push
-AT_CHECK([ovs-ofctl mod-flows int-br action=3])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:01),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(6),header(size=74,type=108,eth(dst=f8:bc:12:44:34:b7,src=aa:55:aa:55:00:00,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::93,label=0,proto=47,tclass=0x0,hlimit=64),erspan(ver=2,sid=0x237,dir=1,hwid=0x7)),out_port(100)),1)
-])
-
-ovs-appctl vlog/set dbg
-dnl Check decapsulation of ERSPAN v1
-dnl Hex dump: GRE:(100088be)
-dnl ERSPAN: v1, session id = 0x7b (1000007b), index=3 (00000003)
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6486dd60000000006a2f402001cafe0000000000000000000000922001cafe000000000000000000000088100088be000000011000007b00000003fe71d883724fbeb6f4e1494a080045000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6486dd60000000006a2f402001cafe0000000000000000000000922001cafe000000000000000000000088100088be000000011000007b00000003fe71d883724fbeb6f4e1494a080045000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port  2'], [0], [dnl
-  port  2: rx pkts=2, bytes=196, drop=?, errs=?, frame=?, over=?, crc=?
-])
-
-dnl Check decapsulation ERSPAN v2
-dnl Hex dump: GRE:(100022eb)
-dnl ERSPAN: v2, session id = 0x237 (20000237), hwid = 8,dir = 1 (00000078)
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6486dd60000000006a2f402001cafe0000000000000000000000932001cafe000000000000000000000088100022eb000000012000023710abcd0100000078fe71d883724fbeb6f4e1494a080045000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port  3'], [0], [dnl
-  port  3: rx pkts=1, bytes=98, drop=?, errs=?, frame=?, over=?, crc=?
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel_push_pop_ipv6 - action])
-
-OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 other-config:hwaddr=aa:55:aa:55:00:00])
-AT_CHECK([ovs-vsctl add-br int-br -- set bridge int-br datapath_type=dummy], [0])
-AT_CHECK([ovs-vsctl add-port int-br t2 -- set Interface t2 type=vxlan \
-                       options:remote_ip=2001:cafe::92 options:key=123 ofport_request=2\
-                    -- add-port int-br t1 -- set Interface t1 type=gre \
-                       options:remote_ip=2001:cafe::92 options:key=456 ofport_request=3\
-                    -- add-port int-br t3 -- set Interface t3 type=vxlan \
-                       options:remote_ip=2001:cafe::93 options:out_key=flow options:csum=true ofport_request=4\
-                    -- add-port int-br t4 -- set Interface t4 type=geneve \
-                       options:remote_ip=flow options:key=123 ofport_request=5\
-                    -- add-port int-br t5 -- set Interface t5 type=gre \
-                       options:remote_ip=2001:cafe::92 options:key=455 options:packet_type=legacy_l3 ofport_request=6\
-                       ], [0])
-
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p0 1/1: (dummy)
-  int-br:
-    int-br 65534/2: (dummy-internal)
-    t1 3/3: (gre: key=456, remote_ip=2001:cafe::92)
-    t2 2/4789: (vxlan: key=123, remote_ip=2001:cafe::92)
-    t3 4/4789: (vxlan: csum=true, out_key=flow, remote_ip=2001:cafe::93)
-    t4 5/6081: (geneve: key=123, remote_ip=flow)
-    t5 6/3: (gre: key=455, packet_type=legacy_l3, remote_ip=2001:cafe::92)
-])
-
-AT_CHECK([ovs-appctl tnl/ports/show |sort], [0], [dnl
-Listening ports:
-genev_sys_6081 (6081) ref_cnt=1
-gre_sys (3) ref_cnt=2
-vxlan_sys_4789 (4789) ref_cnt=2
-])
-
-
-dnl First setup dummy interface IP address, then add the route
-dnl so that tnl-port table can get valid IP address for the device.
-AT_CHECK([ovs-appctl netdev-dummy/ip6addr br0 2001:cafe::88/24], [0], [OK
-])
-AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 1.1.2.88/24], [0], [OK
-])
-AT_CHECK([ovs-appctl ovs/route/add 2001:cafe::92/24 br0], [0], [OK
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-
-dnl Check Neighbour discovery.
-AT_CHECK([ovs-vsctl -- set Interface p0 options:pcap=p0.pcap])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive int-br 'in_port(2),eth(src=aa:55:aa:55:00:00,dst=f8:bc:12:ff:ff:ff),eth_type(0x0800),ipv4(src=1.1.3.92,dst=1.1.3.88,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)'])
-
-dnl Wait for the two Neighbor Solicitation packets to be sent.
-dnl Sometimes the system can be slow (e.g. under valgrind)
-OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | sort | uniq | wc -l` -ge 2])
-
-AT_CHECK([ovs-pcap p0.pcap > p0.pcap.txt 2>&1])
-
-AT_CHECK([cat p0.pcap.txt | grep 92aa55aa55000086dd6000000000203aff2001cafe | uniq], [0], [dnl
-3333ff000092aa55aa55000086dd6000000000203aff2001cafe000000000000000000000088ff0200000000000000000001ff00009287004d48000000002001cafe0000000000000000000000920101aa55aa550000
-])
-AT_CHECK([cat p0.pcap.txt | grep 93aa55aa55000086dd6000000000203aff2001cafe | uniq], [0], [dnl
-3333ff000093aa55aa55000086dd6000000000203aff2001cafe000000000000000000000088ff0200000000000000000001ff00009387004d46000000002001cafe0000000000000000000000930101aa55aa550000
-])
-
-dnl Check ARP Snoop
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=f8:bc:12:44:34:c8,dst=aa:55:aa:55:00:00),eth_type(0x86dd),ipv6(src=2001:cafe::92,dst=2001:cafe::88,label=0,proto=58,tclass=0,hlimit=255,frag=no),icmpv6(type=136,code=0),nd(target=2001:cafe::92,sll=00:00:00:00:00:00,tll=f8:bc:12:44:34:c8)'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl tnl/arp/show | tail -n+3 | sort], [0], [dnl
-2001:cafe::92                                 f8:bc:12:44:34:c8   br0
-])
-
-dnl Receiving Neighbor Advertisement with incorrect 'nw_dst' should not alter tunnel neighbor cache
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x86dd),ipv6(src=2001:cafe::92,dst=2001:cafe::99,label=0,proto=58,tclass=0,hlimit=255,frag=no),icmpv6(type=136,code=0),nd(target=2001:cafe::92,sll=00:00:00:00:00:00,tll=f8:bc:12:44:34:b6)'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl tnl/arp/show | tail -n+3 | sort], [0], [dnl
-2001:cafe::92                                 f8:bc:12:44:34:c8   br0
-])
-
-dnl Receiving Neighbot Advertisement with incorrect VLAN id should not alter tunnel neighbor cache
-AT_CHECK([ovs-vsctl set port br0 tag=10])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x86dd),ipv6(src=2001:cafe::92,dst=2001:cafe::88,label=0,proto=58,tclass=0,hlimit=255,frag=no),icmpv6(type=136,code=0),nd(target=2001:cafe::92,sll=00:00:00:00:00:00,tll=f8:bc:12:44:34:b6))'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl tnl/arp/show | tail -n+3 | sort], [0], [dnl
-2001:cafe::92                                 f8:bc:12:44:34:c8   br0
-])
-
-dnl Receiving Neighbor Advertisement with correct VLAN id should alter tunnel neighbor cache
-AT_CHECK([ovs-vsctl set port br0 tag=10])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x8100),vlan(vid=10,pcp=7),encap(eth_type(0x86dd),ipv6(src=2001:cafe::92,dst=2001:cafe::88,label=0,proto=58,tclass=0,hlimit=255,frag=no),icmpv6(type=136,code=0),nd(target=2001:cafe::92,sll=00:00:00:00:00:00,tll=f8:bc:12:44:34:b6))'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl tnl/arp/show | tail -n+3 | sort], [0], [dnl
-2001:cafe::92                                 f8:bc:12:44:34:b6   br0
-])
-
-dnl Receiving Neighbor Advertisement in overlay bridge should not alter tunnel neighbor cache
-AT_CHECK([ovs-vsctl add-port int-br p1 -- set interface p1 type=dummy ofport_request=200 other-config:hwaddr=aa:55:aa:55:00:99])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(200),eth(src=f8:bc:12:44:34:c8,dst=aa:55:aa:55:00:00),eth_type(0x86dd),ipv6(src=2001:cafe::92,dst=2001:cafe::99,label=0,proto=58,tclass=0,hlimit=255,frag=no),icmpv6(type=136,code=0),nd(target=2001:cafe::92,sll=00:00:00:00:00:00,tll=f8:bc:12:44:34:c8)'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl tnl/neigh/show | grep br | sort], [0], [dnl
-2001:cafe::92                                 f8:bc:12:44:34:b6   br0
-])
-
-dnl Receive Neighbor Advertisement without VLAN header
-AT_CHECK([ovs-vsctl set port br0 tag=0])
-AT_CHECK([ovs-appctl tnl/neigh/flush], [0], [OK
-])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x86dd),ipv6(src=2001:cafe::92,dst=2001:cafe::88,label=0,proto=58,tclass=0,hlimit=255,frag=no),icmpv6(type=136,code=0),nd(target=2001:cafe::92,sll=00:00:00:00:00:00,tll=f8:bc:12:44:34:b6)'])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=f8:bc:12:44:34:b7,dst=aa:55:aa:55:00:00),eth_type(0x86dd),ipv6(src=2001:cafe::93,dst=ff02::1:ff00:0088,label=0,proto=58,tclass=0,hlimit=255,frag=no),icmpv6(type=136,code=0),nd(target=2001:cafe::93,sll=00:00:00:00:00:00,tll=f8:bc:12:44:34:b7)'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl tnl/arp/show | tail -n+3 | sort], [0], [dnl
-2001:cafe::92                                 f8:bc:12:44:34:b6   br0
-2001:cafe::93                                 f8:bc:12:44:34:b7   br0
-])
-
-AT_CHECK([ovs-appctl tnl/ports/show |sort], [0], [dnl
-Listening ports:
-genev_sys_6081 (6081) ref_cnt=1
-gre_sys (3) ref_cnt=2
-vxlan_sys_4789 (4789) ref_cnt=2
-])
-
-dnl Check VXLAN tunnel pop
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x86dd),ipv6(src=2001:cafe::92,dst=2001:cafe::88,label=0,proto=17,tclass=0x0,hlimit=64),udp(src=51283,dst=4789)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: tnl_pop(4789)
-])
-
-dnl Check GRE tunnel pop
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x86dd),ipv6(src=2001:cafe::92,dst=2001:cafe::88,label=0,proto=47,tclass=0x0,hlimit=64)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: tnl_pop(3)
-])
-
-dnl Check Geneve tunnel pop
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x86dd),ipv6(src=2001:cafe::92,dst=2001:cafe::88,label=0,proto=17,tclass=0x0,hlimit=64),udp(src=51283,dst=6081)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: tnl_pop(6081)
-])
-
-dnl Check VXLAN tunnel push
-AT_CHECK([ovs-ofctl add-flow int-br action=2])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:01),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(4789),header(size=70,type=4,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::92,label=0,proto=17,tclass=0x0,hlimit=64),udp(src=0,dst=4789,csum=0xffff),vxlan(flags=0x8000000,vni=0x7b)),out_port(100)),1)
-])
-
-dnl Check VXLAN tunnel push set tunnel id by flow and checksum
-AT_CHECK([ovs-ofctl add-flow int-br "actions=set_tunnel:124,4"])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:01),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(4789),header(size=70,type=4,eth(dst=f8:bc:12:44:34:b7,src=aa:55:aa:55:00:00,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::93,label=0,proto=17,tclass=0x0,hlimit=64),udp(src=0,dst=4789,csum=0xffff),vxlan(flags=0x8000000,vni=0x7c)),out_port(100)),1)
-])
-
-dnl Check GRE tunnel push
-AT_CHECK([ovs-ofctl add-flow int-br action=3])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:01),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(3),header(size=62,type=109,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::92,label=0,proto=47,tclass=0x0,hlimit=64),gre((flags=0x2000,proto=0x6558),key=0x1c8)),out_port(100)),1)
-])
-
-dnl Check Geneve tunnel push
-AT_CHECK([ovs-ofctl add-flow int-br "actions=set_field:2001:cafe::92->tun_ipv6_dst,5"])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:01),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(6081),header(size=70,type=5,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::92,label=0,proto=17,tclass=0x0,hlimit=64),udp(src=0,dst=6081,csum=0xffff),geneve(vni=0x7b)),out_port(100)),1)
-])
-
-dnl Check Geneve tunnel push with options
-AT_CHECK([ovs-ofctl add-tlv-map int-br "{class=0xffff,type=0x80,len=4}->tun_metadata0"])
-AT_CHECK([ovs-ofctl add-flow int-br "actions=set_field:2001:cafe::92->tun_ipv6_dst,set_field:0xa->tun_metadata0,5"])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:01),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(6081),header(size=78,type=5,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x86dd),ipv6(src=2001:cafe::88,dst=2001:cafe::92,label=0,proto=17,tclass=0x0,hlimit=64),udp(src=0,dst=6081,csum=0xffff),geneve(crit,vni=0x7b,options({class=0xffff,type=0x80,len=4,0xa}))),out_port(100)),1)
-])
-
-dnl Check decapsulation of GRE packet
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6486dd60000000006a2f402001cafe0000000000000000000000922001cafe00000000000000000000008820006558000001c8fe71d883724fbeb6f4e1494a080045000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6486dd60000000006a2f402001cafe0000000000000000000000922001cafe00000000000000000000008820006558000001c8fe71d883724fbeb6f4e1494a080045000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port  3'], [0], [dnl
-  port  3: rx pkts=2, bytes=196, drop=?, errs=?, frame=?, over=?, crc=?
-])
-
-dnl Check decapsulation of L3GRE packet
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6486dd60000000005a2f402001cafe0000000000000000000000922001cafe00000000000000000000008820000800000001c745000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6486dd60000000005a2f402001cafe0000000000000000000000922001cafe00000000000000000000008820000800000001c745000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port  6'], [0], [dnl
-  port  6: rx pkts=2, bytes=168, drop=?, errs=?, frame=?, over=?, crc=?
-])
-
-dnl Check decapsulation of Geneve packet with options
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor int-br 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-ofctl del-flows int-br])
-AT_CHECK([ovs-ofctl add-flow int-br "tun_metadata0=0xa/0xf,actions=5,controller"])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6486dd60000000008211402001cafe0000000000000000000000922001cafe000000000000000000000088308817c1008200000400655800007b00ffff80010000000affff00010000000bfe71d883724fbeb6f4e1494a080045000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=98 tun_id=0x7b,tun_ipv6_src=2001:cafe::92,tun_ipv6_dst=2001:cafe::88,tun_metadata0=0xa,in_port=5 (via action) data_len=98 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=be:b6:f4:e1:49:4a,dl_dst=fe:71:d8:83:72:4f,nw_src=30.0.0.1,nw_dst=30.0.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=0,icmp_code=0 icmp_csum:4227
-])
-
-AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port  5'], [0], [dnl
-  port  5: rx pkts=1, bytes=98, drop=?, errs=?, frame=?, over=?, crc=?
-])
-AT_CHECK([ovs-appctl dpif/dump-flows int-br | grep 'in_port(6081)'], [0], [dnl
-tunnel(tun_id=0x7b,ipv6_src=2001:cafe::92,ipv6_dst=2001:cafe::88,geneve({class=0xffff,type=0x80,len=4,0xa/0xf}{class=0xffff,type=0,len=4}),flags(-df-csum+key)),recirc_id(0),in_port(6081),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:userspace(pid=0,controller(reason=1,dont_send=0,continuation=0,recirc_id=3,rule_cookie=0,controller_id=0,max_len=65535))
-])
-
-ovs-appctl time/warp 10000
-
-AT_CHECK([ovs-vsctl del-port int-br t3 \
-                    -- set Interface t1 type=vxlan \
-                    -- set Interface t2 options:dst_port=4790 \
-                       ], [0])
-
-dnl Check tunnel lookup entries after deleting/reconfiguring some ports
-AT_CHECK([ovs-appctl tnl/ports/show |sort], [0], [dnl
-Listening ports:
-genev_sys_6081 (6081) ref_cnt=1
-gre_sys (3) ref_cnt=1
-vxlan_sys_4789 (4789) ref_cnt=1
-vxlan_sys_4790 (4790) ref_cnt=1
-])
-
-AT_CHECK([ovs-vsctl del-port int-br t1 \
-                    -- del-port int-br t2 \
-                    -- del-port int-br t4 \
-                    -- del-port int-br t5 \
-                       ], [0])
-
-dnl Check tunnel lookup entries after deleting all remaining tunnel ports
-AT_CHECK([ovs-appctl tnl/ports/show |sort], [0], [dnl
-Listening ports:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/tunnel-push-pop.at b/tests/tunnel-push-pop.at
deleted file mode 100644
index f7172433e..000000000
--- a/tests/tunnel-push-pop.at
+++ /dev/null
@@ -1,603 +0,0 @@
-AT_BANNER([tunnel_push_pop])
-
-AT_SETUP([tunnel_push_pop - erspan])
-OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 other-config:hwaddr=aa:55:aa:55:00:00])
-AT_CHECK([ovs-vsctl add-br int-br -- set bridge int-br datapath_type=dummy], [0])
-AT_CHECK([ovs-vsctl add-port int-br t1 -- set Interface t1 type=erspan \
-                       options:remote_ip=1.1.2.92 options:key=123 options:erspan_ver=1 \
-                       options:erspan_idx=3 ofport_request=2 \
-                    -- add-port int-br t2 -- set Interface t2 type=erspan \
-                       options:remote_ip=1.1.2.92 options:key=567 options:erspan_ver=2 \
-                       options:erspan_dir=1 options:erspan_hwid=0x7 ofport_request=3\
-                    -- add-port int-br t3 -- set Interface t3 type=erspan \
-                       options:remote_ip=flow options:erspan_ver=2 options:key=456 \
-                       options:erspan_hwid=flow options:erspan_dir=flow ofport_request=4\
-                    -- add-port int-br t4 -- set Interface t4 type=erspan \
-                       options:remote_ip=flow options:erspan_ver=2 options:key=56 \
-                       options:erspan_ver=flow ofport_request=5\
-                       ], [0])
-
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p0 1/1: (dummy)
-  int-br:
-    int-br 65534/2: (dummy-internal)
-    t1 2/3: (erspan: erspan_idx=0x3, erspan_ver=1, key=123, remote_ip=1.1.2.92)
-    t2 3/3: (erspan: erspan_dir=1, erspan_hwid=0x7, erspan_ver=2, key=567, remote_ip=1.1.2.92)
-    t3 4/3: (erspan: erspan_dir=flow, erspan_hwid=flow, erspan_ver=2, key=456, remote_ip=flow)
-    t4 5/3: (erspan: erspan_dir=flow, erspan_hwid=flow, erspan_idx=flow, erspan_ver=flow, key=56, remote_ip=flow)
-])
-
-dnl First setup dummy interface IP address, then add the route
-dnl so that tnl-port table can get valid IP address for the device.
-AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 1.1.2.88/24], [0], [OK
-])
-AT_CHECK([ovs-appctl netdev-dummy/ip6addr br0 2001:cafe::88/24], [0], [OK
-])
-
-AT_CHECK([ovs-appctl ovs/route/add 1.1.2.92/24 br0], [0], [OK
-])
-
-AT_CHECK([ovs-appctl ovs/route/add 1.1.2.92/24 br0 pkt_mark=1234], [0], [OK
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-
-dnl Check ARP request
-AT_CHECK([ovs-vsctl -- set Interface p0 options:pcap=p0.pcap])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive int-br 'in_port(2),eth(src=aa:55:aa:55:00:00,dst=f8:bc:12:ff:ff:ff),eth_type(0x0800),ipv4(src=1.1.3.92,dst=1.1.3.88,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)'])
-
-dnl Wait for the two ARP requests to be sent. Sometimes the system
-dnl can be slow (e.g. under valgrind)
-OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | sort | uniq | wc -l` -ge 1])
-
-AT_CHECK([ovs-pcap p0.pcap > p0.pcap.txt 2>&1])
-
-AT_CHECK([cat p0.pcap.txt | grep 101025 | uniq], [0], [dnl
-ffffffffffffaa55aa55000008060001080006040001aa55aa550000010102580000000000000101025c
-])
-
-
-dnl Check ARP Snoop
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(100),eth(src=f8:bc:12:44:34:b6,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b6,tha=00:00:00:00:00:00)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(100),eth(src=f8:bc:12:44:34:b7,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.93,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b7,tha=00:00:00:00:00:00)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(100),eth(src=f8:bc:12:44:34:b8,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.94,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b8,tha=00:00:00:00:00:00)'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl tnl/neigh/show | tail -n+3 | sort], [0], [dnl
-1.1.2.92                                      f8:bc:12:44:34:b6   br0
-1.1.2.93                                      f8:bc:12:44:34:b7   br0
-1.1.2.94                                      f8:bc:12:44:34:b8   br0
-])
-
-AT_CHECK([ovs-appctl tnl/ports/show |sort], [0], [dnl
-Listening ports:
-erspan_sys (3) ref_cnt=4
-])
-
-dnl Check ERSPAN v1 tunnel push
-AT_CHECK([ovs-vsctl -- set Interface br0 options:pcap=br0.pcap])
-AT_CHECK([ovs-ofctl add-flow int-br action=2])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(3),header(size=50,type=107,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=47,tos=0,ttl=64,frag=0x4000),erspan(ver=1,sid=0x7b,idx=0x3)),out_port(100)),1)
-])
-
-dnl Check ERSPAN v2 tunnel push
-AT_CHECK([ovs-ofctl mod-flows int-br action=3])
-AT_CHECK([ovs-appctl revalidator/wait])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(3),header(size=54,type=107,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=47,tos=0,ttl=64,frag=0x4000),erspan(ver=2,sid=0x237,dir=1,hwid=0x7)),out_port(100)),1)
-])
-
-dnl Check ERSPAN v2 flow-based tunnel push
-AT_CHECK([ovs-ofctl mod-flows int-br "action=set_field:1.1.2.94->tun_dst,set_field:1->tun_erspan_dir,set_field:0x1->tun_erspan_hwid,4"])
-AT_CHECK([ovs-appctl revalidator/wait])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(3),header(size=54,type=107,eth(dst=f8:bc:12:44:34:b8,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.94,proto=47,tos=0,ttl=64,frag=0x4000),erspan(ver=2,sid=0x1c8,dir=1,hwid=0x1)),out_port(100)),1)
-])
-
-dnl Check ERSPAN v2 flow-based tunnel push, erspan_ver=flow
-dnl Dynamically set erspan v2
-AT_CHECK([ovs-ofctl mod-flows int-br "action=set_field:1.1.2.94->tun_dst,set_field:2->tun_erspan_ver,set_field:1->tun_erspan_dir,set_field:0x1->tun_erspan_hwid,5"])
-AT_CHECK([ovs-appctl revalidator/wait])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(3),header(size=54,type=107,eth(dst=f8:bc:12:44:34:b8,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.94,proto=47,tos=0,ttl=64,frag=0x4000),erspan(ver=2,sid=0x38,dir=1,hwid=0x1)),out_port(100)),1)
-])
-
-dnl Dynamically set erspan v1
-AT_CHECK([ovs-ofctl mod-flows int-br "action=set_field:1.1.2.94->tun_dst,set_field:1->tun_erspan_ver,set_field:1->tun_erspan_idx,5"])
-AT_CHECK([ovs-appctl revalidator/wait])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(3),header(size=50,type=107,eth(dst=f8:bc:12:44:34:b8,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.94,proto=47,tos=0,ttl=64,frag=0x4000),erspan(ver=1,sid=0x38,idx=0x1)),out_port(100)),1)
-])
-
-dnl Check ERSPAN v2 flow-based tunnel push
-AT_CHECK([ovs-ofctl mod-flows int-br "action=set_field:1.1.2.94->tun_dst,set_field:1->tun_erspan_dir,set_field:0x1->tun_erspan_hwid,4"])
-AT_CHECK([ovs-appctl revalidator/wait])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(3),header(size=54,type=107,eth(dst=f8:bc:12:44:34:b8,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.94,proto=47,tos=0,ttl=64,frag=0x4000),erspan(ver=2,sid=0x1c8,dir=1,hwid=0x1)),out_port(100)),1)
-])
-
-dnl Check ERSPAN v2 flow-based tunnel push, erspan_ver=flow
-dnl Dynamically set erspan v2
-AT_CHECK([ovs-ofctl mod-flows int-br "action=set_field:1.1.2.94->tun_dst,set_field:2->tun_erspan_ver,set_field:1->tun_erspan_dir,set_field:0x1->tun_erspan_hwid,5"])
-AT_CHECK([ovs-appctl revalidator/wait])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(3),header(size=54,type=107,eth(dst=f8:bc:12:44:34:b8,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.94,proto=47,tos=0,ttl=64,frag=0x4000),erspan(ver=2,sid=0x38,dir=1,hwid=0x1)),out_port(100)),1)
-])
-
-dnl Dynamically set erspan v1
-AT_CHECK([ovs-ofctl mod-flows int-br "action=set_field:1.1.2.94->tun_dst,set_field:1->tun_erspan_ver,set_field:1->tun_erspan_idx,5"])
-AT_CHECK([ovs-appctl revalidator/wait])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(3),header(size=50,type=107,eth(dst=f8:bc:12:44:34:b8,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.94,proto=47,tos=0,ttl=64,frag=0x4000),erspan(ver=1,sid=0x38,idx=0x1)),out_port(100)),1)
-])
-
-dnl Check ERSPAN tunnel pop
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.11.93,dst=1.1.2.88,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: tnl_pop(3)
-])
-
-AT_CHECK([ovs-ofctl del-flows int-br])
-
-dnl Check decapsulation of ERSPAN v1
-dnl Hex dump: GRE:(100088be)
-dnl ERSPAN: v1, session id = 0x7b (1000007b), index=3 (00000003)
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6408004500007e79464000402fba550101025c01010258100088be000000011000007b00000003fe71d883724fbeb6f4e1494a080045000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-
-AT_CHECK([ovs-appctl revalidator/wait])
-AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port  2'], [0], [dnl
-  port  2: rx pkts=1, bytes=98, drop=?, errs=?, frame=?, over=?, crc=?
-])
-
-dnl Check decapsulation ERSPAN v2
-dnl Hex dump: GRE:(100022eb)
-dnl ERSPAN: v2, session id = 0x237 (20000237), hwid =7, dir = 1 (00000078)
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6408004500007e79464000402fba550101025c01010258100022eb000000012000023710abcd0100000078fe71d883724fbeb6f4e1494a080045000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-
-AT_CHECK([ovs-appctl revalidator/wait])
-AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port  3'], [0], [dnl
-  port  3: rx pkts=1, bytes=98, drop=?, errs=?, frame=?, over=?, crc=?
-])
-
-dnl Check ERSPAN encap in pcap file
-dnl This ARP reply from p0 has two effects:
-dnl 1. The ARP cache will learn that 1.1.2.92 is at f8:bc:12:44:34:b6.
-dnl 2. The br0 mac learning will learn that f8:bc:12:44:34:b6 is on p0.
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(2),eth(src=f8:bc:12:44:34:b6,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b6,tha=00:00:00:00:00:00)'])
-
-AT_CHECK([ovs-vsctl -- set Interface p0 options:tx_pcap=p0.pcap])
-
-dnl Output to tunnel from a int-br internal port
-AT_CHECK([ovs-ofctl add-flow int-br "in_port=LOCAL,actions=output:2"])
-AT_CHECK([ovs-appctl revalidator/wait])
-AT_CHECK([ovs-appctl netdev-dummy/receive int-br '50540000000a5054000000091234'])
-dnl 100088be: GRE with ERSPANv1, 00000001: Seqno, 1000007b: v1 with 0x7b session ID (key)
-OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | grep 100088be000000011000007b | wc -l` -ge 1])
-
-AT_CHECK([ovs-ofctl mod-flows int-br "in_port=LOCAL,actions=output:3"])
-AT_CHECK([ovs-appctl revalidator/wait])
-AT_CHECK([ovs-appctl netdev-dummy/receive int-br '50540000000a5054000000091235'])
-dnl 100022eb: GRE with ERSPANv2, 00000001: Seqno, 20000237: v2 with 0x237 session ID (key)
-OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | grep 100022eb0000000120000237 | wc -l` -ge 1])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel_push_pop - action])
-
-OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 other-config:hwaddr=aa:55:aa:55:00:00])
-AT_CHECK([ovs-vsctl add-br int-br -- set bridge int-br datapath_type=dummy], [0])
-AT_CHECK([ovs-vsctl add-port int-br t2 -- set Interface t2 type=vxlan \
-                       options:remote_ip=1.1.2.92 options:key=123 ofport_request=2\
-                    -- add-port int-br t1 -- set Interface t1 type=gre \
-                       options:remote_ip=1.1.2.92 options:key=456 ofport_request=3\
-                    -- add-port int-br t3 -- set Interface t3 type=vxlan \
-                       options:remote_ip=1.1.2.93 options:out_key=flow options:csum=true ofport_request=4\
-                    -- add-port int-br t4 -- set Interface t4 type=geneve \
-                       options:remote_ip=flow options:key=123 ofport_request=5\
-                    -- add-port int-br t5 -- set Interface t5 type=geneve \
-                       options:remote_ip=1.1.2.93 options:out_key=flow options:egress_pkt_mark=1234 ofport_request=6\
-                    -- add-port int-br t6 -- set Interface t6 type=gre \
-                       options:remote_ip=1.1.2.92 options:key=456 options:packet_type=legacy_l3 ofport_request=7\
-                    -- add-port int-br t7 -- set Interface t7 type=vxlan \
-                       options:remote_ip=1.1.2.92 options:key=345 options:exts=gpe ofport_request=8\
-                       ], [0])
-
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p0 1/1: (dummy)
-  int-br:
-    int-br 65534/2: (dummy-internal)
-    t1 3/3: (gre: key=456, remote_ip=1.1.2.92)
-    t2 2/4789: (vxlan: key=123, remote_ip=1.1.2.92)
-    t3 4/4789: (vxlan: csum=true, out_key=flow, remote_ip=1.1.2.93)
-    t4 5/6081: (geneve: key=123, remote_ip=flow)
-    t5 6/6081: (geneve: egress_pkt_mark=1234, out_key=flow, remote_ip=1.1.2.93)
-    t6 7/3: (gre: key=456, packet_type=legacy_l3, remote_ip=1.1.2.92)
-    t7 8/4789: (vxlan: key=345, remote_ip=1.1.2.92)
-])
-
-dnl First setup dummy interface IP address, then add the route
-dnl so that tnl-port table can get valid IP address for the device.
-AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 1.1.2.88/24], [0], [OK
-])
-AT_CHECK([ovs-appctl netdev-dummy/ip6addr br0 2001:cafe::88/24], [0], [OK
-])
-
-AT_CHECK([ovs-appctl ovs/route/add 1.1.2.92/24 br0], [0], [OK
-])
-
-AT_CHECK([ovs-appctl ovs/route/add 1.1.2.92/24 br0 pkt_mark=1234], [0], [OK
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-
-dnl Check ARP request
-AT_CHECK([ovs-vsctl -- set Interface p0 options:pcap=p0.pcap])
-
-AT_CHECK([ovs-appctl netdev-dummy/receive int-br 'in_port(2),eth(src=aa:55:aa:55:00:00,dst=f8:bc:12:ff:ff:ff),eth_type(0x0800),ipv4(src=1.1.3.92,dst=1.1.3.88,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)'])
-
-dnl Wait for the two ARP requests to be sent. Sometimes the system
-dnl can be slow (e.g. under valgrind)
-OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | sort | uniq | wc -l` -ge 2])
-
-AT_CHECK([ovs-pcap p0.pcap > p0.pcap.txt 2>&1])
-
-AT_CHECK([cat p0.pcap.txt | grep 101025c | uniq], [0], [dnl
-ffffffffffffaa55aa55000008060001080006040001aa55aa550000010102580000000000000101025c
-])
-AT_CHECK([cat p0.pcap.txt | grep 101025d | uniq], [0], [dnl
-ffffffffffffaa55aa55000008060001080006040001aa55aa550000010102580000000000000101025d
-])
-
-dnl Check ARP Snoop
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(1),eth(src=f8:bc:12:44:34:c8,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:c8,tha=00:00:00:00:00:00)'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl tnl/neigh/show | grep br0 | sort], [0], [dnl
-1.1.2.92                                      f8:bc:12:44:34:c8   br0
-])
-
-dnl Receiving ARP reply with incorrect 'tip' should not alter tunnel neighbor cache
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(1),eth(src=f8:bc:12:44:34:b8,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.90,op=2,sha=f8:bc:12:44:34:b8,tha=00:00:00:00:00:00)'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl tnl/neigh/show | grep br0 | sort], [0], [dnl
-1.1.2.92                                      f8:bc:12:44:34:c8   br0
-])
-
-dnl Receiving ARP reply with incorrect VLAN id should not alter tunnel neighbor cache
-AT_CHECK([ovs-vsctl set port br0 tag=10])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(1),eth(src=f8:bc:12:44:34:b6,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b6,tha=00:00:00:00:00:00))'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl tnl/neigh/show | grep br0 | sort], [0], [dnl
-1.1.2.92                                      f8:bc:12:44:34:c8   br0
-])
-
-dnl Receiving ARP reply with correct VLAN id should alter tunnel neighbor cache
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(1),eth(src=f8:bc:12:44:34:b6,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8100),vlan(vid=10,pcp=7),encap(eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b6,tha=00:00:00:00:00:00))'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl tnl/neigh/show | grep br0 | sort], [0], [dnl
-1.1.2.92                                      f8:bc:12:44:34:b6   br0
-])
-
-dnl Receiving ARP reply in overlay bridge should not alter tunnel neighbor cache
-AT_CHECK([ovs-vsctl add-port int-br p1 -- set interface p1 type=dummy ofport_request=200 other-config:hwaddr=aa:55:aa:55:00:99])
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'recirc_id(0),in_port(200),eth(src=f8:bc:12:44:34:c8,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:c8,tha=00:00:00:00:00:00)'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl tnl/neigh/show | grep br | sort], [0], [dnl
-1.1.2.92                                      f8:bc:12:44:34:b6   br0
-])
-
-dnl Receive ARP reply without VLAN header
-AT_CHECK([ovs-vsctl set port br0 tag=0])
-AT_CHECK([ovs-appctl tnl/neigh/flush], [0], [OK
-])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(1),eth(src=f8:bc:12:44:34:b6,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b6,tha=00:00:00:00:00:00)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(1),eth(src=f8:bc:12:44:34:b7,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.93,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b7,tha=00:00:00:00:00:00)'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-appctl tnl/neigh/show | tail -n+3 | sort], [0], [dnl
-1.1.2.92                                      f8:bc:12:44:34:b6   br0
-1.1.2.93                                      f8:bc:12:44:34:b7   br0
-])
-
-AT_CHECK([ovs-appctl tnl/ports/show |sort], [0], [dnl
-Listening ports:
-genev_sys_6081 (6081) ref_cnt=2
-gre_sys (3) ref_cnt=2
-vxlan_sys_4789 (4789) ref_cnt=3
-])
-
-dnl Check VXLAN tunnel pop
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=17,tos=0,ttl=64,frag=no),udp(src=51283,dst=4789)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: tnl_pop(4789)
-])
-
-dnl Check GRE tunnel pop
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: tnl_pop(3)
-])
-
-dnl Check Geneve tunnel pop
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=17,tos=0,ttl=64,frag=no),udp(src=51283,dst=6081)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: tnl_pop(6081)
-])
-
-dnl Check Geneve tunnel (t6) pop
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.2.96,dst=1.1.2.88,proto=17,tos=0,ttl=64,frag=no),udp(src=51283,dst=6081)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: tnl_pop(6081)
-])
-
-dnl Check VXLAN tunnel push
-AT_CHECK([ovs-ofctl add-flow int-br action=2])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(4789),header(size=50,type=4,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0x0),vxlan(flags=0x8000000,vni=0x7b)),out_port(100)),1)
-])
-
-dnl Check VXLAN GPE tunnel push
-AT_CHECK([ovs-ofctl add-flow int-br action=8])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:01),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(4789),header(size=50,type=4,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0x0),vxlan(flags=0xc000003,vni=0x159)),out_port(100)),1)
-])
-
-dnl Check VXLAN tunnel push set tunnel id by flow and checksum
-AT_CHECK([ovs-ofctl add-flow int-br "actions=set_tunnel:124,4"])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(4789),header(size=50,type=4,eth(dst=f8:bc:12:44:34:b7,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.93,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0xffff),vxlan(flags=0x8000000,vni=0x7c)),out_port(100)),1)
-])
-
-dnl Check GRE tunnel push
-AT_CHECK([ovs-ofctl add-flow int-br action=3])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(3),header(size=42,type=3,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x2000,proto=0x6558),key=0x1c8)),out_port(100)),1)
-])
-
-dnl Check L3GRE tunnel push
-AT_CHECK([ovs-ofctl add-flow int-br action=7])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:01),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: pop_eth,clone(tnl_push(tnl_port(3),header(size=42,type=3,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x2000,proto=0x800),key=0x1c8)),out_port(100)),1)
-])
-
-dnl Check Geneve tunnel push
-AT_CHECK([ovs-ofctl add-flow int-br "actions=set_field:1.1.2.92->tun_dst,5"])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(6081),header(size=50,type=5,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=6081,csum=0x0),geneve(vni=0x7b)),out_port(100)),1)
-])
-
-dnl Check Geneve tunnel push with pkt-mark
-AT_CHECK([ovs-ofctl add-flow int-br "actions=set_tunnel:234,6"])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(skb_mark(0x4d2)),clone(tnl_push(tnl_port(6081),header(size=50,type=5,eth(dst=f8:bc:12:44:34:b7,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.93,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=6081,csum=0x0),geneve(vni=0xea)),out_port(100)),1)
-])
-
-dnl Check Geneve tunnel push with options
-AT_CHECK([ovs-ofctl add-tlv-map int-br "{class=0xffff,type=0x80,len=4}->tun_metadata0"])
-AT_CHECK([ovs-ofctl add-flow int-br "actions=set_field:1.1.2.92->tun_dst,set_field:0xa->tun_metadata0,5"])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(6081),header(size=58,type=5,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=6081,csum=0x0),geneve(crit,vni=0x7b,options({class=0xffff,type=0x80,len=4,0xa}))),out_port(100)),1)
-])
-
-dnl Check decapsulation of GRE packet
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6408004500007e79464000402fba550101025c0101025820006558000001c8fe71d883724fbeb6f4e1494a080045000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6408004500007e79464000402fba550101025c0101025820006558000001c8fe71d883724fbeb6f4e1494a080045000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6408004500007e79464000402fba550101025c0101025820006558000001c8fe71d883724fbeb6f4e1494a080045000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port  3'], [0], [dnl
-  port  3: rx pkts=3, bytes=294, drop=?, errs=?, frame=?, over=?, crc=?
-])
-
-dnl Check decapsulation of L3GRE packet
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6408004500007079464000402fba630101025c0101025820000800000001c845000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6408004500007079464000402fba630101025c0101025820000800000001c845000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6408004500007079464000402fba630101025c0101025820000800000001c845000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port  7'], [0], [dnl
-  port  7: rx pkts=3, bytes=252, drop=?, errs=?, frame=?, over=?, crc=?
-])
-
-dnl Check GREL3 only accepts non-fragmented packets?
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab6408004500007e79464000402fba550101025c0101025820000800000001c8fe71d883724fbeb6f4e1494a080045000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-
-ovs-appctl time/warp 1000
-ovs-appctl time/warp 1000
-
-AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port  [[37]]' | sort], [0], [dnl
-  port  3: rx pkts=3, bytes=294, drop=?, errs=?, frame=?, over=?, crc=?
-  port  7: rx pkts=4, bytes=350, drop=?, errs=?, frame=?, over=?, crc=?
-])
-
-dnl Check decapsulation of Geneve packet with options
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor int-br 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
-
-AT_CHECK([ovs-ofctl del-flows int-br])
-AT_CHECK([ovs-ofctl add-flow int-br "tun_metadata0=0xa/0xf,actions=5,controller"])
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'aa55aa550000001b213cab64080045000096794640004011ba5b0101025c01010258308817c1008200000400655800007b00ffff80010000000affff00010000000bfe71d883724fbeb6f4e1494a080045000054ba200000400184861e0000011e00000200004227e75400030af3195500000000f265010000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637'])
-
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
-
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
-NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=98 tun_id=0x7b,tun_src=1.1.2.92,tun_dst=1.1.2.88,tun_metadata0=0xa,in_port=5 (via action) data_len=98 (unbuffered)
-icmp,vlan_tci=0x0000,dl_src=be:b6:f4:e1:49:4a,dl_dst=fe:71:d8:83:72:4f,nw_src=30.0.0.1,nw_dst=30.0.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=0,icmp_code=0 icmp_csum:4227
-])
-
-AT_CHECK([ovs-ofctl dump-ports int-br | grep 'port  5'], [0], [dnl
-  port  5: rx pkts=1, bytes=98, drop=?, errs=?, frame=?, over=?, crc=?
-])
-AT_CHECK([ovs-appctl dpif/dump-flows int-br | grep 'in_port(6081)'], [0], [dnl
-tunnel(tun_id=0x7b,src=1.1.2.92,dst=1.1.2.88,geneve({class=0xffff,type=0x80,len=4,0xa/0xf}{class=0xffff,type=0,len=4}),flags(-df-csum+key)),recirc_id(0),in_port(6081),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:userspace(pid=0,controller(reason=1,dont_send=0,continuation=0,recirc_id=3,rule_cookie=0,controller_id=0,max_len=65535))
-])
-
-ovs-appctl time/warp 10000
-
-AT_CHECK([ovs-vsctl del-port int-br t3 \
-                    -- del-port int-br t5 \
-                    -- set Interface t1 type=vxlan \
-                    -- set Interface t2 options:dst_port=4790 \
-                       ], [0])
-
-dnl Check tunnel lookup entries after deleting/reconfiguring some ports
-AT_CHECK([ovs-appctl tnl/ports/show |sort], [0], [dnl
-Listening ports:
-genev_sys_6081 (6081) ref_cnt=1
-gre_sys (3) ref_cnt=1
-vxlan_sys_4789 (4789) ref_cnt=2
-vxlan_sys_4790 (4790) ref_cnt=1
-])
-
-AT_CHECK([ovs-vsctl del-port int-br t1 \
-                    -- del-port int-br t2 \
-                    -- del-port int-br t4 \
-                    -- del-port int-br t6 \
-                    -- del-port int-br t7 \
-                       ], [0])
-
-dnl Check tunnel lookup entries after deleting all remaining tunnel ports
-AT_CHECK([ovs-appctl tnl/ports/show |sort], [0], [dnl
-Listening ports:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel_push_pop - packet_out])
-
-OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 other-config:hwaddr=aa:55:aa:55:00:00])
-AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg])
-AT_CHECK([ovs-vsctl add-br int-br -- set bridge int-br datapath_type=dummy])
-AT_CHECK([ovs-vsctl add-port int-br t2 -- set Interface t2 type=geneve \
-                       options:remote_ip=1.1.2.92 options:key=123 ofport_request=2 \
-                       ])
-
-dnl First setup dummy interface IP address, then add the route
-dnl so that tnl-port table can get valid IP address for the device.
-AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 1.1.2.88/24], [0], [OK
-])
-
-AT_CHECK([ovs-appctl ovs/route/add 1.1.2.92/24 br0], [0], [OK
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=normal])
-
-dnl This ARP reply from p0 has two effects:
-dnl 1. The ARP cache will learn that 1.1.2.92 is at f8:bc:12:44:34:b6.
-dnl 2. The br0 mac learning will learn that f8:bc:12:44:34:b6 is on p0.
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(2),eth(src=f8:bc:12:44:34:b6,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b6,tha=00:00:00:00:00:00)'])
-
-AT_CHECK([ovs-vsctl -- set Interface p0 options:tx_pcap=p0.pcap])
-
-dnl Output to tunnel from a int-br internal port
-AT_CHECK([ovs-ofctl add-flow int-br "in_port=LOCAL,actions=output:2"])
-AT_CHECK([ovs-appctl netdev-dummy/receive int-br '50540000000a5054000000091234'])
-OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | grep 50540000000a5054000000091234 | wc -l` -ge 1])
-
-dnl Output to tunnel from the controller
-AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out int-br CONTROLLER "output:2" '50540000000a5054000000091235'])
-OVS_WAIT_UNTIL([test `ovs-pcap p0.pcap | grep 50540000000a5054000000091235 | wc -l` -ge 1])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel_push_pop - underlay bridge match])
-
-OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 other-config:hwaddr=aa:55:aa:55:00:00])
-AT_CHECK([ovs-vsctl add-br int-br -- set bridge int-br datapath_type=dummy], [0])
-AT_CHECK([ovs-vsctl add-port int-br t1 -- set Interface t1 type=gre \
-                       options:remote_ip=1.1.2.92 options:key=456 options:seq=true ofport_request=3], [0])
-
-AT_CHECK([ovs-appctl dpif/show], [0], [dnl
-dummy at ovs-dummy: hit:0 missed:0
-  br0:
-    br0 65534/100: (dummy-internal)
-    p0 1/1: (dummy)
-  int-br:
-    int-br 65534/2: (dummy-internal)
-    t1 3/3: (gre: key=456, remote_ip=1.1.2.92, seq=true)
-])
-
-AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 1.1.2.88/24], [0], [OK
-])
-AT_CHECK([ovs-appctl ovs/route/add 1.1.2.92/24 br0], [0], [OK
-])
-AT_CHECK([ovs-ofctl add-flow br0 'arp,priority=1,action=normal'])
-
-dnl Use arp reply to achieve tunnel next hop mac binding
-AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(1),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b6,tha=00:00:00:00:00:00)'])
-
-AT_CHECK([ovs-appctl tnl/neigh/show | tail -n+3 | sort], [0], [dnl
-1.1.2.92                                      f8:bc:12:44:34:b6   br0
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 'ip,ip_proto=47,nw_tos=0,eth_src=aa:55:aa:55:00:00,eth_dst=f8:bc:12:44:34:b6,ip_src=1.1.2.88,ip_dst=1.1.2.92,priority=99,action=normal'])
-
-dnl Direct traffic from the integration bridge to the GRE tunnel
-AT_CHECK([ovs-ofctl add-flow int-br action=3])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=f8:bc:12:44:34:b6,dst=aa:55:aa:55:00:00),eth_type(0x0800),ipv4(src=1.1.3.88,dst=1.1.3.112,proto=17,tos=0,ttl=64,frag=no),udp(src=51283,dst=4789)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: clone(tnl_push(tnl_port(3),header(size=46,type=3,eth(dst=f8:bc:12:44:34:b6,src=aa:55:aa:55:00:00,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x3000,proto=0x6558),key=0x1c8,seq=0x0)),out_port(100)),1)
-])
-
-dnl Verify outer L2 and L3 header flow fields can be matched in the underlay bridge
-AT_CHECK([ovs-appctl netdev-dummy/receive int-br '50540000000a5054000000091234'])
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl)
- n_packets=1, n_bytes=42, priority=1,arp actions=NORMAL
- n_packets=1, n_bytes=60, priority=99,ip,dl_src=aa:55:aa:55:00:00,dl_dst=f8:bc:12:44:34:b6,nw_src=1.1.2.88,nw_dst=1.1.2.92,nw_proto=47,nw_tos=0 actions=NORMAL
-NXST_FLOW reply:
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/tunnel.at b/tests/tunnel.at
deleted file mode 100644
index 035c54f67..000000000
--- a/tests/tunnel.at
+++ /dev/null
@@ -1,922 +0,0 @@
-AT_BANNER([tunnel])
-
-AT_SETUP([tunnel - input])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
-                    options:remote_ip=1.1.1.1 ofport_request=1\
-                    -- add-port br0 p2 -- set Interface p2 type=gre \
-                    options:local_ip=2.2.2.2 options:remote_ip=1.1.1.1 \
-                    ofport_request=2 \
-                    -- add-port br0 p3 -- set Interface p3 type=gre \
-                    options:remote_ip=2.2.2.2 ofport_request=3])
-AT_DATA([flows.txt], [dnl
-actions=IN_PORT
-])
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (gre: remote_ip=1.1.1.1)
-    p2 2/1: (gre: local_ip=2.2.2.2, remote_ip=1.1.1.1)
-    p3 3/1: (gre: remote_ip=2.2.2.2)
-])
-
-dnl remote_ip
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(src=1.1.1.1,dst=1.2.3.4,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(dst=1.1.1.1,ttl=64,flags(df))),1
-])
-
-dnl local_ip, remote_ip
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(src=1.1.1.1,dst=2.2.2.2,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(src=2.2.2.2,dst=1.1.1.1,ttl=64,flags(df))),1
-])
-
-dnl reconfigure, local_ip, remote_ip
-AT_CHECK([ovs-vsctl set Interface p2 type=gre options:local_ip=2.2.2.3 \
-          options:df_default=false options:ttl=1 options:csum=true \
-          -- set Interface p3 type=vxlan])
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (gre: remote_ip=1.1.1.1)
-    p2 2/1: (gre: csum=true, df_default=false, local_ip=2.2.2.3, remote_ip=1.1.1.1, ttl=1)
-    p3 3/4789: (vxlan: remote_ip=2.2.2.2)
-])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(src=1.1.1.1,dst=2.2.2.2,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(dst=1.1.1.1,ttl=64,flags(df))),1
-])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(src=1.1.1.1,dst=2.2.2.3,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(src=2.2.2.3,dst=1.1.1.1,ttl=1,flags(csum))),1
-])
-
-dnl nonexistent tunnel
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(src=5.5.5.5,dst=6.6.6.6,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [2], [ignore], [dnl
-no OpenFlow tunnel port for this packet
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-
-OVS_VSWITCHD_STOP(["/receive tunnel port not found/d"])
-AT_CLEANUP
-
-AT_SETUP([tunnel - ECN decapsulation])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
-                    options:remote_ip=1.1.1.1 ofport_request=1 \
-                    -- add-port br0 p2 -- set Interface p2 type=dummy \
-                    ofport_request=2])
-AT_DATA([flows.txt], [dnl
-actions=2
-])
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (gre: remote_ip=1.1.1.1)
-    p2 2/2: (dummy)
-])
-
-dnl Tunnel CE and encapsulated packet CE
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=3,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0,tun_src=1.1.1.1,tun_dst=2.2.2.2,tun_tos=3,tun_flags=-df-csum-key,in_port=1,nw_ecn=3,nw_frag=no
-Datapath actions: 2
-])
-
-dnl Tunnel CE and encapsulated packet ECT(1)
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=1,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0,tun_src=1.1.1.1,tun_dst=2.2.2.2,tun_tos=3,tun_flags=-df-csum-key,in_port=1,nw_ecn=1,nw_frag=no
-Datapath actions: set(ipv4(tos=0x3/0x3)),2
-])
-
-dnl Tunnel CE and encapsulated packet ECT(2)
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=2,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0,tun_src=1.1.1.1,tun_dst=2.2.2.2,tun_tos=3,tun_flags=-df-csum-key,in_port=1,nw_ecn=2,nw_frag=no
-Datapath actions: set(ipv4(tos=0x3/0x3)),2
-])
-
-dnl Tunnel CE and encapsulated packet Non-ECT
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0,tun_src=1.1.1.1,tun_dst=2.2.2.2,tun_tos=3,tun_flags=-df-csum-key,in_port=1,nw_ecn=0,nw_frag=no
-Datapath actions: drop
-])
-OVS_VSWITCHD_STOP(["/dropping tunnel packet marked ECN CE but is not ECN capable/d"])
-AT_CLEANUP
-
-AT_SETUP([tunnel - output])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
-                    options:remote_ip=1.1.1.1 options:local_ip=2.2.2.2 \
-                    options:key=5 ofport_request=1\
-                    -- add-port br0 p2 -- set Interface p2 type=dummy \
-                    ofport_request=2])
-AT_DATA([flows.txt], [dnl
-actions=output:1
-])
-
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (gre: key=5, local_ip=2.2.2.2, remote_ip=1.1.1.1)
-    p2 2/2: (dummy)
-])
-
-dnl Basic
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,ttl=64,flags(df|key))),1
-])
-
-dnl ECN
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=1,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,tos=0x1,ttl=64,flags(df|key))),1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - unencrypted tunnel and not setting skb_mark])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
-                    options:remote_ip=1.1.1.1 options:local_ip=2.2.2.2 \
-                    options:key=5 ofport_request=1\
-                    -- add-port br0 p2 -- set Interface p2 type=dummy \
-                    ofport_request=2 ofport_request=2])
-AT_DATA([flows.txt], [dnl
-actions=output:1
-])
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,ttl=64,flags(df|key))),1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - unencrypted tunnel and setting skb_mark to 1])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
-                    options:remote_ip=1.1.1.1 options:local_ip=2.2.2.2 \
-                    options:key=5 ofport_request=1\
-                    -- add-port br0 p2 -- set Interface p2 type=dummy \
-                    ofport_request=2 ofport_request=2])
-AT_DATA([flows.txt], [dnl
-actions=load:0x1->NXM_NX_PKT_MARK[[]],output:1
-])
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,ttl=64,flags(df|key))),set(skb_mark(0x1)),1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - unencrypted tunnel and setting skb_mark to 2])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
-                    options:remote_ip=1.1.1.1 options:local_ip=2.2.2.2 \
-                    options:key=5 ofport_request=1\
-                    -- add-port br0 p2 -- set Interface p2 type=dummy \
-                    ofport_request=2 ofport_request=2])
-AT_DATA([flows.txt], [dnl
-actions=load:0x2->NXM_NX_PKT_MARK[[]],output:1
-])
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,ttl=64,flags(df|key))),set(skb_mark(0x2)),1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - ToS and TTL inheritance])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
-                    options:remote_ip=1.1.1.1 options:tos=inherit \
-                    options:ttl=inherit ofport_request=1 \
-                    -- add-port br0 p2 -- set Interface p2 type=dummy \
-                    ofport_request=2 ofport_request=2])
-AT_DATA([flows.txt], [dnl
-actions=output:1
-])
-
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (gre: remote_ip=1.1.1.1, tos=inherit, ttl=inherit)
-    p2 2/2: (dummy)
-])
-
-dnl Basic
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(dst=1.1.1.1,tos=0x4,ttl=128,flags(df))),1
-])
-
-dnl ECN
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=5,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(dst=1.1.1.1,tos=0x5,ttl=128,flags(df))),1
-])
-
-dnl non-IP
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0806),arp(sip=1.2.3.4,tip=5.6.7.8,op=1,sha=00:0f:10:11:12:13,tha=00:14:15:16:17:18)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(dst=1.1.1.1,ttl=64,flags(df))),1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - set_tunnel])
-OVS_VSWITCHD_START([dnl
-    add-port br0 p1 -- set Interface p1 type=gre options:key=flow \
-        options:remote_ip=1.1.1.1 ofport_request=1 \
-    -- add-port br0 p2 -- set Interface p2 type=gre options:key=flow \
-        options:remote_ip=2.2.2.2 ofport_request=2 \
-    -- add-port br0 p3 -- set Interface p3 type=gre options:key=flow \
-        options:remote_ip=3.3.3.3 ofport_request=3 \
-    -- add-port br0 p4 -- set Interface p4 type=gre options:key=flow \
-        options:remote_ip=4.4.4.4 ofport_request=4])
-AT_DATA([flows.txt], [dnl
-actions=set_tunnel:1,output:1,set_tunnel:2,output:2,set_tunnel:3,output:3,set_tunnel:5,output:4
-])
-
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (gre: key=flow, remote_ip=1.1.1.1)
-    p2 2/1: (gre: key=flow, remote_ip=2.2.2.2)
-    p3 3/1: (gre: key=flow, remote_ip=3.3.3.3)
-    p4 4/1: (gre: key=flow, remote_ip=4.4.4.4)
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
-set(tunnel(tun_id=0x1,dst=1.1.1.1,ttl=64,flags(df|key))),1,dnl
-set(tunnel(tun_id=0x2,dst=2.2.2.2,ttl=64,flags(df|key))),1,dnl
-set(tunnel(tun_id=0x3,dst=3.3.3.3,ttl=64,flags(df|key))),1,dnl
-set(tunnel(tun_id=0x5,dst=4.4.4.4,ttl=64,flags(df|key))),1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - key])
-OVS_VSWITCHD_START([dnl
-    add-port br0 p1 -- set Interface p1 type=gre options:key=1 \
-        options:remote_ip=1.1.1.1 ofport_request=1 \
-    -- add-port br0 p2 -- set Interface p2 type=gre options:in_key=2 \
-        options:out_key=3 options:remote_ip=1.1.1.1 ofport_request=2 \
-    -- add-port br0 p3 -- set Interface p3 type=gre options:out_key=5 \
-        options:remote_ip=1.1.1.1 ofport_request=3])
-AT_DATA([flows.txt], [dnl
-actions=IN_PORT,output:1,output:2,output:3
-])
-
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (gre: key=1, remote_ip=1.1.1.1)
-    p2 2/1: (gre: in_key=2, out_key=3, remote_ip=1.1.1.1)
-    p3 3/1: (gre: out_key=5, remote_ip=1.1.1.1)
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x1,src=1.1.1.1,dst=2.2.2.2,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
-set(tunnel(tun_id=0x1,dst=1.1.1.1,ttl=64,flags(df|key))),1,dnl
-set(tunnel(tun_id=0x3,dst=1.1.1.1,ttl=64,flags(df|key))),1,dnl
-set(tunnel(tun_id=0x5,dst=1.1.1.1,ttl=64,flags(df|key))),1
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x2,src=1.1.1.1,dst=2.2.2.2,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
-set(tunnel(tun_id=0x3,dst=1.1.1.1,ttl=64,flags(df|key))),1,dnl
-set(tunnel(tun_id=0x1,dst=1.1.1.1,ttl=64,flags(df|key))),1,dnl
-set(tunnel(tun_id=0x5,dst=1.1.1.1,ttl=64,flags(df|key))),1
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(src=1.1.1.1,dst=2.2.2.2,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
-set(tunnel(tun_id=0x5,dst=1.1.1.1,ttl=64,flags(df|key))),1,dnl
-set(tunnel(tun_id=0x1,dst=1.1.1.1,ttl=64,flags(df|key))),1,dnl
-set(tunnel(tun_id=0x3,dst=1.1.1.1,ttl=64,flags(df|key))),1
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0xf,src=1.1.1.1,dst=2.2.2.2,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [2], [ignore], [dnl
-no OpenFlow tunnel port for this packet
-ovs-appctl: ovs-vswitchd: server returned an error
-])
-OVS_VSWITCHD_STOP(["/receive tunnel port not found/d"])
-AT_CLEANUP
-
-AT_SETUP([tunnel - key match])
-OVS_VSWITCHD_START([dnl
-    add-port br0 p1 -- set Interface p1 type=gre options:key=flow \
-        options:remote_ip=1.1.1.1 ofport_request=1 \
-    -- add-port br0 p2 -- set Interface p2 type=gre options:key=3 \
-        options:remote_ip=3.3.3.3 ofport_request=2 \
-    -- add-port br0 p3 -- set Interface p3 type=dummy ofport_request=3 \
-    -- add-port br0 p4 -- set Interface p4 type=dummy ofport_request=4 \
-    -- add-port br0 p5 -- set Interface p5 type=dummy ofport_request=5])
-AT_DATA([flows.txt], [dnl
-tun_id=2,actions=output:3
-tun_id=3,actions=output:4,set_tunnel:2,resubmit:99,set_tunnel:4,output:2,resubmit:99
-tun_id=4,actions=output:5
-])
-
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (gre: key=flow, remote_ip=1.1.1.1)
-    p2 2/1: (gre: key=3, remote_ip=3.3.3.3)
-    p3 3/3: (dummy)
-    p4 4/4: (dummy)
-    p5 5/5: (dummy)
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x2,src=1.1.1.1,dst=2.2.2.2,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: 3
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x3,src=1.1.1.1,dst=2.2.2.2,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: 4,3,set(tunnel(tun_id=0x3,dst=3.3.3.3,ttl=64,flags(df|key))),1,5
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x3,src=3.3.3.3,dst=2.2.2.2,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: 4,3,5
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: drop
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - Geneve])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=geneve \
-                    options:remote_ip=1.1.1.1 ofport_request=1 options:dst_port=5000])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/5000: (geneve: dst_port=5000, remote_ip=1.1.1.1)
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - VXLAN])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=vxlan \
-                    options:remote_ip=1.1.1.1 ofport_request=1])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/4789: (vxlan: remote_ip=1.1.1.1)
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - LISP])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=lisp \
-                    options:remote_ip=1.1.1.1 ofport_request=1])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/4341: (lisp: remote_ip=1.1.1.1)
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - ERSPAN])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=erspan \
-                    options:remote_ip=1.1.1.1 options:key=1 options:erspan_ver=1 \
-                    options:erspan_idx=0x0 ofport_request=1 \
-                 -- add-port br0 p2 -- set Interface p2 type=erspan \
-                    options:remote_ip=1.1.1.1 ofport_request=2 \
-                    options:key=flow options:erspan_ver=1 options:erspan_idx=flow \
-                 -- add-port br0 p3 -- set Interface p3 type=erspan \
-                    options:remote_ip=1.1.1.1 ofport_request=3 \
-                    options:key=10 options:erspan_ver=2 options:erspan_dir=flow \
-                    options:erspan_hwid=flow \
-                 -- add-port br0 p4 -- set Interface p4 type=erspan \
-                    options:remote_ip=1.2.3.4 ofport_request=4 \
-                    options:key=flow options:erspan_ver=flow\
-                 ])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (erspan: erspan_idx=0x0, erspan_ver=1, key=1, remote_ip=1.1.1.1)
-    p2 2/1: (erspan: erspan_idx=flow, erspan_ver=1, key=flow, remote_ip=1.1.1.1)
-    p3 3/1: (erspan: erspan_dir=flow, erspan_hwid=flow, erspan_ver=2, key=10, remote_ip=1.1.1.1)
-    p4 4/1: (erspan: erspan_dir=flow, erspan_hwid=flow, erspan_idx=flow, erspan_ver=flow, key=flow, remote_ip=1.2.3.4)
-])
-
-dnl Check ERSPAN v1 flow-based tunnel push
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=1, actions=set_tunnel:11,set_field:0x1->tun_erspan_idx,2"])
-
-dnl Check ERSPAN v2 flow-based tunnel push
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2, actions=set_field:1->tun_erspan_dir,set_field:0x0->tun_erspan_hwid,3"])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=3, actions=set_field:2->tun_erspan_ver,set_field:1->tun_erspan_dir,set_field:0x0->tun_erspan_hwid,4"])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip],
-[0], [dnl
-NXST_FLOW reply:
- in_port=1 actions=set_tunnel:0xb,set_field:0x1->tun_erspan_idx,output:2
- in_port=2 actions=set_field:1->tun_erspan_dir,set_field:0->tun_erspan_hwid,output:3
- in_port=3 actions=set_field:2->tun_erspan_ver,set_field:1->tun_erspan_dir,set_field:0->tun_erspan_hwid,output:4
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - different VXLAN UDP port])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=vxlan \
-                    options:remote_ip=1.1.1.1 ofport_request=1 options:dst_port=4341])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/4341: (vxlan: dst_port=4341, remote_ip=1.1.1.1)
-])
-
-dnl change UDP port
-
-AT_CHECK([ovs-vsctl -- set Interface p1 options:dst_port=5000])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/5000: (vxlan: dst_port=5000, remote_ip=1.1.1.1)
-])
-
-dnl change UDP port to default
-
-AT_CHECK([ovs-vsctl -- set Interface p1 options:dst_port=4789])
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/4789: (vxlan: remote_ip=1.1.1.1)
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([ofproto-dpif - set_field - tun_src/tun_dst/tun_id])
-OVS_VSWITCHD_START([dnl
-    add-port br0 p1 -- set Interface p1 type=gre options:key=flow \
-        options:remote_ip=1.1.1.1 ofport_request=1 \
-    -- add-port br0 p2 -- set Interface p2 type=gre options:key=flow \
-        options:remote_ip=flow ofport_request=2 \
-    -- add-port br0 p3 -- set Interface p3 type=gre options:key=flow \
-        options:remote_ip=flow options:local_ip=flow ofport_request=3 \
-    -- add-port br0 p4 -- set Interface p4 type=gre options:key=3 \
-        options:remote_ip=flow ofport_request=4 \
-    -- add-port br0 p5 -- set Interface p5 type=gre options:key=flow \
-        options:remote_ip=5.5.5.5 ofport_request=5])
-
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-add_of_ports br0 90
-AT_DATA([flows.txt], [dnl
-in_port=90 actions=resubmit:1,resubmit:2,resubmit:3,resubmit:4,resubmit:5
-in_port=1 actions=set_field:42->tun_id,output:1
-in_port=2 actions=set_field:3.3.3.3->tun_dst,output:2
-in_port=3 actions=set_field:1.1.1.1->tun_src,set_field:4.4.4.4->tun_dst,output:3
-in_port=4 actions=set_field:2.2.2.2->tun_dst,output:4
-in_port=5 actions=set_field:5->tun_id
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x2a,dst=1.1.1.1,ttl=64,flags(df|key))),1,set(tunnel(tun_id=0x2a,dst=3.3.3.3,ttl=64,flags(df|key))),1,set(tunnel(tun_id=0x2a,src=1.1.1.1,dst=4.4.4.4,ttl=64,flags(df|key))),1,set(tunnel(tun_id=0x3,dst=2.2.2.2,ttl=64,flags(df|key))),1
-])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - ERSPAN v1/v2 metadata])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy \
-                        ofport_request=1 \
-                    -- add-port br0 p2 -- set Interface p2 type=dummy \
-                        ofport_request=2])
-
-# Add these ports separately to ensure that they get the datapath port
-# number expected below.
-ovs-vsctl -- add-port br0 p3 \
-          -- set Interface p3 type=erspan \
-                              ofport_request=3 \
-                              options:remote_ip=1.1.1.1 \
-                              options:key=1 options:erspan_ver=1 \
-                              options:erspan_idx=7 \
-          -- add-port br0 p4 \
-          -- set Interface p4 type=erspan \
-                              ofport_request=4 \
-                              options:remote_ip=1.1.1.2 \
-                              options:key=2 options:erspan_ver=2 \
-                              options:erspan_dir=1 \
-                              options:erspan_hwid=7
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-
-AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
-    br0 65534/100: (dummy-internal)
-    p1 1/1: (dummy)
-    p2 2/2: (dummy)
-    p3 3/3: (erspan: erspan_idx=0x7, erspan_ver=1, key=1, remote_ip=1.1.1.1)
-    p4 4/3: (erspan: erspan_dir=1, erspan_hwid=0x7, erspan_ver=2, key=2, remote_ip=1.1.1.2)
-])
-
-AT_DATA([flows.txt], [dnl
-in_port=1,actions=3
-in_port=2,actions=4
-in_port=3,tun_erspan_ver=1,tun_erspan_idx=0x7,actions=1
-in_port=4,tun_erspan_ver=2,tun_erspan_dir=1,tun_erspan_hwid=0xf/0x1,actions=2
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-dnl test encap: in_port=1,actions=3 (erspan v1 port)
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x1,dst=1.1.1.1,ttl=64,erspan(ver=1,idx=0x7),flags(df|key))),3
-])
-
-dnl test encap: in_port=2,actions=4 (erspan v2 port)
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x2,dst=1.1.1.2,ttl=64,erspan(ver=2,dir=1,hwid=0x7),flags(df|key))),3
-])
-
-dnl receive packet from ERSPAN port with v1 metadata
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(0),tunnel(tun_id=0x1,src=1.1.1.1,dst=2.2.2.2,ttl=64,erspan(ver=1,idx=0x7),flags(df|key)),in_port(3),skb_mark(0),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(frag=no)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0x1,tun_src=1.1.1.1,tun_dst=2.2.2.2,tun_tos=0,tun_erspan_ver=1,tun_erspan_idx=0x7,tun_flags=+df-csum+key,in_port=3,nw_frag=no
-Datapath actions: 1
-])
-
-dnl receive packet from ERSPAN port with wrong v1 metadata
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(0),tunnel(tun_id=0x1,src=1.1.1.1,dst=2.2.2.2,ttl=64,erspan(ver=1,idx=0xabcd),flags(df|key)),in_port(3),skb_mark(0),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(frag=no)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0x1,tun_src=1.1.1.1,tun_dst=2.2.2.2,tun_tos=0,tun_erspan_ver=1,tun_erspan_idx=0xabcd,tun_flags=+df-csum+key,in_port=3,nw_frag=no
-Datapath actions: drop
-])
-
-dnl receive packet from ERSPAN port with v2 metadata
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(0),tunnel(tun_id=0x2,src=1.1.1.2,dst=2.2.2.2,ttl=64,erspan(ver=2,dir=1,hwid=0x7),flags(df|key)),in_port(3),skb_mark(0),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(frag=no)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0x2,tun_src=1.1.1.2,tun_dst=2.2.2.2,tun_tos=0,tun_erspan_ver=2,tun_erspan_dir=1,tun_erspan_hwid=0x1,tun_flags=+df-csum+key,in_port=4,nw_frag=no
-Datapath actions: 2
-])
-
-dnl receive packet from ERSPAN port with wrong v2 metadata
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(0),tunnel(tun_id=0x2,src=1.1.1.2,dst=2.2.2.2,ttl=64,erspan(ver=2,dir=0,hwid=0x17),flags(df|key)),in_port(3),skb_mark(0),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(frag=no)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0x2,tun_src=1.1.1.2,tun_dst=2.2.2.2,tun_tos=0,tun_erspan_ver=2,tun_erspan_dir=0,tun_erspan_hwid=0x1,tun_flags=+df-csum+key,in_port=4,nw_frag=no
-Datapath actions: drop
-])
-
-dnl test wildcard mask: recevie all v2 regardless of its metadata
-AT_CHECK([ovs-ofctl del-flows br0 in_port=4,tun_erspan_ver=2,tun_erspan_dir=1,tun_erspan_hwid=0xf/0x1])
-AT_CHECK([ovs-ofctl add-flow br0 in_port=4,tun_erspan_ver=2,tun_erspan_dir=0/0,tun_erspan_hwid=0x0/0x0,actions=2])
-
-AT_CHECK([ovs-ofctl --sort=in_port dump-flows br0 | ofctl_strip],
-[0], [dnl
- in_port=1 actions=output:3
- in_port=2 actions=output:4
- tun_erspan_ver=1,tun_erspan_idx=0x7,in_port=3 actions=output:1
- tun_erspan_ver=2,in_port=4 actions=output:2
-])
-
-dnl this time it won't drop
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(0),tunnel(tun_id=0x2,src=1.1.1.2,dst=2.2.2.2,ttl=64,erspan(ver=2,dir=0,hwid=0x17),flags(df|key)),in_port(3),skb_mark(0),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(frag=no)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0x2,tun_src=1.1.1.2,tun_dst=2.2.2.2,tun_tos=0,tun_erspan_ver=2,tun_flags=+df-csum+key,in_port=4,nw_frag=no
-Datapath actions: 2
-])
-
-dnl flow-based erspan_idx options
-AT_CHECK([ovs-vsctl add-port br0 p5 -- set Interface p5 type=erspan \
-          options:remote_ip=1.1.1.2 ofport_request=5 \
-          options:key=flow options:erspan_ver=1 options:erspan_idx=flow])
-
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=1, actions=set_tunnel:11,set_field:0x7->tun_erspan_idx,5"])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip],
-[0], [dnl
-NXST_FLOW reply:
- in_port=1 actions=set_tunnel:0xb,set_field:0x7->tun_erspan_idx,output:5
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0xb,dst=1.1.1.2,ttl=64,erspan(ver=1,idx=0x7),flags(df|key))),3
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - Geneve metadata])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=geneve \
-                    options:remote_ip=1.1.1.1 ofport_request=1 \
-                    -- add-port br0 p2 -- set Interface p2 type=dummy \
-                    ofport_request=2 ofport_request=2])
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=0,len=4}->tun_metadata0,{class=0xffff,type=1,len=8}->tun_metadata1"])
-
-AT_DATA([flows.txt], [dnl
-in_port=2,actions=set_field:0xa->tun_metadata0,set_field:0x1234567890abcdef->tun_metadata1,1
-tun_metadata0=0xb/0xf,actions=2
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-dnl Option generation
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(dst=1.1.1.1,ttl=64,tp_dst=6081,geneve({class=0xffff,type=0,len=4,0xa}{class=0xffff,type=0x1,len=8,0x1234567890abcdef}),flags(df))),6081
-])
-
-dnl Option match
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(0),tunnel(tun_id=0x0,src=1.1.1.1,dst=1.1.1.2,ttl=64,geneve({class=0xffff,type=0,len=4,0xb}),flags(df|key)),in_port(6081),skb_mark(0),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(frag=no)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0,tun_src=1.1.1.1,tun_dst=1.1.1.2,tun_tos=0,tun_flags=+df-csum+key,tun_metadata0=0xb/0xf,in_port=1,nw_frag=no
-Datapath actions: 2
-])
-
-dnl Skip unknown option
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(0),tunnel(tun_id=0x0,src=1.1.1.1,dst=1.1.1.2,ttl=64,geneve({class=0xffff,type=0,len=4,0xb}{class=0xffff,type=2,len=4,0xc}),flags(df|key)),in_port(6081),skb_mark(0),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(frag=no)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0,tun_src=1.1.1.1,tun_dst=1.1.1.2,tun_tos=0,tun_flags=+df-csum+key,tun_metadata0=0xb/0xf,in_port=1,nw_frag=no
-Datapath actions: 2
-])
-
-dnl Check mapping table constraints
-AT_CHECK([ovs-ofctl del-flows br0])
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=2,len=124}->tun_metadata2,{class=0xffff,type=3,len=124}->tun_metadata3"], [1], [ignore],
-[OFPT_ERROR (xid=0x4): NXTTMFC_TABLE_FULL
-NXT_TLV_TABLE_MOD (xid=0x4):
- ADD mapping table:
-  class  type  length  match field
- ------  ----  ------  --------------
- 0xffff   0x2     124  tun_metadata2
- 0xffff   0x3     124  tun_metadata3
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "tun_metadata0,tun_metadata0,actions=drop"], [1], [ignore],
-[ovs-ofctl: field tun_metadata0 set multiple times
-])
-
-AT_CHECK([ovs-ofctl add-flow br0 "tun_metadata0=0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef,tun_metadata1=0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef,tun_metadata2=0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef,tun_metadata3=0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef,tun_metadata4=0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef,actions=drop"], [1], [ignore],
-[ovs-ofctl: field tun_metadata4 exceeds maximum size for tunnel metadata (used 320, max 256)
-])
-
-dnl Allocation and match with fragmented address space
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=2,len=124}->tun_metadata2"])
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=3,len=4}->tun_metadata3"])
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=4,len=112}->tun_metadata4"])
-AT_CHECK([ovs-ofctl del-tlv-map br0 "{class=0xffff,type=3,len=4}->tun_metadata3"])
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=3,len=8}->tun_metadata3"])
-
-AT_CHECK([ovs-ofctl add-flow br0 tun_metadata3=0x1234567890abcdef,actions=2])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(0),tunnel(tun_id=0x0,src=1.1.1.1,dst=1.1.1.2,ttl=64,geneve({class=0xffff,type=3,len=8,0x1234567890abcdef}),flags(df|key)),in_port(6081),skb_mark(0),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(frag=no)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0,tun_src=1.1.1.1,tun_dst=1.1.1.2,tun_tos=0,tun_flags=+df-csum+key,tun_metadata3=0x1234567890abcdef,in_port=1,nw_frag=no
-Datapath actions: 2
-])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip],
-[0], [dnl
-NXST_FLOW reply:
- tun_metadata3=0x1234567890abcdef actions=output:2
-])
-
-dnl A TLV mapping should not be removed if any active flow uses the mapping.
-AT_CHECK([ovs-ofctl del-tlv-map br0], [1], [], [dnl
-OFPT_ERROR (xid=0x4): NXTTMFC_INVALID_TLV_DEL
-NXT_TLV_TABLE_MOD (xid=0x4):
- CLEAR
-])
-
-AT_CHECK([ovs-ofctl del-flows br0], [0])
-AT_CHECK([ovs-ofctl del-tlv-map br0], [0])
-
-dnl Flow modification
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=1,len=4}->tun_metadata0"])
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=2,len=4}->tun_metadata1"])
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=3,len=4}->tun_metadata2"])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=1 actions=multipath(eth_src,50,modulo_n,1,0,tun_metadata0[[0..31]])"])
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=push:tun_metadata1[[0..31]],clone(move:tun_metadata2[[0..31]]->reg0[[0..31]])"])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=1 actions=output:4"])
-AT_CHECK([ovs-ofctl del-tlv-map br0 "{class=0xffff,type=3,len=4}->tun_metadata0"])
-
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2 actions=push:tun_metadata2[[0..31]]"])
-AT_CHECK([ovs-ofctl del-tlv-map br0 "{class=0xffff,type=2,len=4}->tun_metadata1"])
-AT_CHECK([ovs-ofctl del-tlv-map br0 "{class=0xffff,type=3,len=4}->tun_metadata2"], [1], [], [dnl
-OFPT_ERROR (xid=0x4): NXTTMFC_INVALID_TLV_DEL
-NXT_TLV_TABLE_MOD (xid=0x4):
- DEL mapping table:
-  class  type  length  match field
- ------  ----  ------  --------------
- 0xffff   0x3       4  tun_metadata2
-])
-
-AT_CHECK([ovs-ofctl del-flows br0], [0])
-AT_CHECK([ovs-ofctl del-tlv-map br0], [0])
-
-dnl Learn action
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=1,len=4}->tun_metadata1"])
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=2,len=4}->tun_metadata2"])
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2, eth_src=00:00:00:00:00:01 actions=learn(tun_metadata1[[0..31]]=reg1, output:NXM_OF_IN_PORT[[]])"])
-AT_CHECK([ovs-ofctl add-flow br0 "in_port=2, eth_src=00:00:00:00:00:02 actions=learn(reg1[[0..31]]=0xFF, load:reg1[[0..31]]->tun_metadata2[[0..31]])"])
-flow1="in_port(2),eth(src=00:00:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0800)"
-flow2="in_port(2),eth(src=00:00:00:00:00:02,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0800)"
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow1" -generate], [0], [stdout])
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow2" -generate], [0], [stdout])
-
-dnl Delete flows with learn action
-AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"])
-
-AT_CHECK([ovs-ofctl del-tlv-map br0 "{class=0xffff,type=1,len=4}->tun_metadata1"], [1], [], [dnl
-OFPT_ERROR (xid=0x4): NXTTMFC_INVALID_TLV_DEL
-NXT_TLV_TABLE_MOD (xid=0x4):
- DEL mapping table:
-  class  type  length  match field
- ------  ----  ------  --------------
- 0xffff   0x1       4  tun_metadata1
-])
-AT_CHECK([ovs-ofctl del-flows br0 "tun_metadata1"])
-AT_CHECK([ovs-ofctl del-tlv-map br0 "{class=0xffff,type=1,len=4}->tun_metadata1"])
-
-AT_CHECK([ovs-ofctl del-tlv-map br0 "{class=0xffff,type=2,len=4}->tun_metadata2"], [1], [], [dnl
-OFPT_ERROR (xid=0x4): NXTTMFC_INVALID_TLV_DEL
-NXT_TLV_TABLE_MOD (xid=0x4):
- DEL mapping table:
-  class  type  length  match field
- ------  ----  ------  --------------
- 0xffff   0x2       4  tun_metadata2
-])
-AT_CHECK([ovs-ofctl del-flows br0 "reg1=0xFF"])
-AT_CHECK([ovs-ofctl del-tlv-map br0], [0])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - Geneve option present])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=geneve \
-                    options:remote_ip=1.1.1.1 ofport_request=1 \
-                    -- add-port br0 p2 -- set Interface p2 type=dummy \
-                    ofport_request=2 ofport_request=2])
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=0,len=4}->tun_metadata0,{class=0xffff,type=1,len=0}->tun_metadata1,{class=0xffff,type=2,len=4}->tun_metadata2"])
-
-AT_DATA([flows.txt], [dnl
-priority=1,tun_metadata0,actions=2
-priority=2,tun_metadata1=0,actions=IN_PORT
-priority=3,tun_metadata2=0,actions=drop
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort],
-[0], [dnl
- priority=1,tun_metadata0 actions=output:2
- priority=2,tun_metadata1 actions=IN_PORT
- priority=3,tun_metadata2=0 actions=drop
-NXST_FLOW reply:
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(0),tunnel(tun_id=0x0,src=1.1.1.1,dst=1.1.1.2,ttl=64,geneve({class=0xffff,type=0,len=4,0x12345678}),flags(df|key)),in_port(6081),skb_mark(0),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(frag=no)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0,tun_src=1.1.1.1,tun_dst=1.1.1.2,tun_tos=0,tun_flags=+df-csum+key,tun_metadata0,tun_metadata1=NP,tun_metadata2=NP,in_port=1,nw_frag=no
-Datapath actions: 2
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(0),tunnel(tun_id=0x0,src=1.1.1.1,dst=1.1.1.2,ttl=64,geneve({class=0xffff,type=1,len=0}),flags(df|key)),in_port(6081),skb_mark(0),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(frag=no)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0,tun_src=1.1.1.1,tun_dst=1.1.1.2,tun_tos=0,tun_flags=+df-csum+key,tun_metadata1,tun_metadata2=NP,in_port=1,nw_ecn=0,nw_frag=no
-Datapath actions: set(tunnel(dst=1.1.1.1,ttl=64,tp_dst=6081,geneve({class=0xffff,type=0x1,len=0}),flags(df))),6081
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - concomitant IPv6 and IPv4 tunnels])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=vxlan \
-                    options:remote_ip=1.1.1.1 ofport_request=1 \
-                    -- add-port br0 p2 -- set Interface p2 type=vxlan \
-                    options:remote_ip=2001:cafe::1 ofport_request=2])
-AT_DATA([flows.txt], [dnl
-in_port=1,actions=2
-in_port=2,actions=1
-])
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0,src=1.1.1.1,dst=1.1.1.2,ttl=64),in_port(4789)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(ipv6_dst=2001:cafe::1,ttl=64,tp_dst=4789,flags(df))),4789
-])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,ipv6_src=2001:cafe::1,ipv6_dst=2001:cafe::2,ttl=64),in_port(4789)'], [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(dst=1.1.1.1,ttl=64,tp_dst=4789,flags(df))),4789
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - concomitant incompatible tunnels on the same port])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=vxlan \
-                    options:remote_ip=flow ofport_request=1])
-
-AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=vxlan \
-                    options:remote_ip=flow options:exts=gbp options:key=1 ofport_request=2], [0],
-  [], [ignore])
-
-AT_CHECK([grep 'p2: could not set configuration (File exists)' ovs-vswitchd.log | sed "s/^.*\(p2:.*\)$/\1/"], [0],
-  [p2: could not set configuration (File exists)
-])
-
-OVS_VSWITCHD_STOP(["/p2: VXLAN-GBP, and non-VXLAN-GBP tunnels can't be configured on the same dst_port/d
-/p2: could not set configuration (File exists)/d"])
-AT_CLEANUP
-
-AT_SETUP([tunnel - concomitant incompatible tunnels on different ports])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=vxlan \
-                    options:remote_ip=flow ofport_request=1])
-
-AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=vxlan options:dst_port=9000 \
-                    options:remote_ip=flow options:exts=gbp ofport_request=2])
-
-AT_CHECK([grep p2 ovs-vswitchd.log | sed "s/^.*\(bridge br0:.*\)$/\1/"], [0],
-  [bridge br0: added interface p2 on port 2
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
-AT_SETUP([tunnel - Mix Geneve/GRE options])
-OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=geneve \
-                    options:remote_ip=1.1.1.1 options:csum=true ofport_request=1 \
-                    -- add-port br0 p2 -- set Interface p2 type=dummy \
-                    ofport_request=2 ofport_request=2 \
-                    -- add-port br0 p3 -- set Interface p3 type=gre \
-                    options:remote_ip=2.2.2.2 options:csum=false options:key=123 ofport_request=3])
-OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
-
-AT_DATA([flows.txt], [dnl
-priority=1,in_port=1,actions=3
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
-
-AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort],
-[0], [dnl
- priority=1,in_port=1 actions=output:3
-NXST_FLOW reply:
-])
-
-dnl the input packet from geneve tunnel has flags(-df+csum+key) flags, making
-dnl sure that the output gre tunnel has (+df-csum+key).
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(0),tunnel(tun_id=0x0,src=1.1.1.1,dst=1.1.1.2,ttl=64,geneve({class=0xffff,type=0,len=4,0x12345678}),flags(csum|key)),in_port(6081),skb_mark(0),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(frag=no)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0,tun_src=1.1.1.1,tun_dst=1.1.1.2,tun_tos=0,tun_flags=-df+csum+key,in_port=1,nw_ecn=0,nw_frag=no
-Datapath actions: set(tunnel(tun_id=0x7b,dst=2.2.2.2,ttl=64,flags(df|key))),1
-])
-
-AT_CHECK([ovs-ofctl add-tlv-map br0 "{class=0xffff,type=0,len=4}->tun_metadata0"])
-AT_CHECK([ovs-ofctl del-flows br0])
-
-AT_DATA([flows2.txt], [dnl
-priority=1,in_port=1,tun_metadata0=0x123, actions=3
-])
-AT_CHECK([ovs-ofctl add-flows br0 flows2.txt])
-
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(0),tunnel(tun_id=0x0,src=1.1.1.1,dst=1.1.1.2,ttl=64,geneve({class=0xffff,type=0,len=4,0x123}),flags(csum|key)),in_port(6081),skb_mark(0),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(frag=no)'], [0], [stdout])
-AT_CHECK([tail -2 stdout], [0],
-  [Megaflow: recirc_id=0,eth,ip,tun_id=0,tun_src=1.1.1.1,tun_dst=1.1.1.2,tun_tos=0,tun_flags=-df+csum+key,tun_metadata0=0x123,in_port=1,nw_ecn=0,nw_frag=no
-Datapath actions: set(tunnel(tun_id=0x7b,dst=2.2.2.2,ttl=64,flags(df|key))),1
-])
-
-dnl without the fix, the actions have geneve options:
-dnl set(tunnel(tun_id=0x7b,dst=2.2.2.2,ttl=64,geneve({class=0xffff,type=0,len=4,0x123}),flags(df|key))),1
-dnl which is not correct
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
diff --git a/tests/unixctl-py.at b/tests/unixctl-py.at
deleted file mode 100644
index 5c28e2c01..000000000
--- a/tests/unixctl-py.at
+++ /dev/null
@@ -1,192 +0,0 @@
-AT_BANNER([unixctl])
-
-m4_define([APPCTL], [ovs-appctl --timeout 20])
-m4_define([PYAPPCTL_PYN], [$1 $srcdir/appctl.py --timeout 20])
-
-m4_define([UNIXCTL_EXIT_PYN],
-  [AT_SETUP([unixctl ovs-vswitchd exit - $1])
-   AT_SKIP_IF([test $2 = no])
-   AT_KEYWORDS([python unixctl])
-   OVS_VSWITCHD_START
-
-   AT_CHECK([PYAPPCTL_PYN([$3]) -t ovs-vswitchd exit], [0], [])
-   OVS_WAIT_WHILE([test -s ovs-vswitchd.pid])
-
-   AT_CHECK([PYAPPCTL_PYN([$3]) -t ovsdb-server exit], [0], [])
-   OVS_WAIT_WHILE([test -s ovsdb-server.pid])
-   AT_CLEANUP])
-
-UNIXCTL_EXIT_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-UNIXCTL_EXIT_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([UNIXCTL_LIST_COMMANDS_PYN],
-  [AT_SETUP([unixctl ovs-vswitchd list-commands - $1])
-   AT_SKIP_IF([test $2 = no])
-   OVS_VSWITCHD_START
-
-   AT_CHECK([APPCTL list-commands], [0], [stdout])
-   AT_CHECK([head -1 stdout], [0], [dnl
-The available commands are:
-])
-   mv stdout expout
-   AT_CHECK([PYAPPCTL_PYN([$3]) list-commands], [0], [expout])
-
-   OVS_VSWITCHD_STOP
-   AT_CLEANUP])
-
-UNIXCTL_LIST_COMMANDS_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-UNIXCTL_LIST_COMMANDS_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([UNIXCTL_ARGS_PYN],
-  [AT_SETUP([unixctl ovs-vswitchd arguments - $1])
-   AT_SKIP_IF([test $2 = no])
-   OVS_VSWITCHD_START
-
-   AT_CHECK([APPCTL bond/hash], [2], [], [stderr])
-   AT_CHECK([head -1 stderr], [0], [dnl
-"bond/hash" command requires at least 1 arguments
-])
-   sed 's/ovs-appctl/appctl.py/' stderr > experr
-   AT_CHECK([PYAPPCTL_PYN([$3]) bond/hash], [2], [], [experr])
-
-   AT_CHECK([APPCTL bond/hash mac], [2], [], [stderr])
-   AT_CHECK([head -1 stderr], [0], [dnl
-invalid mac
-])
-   sed 's/ovs-appctl/appctl.py/' stderr > experr
-   AT_CHECK([PYAPPCTL_PYN([$3]) bond/hash mac], [2], [], [experr])
-
-   AT_CHECK([APPCTL bond/hash mac vlan], [2], [], [stderr])
-   AT_CHECK([head -1 stderr], [0], [dnl
-invalid vlan
-])
-   sed 's/ovs-appctl/appctl.py/' stderr > experr
-   AT_CHECK([PYAPPCTL_PYN([$3]) bond/hash mac vlan], [2], [], [experr])
-
-   AT_CHECK([APPCTL bond/hash mac vlan basis], [2], [], [stderr])
-   AT_CHECK([head -1 stderr], [0], [dnl
-invalid vlan
-])
-   sed 's/ovs-appctl/appctl.py/' stderr > experr
-   AT_CHECK([PYAPPCTL_PYN([$3]) bond/hash vlan basis], [2], [], [experr])
-
-   AT_CHECK([APPCTL bond/hash mac vlan basis extra], [2], [], [stderr])
-   AT_CHECK([head -1 stderr], [0], [dnl
-"bond/hash" command takes at most 3 arguments
-])
-   sed 's/ovs-appctl/appctl.py/' stderr > experr
-   AT_CHECK([PYAPPCTL_PYN([$3]) bond/hash mac vlan basis extra], [2], [], [experr])
-
-   OVS_VSWITCHD_STOP
-   AT_CLEANUP])
-
-UNIXCTL_ARGS_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-UNIXCTL_ARGS_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([UNIXCTL_BAD_TARGET_PYN],
-  [AT_SETUP([unixctl bad target - $1])
-   AT_SKIP_IF([test $2 = no])
-
-   AT_CHECK([PYAPPCTL_PYN([$3]) -t bogus doit], [1], [], [stderr])
-   AT_CHECK_UNQUOTED([tail -1 stderr], [0], [dnl
-appctl.py: cannot read pidfile "`pwd`/bogus.pid" (No such file or directory)
-])
-   if test "$IS_WIN32" = "no"; then
-     AT_CHECK([PYAPPCTL_PYN([$3]) -t /bogus/path.pid doit], [1], [], [stderr])
-     AT_CHECK([tail -1 stderr], [0], [dnl
-appctl.py: cannot connect to "/bogus/path.pid" (No such file or directory)
-])
-   else
-     AT_CHECK([PYAPPCTL_PYN([$3]) -t c:/bogus/path.pid doit], [1], [], [stderr])
-     AT_CHECK([tail -1 stderr], [0], [dnl
-appctl.py: cannot connect to "c:/bogus/path.pid" (No such file or directory)
-])
-   fi
-
-   AT_CLEANUP])
-
-UNIXCTL_BAD_TARGET_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-UNIXCTL_BAD_TARGET_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([UNIXCTL_SERVER_PYN],
-  [AT_SETUP([unixctl server - $1])
-   AT_SKIP_IF([test $2 = no])
-   on_exit 'kill `cat test-unixctl.py.pid`'
-   AT_CAPTURE_FILE([`pwd`/test-unixctl.py.log])
-   AT_CHECK([$3 $srcdir/test-unixctl.py --log-file --pidfile --detach --no-chdir])
-
-   AT_CHECK([APPCTL -t test-unixctl.py help], [0], [stdout])
-   AT_CHECK([cat stdout], [0], [dnl
-The available commands are:
-  block
-  echo                    [[arg ...]]
-  echo_error              [[arg ...]]
-  exit
-  help
-  log                     [[arg ...]]
-  version
-  vlog/close
-  vlog/list
-  vlog/reopen
-  vlog/set                spec
-])
-   mv stdout expout
-   AT_CHECK([PYAPPCTL_PYN([$3]) -t test-unixctl.py help], [0], [expout])
-
-   AT_CHECK([ovs-vsctl --version | sed 's/ovs-vsctl/test-unixctl.py/' | head -1 > expout])
-   AT_CHECK([APPCTL -t test-unixctl.py version], [0], [expout])
-   AT_CHECK([PYAPPCTL_PYN([$3]) -t test-unixctl.py version], [0], [expout])
-
-   AT_CHECK([APPCTL -t test-unixctl.py echo robot ninja], [0], [stdout])
-   AT_CHECK([cat stdout | sed -e "s/u'/'/g"], [0], [dnl
-[['robot', 'ninja']]
-])
-   mv stdout expout
-   AT_CHECK([PYAPPCTL_PYN([$3]) -t test-unixctl.py echo robot ninja], [0], [expout])
-
-   AT_CHECK([APPCTL -t test-unixctl.py echo_error robot ninja], [2], [], [stderr])
-   AT_CHECK([cat stderr | sed -e "s/u'/'/g"], [0], [dnl
-[['robot', 'ninja']]
-ovs-appctl: test-unixctl.py: server returned an error
-])
-   sed 's/ovs-appctl/appctl.py/' stderr > experr
-   AT_CHECK([PYAPPCTL_PYN([$3]) -t test-unixctl.py echo_error robot ninja], [2], [], [experr])
-
-   AT_CHECK([APPCTL -t test-unixctl.py echo], [2], [], [stderr])
-   AT_CHECK([cat stderr], [0], [dnl
-"echo" command requires at least 1 arguments
-ovs-appctl: test-unixctl.py: server returned an error
-])
-   sed 's/ovs-appctl/appctl.py/' stderr > experr
-   AT_CHECK([PYAPPCTL_PYN([$3]) -t test-unixctl.py echo], [2], [], [experr])
-
-   AT_CHECK([APPCTL -t test-unixctl.py echo robot ninja pirates], [2], [], [stderr])
-   AT_CHECK([cat stderr], [0], [dnl
-"echo" command takes at most 2 arguments
-ovs-appctl: test-unixctl.py: server returned an error
-])
-   sed 's/ovs-appctl/appctl.py/' stderr > experr
-   AT_CHECK([PYAPPCTL_PYN([$3]) -t test-unixctl.py echo robot ninja pirates], [2], [], [experr])
-
-   AT_CHECK([APPCTL -t test-unixctl.py bogus], [2], [], [stderr])
-   AT_CHECK([cat stderr], [0], [dnl
-"bogus" is not a valid command
-ovs-appctl: test-unixctl.py: server returned an error
-])
-   sed 's/ovs-appctl/appctl.py/' stderr > experr
-   AT_CHECK([PYAPPCTL_PYN([$3]) -t test-unixctl.py bogus], [2], [], [experr])
-
-   AT_CHECK([APPCTL -t test-unixctl.py exit])
-   AT_CLEANUP])
-
-UNIXCTL_SERVER_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-UNIXCTL_SERVER_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_define([UNIXCTL_SERVER_ERRORS_PYN],
-  [AT_SETUP([unixctl server errors - $1])
-   AT_SKIP_IF([test $2 = no])
-   AT_CHECK($3 $srcdir/test-unixctl.py --unixctl "`pwd`"/bogus/path, [1], [], [ignore])
-   AT_CLEANUP])
-
-UNIXCTL_SERVER_ERRORS_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-UNIXCTL_SERVER_ERRORS_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
diff --git a/tests/uuid.at b/tests/uuid.at
deleted file mode 100644
index da64dd4d6..000000000
--- a/tests/uuid.at
+++ /dev/null
@@ -1,39 +0,0 @@
-AT_BANNER([UUID unit tests])
-
-m4_define([UUID_REGEX], 
-  [[[0-9a-f]\{8\}-[0-9a-f]\{4\}-4[0-9a-f]\{3\}-[89ab][0-9a-f]\{3\}-[0-9a-f]\{12\}$]])
-
-m4_define([CHECK_UUID],
-  [if expr "$uuid" : 'UUID_REGEX' > /dev/null
-   then
-      :
-   else
-     echo "$uuid: not a random UUID"
-     exit 1
-   fi])
-
-AT_SETUP([UUID generation, parsing, serialization])
-AT_KEYWORDS([UUID])
-AT_CHECK([
-  uuids=
-  for i in m4_for([count], [1], [100], [1], [count ]); do
-     # Generate random UUID and check that it is in the expected format.
-     uuid=`ovstest test-uuid`
-     CHECK_UUID
-
-     # Verify that $uuid does not duplicate any UUID generated so far.
-     case $uuids in
-       *$uuid*) 
-         echo "$uuid: generated duplicate UUID"
-         exit 1
-     esac
-     uuids="$uuids $uuid"
-
-     # Verify that test-uuid parses and re-serializes this UUID correctly.
-     serialized=`ovstest test-uuid $uuid`
-     if test "$uuid" != "$serialized"; then
-       echo "$uuid: test-uuid serialized this as $serialized"
-       exit 1
-     fi
-   done], [0])
-AT_CLEANUP
diff --git a/tests/vconn.at b/tests/vconn.at
deleted file mode 100644
index 397725d43..000000000
--- a/tests/vconn.at
+++ /dev/null
@@ -1,22 +0,0 @@
-m4_define([TEST_VCONN_CLASS],
-  [AT_BANNER([vconn library -- $1 class])
-   m4_foreach(
-     [testname], 
-     [[refuse-connection], 
-      [accept-then-close],
-      [read-hello],
-      [send-plain-hello],
-      [send-long-hello],
-      [send-echo-hello],
-      [send-short-hello],
-      [send-invalid-version-hello]],
-     [AT_SETUP([$1 vconn - m4_bpatsubst(testname, [-], [ ])])
-      m4_if([$1], [ssl], [
-        AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
-        AT_CHECK([cp $abs_top_builddir/tests/testpki*.pem .])])
-      AT_CHECK([ovstest test-vconn testname $1], [0], [], [ignore])
-      AT_CLEANUP])])
-
-TEST_VCONN_CLASS([unix])
-TEST_VCONN_CLASS([tcp])
-TEST_VCONN_CLASS([ssl])
diff --git a/tests/vlog.at b/tests/vlog.at
deleted file mode 100644
index 2f532a725..000000000
--- a/tests/vlog.at
+++ /dev/null
@@ -1,515 +0,0 @@
-AT_BANNER([vlog])
-
-m4_define([VLOG_PYN],
-  [AT_SETUP([vlog - $1])
-   AT_SKIP_IF([test $2 = no])
-   AT_CAPTURE_FILE([log_file])
-   AT_CAPTURE_FILE([stderr_log])
-   AT_CHECK([$3 $srcdir/test-vlog.py --log-file log_file \
--v dbg module_1:info module_2:warn syslog:off 2>stderr_log])
-
-   AT_CHECK([sed -e 's/.*-.*-.*T..:..:..Z |//' \
--e 's/File ".*", line [[0-9]][[0-9]]*,/File <name>, line <number>,/' \
-stderr_log], [0], [dnl
-  0  | module_0 | EMER | emergency
-  1  | module_0 | ERR | error
-  2  | module_0 | WARN | warning
-  3  | module_0 | INFO | information
-  4  | module_0 | DBG | debug
-  5  | module_0 | EMER | emergency exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-  6  | module_0 | ERR | error exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-  7  | module_0 | WARN | warn exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-  8  | module_0 | INFO | information exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-  9  | module_0 | DBG | debug exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-  10 | module_0 | ERR | exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-  11 | module_1 | EMER | emergency
-  12 | module_1 | ERR | error
-  13 | module_1 | WARN | warning
-  14 | module_1 | INFO | information
-  16 | module_1 | EMER | emergency exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-  17 | module_1 | ERR | error exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-  18 | module_1 | WARN | warn exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-  19 | module_1 | INFO | information exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-  21 | module_1 | ERR | exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-  22 | module_2 | EMER | emergency
-  23 | module_2 | ERR | error
-  24 | module_2 | WARN | warning
-  27 | module_2 | EMER | emergency exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-  28 | module_2 | ERR | error exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-  29 | module_2 | WARN | warn exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-  32 | module_2 | ERR | exception
-Traceback (most recent call last):
-  File <name>, line <number>, in main
-    assert fail
-AssertionError
-])
-
-   AT_CLEANUP])
-
-VLOG_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-VLOG_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-m4_divert_push([PREPARE_TESTS])
-vlog_filt () {
-    sed 's/.*\(opened log file\).*/\1/
-s/.*|//' "$@"
-}
-m4_divert_pop([PREPARE_TESTS])
-
-AT_SETUP([vlog - vlog/reopen - C])
-# This test won't work as-is on Windows because Windows doesn't allow
-# files that are open to be renamed.
-AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-on_exit 'kill `cat test-unixctl.pid`'
-
-AT_CAPTURE_FILE([log])
-AT_CAPTURE_FILE([log.old])
-AT_CHECK([ovstest test-unixctl --log-file=`pwd`/log --pidfile --detach --no-chdir],
-  [0], [], [stderr])
-AT_CHECK([vlog_filt stderr], [0],
-  [opened log file
-])
-
-AT_CHECK([APPCTL -t test-unixctl log message])
-mv log log.old
-AT_CHECK([APPCTL -t test-unixctl log message2])
-AT_CHECK([APPCTL -t test-unixctl vlog/reopen])
-AT_CHECK([APPCTL -t test-unixctl log message3])
-AT_CHECK([APPCTL -t test-unixctl exit])
-
-AT_CHECK([vlog_filt log.old], [0], [dnl
-opened log file
-Entering run loop.
-message
-message2
-closing log file
-])
-AT_CHECK([vlog_filt log], [0], [dnl
-opened log file
-message3
-])
-AT_CLEANUP
-
-m4_define([VLOG_REOPEN_PYN],
-  [AT_SETUP([vlog - vlog/reopen - $1])
-   # This test won't work as-is on Windows because Windows doesn't allow
-   # files that are open to be renamed.
-   AT_SKIP_IF([test "$IS_WIN32" = "yes"])
-   AT_SKIP_IF([test $2 = no])
-   on_exit 'kill `cat test-unixctl.py.pid`'
-
-   AT_CAPTURE_FILE([log])
-   AT_CAPTURE_FILE([log.old])
-   AT_CHECK([$3 $srcdir/test-unixctl.py --log-file=`pwd`/log --pidfile --detach --no-chdir])
-
-   AT_CHECK([APPCTL -t test-unixctl.py log message])
-   mv log log.old
-   AT_CHECK([APPCTL -t test-unixctl.py log message2])
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/reopen])
-   AT_CHECK([APPCTL -t test-unixctl.py log message3])
-   AT_CHECK([APPCTL -t test-unixctl.py exit])
-
-   AT_CHECK([sed 's/.*|//' log.old], [0], [dnl
- Entering run loop.
- message
- message2
-])
-   AT_CHECK([sed 's/.*|//' log], [0], [dnl
- message3
-])
-   AT_CLEANUP])
-
-VLOG_REOPEN_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-VLOG_REOPEN_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-AT_SETUP([vlog - vlog/reopen without log file - C])
-on_exit 'kill `cat test-unixctl.pid`'
-
-AT_CHECK([ovstest test-unixctl --pidfile --detach --no-chdir])
-
-AT_CHECK([APPCTL -t test-unixctl vlog/reopen], [2], [],
-  [Logging to file not configured
-ovs-appctl: test-unixctl: server returned an error
-])
-OVS_APP_EXIT_AND_WAIT([test-unixctl])
-AT_CLEANUP
-
-m4_define([VLOG_REOPEN_WITHOUT_FILE_PYN],
-  [AT_SETUP([vlog - vlog/reopen without log file - $1])
-   AT_SKIP_IF([test $2 = no])
-   on_exit 'kill `cat test-unixctl.py.pid`'
-
-   AT_CHECK([$3 $srcdir/test-unixctl.py --pidfile --detach --no-chdir])
-
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/reopen], [0],
-     [Logging to file not configured
-])
-   AT_CLEANUP])
-
-VLOG_REOPEN_WITHOUT_FILE_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-VLOG_REOPEN_WITHOUT_FILE_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-dnl This checks that if vlog/reopen can't reopen the log file,
-dnl nothing particularly bad (e.g. a crash) happens.
-AT_SETUP([vlog - vlog/reopen can't reopen log file - C])
-# Verify that /dev/full is a character device that fails writes.
-AT_SKIP_IF([test ! -c /dev/full])
-AT_SKIP_IF([echo > /dev/full])
-
-on_exit 'kill `cat test-unixctl.pid`'
-
-AT_CHECK([ovstest test-unixctl --log-file=`pwd`/log --pidfile --detach --no-chdir],
-  [0], [], [stderr])
-AT_CHECK([vlog_filt stderr], [0], [opened log file
-])
-
-AT_CHECK([APPCTL -t test-unixctl log message])
-mv log log.old
-ln -s /dev/full log
-AT_CHECK([APPCTL -t test-unixctl vlog/reopen])
-AT_CHECK([APPCTL -t test-unixctl log message2])
-rm log
-AT_CHECK([APPCTL -t test-unixctl vlog/reopen])
-AT_CHECK([APPCTL -t test-unixctl log message3])
-AT_CHECK([APPCTL -t test-unixctl exit])
-AT_CHECK([vlog_filt log.old], [0], [dnl
-opened log file
-Entering run loop.
-message
-closing log file
-])
-AT_CHECK([vlog_filt log], [0], [dnl
-opened log file
-message3
-])
-AT_CLEANUP
-
-dnl This checks that if vlog/reopen can't reopen the log file,
-dnl nothing particularly bad (e.g. Python throws an exception and
-dnl aborts the program) happens.
-m4_define([VLOG_CANT_REOPEN_PYN],
-  [AT_SETUP([vlog - vlog/reopen can't reopen log file - $1])
-   AT_SKIP_IF([test $2 = no])
-
-   # Verify that /dev/full is a character device that fails writes.
-   AT_SKIP_IF([test ! -c /dev/full])
-   AT_SKIP_IF([echo > /dev/full])
-
-   on_exit 'kill `cat test-unixctl.py.pid`'
-
-   AT_CHECK([$3 $srcdir/test-unixctl.py --log-file=`pwd`/log --pidfile --detach --no-chdir])
-   AT_CHECK([APPCTL -t test-unixctl.py log message])
-   mv log log.old
-   ln -s /dev/full log
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/reopen])
-   AT_CHECK([APPCTL -t test-unixctl.py log message2])
-   rm log
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/reopen])
-   AT_CHECK([APPCTL -t test-unixctl.py log message3])
-   AT_CHECK([APPCTL -t test-unixctl.py exit])
-   AT_CHECK([sed 's/.*|//' log.old], [0], [dnl
- Entering run loop.
- message
-])
-   AT_CHECK([sed 's/.*|//' log], [0], [dnl
- message3
-])
-   AT_CLEANUP])
-
-VLOG_CANT_REOPEN_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-VLOG_CANT_REOPEN_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-AT_SETUP([vlog - vlog/close - C])
-on_exit 'kill `cat test-unixctl.pid`'
-
-AT_CAPTURE_FILE([log])
-AT_CAPTURE_FILE([log.old])
-AT_CHECK([ovstest test-unixctl --log-file=`pwd`/log --pidfile --detach --no-chdir],
-  [0], [], [ignore])
-AT_CHECK([vlog_filt log], [0], [opened log file
-Entering run loop.
-])
-
-AT_CHECK([APPCTL -t test-unixctl log message])
-AT_CHECK([APPCTL -t test-unixctl log message2])
-
-# After closing the log file, message3 won't appear anywhere.
-AT_CHECK([APPCTL -t test-unixctl vlog/close])
-mv log log.old
-AT_CHECK([APPCTL -t test-unixctl log message3])
-
-# Closing the log file again is harmless.
-AT_CHECK([APPCTL -t test-unixctl vlog/close])
-AT_CHECK([APPCTL -t test-unixctl log message4])
-
-# After reopening the log file, further messages start appearing again.
-AT_CHECK([APPCTL -t test-unixctl vlog/reopen])
-AT_CHECK([APPCTL -t test-unixctl log message5])
-AT_CHECK([APPCTL -t test-unixctl exit])
-
-AT_CHECK([vlog_filt log.old], [0], [dnl
-opened log file
-Entering run loop.
-message
-message2
-])
-AT_CHECK([vlog_filt log], [0], [dnl
-opened log file
-message5
-])
-AT_CLEANUP
-
-m4_define([VLOG_CLOSE_PYN],
-  [AT_SETUP([vlog - vlog/close - $1])
-   AT_SKIP_IF([test $2 = no])
-   on_exit 'kill `cat test-unixctl.py.pid`'
-
-   AT_CAPTURE_FILE([log])
-   AT_CAPTURE_FILE([log.old])
-   AT_CHECK([$3 $srcdir/test-unixctl.py --log-file=`pwd`/log --pidfile --detach --no-chdir])
-
-   AT_CHECK([APPCTL -t test-unixctl.py log message])
-   AT_CHECK([APPCTL -t test-unixctl.py log message2])
-
-   # After closing the log file, message3 won't appear anywhere.
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/close])
-   mv log log.old
-   AT_CHECK([APPCTL -t test-unixctl.py log message3])
-
-   # Closing the log file again is harmless.
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/close])
-   AT_CHECK([APPCTL -t test-unixctl.py log message4])
-
-   # After reopening the log file, further messages start appearing again.
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/reopen])
-   AT_CHECK([APPCTL -t test-unixctl.py log message5])
-   AT_CHECK([APPCTL -t test-unixctl.py exit])
-
-   AT_CHECK([sed 's/.*|//' log.old], [0], [dnl
- Entering run loop.
- message
- message2
-])
-   AT_CHECK([sed 's/.*|//' log], [0], [dnl
- message5
-])
-   AT_CLEANUP])
-
-VLOG_CLOSE_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-VLOG_CLOSE_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-AT_SETUP([vlog - vlog/set and vlog/list - C])
-on_exit 'kill `cat test-unixctl.pid`'
-
-AT_CAPTURE_FILE([log])
-AT_CHECK([ovstest test-unixctl --log-file=`pwd`/log --pidfile --detach --no-chdir],
-  [0], [], [ignore])
-AT_CHECK([vlog_filt log], [0], [opened log file
-Entering run loop.
-])
-
-AT_CHECK([APPCTL -t test-unixctl vlog/list | sed -n '1,2p
-/test_unixctl /p; /daemon /p'], [0], [dnl
-                 console    syslog    file
-                 -------    ------    ------
-daemon             OFF       INFO       INFO
-test_unixctl       OFF       INFO       INFO
-])
-
-AT_CHECK([APPCTL -t test-unixctl vlog/set daemon:syslog:err])
-AT_CHECK([APPCTL -t test-unixctl vlog/set file:dbg])
-AT_CHECK([APPCTL -t test-unixctl vlog/set nonexistent], [2], [],
-  [no destination, level, or module "nonexistent"
-ovs-appctl: test-unixctl: server returned an error
-])
-AT_CHECK([APPCTL -t test-unixctl vlog/list | sed -n '1,2p
-/test_unixctl /p; /daemon /p'], [0], [dnl
-                 console    syslog    file
-                 -------    ------    ------
-daemon             OFF        ERR        DBG
-test_unixctl       OFF       INFO        DBG
-])
-
-AT_CHECK([APPCTL -t test-unixctl vlog/set pattern], [2], [],
-  [missing destination
-ovs-appctl: test-unixctl: server returned an error
-])
-AT_CHECK([APPCTL -t test-unixctl vlog/set pattern:nonexistent], [2], [],
-  [unknown destination "nonexistent"
-ovs-appctl: test-unixctl: server returned an error
-])
-AT_CHECK([APPCTL -t test-unixctl vlog/set pattern:file:'I<3OVS|%m'])
-AT_CHECK([APPCTL -t test-unixctl log patterntest])
-AT_CHECK([grep -q 'I<3OVS' log])
-OVS_APP_EXIT_AND_WAIT([test-unixctl])
-AT_CLEANUP
-
-m4_define([VLOG_SET_AND_LIST_PYN],
-  [AT_SETUP([vlog - vlog/set and vlog/list - $1])
-   AT_SKIP_IF([test $2 = no])
-   on_exit 'kill `cat test-unixctl.py.pid`'
-
-   AT_CAPTURE_FILE([log])
-   AT_CHECK([$3 $srcdir/test-unixctl.py --log-file=`pwd`/log --pidfile --detach --no-chdir])
-
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/list], [0], [dnl
-                 console    syslog    file
-                 -------    ------    ------
-daemon            info       info       info
-fatal-signal      info       info       info
-jsonrpc           info       info       info
-poller            info       info       info
-reconnect         info       info       info
-socket_util       info       info       info
-stream            info       info       info
-test-unixctl      info       info       info
-unixctl_server    info       info       info
-])
-
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/set daemon:syslog:err])
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/set file:dbg])
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/set nonexistent], [0],
-  [no destination, level, or module "nonexistent"
-])
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/list], [0], [dnl
-                 console    syslog    file
-                 -------    ------    ------
-daemon            info        err        dbg
-fatal-signal      info       info        dbg
-jsonrpc           info       info        dbg
-poller            info       info        dbg
-reconnect         info       info        dbg
-socket_util       info       info        dbg
-stream            info       info        dbg
-test-unixctl      info       info        dbg
-unixctl_server    info       info        dbg
-])
-
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/set pattern], [0],
-  [Please supply a valid pattern and destination
-])
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/set pattern:nonexistent], [0],
-  [Destination nonexistent does not exist
-])
-   AT_CHECK([APPCTL -t test-unixctl.py vlog/set pattern:file:'I<3OVS|%m'])
-   AT_CHECK([APPCTL -t test-unixctl.py log patterntest])
-   AT_CHECK([grep -q 'I<3OVS' log])
-   AT_CLEANUP])
-
-VLOG_SET_AND_LIST_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-VLOG_SET_AND_LIST_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
-
-AT_SETUP([vlog - RFC5424 facility])
-on_exit 'kill `cat ovsdb-server.pid`'
-
-dnl Create database.
-touch .conf.db.~lock~
-AT_CHECK([ovsdb-tool create conf.db $abs_top_srcdir/vswitchd/vswitch.ovsschema])
-
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile \
-          --remote=punix:$OVS_RUNDIR/db.sock -vPATTERN:file:"<%B>1 %A %m" \
-          --log-file], [0], [], [stderr])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-
-# A default facility of LOG_LOCAL0 while writing to file.
-AT_CHECK([head -1 ovsdb-server.log | awk '{print $1}'], [0], [<133>1
-])
-rm ovsdb-server.log
-
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile \
-          --remote=punix:$OVS_RUNDIR/db.sock -vPATTERN:file:"<%B>1 %A %m" \
-          -vFACILITY:daemon --log-file], [0], [], [stderr])
-
-AT_CHECK([head -1 ovsdb-server.log | awk '{print $1}'], [0], [<29>1
-])
-
-AT_CHECK([ovs-appctl -t ovsdb-server vlog/set FACILITY:invalid], [2], [],
-[invalid facility
-ovs-appctl: ovsdb-server: server returned an error
-])
-
-AT_CHECK([ovs-appctl -t ovsdb-server vlog/set FACILITY:local7])
-AT_CHECK([ovs-appctl -t ovsdb-server vlog/set ANY:file:DBG])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
-
-AT_CHECK([tail -1 ovsdb-server.log | awk '{print $1}'], [0], [<191>1
-])
-AT_CLEANUP
-
-m4_define([VLOG_RFC5424_PYN],
-  [AT_SETUP([vlog - RFC5424 facility - $1])
-   AT_SKIP_IF([test $2 = no])
-   on_exit 'kill `cat test-unixctl.py.pid`'
-
-   AT_CHECK([$3 $srcdir/test-unixctl.py --log-file=`pwd`/log --pidfile \
--vFACILITY:invalid --detach --no-chdir], [1], [], [test-unixctl.py: processing "FACILITY:invalid": Facility invalid is invalid
-])
-
-   AT_CHECK([$3 $srcdir/test-unixctl.py --log-file=`pwd`/log --pidfile \
--vFACILITY:daemon --detach --no-chdir])
-
-   AT_CHECK([ovs-appctl -t test-unixctl.py vlog/set FACILITY:invalid], [0],
-[Facility invalid is invalid
-])
-
-   AT_CHECK([ovs-appctl -t test-unixctl.py vlog/set FACILITY:local0])
-   AT_CLEANUP])
-
-VLOG_RFC5424_PYN([Python2], [$HAVE_PYTHON2], [$PYTHON2])
-VLOG_RFC5424_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3])
diff --git a/tests/vtep-ctl.at b/tests/vtep-ctl.at
deleted file mode 100644
index e44eb33ee..000000000
--- a/tests/vtep-ctl.at
+++ /dev/null
@@ -1,948 +0,0 @@
-dnl VTEP_OVSDB_INIT([$1])
-dnl
-dnl Creates an empty database named $1.
-m4_define([VTEP_OVSDB_INIT],
-  [AT_CHECK(
-     [ovsdb-tool create $1 $abs_top_srcdir/vtep/vtep.ovsschema],
-     [0], [stdout], [ignore])
-   AT_CHECK(
-     [[ovsdb-tool transact $1 \
-        '["hardware_vtep",
-          {"op": "insert",
-           "table": "Global",
-           "row": {}}]']],
-     [0], [ignore], [ignore])])
-
-dnl VTEP_CTL_SETUP
-dnl
-dnl Creates an empty database in the current directory and then starts
-dnl an ovsdb-server on it for vtep-ctl to connect to.
-m4_define([VTEP_CTL_SETUP],
-  [VTEP_OVSDB_INIT([db])
-   AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket db >/dev/null 2>&1], [0], [ignore], [ignore])])
-
-dnl VTEP_CTL_CLEANUP
-dnl
-dnl Kills off the database server.
-m4_define([VTEP_CTL_CLEANUP], [OVSDB_SERVER_SHUTDOWN])
-
-dnl RUN_VTEP_CTL(COMMAND, ...)
-dnl
-dnl Executes each vtep-ctl COMMAND.
-m4_define([RUN_VTEP_CTL],
-  [m4_foreach([command], [$@], [vtep-ctl --timeout=5 -vreconnect:emer --db=unix:socket command
-])])
-m4_define([RUN_VTEP_CTL_ONELINE],
-  [m4_foreach([command], [$@], [vtep-ctl --timeout=5 -vreconnect:emer --db=unix:socket --oneline -- command
-])])
-
-dnl RUN_VTEP_CTL_TOGETHER(COMMAND, ...)
-dnl
-dnl Executes each vtep-ctl COMMAND in a single run of vtep-ctl.
-m4_define([RUN_VTEP_CTL_TOGETHER],
-  [vtep-ctl --timeout=5 -vreconnect:emer --db=unix:socket --oneline dnl
-m4_foreach([command], [$@], [ -- command])])
-
-dnl CHECK_PSWITCHES([PSWITCH], ...)
-dnl
-dnl Verifies that "vtep-ctl list-ps" prints the specified list of
-dnl physical switches, which must be in alphabetical order.
-m4_define([CHECK_PSWITCHES],
-  [dnl Check that the pswitches appear on list-ps, without --oneline.
-   AT_CHECK(
-     [RUN_VTEP_CTL([list-ps])],
-     [0],
-     [m4_foreach([psinfo], [$@], [m4_car(psinfo)
-])],
-     [],
-     [VTEP_CTL_CLEANUP])
-
-   dnl Check that the pswitches appear on list-ps, with --oneline.
-   AT_CHECK(
-     [RUN_VTEP_CTL_ONELINE([list-ps])],
-     [0],
-     [m4_join([\n], m4_foreach([psinfo], [$@], [m4_car(psinfo),]))
-],
-     [],
-     [VTEP_CTL_CLEANUP])
-
-   dnl Check that each pswitch exists according to ps-exists and that
-   dnl a pswitch that should not exist does not.
-   m4_foreach([psinfo], [$@],
-              [AT_CHECK([RUN_VTEP_CTL([ps-exists m4_car(psinfo)])], [0], [],
-                        [], [VTEP_CTL_CLEANUP])])
-   AT_CHECK([RUN_VTEP_CTL([ps-exists nonexistent])], [2], [], [],
-            [VTEP_CTL_CLEANUP])])
-
-dnl CHECK_PORTS(PSWITCH, PORT[, PORT...])
-dnl
-dnl Verifies that "vtep-ctl list-ports PSWITCH" prints the specified
-dnl list of ports, which must be in alphabetical order.
-m4_define([CHECK_PORTS],
-  [dnl Check ports without --oneline.
-   AT_CHECK(
-     [RUN_VTEP_CTL([list-ports $1])],
-     [0],
-     [m4_foreach([port], m4_cdr($@), [port
-])],
-     [],
-     [VTEP_CTL_CLEANUP])
-
-   dnl Check ports with --oneline.
-   AT_CHECK(
-     [RUN_VTEP_CTL_ONELINE([list-ports $1])],
-     [0],
-     [m4_join([\n], m4_shift($@))
-],
-     [],
-     [VTEP_CTL_CLEANUP])])
-
-
-dnl CHECK_LSWITCHES([LSWITCH], ...)
-dnl
-dnl Verifies that "vtep-ctl list-ls" prints the specified list of
-dnl logical switches, which must be in alphabetical order.
-m4_define([CHECK_LSWITCHES],
-  [dnl Check that the lswitches appear on list-ls, without --oneline.
-   AT_CHECK(
-     [RUN_VTEP_CTL([list-ls])],
-     [0],
-     [m4_foreach([lsinfo], [$@], [m4_car(lsinfo)
-])],
-     [],
-     [VTEP_CTL_CLEANUP])
-
-   dnl Check that the lswitches appear on list-ls, with --oneline.
-   AT_CHECK(
-     [RUN_VTEP_CTL_ONELINE([list-ls])],
-     [0],
-     [m4_join([\n], m4_foreach([lsinfo], [$@], [m4_car(lsinfo),]))
-],
-     [],
-     [VTEP_CTL_CLEANUP])
-
-   dnl Check that each lswitch exists according to ls-exists and that
-   dnl a pswitch that should not exist does not.
-   m4_foreach([lsinfo], [$@],
-              [AT_CHECK([RUN_VTEP_CTL([ls-exists m4_car(lsinfo)])], [0], [],
-                        [], [VTEP_CTL_CLEANUP])])
-   AT_CHECK([RUN_VTEP_CTL([ls-exists nonexistent])], [2], [], [],
-            [VTEP_CTL_CLEANUP])])
-
-dnl ----------------------------------------------------------------------
-AT_BANNER([vtep-ctl unit tests -- physical switch tests])
-
-AT_SETUP([add-ps a])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL([add-ps a])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_PSWITCHES([a])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ps a, add-ps a])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL([add-ps a])], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([add-ps a])], [1], [],
-  [vtep-ctl: cannot create physical switch a because it already exists
-], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ps a, add-ps b])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL([add-ps a], [add-ps b])], [0], [], [],
-         [VTEP_CTL_CLEANUP])
-CHECK_PSWITCHES([a], [b])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ps a, add-ps b, del-ps a])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL([add-ps a], [add-ps b], [del-ps a])], [0], [], [],
-         [VTEP_CTL_CLEANUP])
-CHECK_PSWITCHES([b])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ps a, del-ps a, add-ps a])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL_TOGETHER(
-  [add-ps a],
-  [del-ps a],
-  [add-ps a])], [0], [
-
-
-], [], [VTEP_CTL_CLEANUP])
-CHECK_PSWITCHES([a])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ps a, add-port a a1, add-port a a2])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ps a],
-   [--if-exists del-ps b],
-   [add-port a a1],
-   [add-port a a2])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_PSWITCHES([a])
-CHECK_PORTS([a], [a1], [a2])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ps a, add-port a a1, add-port a a1])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ps a],
-   [add-port a a1])], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([add-port a a1])], [1], [],
-  [vtep-ctl: cannot create a port named a1 on a because a port with that name already exists
-], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ps a b, add-port a a1, add-port b b1, del-ps a])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL_TOGETHER(
-   [add-ps a],
-   [add-ps b],
-   [add-port a a1],
-   [add-port b b1],
-   [--if-exists del-port b b2],
-   [del-ps a])], [0], [
-
-
-
-
-
-], [], [VTEP_CTL_CLEANUP])
-CHECK_PSWITCHES([b])
-CHECK_PORTS([b], [b1])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ps a b, add-port a a1, add-port b b1, del-port a a1])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-  [add-ps a],
-  [add-ps b],
-  [add-port a a1],
-  [--may-exist add-port b b1],
-  [del-port a a1])], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([--may-exist add-port b b1])], [0], [], [],
-  [VTEP_CTL_CLEANUP])
-CHECK_PSWITCHES([a], [b])
-CHECK_PORTS([a])
-CHECK_PORTS([b], [b1])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ps a b, add-port a p1, add-port b p1, del-port a p1])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-  [add-ps a],
-  [add-ps b],
-  [add-port a p1],
-  [add-port b p1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_PSWITCHES([a], [b])
-CHECK_PORTS([a], [p1])
-CHECK_PORTS([b], [p1])
-AT_CHECK([RUN_VTEP_CTL([del-port a p1])], [0], [], [],
-  [VTEP_CTL_CLEANUP])
-CHECK_PSWITCHES([a], [b])
-CHECK_PORTS([a])
-CHECK_PORTS([b], [p1])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-
-dnl ----------------------------------------------------------------------
-AT_BANNER([vtep-ctl unit tests -- logical switch tests])
-
-AT_SETUP([add-ls a])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL([add-ls a])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([a])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ls a, add-ls a])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL([add-ls a])], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([add-ls a])], [1], [],
-  [vtep-ctl: cannot create logical switch a because it already exists
-], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ls a, add-ls b])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL([add-ls a], [add-ls b])], [0], [], [],
-         [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([a], [b])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ls a, add-ls b, del-ls a])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL([add-ls a], [add-ls b], [del-ls a])], [0], [], [],
-         [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([b])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ls a, del-ls a, add-ls a])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL_TOGETHER(
-  [add-ls a],
-  [del-ls a],
-  [add-ls a])], [0], [
-
-
-], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([a])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ls a, get-replication-mode a])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-  [add-ls a],
-  [get-replication-mode a])],
-  [0], [[(null)]
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ls a, set-replication-mode a source_node])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-  [add-ls a],[set-replication-mode a source_node],
-  [get-replication-mode a])],
-  [0], [source_node
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ls a, set-replication-mode a service_node])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-  [add-ls a],[set-replication-mode a service_node],
-  [get-replication-mode a])],
-  [0], [service_node
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-AT_BANNER([vtep-ctl unit tests -- logical binding tests])
-
-AT_SETUP([bind-ls ps1 pp1 300 ls1])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ps ps1],
-   [add-port ps1 pp1],
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_PSWITCHES([ps1])
-CHECK_PORTS([ps1], [pp1])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [bind-ls ps1 pp1 300 ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-bindings ps1 pp1])], [0],
-   [0300 ls1
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([bind-ls ps1 pp1 300 ls1, bind-ls ps1 pp1 400 ls2])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ps ps1],
-   [add-port ps1 pp1],
-   [add-ls ls1],
-   [add-ls ls2])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_PSWITCHES([ps1])
-CHECK_PORTS([ps1], [pp1])
-CHECK_LSWITCHES([ls1], [ls2])
-AT_CHECK([RUN_VTEP_CTL(
-   [bind-ls ps1 pp1 300 ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL(
-   [bind-ls ps1 pp1 400 ls2])], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-bindings ps1 pp1])], [0],
-   [0300 ls1
-0400 ls2
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([bind-ls ps1 pp1 300, bind-ls ps2 pp2 300 ls2])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ps ps1],
-   [add-ps ps2],
-   [add-port ps1 pp1],
-   [add-port ps2 pp2],
-   [add-ls ls1],
-   [add-ls ls2])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_PSWITCHES([ps1], [ps2])
-CHECK_PORTS([ps1], [pp1])
-CHECK_PORTS([ps2], [pp2])
-CHECK_LSWITCHES([ls1], [ls2])
-AT_CHECK([RUN_VTEP_CTL(
-   [bind-ls ps1 pp1 300 ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL(
-   [bind-ls ps2 pp2 300 ls2])], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-bindings ps1 pp1])], [0],
-   [0300 ls1
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-bindings ps2 pp2])], [0],
-   [0300 ls2
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-
-dnl ----------------------------------------------------------------------
-AT_BANNER([vtep-ctl unit tests -- MAC binding tests])
-
-AT_SETUP([add-ucast-local ls1])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ucast-local ls1 00:11:22:33:44:55 10.0.0.10],
-   [add-ucast-local ls1 00:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-  00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  00:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-mcast-mac-local
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-
-mcast-mac-remote
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ucast-local ls1, overwrite])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ucast-local ls1 00:11:22:33:44:55 10.0.0.10],
-   [add-ucast-local ls1 00:11:22:33:44:55 10.0.0.11])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-  00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.11
-
-mcast-mac-local
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ucast-local ls1, del-ucast-local ls1])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ucast-local ls1 00:11:22:33:44:55 10.0.0.10],
-   [add-ucast-local ls1 00:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-  00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  00:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-mcast-mac-local
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL(
-   [del-ucast-local ls1 00:11:22:33:44:55])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-  00:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-mcast-mac-local
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ucast-remote ls1])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ucast-remote ls1 00:11:22:33:44:55 10.0.0.10],
-   [add-ucast-remote ls1 00:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-  00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  00:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-mcast-mac-remote
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-
-mcast-mac-local
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ucast-remote ls1, overwrite])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ucast-remote ls1 00:11:22:33:44:55 10.0.0.10],
-   [add-ucast-remote ls1 00:11:22:33:44:55 10.0.0.11])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-  00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.11
-
-mcast-mac-remote
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ucast-remote ls1, del-ucast-remote ls1])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ucast-remote ls1 00:11:22:33:44:55 10.0.0.10],
-   [add-ucast-remote ls1 00:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-  00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  00:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-mcast-mac-remote
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL(
-   [del-ucast-remote ls1 00:11:22:33:44:55])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-  00:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-mcast-mac-remote
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-ucast-local ls1, add-ucast-remote ls1])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ucast-local ls1 00:11:22:33:44:55 10.0.0.10],
-   [add-ucast-local ls1 00:11:22:33:44:66 10.0.0.11],
-   [add-ucast-remote ls1 02:11:22:33:44:55 10.0.0.10],
-   [add-ucast-remote ls1 02:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-  00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  00:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-mcast-mac-local
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-  02:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  02:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-mcast-mac-remote
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-mcast-local ls1])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.10],
-   [add-mcast-local ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
-   [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.12])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-
-mcast-mac-local
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
-  01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-
-mcast-mac-remote
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-mcast-local ls1, del-mcast-local ls1])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.10],
-   [add-mcast-local ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
-   [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.12],
-   [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.13])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-
-mcast-mac-local
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.13
-  01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL(
-   [del-mcast-local ls1 01:11:22:33:44:55 10.0.0.12])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-
-mcast-mac-local
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.13
-  01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-mcast-remote ls1])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.10],
-   [add-mcast-remote ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
-   [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.12])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-
-mcast-mac-remote
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
-  01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-
-mcast-mac-local
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-mcast-remote ls1, del-mcast-remote ls1])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.10],
-   [add-mcast-remote ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
-   [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.12],
-   [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.13])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-
-mcast-mac-remote
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.13
-  01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL(
-   [del-mcast-remote ls1 01:11:22:33:44:55 10.0.0.12])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-
-mcast-mac-remote
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.13
-  01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add-mcast-local ls1, add-mcast-remote ls1])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.10],
-   [add-mcast-local ls1 01:11:22:33:44:66 10.0.0.11],
-   [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.12],
-   [add-mcast-remote ls1 03:11:22:33:44:55 10.0.0.10],
-   [add-mcast-remote ls1 03:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
-   [add-mcast-remote ls1 03:11:22:33:44:55 10.0.0.12])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-
-mcast-mac-local
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
-  01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-
-mcast-mac-remote
-  03:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  03:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
-  03:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add local and remote macs, clear-local-macs])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ucast-local ls1 00:11:22:33:44:55 10.0.0.10],
-   [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.10],
-   [add-mcast-local ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
-   [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.12],
-   [add-ucast-remote ls1 00:11:22:33:44:55 10.0.0.10],
-   [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.10],
-   [add-mcast-remote ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
-   [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.12])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-  00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-
-mcast-mac-local
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
-  01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-  00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-
-mcast-mac-remote
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
-  01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL(
-   [clear-local-macs ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-
-mcast-mac-local
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-  00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-
-mcast-mac-remote
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
-  01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([add local and remote macs, clear-remote-macs])
-AT_KEYWORDS([vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-CHECK_LSWITCHES([ls1])
-AT_CHECK([RUN_VTEP_CTL(
-   [add-ucast-local ls1 00:11:22:33:44:55 10.0.0.10],
-   [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.10],
-   [add-mcast-local ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
-   [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.12],
-   [add-ucast-remote ls1 00:11:22:33:44:55 10.0.0.10],
-   [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.10],
-   [add-mcast-remote ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
-   [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.12])
-], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-  00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-
-mcast-mac-local
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
-  01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-  00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-
-mcast-mac-remote
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
-  01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL(
-   [clear-remote-macs ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
-   [ucast-mac-local
-  00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-
-mcast-mac-local
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
-  01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
-  01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
-
-], [], [VTEP_CTL_CLEANUP])
-AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
-   [ucast-mac-remote
-
-mcast-mac-remote
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-dnl ----------------------------------------------------------------------
-AT_BANNER([vtep-ctl unit tests -- manager commands])
-
-AT_SETUP([managers])
-AT_KEYWORDS([manager vtep-ctl])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL_TOGETHER(
-  [del-manager],
-  [get-manager],
-  [set-manager tcp:4.5.6.7],
-  [get-manager],
-  [set-manager tcp:8.9.10.11 tcp:5.4.3.2],
-  [get-manager],
-  [--inactivity-probe=30000 set-manager tcp:1.2.3.4],
-  [get-manager],
-  [del-manager],
-  [get-manager])], [0], [
-
-
-tcp:4.5.6.7
-
-tcp:5.4.3.2\ntcp:8.9.10.11
-
-tcp:1.2.3.4
-
-
-], [], [VTEP_CTL_CLEANUP])
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-
-AT_SETUP([show command])
-AT_KEYWORDS([vtep-ctl show])
-VTEP_CTL_SETUP
-AT_CHECK([RUN_VTEP_CTL(
-  [set-manager tcp:4.5.6.7],
-  [add-ps a],
-  [add-port a a1],
-  [add-ls ls1],
-  [bind-ls a a1 100 ls1],
-  [set Physical_Switch a management_ips=[[4.3.2.1]] tunnel_ips=[[1.2.3.4]]])], [0], [ignore], [], [VTEP_CTL_CLEANUP])
-
-AT_CHECK([vtep-ctl --timeout=5 -vreconnect:emer --db=unix:socket show | tail -n+2 | sed 's/=[[a-f0-9-]][[a-f0-9-]]*}/=<ls>}/' ], [0], [dnl
-    Manager "tcp:4.5.6.7"
-    Physical_Switch a
-        management_ips: [["4.3.2.1"]]
-        tunnel_ips: [["1.2.3.4"]]
-        Physical_Port "a1"
-            vlan_bindings:
-                100="ls1"
-], [], [VTEP_CTL_CLEANUP])
-
-VTEP_CTL_CLEANUP
-AT_CLEANUP
-- 
2.21.0



More information about the dev mailing list