[ovs-dev] [PATCH] tests: Make compatible with FreeBSD's xargs

Ben Pfaff blp at nicira.com
Tue Jul 31 00:16:14 UTC 2012


On Mon, Jul 30, 2012 at 07:23:48PM -0400, Ed Maste wrote:
> The FreeBSD version of xargs does not run the utility argument on empty
> input, while GNU xargs runs it at least once, even with empty input.  As
> a result on FreeBSD VSCTL_CHECK_FIND returned no output for an empty
> bridge list while on Linux it returned a single blank line.  Add a new
> VSCTL_CHECK_FIND_EMPTY to explicitly match an empty bridge list.
> 
> Signed-off-by: Ed Maste <emaste at freebsd.org>

I think that we could avoid the need for VSCTL_CHECK_FIND_EMPTY by
changing
        | sort | xargs echo
in VSCTL_CHECK_FDIN to
        m4_if([$2], [], [], [| sort | xargs echo])

Does that work?

Thanks,

Ben.



More information about the dev mailing list