[ovs-dev] [PATCH repost 1/3] tests: Run OVS_WAIT_WHILE, OVS_WAIT_UNTIL in main shell environment.

Ben Pfaff blp at ovn.org
Thu Nov 26 21:28:51 UTC 2015


On Wed, Nov 25, 2015 at 04:21:22PM +0900, Simon Horman wrote:
> Hi Ben,
> 
> On Tue, Sep 29, 2015 at 11:17:13AM -0700, Ben Pfaff wrote:
> > AT_CHECK runs its commands in a subshell.  That means that (among other
> > effects), any variable assignments within its commands will disappear after
> > the commands' completion.  That doesn't matter for any of the existing
> > users, which don't do the sorts of things that affect an outer shell
> > environment anyhow, but an upcoming user wants to make a shell assignment
> > that persists.  This commit makes that possible, by using AT_CHECK
> > (actually AT_FAIL_IF but it's moot) only upon failure instead of bracketing
> > the entire test.
> > 
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> 
> From my point of view adding support for side effects isn't particularly
> desirable, however, I'm not sure that I know a way to cleanly handle the
> use-case in the third patch of the series. So I guess its best to give a
> little to get a lot.
> 
> With the above in mind, the entire series:
> 
> Reviewed-by: Simon Horman <simon.horman at netronome.com>

I guess I feel like scoping in a shell environment is more of a surprise
than a feature.

Thanks Simon and Flavio!  I applied these three patches to master.



More information about the dev mailing list