[ovs-dev] [PATCH] ovsdb-client.at: Fix ovsdb-client backup test on Win

aserdean at ovn.org aserdean at ovn.org
Thu Mar 8 18:33:20 UTC 2018


It's been a while 😊.

I sent a patch as you suggested: https://patchwork.ozlabs.org/patch/883250/ .
Mind taking a look?

Alin.

> -----Mesaj original-----
> De la: ovs-dev-bounces at openvswitch.org <ovs-dev-
> bounces at openvswitch.org> În numele aserdean at ovn.org
> Trimis: Tuesday, January 23, 2018 11:01 PM
> Către: 'Ben Pfaff' <blp at ovn.org>; 'Alin Gabriel Serdean'
> <aserdean at ovn.org>
> Cc: dev at openvswitch.org
> Subiect: Re: [ovs-dev] [PATCH] ovsdb-client.at: Fix ovsdb-client backup test
> on Win
> 
> (facepalm). Thanks for pointing me to the right direction. I will look into it.
> 
> Thanks,
> Alin.
> 
> > -----Original Message-----
> > From: Ben Pfaff [mailto:blp at ovn.org]
> > Sent: Tuesday, January 23, 2018 2:24 AM
> > To: Alin Gabriel Serdean <aserdean at ovn.org>
> > Cc: dev at openvswitch.org
> > Subject: Re: [ovs-dev] [PATCH] ovsdb-client.at: Fix ovsdb-client
> > backup
> test
> > on Win
> >
> > On Sun, Jan 14, 2018 at 08:26:47PM +0200, Alin Gabriel Serdean wrote:
> > > The test:
> > > 1948. ovsdb-client.at:15: testing ovsdb-client backup and restore
> > > fails on Windows with:
> > > --- /dev/null   2018-01-14 20:09:57 +0200
> > > +++ /c/_2018/january/14/ovs/tests/testsuite.dir/at-groups/1948/stder
> > > +++ r
> > > @@ -0,0 +1,3 @@
> > > +ovsdb-server: ovsdb error: backup: unexpected file format
> > > +ovsdb-server: Failed to read from child (The pipe has been ended.
> > > +)
> > > ./ovsdb-client.at:111: exit code was 1, expected 0
> > >
> > > The root cause is that when redirecting output defaults to the
> > > Windows line
> > > endings(CRLF):
> > > $ file db
> > > db: ASCII text, with very long lines $ file backup
> > > backup: ASCII text, with very long lines, with CRLF line terminators
> > >
> > > Add a `dos2unix` command to convert to the line endings expected by
> > > ovsdb-server.
> > >
> > > Signed-off-by: Alin Gabriel Serdean <aserdean at ovn.org>
> >
> > Thank you for the fix.
> >
> > Hmm, maybe this is a bug in "ovsdb-client backup".  Maybe it should do
> > something like:
> >
> > #ifdef _WIN32
> >         fflush(stdout);
> >         _setmode(STDOUT_FILENO, _O_BINARY); #endif
> >
> > and then the test wouldn't have to change at all?  What do you think?
> >
> > I don't know whether anything similar is needed for stdin for
> "ovsdb-client
> > restore".
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev



More information about the dev mailing list