Message ID | 20180816163139.16096-1-aserdean@ovn.org |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev,v2] ovn-nbctl test: Add different search string for getopt BSD variant | expand |
On Thu, Aug 16, 2018 at 07:31:39PM +0300, Alin Gabriel Serdean wrote: > 2714. ovn-nbctl.at:1443: testing ovn-nbctl - commands parser error paths > > fails due to: > ovn-nbctl.at:1443: ovn-nbctl --if-exists=foo list Logical_Switch > stderr: > ovn-nbctl: option '--if-exists=foo' requires an argument > ./ovn-nbctl.at:1443: grep 'option .* doesn'\''t allow an argument' stderr > stdout: > ./ovn-nbctl.at:1443: exit code was 1, expected 0 > > This is due to the difference between getopt BSD and GNU variant. > > Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org> > Acked-by: Ben Pfaff <blp@ovn.org> > --- > v2: Change grep to egrep and drop the '\|' as suggested by Ben Acked-by: Ben Pfaff <blp@ovn.org>
> On 16 Aug 2018, at 19:53, Ben Pfaff <blp@ovn.org> wrote: > > On Thu, Aug 16, 2018 at 07:31:39PM +0300, Alin Gabriel Serdean wrote: >> 2714. ovn-nbctl.at:1443: testing ovn-nbctl - commands parser error paths >> >> fails due to: >> ovn-nbctl.at:1443: ovn-nbctl --if-exists=foo list Logical_Switch >> stderr: >> ovn-nbctl: option '--if-exists=foo' requires an argument >> ./ovn-nbctl.at:1443: grep 'option .* doesn'\''t allow an argument' stderr >> stdout: >> ./ovn-nbctl.at:1443: exit code was 1, expected 0 >> >> This is due to the difference between getopt BSD and GNU variant. >> >> Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org> >> Acked-by: Ben Pfaff <blp@ovn.org> >> --- >> v2: Change grep to egrep and drop the '\|' as suggested by Ben > > Acked-by: Ben Pfaff <blp@ovn.org <mailto:blp@ovn.org>> > _______________________________________________ > dev mailing list > dev@openvswitch.org <mailto:dev@openvswitch.org> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev <https://mail.openvswitch.org/mailman/listinfo/ovs-dev> Thanks! Applied on master and branch-2.10
diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at index 725665b76..a599b1bf7 100644 --- a/tests/ovn-nbctl.at +++ b/tests/ovn-nbctl.at @@ -1484,7 +1484,7 @@ AT_CHECK([grep 'missing argument to .* option' stderr], [0], [ignore]) dnl Unexpected option argument AT_CHECK([ovn-nbctl --if-exists=foo list Logical_Switch], [1], [], [stderr]) -AT_CHECK([grep 'option .* doesn'\''t allow an argument' stderr], [0], [ignore]) +AT_CHECK([egrep 'option .* doesn'\''t allow an argument|option .* requires an argument' stderr], [0], [ignore]) AT_CHECK([ovn-nbctl -- --if-exists=foo list Logical_Switch], [1], [], [stderr]) AT_CHECK([grep 'option on .* does not accept an argument' stderr], [0], [ignore])