diff mbox series

[ovs-dev] tests: keep some datapath parsing tests from hanging

Message ID 20181129003803.fzaoll73vodnw37z@rascal.austin.ibm.com
State Accepted
Headers show
Series [ovs-dev] tests: keep some datapath parsing tests from hanging | expand

Commit Message

Scott Cheloha Nov. 29, 2018, 12:38 a.m. UTC
The arguments to sed(1) need to be on the same line in the shell
script or it will just sit there awaiting input.

Signed-off-by: Scott Cheloha <scottcheloha@gmail.com>
---

This is my first submission so I'm not sure if I'm doing this correctly.

 tests/odp.at | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

Comments

Aaron Conole Nov. 29, 2018, 4:11 p.m. UTC | #1
Hi Scott,

Scott Cheloha <scottcheloha@gmail.com> writes:

> The arguments to sed(1) need to be on the same line in the shell
> script or it will just sit there awaiting input.
>
> Signed-off-by: Scott Cheloha <scottcheloha@gmail.com>
> ---
>
> This is my first submission so I'm not sure if I'm doing this correctly.
>
>  tests/odp.at | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/tests/odp.at b/tests/odp.at
> index 1cff727ae..05dc76dbf 100644
> --- a/tests/odp.at
> +++ b/tests/odp.at
> @@ -83,13 +83,11 @@ sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt | s
>  
>   echo
>   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
> - sed
> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>  
>   echo
>   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
> - sed
> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>  ) > odp-in.txt
>  AT_CAPTURE_FILE([odp-in.txt])
>  
> @@ -186,13 +184,11 @@ sed -n 's/,frag=no),.*/,frag=later)/p' odp-base.txt
>  
>   echo
>   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
> - sed
> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>  
>   echo
>   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
> - sed
> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>  ) > odp.txt
>  AT_CAPTURE_FILE([odp.txt])
>  AT_CHECK_UNQUOTED([ovstest test-odp parse-wc-keys < odp.txt], [0], [`cat odp.txt`

I see the following error on a RHEL7 system:

   485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:107)

Let me know if you want a zip of the testsuite directory.  I can make it
available.

-Aaron
Scott Cheloha Nov. 29, 2018, 5:43 p.m. UTC | #2
On Thu, Nov 29, 2018 at 11:11:31AM -0500, Aaron Conole wrote:
> Hi Scott,
> 
> Scott Cheloha <scottcheloha@gmail.com> writes:
> 
> > The arguments to sed(1) need to be on the same line in the shell
> > script or it will just sit there awaiting input.
> >
> > Signed-off-by: Scott Cheloha <scottcheloha@gmail.com>
> > ---
> >
> > This is my first submission so I'm not sure if I'm doing this correctly.
> >
> >  tests/odp.at | 12 ++++--------
> >  1 file changed, 4 insertions(+), 8 deletions(-)
> >
> > diff --git a/tests/odp.at b/tests/odp.at
> > index 1cff727ae..05dc76dbf 100644
> > --- a/tests/odp.at
> > +++ b/tests/odp.at
> > @@ -83,13 +83,11 @@ sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt | s
> >  
> >   echo
> >   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
> > - sed
> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >  
> >   echo
> >   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
> > - sed
> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >  ) > odp-in.txt
> >  AT_CAPTURE_FILE([odp-in.txt])
> >  
> > @@ -186,13 +184,11 @@ sed -n 's/,frag=no),.*/,frag=later)/p' odp-base.txt
> >  
> >   echo
> >   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
> > - sed
> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >  
> >   echo
> >   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
> > - sed
> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >  ) > odp.txt
> >  AT_CAPTURE_FILE([odp.txt])
> >  AT_CHECK_UNQUOTED([ovstest test-odp parse-wc-keys < odp.txt], [0], [`cat odp.txt`
> 
> I see the following error on a RHEL7 system:
> 
>    485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:107)
> 
> Let me know if you want a zip of the testsuite directory.  I can make it
> available.

I'm getting nearly the same error here on OpenBSD 6.4:

485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:108)

But before digging into the meat of the test itself, can you try running that
test without my patch?  When I invoke sed(1) without arguments on RHEL7.6 it
exits with status 4 and prints a usage statement, which makes me think that
the test is failing/broken without this patch.  (The fact that the test hangs
here with OpenBSD's sed seems to be a historical difference in behavior between
the two implementations.)

-Scott
Aaron Conole Nov. 29, 2018, 6:15 p.m. UTC | #3
Scott Cheloha <scottcheloha@gmail.com> writes:

