summaryrefslogtreecommitdiff
path: root/tests/test-bundle.c
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-07-20 15:07:46 -0700
committerEthan Jackson <ethan@nicira.com>2011-07-22 17:46:48 -0700
commita368bb53d9769ae42042e122775672ac9546e3f9 (patch)
tree4cbb05275c16ffd4ab6d5121eeb78accf0c08b63 /tests/test-bundle.c
parent04a85497b994b0cb1c702d4ff8b0d2149767ae0e (diff)
downloadopenvswitch-a368bb53d9769ae42042e122775672ac9546e3f9.tar.gz
bundle: New action "bundle_load".
The bundle_load action behaves the same as the bundle action, except instead of outputting, it writes its result to a register.
Diffstat (limited to 'tests/test-bundle.c')
-rw-r--r--tests/test-bundle.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/test-bundle.c b/tests/test-bundle.c
index fb15faf98..16e264d2b 100644
--- a/tests/test-bundle.c
+++ b/tests/test-bundle.c
@@ -71,7 +71,7 @@ parse_bundle_actions(char *actions)
struct ofpbuf b;
ofpbuf_init(&b, 0);
- bundle_parse(&b, actions);
+ bundle_parse_load(&b, actions);
nab = ofpbuf_steal_data(&b);
ofpbuf_uninit(&b);
@@ -136,7 +136,7 @@ main(int argc, char *argv[])
flows[i].regs[0] = OFPP_NONE;
}
- if (bundle_check(nab, 1024)) {
+ if (bundle_check(nab, 1024, flows)) {
ovs_fatal(0, "Bundle action fails to check.");
}
@@ -185,10 +185,15 @@ main(int argc, char *argv[])
changed = 0;
for (j = 0; j < N_FLOWS; j++) {
struct flow *flow = &flows[j];
- uint16_t old_slave_id;
+ uint16_t old_slave_id, ofp_port;
old_slave_id = flow->regs[0];
- flow->regs[0] = bundle_execute(nab, flow, slave_enabled_cb, &sg);
+ ofp_port = bundle_execute(nab, flow, slave_enabled_cb, &sg);
+ bundle_execute_load(nab, flow, slave_enabled_cb, &sg);
+ if (flow->regs[0] != ofp_port) {
+ ovs_fatal(0, "bundle_execute_load() and bundle_execute() "
+ "disagree");
+ }
if (flow->regs[0] != OFPP_NONE) {
slave_lookup(&sg, flow->regs[0])->flow_count++;