bundle: Run bundle_check() in unit tests.
authorEthan Jackson <ethan@nicira.com>
Thu, 21 Jul 2011 01:58:23 +0000 (18:58 -0700)
committerEthan Jackson <ethan@nicira.com>
Sat, 23 Jul 2011 00:46:48 +0000 (17:46 -0700)
This has been helpful finding bugs in my development environment.
It's good to exercise this code.

tests/test-bundle.c

index 8a89292..c6c9aec 100644 (file)
@@ -135,6 +135,10 @@ main(int argc, char *argv[])
         flows[i].regs[0] = OFPP_NONE;
     }
 
+    if (bundle_check(nab, 1024)) {
+        ovs_fatal(0, "Bundle action fails to check.");
+    }
+
     /* 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