> On Thu, Nov 29, 2018 at 11:11:31AM -0500, Aaron Conole wrote:
>> Hi Scott,
>> 
>> Scott Cheloha <scottcheloha@gmail.com> writes:
>> 
>> > The arguments to sed(1) need to be on the same line in the shell
>> > script or it will just sit there awaiting input.
>> >
>> > Signed-off-by: Scott Cheloha <scottcheloha@gmail.com>
>> > ---
>> >
>> > This is my first submission so I'm not sure if I'm doing this correctly.
>> >
>> >  tests/odp.at | 12 ++++--------
>> >  1 file changed, 4 insertions(+), 8 deletions(-)
>> >
>> > diff --git a/tests/odp.at b/tests/odp.at
>> > index 1cff727ae..05dc76dbf 100644
>> > --- a/tests/odp.at
>> > +++ b/tests/odp.at
>> > @@ -83,13 +83,11 @@ sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt | s
>> >  
>> >   echo
>> >   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
>> > - sed
>> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> >  
>> >   echo
>> >   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
>> > - sed
>> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> >  ) > odp-in.txt
>> >  AT_CAPTURE_FILE([odp-in.txt])
>> >  
>> > @@ -186,13 +184,11 @@ sed -n 's/,frag=no),.*/,frag=later)/p' odp-base.txt
>> >  
>> >   echo
>> >   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
>> > - sed
>> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> >  
>> >   echo
>> >   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
>> > - sed
>> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> >  ) > odp.txt
>> >  AT_CAPTURE_FILE([odp.txt])
>> >  AT_CHECK_UNQUOTED([ovstest test-odp parse-wc-keys < odp.txt], [0], [`cat odp.txt`
>> 
>> I see the following error on a RHEL7 system:
>> 
>>    485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:107)
>> 
>> Let me know if you want a zip of the testsuite directory.  I can make it
>> available.
>
> I'm getting nearly the same error here on OpenBSD 6.4:
>
> 485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:108)
>
> But before digging into the meat of the test itself, can you try running that
> test without my patch?  When I invoke sed(1) without arguments on RHEL7.6 it
> exits with status 4 and prints a usage statement, which makes me think that
> the test is failing/broken without this patch.  (The fact that the test hangs
> here with OpenBSD's sed seems to be a historical difference in behavior between
> the two implementations.)

I looked at the last few builds on the build server, and this series is
the only one that fails this test suite.

Thanks!

> -Scott
Aaron Conole Dec. 3, 2018, 10:13 p.m. UTC | #4
Whoops, looks like you dropped the list.  No problem.  I've re-added it.

Scott Cheloha <scottcheloha@gmail.com> writes:

> On Thu, Nov 29, 2018 at 01:15:24PM -0500, Aaron Conole wrote:
>> Scott Cheloha <scottcheloha@gmail.com> writes:
>> 
>> > On Thu, Nov 29, 2018 at 11:11:31AM -0500, Aaron Conole wrote:
>> >> Hi Scott,
>> >> 
>> >> Scott Cheloha <scottcheloha@gmail.com> writes:
>> >> 
>> >> > The arguments to sed(1) need to be on the same line in the shell
>> >> > script or it will just sit there awaiting input.
>> >> >
>> >> > Signed-off-by: Scott Cheloha <scottcheloha@gmail.com>
>> >> > ---
>> >> >
>> >> > This is my first submission so I'm not sure if I'm doing this correctly.
>> >> >
>> >> >  tests/odp.at | 12 ++++--------
>> >> >  1 file changed, 4 insertions(+), 8 deletions(-)
>> >> >
>> >> > diff --git a/tests/odp.at b/tests/odp.at
>> >> > index 1cff727ae..05dc76dbf 100644
>> >> > --- a/tests/odp.at
>> >> > +++ b/tests/odp.at
>> >> > @@ -83,13 +83,11 @@ sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt | s
>> >> >  
>> >> >   echo
>> >> >   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
>> >> > - sed
>> >> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> >> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> >> >  
>> >> >   echo
>> >> >   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
>> >> > - sed
>> >> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> >> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> >> >  ) > odp-in.txt
>> >> >  AT_CAPTURE_FILE([odp-in.txt])
>> >> >  
>> >> > @@ -186,13 +184,11 @@ sed -n 's/,frag=no),.*/,frag=later)/p' odp-base.txt
>> >> >  
>> >> >   echo
>> >> >   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
>> >> > - sed
>> >> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> >> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> >> >  
>> >> >   echo
>> >> >   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
>> >> > - sed
>> >> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> >> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>> >> >  ) > odp.txt
>> >> >  AT_CAPTURE_FILE([odp.txt])
>> >> >  AT_CHECK_UNQUOTED([ovstest test-odp parse-wc-keys < odp.txt], [0], [`cat odp.txt`
>> >> 
>> >> I see the following error on a RHEL7 system:
>> >> 
>> >>    485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:107)
>> >> 
>> >> Let me know if you want a zip of the testsuite directory.  I can make it
>> >> available.
>> >
>> > I'm getting nearly the same error here on OpenBSD 6.4:
>> >
>> > 485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:108)
>> >
>> > But before digging into the meat of the test itself, can you try running that
>> > test without my patch?  When I invoke sed(1) without arguments on RHEL7.6 it
>> > exits with status 4 and prints a usage statement, which makes me think that
>> > the test is failing/broken without this patch.  (The fact that the test hangs
>> > here with OpenBSD's sed seems to be a historical difference in behavior between
>> > the two implementations.)
>> 
>> I looked at the last few builds on the build server, and this series is
>> the only one that fails this test suite.
>> 
>> Thanks!
>
> Sure thing.
>
> So, uh, what do I need to do next?

