summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2017-05-31 16:06:12 -0700
committerBen Pfaff <blp@ovn.org>2017-05-31 16:06:12 -0700
commit50f96b10e1c87db9fbe4df297f9b2fea13436bc0 (patch)
tree9122b84ecb6d90d0ba343f1f7b451b2db057870f /tests
parent52182c5f50198d0f985b10677e47a9ac49ee709b (diff)
downloadopenvswitch-50f96b10e1c87db9fbe4df297f9b2fea13436bc0.tar.gz
Support accepting and displaying port names in OVS tools.
Until now, most ovs-ofctl commands have not accepted names for ports, only numbers, and have not been able to display port names either. It's a lot easier for users if they can use and see meaningful names instead of arbitrary numbers. This commit adds that support. For backward compatibility, only interactive ovs-ofctl commands by default display port names; to display them in scripts, use the new --names option. Signed-off-by: Ben Pfaff <blp@ovn.org> Tested-by: Aaron Conole <aconole@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ofproto-dpif.at2
-rw-r--r--tests/ofproto.at56
-rw-r--r--tests/ovs-ofctl.at56
-rw-r--r--tests/test-bundle.c4
-rw-r--r--tests/test-flows.c8
-rw-r--r--tests/test-ovn.c2
6 files changed, 85 insertions, 43 deletions
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index 55b082297..14292ea9c 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -219,7 +219,7 @@ 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=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([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
])
diff --git a/tests/ofproto.at b/tests/ofproto.at
index 6a4e26d98..76a33b690 100644
--- a/tests/ofproto.at
+++ b/tests/ofproto.at
@@ -2099,9 +2099,9 @@ 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'], [], [dnl
-Error OFPBAC_BAD_OUT_GROUP for: OFPT_FLOW_MOD (OF1.4) (xid=0x5): ADD in_port=7 actions=group:2
-Error OFPBFC_MSG_FAILED for: OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x8):
+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
])
@@ -2112,7 +2112,7 @@ OFPST_FLOW reply (OF1.4):
])
# Verify that the packet-in was NOT received via controller action.
-AT_CHECK([sed 's/ (xid=0x[[1-9a-fA-F]][[0-9a-fA-F]]*)//' monitor.log], [0], [])
+AT_CHECK([strip_xids < monitor.log], [0], [])
OVS_VSWITCHD_STOP
AT_CLEANUP
@@ -2140,10 +2140,10 @@ 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'], [], [dnl
-Error OFPBAC_BAD_OUT_GROUP for: OFPT_PACKET_OUT (OF1.4) (xid=0x5): in_port=6 actions=group:2 data_len=14
+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) (xid=0x8):
+Error OFPBFC_MSG_FAILED for: OFPT_BUNDLE_CONTROL (OF1.4):
bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
])
@@ -2154,7 +2154,7 @@ OFPST_FLOW reply (OF1.4):
])
# Verify that the packet-in was NOT received via controller action.
-AT_CHECK([sed 's/ (xid=0x[[1-9a-fA-F]][[0-9a-fA-F]]*)//' monitor.log], [0], [])
+AT_CHECK([strip_xids < monitor.log], [0], [])
OVS_VSWITCHD_STOP
AT_CLEANUP
@@ -2227,7 +2227,7 @@ 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], [0], [NXST_FLOW reply (xid=0x4):
+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.
@@ -2239,7 +2239,7 @@ 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 (xid=0x2):
+ printf 'OFPST_TABLE reply:
table 0 ("%s"):
active=0, lookup=0, matched=0
max_entries=1000000
@@ -2265,7 +2265,7 @@ ditto() {
done
}
(head_table classifier; ditto 1 253) > expout
-AT_CHECK([ovs-ofctl dump-tables br0], [0], [expout])
+AT_CHECK([ovs-ofctl dump-tables br0 | strip_xids], [0], [expout])
OVS_VSWITCHD_STOP(["/240\.0\.0\.1/d"])
AT_CLEANUP
@@ -4939,7 +4939,7 @@ OVS_VSWITCHD_START
AT_CHECK([ovs-appctl vlog/set vconn:dbg])
-AT_CHECK([ovs-ofctl del-flows br0])
+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
@@ -4953,7 +4953,7 @@ 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 --bundle add-flows br0 flows.txt])
+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
@@ -4966,7 +4966,7 @@ modify actions=drop
modify_strict in_port=2 dl_src=00:77:88:99:aa:bb actions=7
])
-AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
+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
@@ -4981,7 +4981,7 @@ 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 --bundle add-flows br0 flows.txt])
+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
@@ -5168,9 +5168,9 @@ 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'],
+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) (xid=0xb): ADD table:254 actions=drop
+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
@@ -5492,7 +5492,7 @@ OVS_VSWITCHD_START
AT_CHECK([ovs-appctl vlog/set vconn:dbg])
-AT_CHECK([ovs-ofctl del-flows br0])
+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
@@ -5506,7 +5506,7 @@ 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 --bundle add-flows br0 flows.txt])
+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
@@ -5519,7 +5519,7 @@ modify actions=drop
modify_strict in_port=2 dl_src=00:77:88:99:aa:bb actions=7
])
-AT_CHECK([ovs-ofctl -O OpenFlow13 --bundle add-flows br0 flows.txt])
+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
@@ -5534,7 +5534,7 @@ 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 add-flows br0 flows.txt])
+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
@@ -5714,9 +5714,9 @@ 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'],
+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) (xid=0xb): ADD table:254 actions=drop
+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
@@ -5742,10 +5742,10 @@ 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'],
+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) (xid=0x2): 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) (xid=0x7):
+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
])
@@ -5812,8 +5812,8 @@ 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], [0], [dnl
-NXST_FLOW reply (xid=0x4):
+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..... |
diff --git a/tests/ovs-ofctl.at b/tests/ovs-ofctl.at
index c45fc23ca..6afe8f766 100644
--- a/tests/ovs-ofctl.at
+++ b/tests/ovs-ofctl.at
@@ -373,9 +373,12 @@ 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)])
@@ -484,8 +487,8 @@ NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_LABEL[
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=65534,max_len=123)
-NXT_FLOW_MOD: ADD table:255 actions=output(port=65528,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
@@ -2595,12 +2598,14 @@ 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])
-AT_CHECK([ovs-ofctl -F openflow10 add-flow dummy tun_id=123,actions=drop],
+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 dummy metadata=123,actions=drop],
+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.
@@ -2757,6 +2762,43 @@ AT_CHECK(
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
@@ -2995,15 +3037,15 @@ 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 add-flows br0 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 replace-flows br0 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 dump-flows br0 | ofctl_strip | sed '/OFPST_FLOW/d' | sort],
+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
diff --git a/tests/test-bundle.c b/tests/test-bundle.c
index 88949be39..af2543200 100644
--- a/tests/test-bundle.c
+++ b/tests/test-bundle.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2012, 2013, 2014 Nicira, Inc.
+/* 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.
@@ -71,7 +71,7 @@ parse_bundle_actions(char *actions)
char *error;
ofpbuf_init(&ofpacts, 0);
- error = bundle_parse_load(actions, &ofpacts);
+ error = bundle_parse_load(actions, NULL, &ofpacts);
if (error) {
ovs_fatal(0, "%s", error);
}
diff --git a/tests/test-flows.c b/tests/test-flows.c
index 067f36a49..d7fa798df 100644
--- a/tests/test-flows.c
+++ b/tests/test-flows.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
+ * 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.
@@ -78,14 +78,14 @@ test_flows_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
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, 2);
- char *got_s = ofp10_match_to_string(&extracted_match, 2);
+ 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);
+ 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);
diff --git a/tests/test-ovn.c b/tests/test-ovn.c
index 32efac478..e2c61d2b2 100644
--- a/tests/test-ovn.c
+++ b/tests/test-ovn.c
@@ -1254,7 +1254,7 @@ test_parse_actions(struct ovs_cmdl_context *ctx OVS_UNUSED)
ofpbuf_init(&ofpacts, 0);
ovnacts_encode(ovnacts.data, ovnacts.size, &ep, &ofpacts);
struct ds ofpacts_s = DS_EMPTY_INITIALIZER;
- ofpacts_format(ofpacts.data, ofpacts.size, &ofpacts_s);
+ ofpacts_format(ofpacts.data, ofpacts.size, NULL, &ofpacts_s);
printf(" encodes as %s\n", ds_cstr(&ofpacts_s));
ds_destroy(&ofpacts_s);
ofpbuf_uninit(&ofpacts);