From 8e9ce036dd93307b50b9189438b3929234391d61 Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Mon, 12 Sep 2011 17:19:13 -0700 Subject: [PATCH] tests: Test ofproto-dpif set_tunnel translation. This patch adds a unit test which would have caught the issue fixed in Commit 2446268e "ofproto-dpif: set_tunnel when required to." --- tests/ofproto-dpif.at | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index c504dfe6..a4fb737b 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -61,3 +61,21 @@ AT_CHECK([tail -1 stdout], [0], ]) OFPROTO_STOP AT_CLEANUP + +AT_SETUP([ofproto-dpif - set_tunnel]) +OFPROTO_START +AT_DATA([flows.txt], [dnl +in_port=90 actions=resubmit:1,resubmit:2,resubmit:3,resubmit:4,resubmit:5 +in_port=1 actions=set_tunnel:1,output:1 +in_port=2 actions=set_tunnel:1,output:2 +in_port=3 actions=set_tunnel:2,set_tunnel:3,output:3 +in_port=4 actions=set_tunnel:4,set_tunnel:3,output:4 +in_port=5 actions=set_tunnel:5 +]) +AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) +AT_CHECK([ovs-appctl -t test-openflowd ofproto/trace br0 'tun_id(0x1),in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0),icmp(type=8,code=0)'], [0], [stdout]) +AT_CHECK([tail -1 stdout], [0], + [Datapath actions: set_tunnel(0x1),1,2,set_tunnel(0x3),3,4 +]) +OFPROTO_STOP +AT_CLEANUP -- 2.30.2