[LTP] [PATCH v3 1/2] net: Add tst_net_run helper

Petr Vorel pvorel@suse.cz
Mon Nov 12 21:37:23 CET 2018


Hi Alexey,

> > +	[ -n "$safe" ] && ROD $cmd || sh -c "$cmd"
>                                       ^
>                                   just $cmd?
Yes, sh -c does not work for shell functions unless are exported
(tst_test_drivers() in next commit is a shell function).
I somehow overlooked it.

But sh -c is used for all test links in tst_rhost_run(),
I guess we don't want to do export -f FUNCNAME for all functions in tst_net.sh,
do we?

> > +
> > +	cmd="$cmd $rparams $@"
>                ^
> So, now it is "$cmd $lparams $@", we need to store $1 in a separate variable.
Good catch, thx!


Kind regards,
Petr


More information about the ltp mailing list