[ovs-dev] [PATCH] ovn.at: Fix "ovn -- 1 LR with distributed router gateway port" test
Ben Pfaff
blp at ovn.org
Tue May 2 15:09:36 UTC 2017
On Tue, May 02, 2017 at 02:48:00PM +0900, Takashi YAMAMOTO wrote:
> On Tue, May 2, 2017 at 5:21 AM, Ben Pfaff <blp at ovn.org> wrote:
>
> > On Fri, Apr 21, 2017 at 10:32:57AM +0900, YAMAMOTO Takashi wrote:
> > > NetBSD implementation of wc command outputs extra whitespaces
> > > like the following. Tweak the test to success on such environments.
> > >
> > > % echo hoge|wc -l|hexdump -C
> > > 00000000 20 20 20 20 20 20 20 31 0a |
> > 1.|
> > > 00000009
> > > %
> > >
> > > The failing test was introduced by
> > > commit 41a15b71ed1ef35aa612a1128082219fbfc3f327
> > > (ovn: Introduce distributed gateway port and "chassisredirect" port
> > binding)
> > >
> > > Signed-off-by: YAMAMOTO Takashi <yamamoto at ovn.org>
> >
> > Thanks a lot for this fix.
> >
> > This is not the first time we've had trouble with wc, and not the first
> > project where I've had trouble with wc. POSIX standardizes the output
> > format for wc, but neither GNU or BSD honors the standard, and so it's
> > not even that a particular OS is at fault.
> >
> > Anyway, how about the following? I believe that it will fix the problem
> > you're seeing, and it ought to avoid new problems of the same kind in
> > the future. What do you think?
> >
> > Thanks,
> >
> > Ben.
> >
> > --8<--------------------------cut here-------------------------->8--
> >
> > From: Ben Pfaff <blp at ovn.org>
> > Date: Mon, 1 May 2017 13:19:43 -0700
> > Subject: [PATCH] ovs-macros: Add helper to make 'wc' use POSIX compliant
> > output format.
> >
> > Several times, we've had to fix tests that used 'wc' and expected a
> > particular output format. POSIX is specific about the output format, but
> > neither GNU or BSD wc honors it. This commit makes whatever 'wc' is on
> > the system use the POSIX output format.
> >
> > Signed-off-by: Ben Pfaff <blp at ovn.org>
> >
>
> good idea. tested it on netbsd.
> Acked-by: YAMAMOTO Takashi <yamamoto at ovn.org>
Thanks for the review! I applied this to master.
More information about the dev
mailing list