[LTP] [PATCH v2 6/7] net/test: Add basic testing for tst_rhost_run

Petr Vorel pvorel@suse.cz
Mon Jul 20 13:53:45 CEST 2020


Hi,

> > +	tst_rhost_run -c 'which grep > /dev/null' || \
> > +		tst_res TCONF "grep not found on rhost"
> Hi Petr,

> 1) Do you want to discard stderr as well? For example:
> -------------------------------------------------
> # which gre >/dev/null
> /usr/bin/which: no gre in
> (/opt/ltp/testcases/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin)

That's not needed because tst_rhost_run already redirect stderr to stdout.

> -------------------------------------------------
> 2) Is it necessary to continue if grep command is not found on rhost?
> How about calling tst_brk?
Good catch, I should use tst_brk on both places.

> > +
> > +	tst_rhost_run -c "[ -f $file ]" || \
> > +		tst_res TCONF "$file not found on rhost"
> Call tst_brk as well?

> Thanks,
> Xiao Yang

Thanks!
Petr


More information about the ltp mailing list