Can you reproduce this error locally?  Meaning, if you run a 'make
distcheck' do you see it?  Can you try on CentOS7 or using a RHEL7
Developer license install?  Maybe Ubuntu?  I can schedule the job again
on the server and see if it was just a transient failure.

> Or, rather, what happens next?

I guess, more testing :)

> -Scott
Ilya Maximets Dec. 7, 2018, 3:15 p.m. UTC | #5
> Whoops, looks like you dropped the list.  No problem.  I've re-added it.
> 
> Scott Cheloha <scottcheloha at gmail.com> writes:
> 
>> On Thu, Nov 29, 2018 at 01:15:24PM -0500, Aaron Conole wrote:
>>> Scott Cheloha <scottcheloha at gmail.com> writes:
>>> 
>>> > On Thu, Nov 29, 2018 at 11:11:31AM -0500, Aaron Conole wrote:
>>> >> Hi Scott,
>>> >> 
>>> >> Scott Cheloha <scottcheloha at gmail.com> writes:
>>> >> 
>>> >> > The arguments to sed(1) need to be on the same line in the shell
>>> >> > script or it will just sit there awaiting input.
>>> >> >
>>> >> > Signed-off-by: Scott Cheloha <scottcheloha at gmail.com>
>>> >> > ---
>>> >> >
>>> >> > This is my first submission so I'm not sure if I'm doing this correctly.
>>> >> >
>>> >> >  tests/odp.at | 12 ++++--------
>>> >> >  1 file changed, 4 insertions(+), 8 deletions(-)
>>> >> >
>>> >> > diff --git a/tests/odp.at b/tests/odp.at
>>> >> > index 1cff727ae..05dc76dbf 100644
>>> >> > --- a/tests/odp.at
>>> >> > +++ b/tests/odp.at
>>> >> > @@ -83,13 +83,11 @@ sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt | s
>>> >> >  
>>> >> >   echo
>>> >> >   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
>>> >> > - sed
>>> >> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>> >> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>> >> >  
>>> >> >   echo
>>> >> >   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
>>> >> > - sed
>>> >> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>> >> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>> >> >  ) > odp-in.txt
>>> >> >  AT_CAPTURE_FILE([odp-in.txt])
>>> >> >  
>>> >> > @@ -186,13 +184,11 @@ sed -n 's/,frag=no),.*/,frag=later)/p' odp-base.txt
>>> >> >  
>>> >> >   echo
>>> >> >   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
>>> >> > - sed
>>> >> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>> >> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>> >> >  
>>> >> >   echo
>>> >> >   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
>>> >> > - sed
>>> >> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>> >> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>> >> >  ) > odp.txt
>>> >> >  AT_CAPTURE_FILE([odp.txt])
>>> >> >  AT_CHECK_UNQUOTED([ovstest test-odp parse-wc-keys < odp.txt], [0], [`cat odp.txt`
>>> >> 
>>> >> I see the following error on a RHEL7 system:
>>> >> 
>>> >>    485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:107)
>>> >> 
>>> >> Let me know if you want a zip of the testsuite directory.  I can make it
>>> >> available.
>>> >
>>> > I'm getting nearly the same error here on OpenBSD 6.4:
>>> >
>>> > 485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:108)
>>> >
>>> > But before digging into the meat of the test itself, can you try running that
>>> > test without my patch?  When I invoke sed(1) without arguments on RHEL7.6 it
>>> > exits with status 4 and prints a usage statement, which makes me think that
>>> > the test is failing/broken without this patch.  (The fact that the test hangs
>>> > here with OpenBSD's sed seems to be a historical difference in behavior between
>>> > the two implementations.)
>>> 
>>> I looked at the last few builds on the build server, and this series is
>>> the only one that fails this test suite.
>>> 
>>> Thanks!
>>
>> Sure thing.
>>
>> So, uh, what do I need to do next?
> 
> Can you reproduce this error locally?  Meaning, if you run a 'make
> distcheck' do you see it?  Can you try on CentOS7 or using a RHEL7
> Developer license install?  Maybe Ubuntu?  I can schedule the job again
> on the server and see if it was just a transient failure.

