When I run this test with DPDK enabled, it fails because it ends up using
a different recirculation ID when DPDK is not enabled.  I guess that's a
little weird but the recirculation IDs are not supposed to be significant,
so this change makes the test ignore it.

Signed-off-by: Ben Pfaff <b...@ovn.org>
---
 tests/mpls-xlate.at | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/mpls-xlate.at b/tests/mpls-xlate.at
index ad3141c6412c..e335b7fdf0a0 100644
--- a/tests/mpls-xlate.at
+++ b/tests/mpls-xlate.at
@@ -129,11 +129,14 @@ 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,ttl=64,bos=0,label=50,tc=0,ttl=64,bos=1)'],
 [0], [stdout])
-AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: 
pop_mpls(eth_type=0x8847),pop_mpls(eth_type=0x800),recirc(0x7)
+AT_CHECK([tail -1 stdout | sed 's/recirc(0x[[0-9a-f]]*)/recirc(?)/'], [0],
+  [Datapath actions: 
pop_mpls(eth_type=0x8847),pop_mpls(eth_type=0x800),recirc(?)
 ])
 
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 
'recirc_id(7),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])
+recirc_id=$(tail -1 stdout | sed 's/.*recirc(0x\([[0-9a-f]]*\)).*/\1/')
+echo "recirc_id $recirc_id"
+
+AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 
"recirc_id($recirc_id),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
 ])
-- 
2.16.1

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to