diff options
author | Jarno Rajahalme <jarno@ovn.org> | 2016-02-24 16:10:42 -0800 |
---|---|---|
committer | Jarno Rajahalme <jarno@ovn.org> | 2016-02-24 16:10:42 -0800 |
commit | 3fd12197cda71b79198a4802e298be783877370c (patch) | |
tree | 1494bd23d1fb572b2b67f8df676395538513487f /tests | |
parent | 8cffdcd071ed47a503edb211bfaa15639d265ee0 (diff) | |
download | openvswitch-3fd12197cda71b79198a4802e298be783877370c.tar.gz |
tests: Fix MPLS tests.
Some MPLS tests used non-MPLS ethertype for popping a label from a
multi-label stack. Also, reveal actions in some MPLS tests. This
will make later patches more easily understandable.
Fix the mpls-xlate banner and remove '-generate' option from MPLS
tests as it is no longer needed to create recirculation state.
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dpif-netdev.at | 9 | ||||
-rw-r--r-- | tests/mpls-xlate.at | 8 | ||||
-rw-r--r-- | tests/ofproto-dpif.at | 10 |
3 files changed, 18 insertions, 9 deletions
diff --git a/tests/dpif-netdev.at b/tests/dpif-netdev.at index 9abfbafe9..12468f437 100644 --- a/tests/dpif-netdev.at +++ b/tests/dpif-netdev.at @@ -14,6 +14,15 @@ strip_xout () { ' | 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 } diff --git a/tests/mpls-xlate.at b/tests/mpls-xlate.at index 38790ea52..d06036f62 100644 --- a/tests/mpls-xlate.at +++ b/tests/mpls-xlate.at @@ -1,4 +1,4 @@ -AT_BANNER([mpls_xlate]) +AT_BANNER([mpls-xlate]) AT_SETUP([MPLS xlate action]) @@ -45,17 +45,17 @@ AT_CHECK([tail -1 stdout], [0], ]) 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/0,ttl=64,bos=0)' -generate], [0], [stdout]) +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)'], [0], [stdout]) AT_CHECK([tail -1 stdout], [0], [Datapath actions: pop_mpls(eth_type=0x8847),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(0x8847),mpls(label=50,tc=0/0,ttl=64,bos=0)' -generate], [0], [stdout]) +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(0x8847),mpls(label=50,tc=0,ttl=64,bos=0)'], [0], [stdout]) AT_CHECK([tail -1 stdout], [0], [Datapath actions: pop_mpls(eth_type=0x800),recirc(0x2) ]) -AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(2),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)' -generate], [0], [stdout]) +AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(2),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 ]) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index a4358429d..fcb971666 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -6069,7 +6069,7 @@ 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:0x8849,controller +dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8847,controller ]) AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) @@ -6105,7 +6105,7 @@ 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:0x8849,controller +dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8847,controller ]) AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) @@ -6396,9 +6396,9 @@ 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], [0], [dnl -recirc_id=0,mpls,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,mpls_label=11,mpls_tc=3,mpls_ttl=64,mpls_bos=1, actions: <del> -recirc_id=0,mpls,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del> +AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout_keep_actions], [0], [dnl +recirc_id=0,mpls,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,mpls_label=11,mpls_tc=3,mpls_ttl=64,mpls_bos=1, actions:push_mpls(label=11,tc=3,ttl=64,bos=0,eth_type=0x8847),2 +recirc_id=0,mpls,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions:pop_mpls(eth_type=0x800),2 ]) OVS_VSWITCHD_STOP AT_CLEANUP |