The test fails just because it is wrong, syntactically.
You need to replace 'dir=0x1' with 'dir=1'. After that it works on my Ubuntu
at least. But the test itself is still broken because it doesn't work on BSD.
It constantly fails on my FreeBSD setup. My best guess is that because of
difference between 'sed's, i.e. BSD sed does not understand commands that
intended to strip out connection tracking fields. I'm not a sed expert, so
I have no quick solution how to fix it.

Without the patch testsuite hangs on FreeBSD, with patch it just fails these tests.
So, maybe it's worth to apply the patch (with fixed 'dir' format) anyway and start
thinking how to make it work with BSD sed.

> 
>> Or, rather, what happens next?
> 
> I guess, more testing :)
> 
>> -Scott
Ben Pfaff Dec. 10, 2018, 5:25 p.m. UTC | #6
On Fri, Dec 07, 2018 at 06:15:29PM +0300, Ilya Maximets wrote:
> > Whoops, looks like you dropped the list.  No problem.  I've re-added it.
> > 
> > Scott Cheloha <scottcheloha at gmail.com> writes:
> > 
> >> On Thu, Nov 29, 2018 at 01:15:24PM -0500, Aaron Conole wrote:
> >>> Scott Cheloha <scottcheloha at gmail.com> writes:
> >>> 
> >>> > On Thu, Nov 29, 2018 at 11:11:31AM -0500, Aaron Conole wrote:
> >>> >> Hi Scott,
> >>> >> 
> >>> >> Scott Cheloha <scottcheloha at gmail.com> writes:
> >>> >> 
> >>> >> > The arguments to sed(1) need to be on the same line in the shell
> >>> >> > script or it will just sit there awaiting input.
> >>> >> >
> >>> >> > Signed-off-by: Scott Cheloha <scottcheloha at gmail.com>
> >>> >> > ---
> >>> >> >
> >>> >> > This is my first submission so I'm not sure if I'm doing this correctly.
> >>> >> >
> >>> >> >  tests/odp.at | 12 ++++--------
> >>> >> >  1 file changed, 4 insertions(+), 8 deletions(-)
> >>> >> >
> >>> >> > diff --git a/tests/odp.at b/tests/odp.at
> >>> >> > index 1cff727ae..05dc76dbf 100644
> >>> >> > --- a/tests/odp.at
> >>> >> > +++ b/tests/odp.at
> >>> >> > @@ -83,13 +83,11 @@ sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt | s
> >>> >> >  
> >>> >> >   echo
> >>> >> >   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
> >>> >> > - sed
> >>> >> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>> >> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>> >> >  
> >>> >> >   echo
> >>> >> >   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
> >>> >> > - sed
> >>> >> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>> >> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>> >> >  ) > odp-in.txt
> >>> >> >  AT_CAPTURE_FILE([odp-in.txt])
> >>> >> >  
> >>> >> > @@ -186,13 +184,11 @@ sed -n 's/,frag=no),.*/,frag=later)/p' odp-base.txt
> >>> >> >  
> >>> >> >   echo
> >>> >> >   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
> >>> >> > - sed
> >>> >> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>> >> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>> >> >  
> >>> >> >   echo
> >>> >> >   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
> >>> >> > - sed
> >>> >> > - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>> >> > + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>> >> >  ) > odp.txt
> >>> >> >  AT_CAPTURE_FILE([odp.txt])
> >>> >> >  AT_CHECK_UNQUOTED([ovstest test-odp parse-wc-keys < odp.txt], [0], [`cat odp.txt`
> >>> >> 
> >>> >> I see the following error on a RHEL7 system:
> >>> >> 
> >>> >>    485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:107)
> >>> >> 
> >>> >> Let me know if you want a zip of the testsuite directory.  I can make it
> >>> >> available.
> >>> >
> >>> > I'm getting nearly the same error here on OpenBSD 6.4:
> >>> >
> >>> > 485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:108)
> >>> >
> >>> > But before digging into the meat of the test itself, can you try running that
> >>> > test without my patch?  When I invoke sed(1) without arguments on RHEL7.6 it
> >>> > exits with status 4 and prints a usage statement, which makes me think that
> >>> > the test is failing/broken without this patch.  (The fact that the test hangs
> >>> > here with OpenBSD's sed seems to be a historical difference in behavior between
> >>> > the two implementations.)
> >>> 
> >>> I looked at the last few builds on the build server, and this series is
> >>> the only one that fails this test suite.
> >>> 
> >>> Thanks!
> >>
> >> Sure thing.
> >>
> >> So, uh, what do I need to do next?
> > 
> > Can you reproduce this error locally?  Meaning, if you run a 'make
> > distcheck' do you see it?  Can you try on CentOS7 or using a RHEL7
> > Developer license install?  Maybe Ubuntu?  I can schedule the job again
> > on the server and see if it was just a transient failure.
> 
> The test fails just because it is wrong, syntactically.
> You need to replace 'dir=0x1' with 'dir=1'. After that it works on my Ubuntu
> at least. But the test itself is still broken because it doesn't work on BSD.
> It constantly fails on my FreeBSD setup. My best guess is that because of
> difference between 'sed's, i.e. BSD sed does not understand commands that
> intended to strip out connection tracking fields. I'm not a sed expert, so
> I have no quick solution how to fix it.
> 
> Without the patch testsuite hangs on FreeBSD, with patch it just fails these tests.
> So, maybe it's worth to apply the patch (with fixed 'dir' format) anyway and start
> thinking how to make it work with BSD sed.

