diff options
author | Ben Pfaff <blp@nicira.com> | 2011-05-18 14:01:13 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-05-18 14:01:13 -0700 |
commit | b2fda3effc787f265b5ad5dfa967ac00627bd075 (patch) | |
tree | 5c0017aedd36c0d9088dcd67a79beb8ff69bd4f9 /tests | |
parent | 827ab71c97f25b77c94a1158834cdad35df6806f (diff) | |
parent | 2e281761473ed67ecae00205f62180e9a21c9ade (diff) |
Merge 'next' into 'master'.
I know already that this breaks the statsfixes that were implemented by the
following commits:
827ab71c97f "ofproto: Datapath statistics accounted twice."
6f1435fc8f7 "ofproto: Resubmit statistics improperly account during..."
These were already broken in a previous merge. I will work on a fix.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ofproto-macros.at | 2 | ||||
-rw-r--r-- | tests/ofproto.at | 6 | ||||
-rw-r--r-- | tests/ovs-ofctl.at | 9 | ||||
-rw-r--r-- | tests/test-classifier.c | 14 |
4 files changed, 16 insertions, 15 deletions
diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at index fabdb849..39275506 100644 --- a/tests/ofproto-macros.at +++ b/tests/ofproto-macros.at @@ -7,7 +7,7 @@ m4_define([OFPROTO_START], trap 'kill `cat ovs-openflowd.pid`' 0 AT_CAPTURE_FILE([ovs-openflowd.log]) AT_CHECK( - [ovs-openflowd --detach --pidfile --enable-dummy --log-file dummy@br0 none --datapath-id=fedcba9876543210 $1], + [ovs-openflowd --detach --pidfile --enable-dummy --log-file --fail=closed dummy@br0 none --datapath-id=fedcba9876543210 $1], [0], [], [stderr]) AT_CHECK([[sed < stderr ' /vlog|INFO|opened log file/d diff --git a/tests/ofproto.at b/tests/ofproto.at index 10080e67..bb43149f 100644 --- a/tests/ofproto.at +++ b/tests/ofproto.at @@ -11,7 +11,7 @@ OFPROTO_START AT_CHECK([ovs-ofctl -vANY:ANY:WARN show br0], [0], [stdout]) AT_CHECK([STRIP_XIDS stdout], [0], [dnl OFPT_FEATURES_REPLY: ver:0x1, dpid:fedcba9876543210 -n_tables:2, n_buffers:256 +n_tables:1, n_buffers:256 features: capabilities:0x87, actions:0xfff LOCAL(br0): addr:aa:55:aa:55:00:00, config: 0x1, state:0x1 OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0 @@ -33,7 +33,7 @@ do AT_CHECK([ovs-ofctl -vANY:ANY:WARN show br0], [0], [stdout]) AT_CHECK_UNQUOTED([STRIP_XIDS stdout], [0], [dnl OFPT_FEATURES_REPLY: ver:0x1, dpid:fedcba9876543210 -n_tables:2, n_buffers:256 +n_tables:1, n_buffers:256 features: capabilities:0x87, actions:0xfff LOCAL(br0): addr:aa:55:aa:55:00:00, config: $config, state:$state OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0 @@ -49,8 +49,8 @@ AT_CHECK([ovs-ofctl dump-flows br0 | STRIP_XIDS], [0], [NXST_FLOW reply: AT_CHECK([echo 'in_port=1,actions=0' | ovs-ofctl add-flows br0 -]) AT_CHECK([ovs-ofctl add-flow br0 in_port=0,actions=1]) AT_CHECK([ovs-ofctl dump-flows br0 | STRIP_XIDS | STRIP_DURATION | sort], [0], [dnl + cookie=0x0, duration=?s, table_id=0, n_packets=0, n_bytes=0, in_port=0 actions=output:1 cookie=0x0, duration=?s, table_id=0, n_packets=0, n_bytes=0, in_port=1 actions=output:0 - cookie=0x0, duration=?s, table_id=0, n_packets=0, n_bytes=0, in_port=65534 actions=output:1 NXST_FLOW reply: ]) AT_CHECK([ovs-ofctl del-flows br0]) diff --git a/tests/ovs-ofctl.at b/tests/ovs-ofctl.at index c23945f5..997cc306 100644 --- a/tests/ovs-ofctl.at +++ b/tests/ovs-ofctl.at @@ -14,7 +14,7 @@ actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note 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, NXM_NX_REG0[0..12]) -actions=drop +table=1,actions=drop tun_id=0x1234000056780000/0xffff0000ffff0000,actions=drop ]]) AT_CHECK([ovs-ofctl parse-flows flows.txt @@ -32,8 +32,9 @@ NXT_SET_FLOW_FORMAT: format=nxm NXT_FLOW_MOD: ADD tun_id=0x1234 cookie:0x5678 actions=FLOOD NXT_FLOW_MOD: ADD actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel64:0x123456789 NXT_FLOW_MOD: ADD 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 actions=drop -NXT_FLOW_MOD: ADD tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop +NXT_FLOW_MOD_TABLE_ID: enable +NXT_FLOW_MOD: ADD table_id:1 actions=drop +NXT_FLOW_MOD: ADD table_id:255 tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop ]]) AT_CLEANUP @@ -297,7 +298,7 @@ AT_CHECK([ovs-ofctl parse-nx-match < nx-match.txt], [0], [dnl <any> # in port -NXM_OF_IN_PORT(fffe) +NXM_OF_IN_PORT(0000) NXM_OF_IN_PORT(fffe) # eth dst diff --git a/tests/test-classifier.c b/tests/test-classifier.c index 9af8aacb..1cfd5cf6 100644 --- a/tests/test-classifier.c +++ b/tests/test-classifier.c @@ -251,7 +251,7 @@ static ovs_be32 nw_dst_values[] = { CONSTANT_HTONL(0xc0a80002), static ovs_be64 tun_id_values[] = { 0, CONSTANT_HTONLL(UINT64_C(0xfedcba9876543210)) }; -static uint16_t in_port_values[] = { 1, ODPP_LOCAL }; +static uint16_t in_port_values[] = { 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) }; @@ -526,7 +526,7 @@ test_single_rule(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) tcls_init(&tcls); tcls_rule = tcls_insert(&tcls, rule); - assert(!classifier_insert(&cls, &rule->cls_rule)); + classifier_insert(&cls, &rule->cls_rule); check_tables(&cls, 1, 1, 0); compare_classifiers(&cls, &tcls); @@ -562,7 +562,7 @@ test_rule_replacement(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) classifier_init(&cls); tcls_init(&tcls); tcls_insert(&tcls, rule1); - assert(!classifier_insert(&cls, &rule1->cls_rule)); + classifier_insert(&cls, &rule1->cls_rule); check_tables(&cls, 1, 1, 0); compare_classifiers(&cls, &tcls); tcls_destroy(&tcls); @@ -570,7 +570,7 @@ test_rule_replacement(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) tcls_init(&tcls); tcls_insert(&tcls, rule2); assert(test_rule_from_cls_rule( - classifier_insert(&cls, &rule2->cls_rule)) == rule1); + classifier_replace(&cls, &rule2->cls_rule)) == rule1); free(rule1); check_tables(&cls, 1, 1, 0); compare_classifiers(&cls, &tcls); @@ -681,7 +681,7 @@ test_many_rules_in_one_list (int argc OVS_UNUSED, char *argv[] OVS_UNUSED) tcls_rules[j] = tcls_insert(&tcls, rules[j]); displaced_rule = test_rule_from_cls_rule( - classifier_insert(&cls, &rules[j]->cls_rule)); + classifier_replace(&cls, &rules[j]->cls_rule)); if (pri_rules[pris[j]] >= 0) { int k = pri_rules[pris[j]]; assert(displaced_rule != NULL); @@ -781,7 +781,7 @@ test_many_rules_in_one_table(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) rules[i] = make_rule(wcf, priority, value_pats[i]); tcls_rules[i] = tcls_insert(&tcls, rules[i]); - assert(!classifier_insert(&cls, &rules[i]->cls_rule)); + classifier_insert(&cls, &rules[i]->cls_rule); check_tables(&cls, 1, i + 1, 0); compare_classifiers(&cls, &tcls); @@ -839,7 +839,7 @@ test_many_rules_in_n_tables(int n_tables) int value_pat = rand() & ((1u << CLS_N_FIELDS) - 1); rule = make_rule(wcf, priority, value_pat); tcls_insert(&tcls, rule); - assert(!classifier_insert(&cls, &rule->cls_rule)); + classifier_insert(&cls, &rule->cls_rule); check_tables(&cls, -1, i + 1, -1); compare_classifiers(&cls, &tcls); } |