On Wed, 01 Aug 2018 17:00:11 +0300 Ilya Maximets <i.maxim...@samsung.com> wrote:
> Aliases are not inheritable. To add a default options for utils > executed in subshell we may try to catch them here and append > options explicitly. > > There are still few cases with utils invocation in subshell inside > the functions that we can not track this way, but they are not > very frequent. > > Signed-off-by: Ilya Maximets <i.maxim...@samsung.com> > --- > tests/ofproto-macros.at | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at > index 2a56ae6..96219cd 100644 > --- a/tests/ofproto-macros.at > +++ b/tests/ofproto-macros.at > @@ -107,7 +107,17 @@ sim_add () { > # there. > as() { > if test "X$2" != X; then > - (ovs_setenv $1; shift; "$@") > + ( > + ovs_setenv $1; shift; > + cmd=$1; shift; > + for util in $OVS_UTILS_LIST; do > + if test "X$util" == "X$cmd"; then ^^ Tests are started with "/bin/sh" (that is not always bash), so please use "=" instead of "==" since the latter is not portable and it doesn't work on some shells (for example it doesn't work on dash that Debian/Ubuntu uses by default). > + $cmd --timeout=$OVS_TIMEOUT "$@" > + exit "$?" > + fi > + done > + $cmd "$@" > + ) > else > ovs_setenv $1 > fi _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev