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

Petr Vorel pvorel@suse.cz
Tue Nov 13 09:27:24 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?
OK, export -f FUNCNAME is a bashism, we cannot use it.
I'll check whether we can replace sh -c with brackets.
If not, tst_rhost_run() won't be able to use functions (just binaries).


Kind regards,
Petr


More information about the ltp mailing list