diff mbox series

[ovs-dev] tests: Ignore recirc_id in "MPLS xlate action" test.

Message ID 20180712215531.21231-1-blp@ovn.org
State Accepted
Headers show
Series [ovs-dev] tests: Ignore recirc_id in "MPLS xlate action" test. | expand

Commit Message

Ben Pfaff July 12, 2018, 9:55 p.m. UTC
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 <blp@ovn.org>
---
 tests/mpls-xlate.at | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Aaron Conole July 13, 2018, 1:11 p.m. UTC | #1
Ben Pfaff <blp@ovn.org> writes:

> 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 <blp@ovn.org>
> ---

Thanks for this patch!

I'm pretty sure that with this patch applied, I can re-enable the make
distcheck for the bot.  I looked at this test a bit earlier, but didn't
know if the recirc ID was important.  Thanks for detailing that.

After this gets applied, I'll wait a bit and see if the tests
consistently pass.  If that's so, I'll re-enable the make distcheck in
the bot for output.

Acked-by: Aaron Conole <aconole@redhat.com>
Flavio Leitner Aug. 7, 2018, 9:19 p.m. UTC | #2
On Thu, Jul 12, 2018 at 02:55:31PM -0700, Ben Pfaff wrote:
> 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 <blp@ovn.org>

One nit below, otherwise looks good and works for me.

Acked-by: Flavio Leitner <fbl@sysclose.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"

Debug leftover?

> +
> +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
>
Ben Pfaff Aug. 7, 2018, 10:03 p.m. UTC | #3
On Fri, Jul 13, 2018 at 09:11:54AM -0400, Aaron Conole wrote:
> Ben Pfaff <blp@ovn.org> writes:
> 
> > 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 <blp@ovn.org>
> > ---
> 
> Thanks for this patch!
> 
> I'm pretty sure that with this patch applied, I can re-enable the make
> distcheck for the bot.  I looked at this test a bit earlier, but didn't
> know if the recirc ID was important.  Thanks for detailing that.
> 
> After this gets applied, I'll wait a bit and see if the tests
> consistently pass.  If that's so, I'll re-enable the make distcheck in
> the bot for output.
> 
> Acked-by: Aaron Conole <aconole@redhat.com>

Thanks, applied to master and branch-2.10.
Ben Pfaff Aug. 7, 2018, 10:03 p.m. UTC | #4
On Tue, Aug 07, 2018 at 06:19:52PM -0300, Flavio Leitner wrote:
> On Thu, Jul 12, 2018 at 02:55:31PM -0700, Ben Pfaff wrote:
> > 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 <blp@ovn.org>
> 
> One nit below, otherwise looks good and works for me.
> 
> Acked-by: Flavio Leitner <fbl@sysclose.org>

Thanks, applied to master and branch-2.10.

> > ---
> >  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"
> 
> Debug leftover?

Maybe, but it also might be useful if someone sends me a test failure
later.

Thanks,

Ben.
diff mbox series

Patch

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
 ])