Seems reasonable.  I folded in the "dir" fix and applied this to master.
Ilya Maximets Dec. 10, 2018, 5:34 p.m. UTC | #7
On 10.12.2018 20:25, Ben Pfaff wrote:
> On Fri, Dec 07, 2018 at 06:15:29PM +0300, Ilya Maximets wrote:
>>> Whoops, looks like you dropped the list.  No problem.  I've re-added it.
>>>
>>> Scott Cheloha <scottcheloha at gmail.com> writes:
>>>
>>>> On Thu, Nov 29, 2018 at 01:15:24PM -0500, Aaron Conole wrote:
>>>>> Scott Cheloha <scottcheloha at gmail.com> writes:
>>>>>
>>>>>> On Thu, Nov 29, 2018 at 11:11:31AM -0500, Aaron Conole wrote:
>>>>>>> Hi Scott,
>>>>>>>
>>>>>>> Scott Cheloha <scottcheloha at gmail.com> writes:
>>>>>>>
>>>>>>>> The arguments to sed(1) need to be on the same line in the shell
>>>>>>>> script or it will just sit there awaiting input.
>>>>>>>>
>>>>>>>> Signed-off-by: Scott Cheloha <scottcheloha at gmail.com>
>>>>>>>> ---
>>>>>>>>
>>>>>>>> This is my first submission so I'm not sure if I'm doing this correctly.
>>>>>>>>
>>>>>>>>  tests/odp.at | 12 ++++--------
>>>>>>>>  1 file changed, 4 insertions(+), 8 deletions(-)
>>>>>>>>
>>>>>>>> diff --git a/tests/odp.at b/tests/odp.at
>>>>>>>> index 1cff727ae..05dc76dbf 100644
>>>>>>>> --- a/tests/odp.at
>>>>>>>> +++ b/tests/odp.at
>>>>>>>> @@ -83,13 +83,11 @@ sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt | s
>>>>>>>>  
>>>>>>>>   echo
>>>>>>>>   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
>>>>>>>> - sed
>>>>>>>> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>>  
>>>>>>>>   echo
>>>>>>>>   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
>>>>>>>> - sed
>>>>>>>> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>>  ) > odp-in.txt
>>>>>>>>  AT_CAPTURE_FILE([odp-in.txt])
>>>>>>>>  
>>>>>>>> @@ -186,13 +184,11 @@ sed -n 's/,frag=no),.*/,frag=later)/p' odp-base.txt
>>>>>>>>  
>>>>>>>>   echo
>>>>>>>>   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
>>>>>>>> - sed
>>>>>>>> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>>  
>>>>>>>>   echo
>>>>>>>>   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
>>>>>>>> - sed
>>>>>>>> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>>  ) > odp.txt
>>>>>>>>  AT_CAPTURE_FILE([odp.txt])
>>>>>>>>  AT_CHECK_UNQUOTED([ovstest test-odp parse-wc-keys < odp.txt], [0], [`cat odp.txt`
>>>>>>>
>>>>>>> I see the following error on a RHEL7 system:
>>>>>>>
>>>>>>>    485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:107)
>>>>>>>
>>>>>>> Let me know if you want a zip of the testsuite directory.  I can make it
>>>>>>> available.
>>>>>>
>>>>>> I'm getting nearly the same error here on OpenBSD 6.4:
>>>>>>
>>>>>> 485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:108)
>>>>>>
>>>>>> But before digging into the meat of the test itself, can you try running that
>>>>>> test without my patch?  When I invoke sed(1) without arguments on RHEL7.6 it
>>>>>> exits with status 4 and prints a usage statement, which makes me think that
>>>>>> the test is failing/broken without this patch.  (The fact that the test hangs
>>>>>> here with OpenBSD's sed seems to be a historical difference in behavior between
>>>>>> the two implementations.)
>>>>>
>>>>> I looked at the last few builds on the build server, and this series is
>>>>> the only one that fails this test suite.
>>>>>
>>>>> Thanks!
>>>>
>>>> Sure thing.
>>>>
>>>> So, uh, what do I need to do next?
>>>
>>> Can you reproduce this error locally?  Meaning, if you run a 'make
>>> distcheck' do you see it?  Can you try on CentOS7 or using a RHEL7
>>> Developer license install?  Maybe Ubuntu?  I can schedule the job again
>>> on the server and see if it was just a transient failure.
>>
>> The test fails just because it is wrong, syntactically.
>> You need to replace 'dir=0x1' with 'dir=1'. After that it works on my Ubuntu
>> at least. But the test itself is still broken because it doesn't work on BSD.
>> It constantly fails on my FreeBSD setup. My best guess is that because of
>> difference between 'sed's, i.e. BSD sed does not understand commands that
>> intended to strip out connection tracking fields. I'm not a sed expert, so
>> I have no quick solution how to fix it.
>>
>> Without the patch testsuite hangs on FreeBSD, with patch it just fails these tests.
>> So, maybe it's worth to apply the patch (with fixed 'dir' format) anyway and start
>> thinking how to make it work with BSD sed.
> 
> Seems reasonable.  I folded in the "dir" fix and applied this to master.

