[LTP] [PATCH 2/5] lib/tst_net: calc mean in tst_netload()

Petr Vorel pvorel@suse.cz
Mon Oct 26 07:46:25 CET 2020


Hi Alexey,

...
> >> +	if [ "$run_cnt" -lt 2 ]; then
> > maybe: if [ "$run_cnt" -lt 1 ]; then

> > BTW we should also check all numeric variables (TST_NETLOAD_CLN_REQUESTS, ...)
> > with tst_is_int (but don't bother with it now).

> >> +		run_cnt=1
> >> +		was_failure=1
> > Hm, $was_failure set before loop. Shouldn't it be inside for i in $(seq 1
> > $run_cnt); do loop? And updated on each failure (be a error counter, not boolean)?


> It is set to 1 for the special case, i.e. when run_cnt is 1, in that case
> we should tbrok the test at once. I don't see how the error counter will be
> better?

I'm sorry, I just misinterpret the code, please ignore my comment.


Kind regards,
Petr


More information about the ltp mailing list