[ovs-dev] [PATCH V2 4/4] tests: Fix fail of OVS_APP_EXIT_AND_WAIT on Windows

Lance Richardson lrichard at redhat.com
Fri Jun 3 16:49:54 UTC 2016


----- Original Message -----
> From: "Ben Pfaff" <blp at ovn.org>
> To: "Lance Richardson" <lrichard at redhat.com>
> Cc: "Joe Stringer" <joe at ovn.org>, dev at openvswitch.org, "Paul Boca" <pboca at cloudbasesolutions.com>
> Sent: Friday, June 3, 2016 12:38:56 PM
> Subject: Re: [ovs-dev] [PATCH V2 4/4] tests: Fix fail of OVS_APP_EXIT_AND_WAIT on Windows
> 
> On Fri, Jun 03, 2016 at 12:00:11PM -0400, Lance Richardson wrote:
> > OK, it appears that I was probably a little too focused on the ~250
> > locations where OVS_APP_EXIT_AND_WAIT() is invoked with a daemon
> > name (where the TMPPID stuff works fine) and not enough to the ~8
> > locations where it's invoked with the path of a unixctl socket.
> > 
> > Ben's suggestion to have the Windows-specfic kill() function emulate
> > the kill command's handling of "kill -0" should make this macro
> > behave as it does on other systems, but I'm wondering if it might
> > also be good to create a separate macro for the unixctl case. Ideally
> > there would be a way to derive the pid from the unixctl socket path,
> > but I believe we can't assume the existence of things like fuser or
> > lsof even on Linux or BSD systems. Or maybe this variant could
> > take both the unixctl socket path and pid file path as parameters.
> 
> The "kill -0" change is a tangent.  It solves a particular problem, but
> not the root of this issue.
> 
> It's a mistake to pass a unixctl socket name to OVS_APP_EXIT_AND_WAIT.

Right.

> A new macro is one possible solution.  However, looking at a few of the
> cases where OVS_APP_EXIT_AND_WAIT is being passed a unixctl socket, I'm
> not sure why we couldn't just pass a pidfile instead.  Some of the users
> don't have a pidfile, but why not just add one?
> 

I'm fine with that, the main difference between creating a new macro and
adding a parameter to the existing one is the number of invocation sites
that would need to be modified... 8 or so if a new macro is created and
over 250 if a parameter is added to the existing macro.  It's more work
in the short term to add a parameter, but it does have a cleaner end result.

I'll go ahead and start working a patch set up to add a pidfile parameter
to OVS_APP_EXIT_AND_WAIT.

Thanks,

   Lance



More information about the dev mailing list