Looks like you fixed it only in one of two places. 

> 
>
Ben Pfaff Dec. 10, 2018, 5:45 p.m. UTC | #8
On Mon, Dec 10, 2018 at 08:34:32PM +0300, Ilya Maximets wrote:
> On 10.12.2018 20:25, Ben Pfaff wrote:
> > On Fri, Dec 07, 2018 at 06:15:29PM +0300, Ilya Maximets wrote:
> >>> Whoops, looks like you dropped the list.  No problem.  I've re-added it.
> >>>
> >>> Scott Cheloha <scottcheloha at gmail.com> writes:
> >>>
> >>>> On Thu, Nov 29, 2018 at 01:15:24PM -0500, Aaron Conole wrote:
> >>>>> Scott Cheloha <scottcheloha at gmail.com> writes:
> >>>>>
> >>>>>> On Thu, Nov 29, 2018 at 11:11:31AM -0500, Aaron Conole wrote:
> >>>>>>> Hi Scott,
> >>>>>>>
> >>>>>>> Scott Cheloha <scottcheloha at gmail.com> writes:
> >>>>>>>
> >>>>>>>> The arguments to sed(1) need to be on the same line in the shell
> >>>>>>>> script or it will just sit there awaiting input.
> >>>>>>>>
> >>>>>>>> Signed-off-by: Scott Cheloha <scottcheloha at gmail.com>
> >>>>>>>> ---
> >>>>>>>>
> >>>>>>>> This is my first submission so I'm not sure if I'm doing this correctly.
> >>>>>>>>
> >>>>>>>>  tests/odp.at | 12 ++++--------
> >>>>>>>>  1 file changed, 4 insertions(+), 8 deletions(-)
> >>>>>>>>
> >>>>>>>> diff --git a/tests/odp.at b/tests/odp.at
> >>>>>>>> index 1cff727ae..05dc76dbf 100644
> >>>>>>>> --- a/tests/odp.at
> >>>>>>>> +++ b/tests/odp.at
> >>>>>>>> @@ -83,13 +83,11 @@ sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt | s
> >>>>>>>>  
> >>>>>>>>   echo
> >>>>>>>>   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
> >>>>>>>> - sed
> >>>>>>>> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>>>>>>> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>>>>>>>  
> >>>>>>>>   echo
> >>>>>>>>   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
> >>>>>>>> - sed
> >>>>>>>> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>>>>>>> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>>>>>>>  ) > odp-in.txt
> >>>>>>>>  AT_CAPTURE_FILE([odp-in.txt])
> >>>>>>>>  
> >>>>>>>> @@ -186,13 +184,11 @@ sed -n 's/,frag=no),.*/,frag=later)/p' odp-base.txt
> >>>>>>>>  
> >>>>>>>>   echo
> >>>>>>>>   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
> >>>>>>>> - sed
> >>>>>>>> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>>>>>>> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>>>>>>>  
> >>>>>>>>   echo
> >>>>>>>>   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
> >>>>>>>> - sed
> >>>>>>>> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>>>>>>> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
> >>>>>>>>  ) > odp.txt
> >>>>>>>>  AT_CAPTURE_FILE([odp.txt])
> >>>>>>>>  AT_CHECK_UNQUOTED([ovstest test-odp parse-wc-keys < odp.txt], [0], [`cat odp.txt`
> >>>>>>>
> >>>>>>> I see the following error on a RHEL7 system:
> >>>>>>>
> >>>>>>>    485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:107)
> >>>>>>>
> >>>>>>> Let me know if you want a zip of the testsuite directory.  I can make it
> >>>>>>> available.
> >>>>>>
> >>>>>> I'm getting nearly the same error here on OpenBSD 6.4:
> >>>>>>
> >>>>>> 485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:108)
> >>>>>>
> >>>>>> But before digging into the meat of the test itself, can you try running that
> >>>>>> test without my patch?  When I invoke sed(1) without arguments on RHEL7.6 it
> >>>>>> exits with status 4 and prints a usage statement, which makes me think that
> >>>>>> the test is failing/broken without this patch.  (The fact that the test hangs
> >>>>>> here with OpenBSD's sed seems to be a historical difference in behavior between
> >>>>>> the two implementations.)
> >>>>>
> >>>>> I looked at the last few builds on the build server, and this series is
> >>>>> the only one that fails this test suite.
> >>>>>
> >>>>> Thanks!
> >>>>
> >>>> Sure thing.
> >>>>
> >>>> So, uh, what do I need to do next?
> >>>
> >>> Can you reproduce this error locally?  Meaning, if you run a 'make
> >>> distcheck' do you see it?  Can you try on CentOS7 or using a RHEL7
> >>> Developer license install?  Maybe Ubuntu?  I can schedule the job again
> >>> on the server and see if it was just a transient failure.
> >>
> >> The test fails just because it is wrong, syntactically.
> >> You need to replace 'dir=0x1' with 'dir=1'. After that it works on my Ubuntu
> >> at least. But the test itself is still broken because it doesn't work on BSD.
> >> It constantly fails on my FreeBSD setup. My best guess is that because of
> >> difference between 'sed's, i.e. BSD sed does not understand commands that
> >> intended to strip out connection tracking fields. I'm not a sed expert, so
> >> I have no quick solution how to fix it.
> >>
> >> Without the patch testsuite hangs on FreeBSD, with patch it just fails these tests.
> >> So, maybe it's worth to apply the patch (with fixed 'dir' format) anyway and start
> >> thinking how to make it work with BSD sed.
> > 
> > Seems reasonable.  I folded in the "dir" fix and applied this to master.
> 
> Looks like you fixed it only in one of two places. 

Oops, I sent a fix for the other one, will you ack it?

Thanks,

Ben.
Ilya Maximets Dec. 11, 2018, 8:17 a.m. UTC | #9
On 10.12.2018 20:45, Ben Pfaff wrote:
> On Mon, Dec 10, 2018 at 08:34:32PM +0300, Ilya Maximets wrote:
>> On 10.12.2018 20:25, Ben Pfaff wrote:
>>> On Fri, Dec 07, 2018 at 06:15:29PM +0300, Ilya Maximets wrote:
>>>>> Whoops, looks like you dropped the list.  No problem.  I've re-added it.
>>>>>
>>>>> Scott Cheloha <scottcheloha at gmail.com> writes:
>>>>>
>>>>>> On Thu, Nov 29, 2018 at 01:15:24PM -0500, Aaron Conole wrote:
>>>>>>> Scott Cheloha <scottcheloha at gmail.com> writes:
>>>>>>>
>>>>>>>> On Thu, Nov 29, 2018 at 11:11:31AM -0500, Aaron Conole wrote:
>>>>>>>>> Hi Scott,
>>>>>>>>>
>>>>>>>>> Scott Cheloha <scottcheloha at gmail.com> writes:
>>>>>>>>>
>>>>>>>>>> The arguments to sed(1) need to be on the same line in the shell
>>>>>>>>>> script or it will just sit there awaiting input.
>>>>>>>>>>
>>>>>>>>>> Signed-off-by: Scott Cheloha <scottcheloha at gmail.com>
>>>>>>>>>> ---
>>>>>>>>>>
>>>>>>>>>> This is my first submission so I'm not sure if I'm doing this correctly.
>>>>>>>>>>
>>>>>>>>>>  tests/odp.at | 12 ++++--------
>>>>>>>>>>  1 file changed, 4 insertions(+), 8 deletions(-)
>>>>>>>>>>
>>>>>>>>>> diff --git a/tests/odp.at b/tests/odp.at
>>>>>>>>>> index 1cff727ae..05dc76dbf 100644
>>>>>>>>>> --- a/tests/odp.at
>>>>>>>>>> +++ b/tests/odp.at
>>>>>>>>>> @@ -83,13 +83,11 @@ sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt | s
>>>>>>>>>>  
>>>>>>>>>>   echo
>>>>>>>>>>   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
>>>>>>>>>> - sed
>>>>>>>>>> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>>>> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>>>>  
>>>>>>>>>>   echo
>>>>>>>>>>   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
>>>>>>>>>> - sed
>>>>>>>>>> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>>>> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>>>>  ) > odp-in.txt
>>>>>>>>>>  AT_CAPTURE_FILE([odp-in.txt])
>>>>>>>>>>  
>>>>>>>>>> @@ -186,13 +184,11 @@ sed -n 's/,frag=no),.*/,frag=later)/p' odp-base.txt
>>>>>>>>>>  
>>>>>>>>>>   echo
>>>>>>>>>>   echo '# Valid forms with tunnel and ERSPAN v1 headers.'
>>>>>>>>>> - sed
>>>>>>>>>> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>>>> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>>>>  
>>>>>>>>>>   echo
>>>>>>>>>>   echo '# Valid forms with tunnel and ERSPAN v2 headers.'
>>>>>>>>>> - sed
>>>>>>>>>> - 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>>>> + sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
>>>>>>>>>>  ) > odp.txt
>>>>>>>>>>  AT_CAPTURE_FILE([odp.txt])
>>>>>>>>>>  AT_CHECK_UNQUOTED([ovstest test-odp parse-wc-keys < odp.txt], [0], [`cat odp.txt`
>>>>>>>>>
>>>>>>>>> I see the following error on a RHEL7 system:
>>>>>>>>>
>>>>>>>>>    485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:107)
>>>>>>>>>
>>>>>>>>> Let me know if you want a zip of the testsuite directory.  I can make it
>>>>>>>>> available.
>>>>>>>>
>>>>>>>> I'm getting nearly the same error here on OpenBSD 6.4:
>>>>>>>>
>>>>>>>> 485: OVS datapath key parsing and formatting - valid forms FAILED (odp.at:108)
>>>>>>>>
>>>>>>>> But before digging into the meat of the test itself, can you try running that
>>>>>>>> test without my patch?  When I invoke sed(1) without arguments on RHEL7.6 it
>>>>>>>> exits with status 4 and prints a usage statement, which makes me think that
>>>>>>>> the test is failing/broken without this patch.  (The fact that the test hangs
>>>>>>>> here with OpenBSD's sed seems to be a historical difference in behavior between
>>>>>>>> the two implementations.)
>>>>>>>
>>>>>>> I looked at the last few builds on the build server, and this series is
>>>>>>> the only one that fails this test suite.
>>>>>>>
>>>>>>> Thanks!
>>>>>>
>>>>>> Sure thing.
>>>>>>
>>>>>> So, uh, what do I need to do next?
>>>>>
>>>>> Can you reproduce this error locally?  Meaning, if you run a 'make
>>>>> distcheck' do you see it?  Can you try on CentOS7 or using a RHEL7
>>>>> Developer license install?  Maybe Ubuntu?  I can schedule the job again
>>>>> on the server and see if it was just a transient failure.
>>>>
>>>> The test fails just because it is wrong, syntactically.
>>>> You need to replace 'dir=0x1' with 'dir=1'. After that it works on my Ubuntu
>>>> at least. But the test itself is still broken because it doesn't work on BSD.
>>>> It constantly fails on my FreeBSD setup. My best guess is that because of
>>>> difference between 'sed's, i.e. BSD sed does not understand commands that
>>>> intended to strip out connection tracking fields. I'm not a sed expert, so
>>>> I have no quick solution how to fix it.
>>>>
>>>> Without the patch testsuite hangs on FreeBSD, with patch it just fails these tests.
>>>> So, maybe it's worth to apply the patch (with fixed 'dir' format) anyway and start
>>>> thinking how to make it work with BSD sed.
>>>
>>> Seems reasonable.  I folded in the "dir" fix and applied this to master.
>>
>> Looks like you fixed it only in one of two places. 
> 
> Oops, I sent a fix for the other one, will you ack it?

Sure.
diff mbox series

Patch

diff --git a/tests/odp.at b/tests/odp.at
index 1cff727ae..05dc76dbf 100644
--- a/tests/odp.at
+++ b/tests/odp.at
@@ -83,13 +83,11 @@  sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt | s
 
  echo
  echo '# Valid forms with tunnel and ERSPAN v1 headers.'
- sed
- 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
+ sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1,idx=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
 
  echo
  echo '# Valid forms with tunnel and ERSPAN v2 headers.'
- sed
- 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
+ sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
 ) > odp-in.txt
 AT_CAPTURE_FILE([odp-in.txt])
 
@@ -186,13 +184,11 @@  sed -n 's/,frag=no),.*/,frag=later)/p' odp-base.txt
 
  echo
  echo '# Valid forms with tunnel and ERSPAN v1 headers.'
- sed
- 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
+ sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=1/0,idx=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
 
  echo
  echo '# Valid forms with tunnel and ERSPAN v2 headers.'
- sed
- 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
+ sed 's/^/skb_priority(0),tunnel(tun_id=0xfedcba9876543210,src=10.0.0.1,dst=10.0.0.2,ttl=128,erspan(ver=2,dir=0x1,hwid=0x7/0xf),flags(df|key)),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt
 ) > odp.txt
 AT_CAPTURE_FILE([odp.txt])
 AT_CHECK_UNQUOTED([ovstest test-odp parse-wc-keys < odp.txt], [0], [`cat odp.txt`