[LTP] [PATCH v4 2/5] tst_test.c: Add tst_multiply_timeout()

Petr Vorel pvorel@suse.cz
Mon Oct 21 20:08:55 CEST 2019


Hi,

> On Mon, 2019-10-21 at 16:37 +0200, Cyril Hrubis wrote:
> > Hi!
> > > +	if (timeout_mul == -1) {
> > > +		mul = getenv("LTP_TIMEOUT_MUL");
> > > +		if (mul) {
> > > +			timeout_mul = mul_float = atof(mul);
> > > +			if (timeout_mul != mul_float) {
> > > +				timeout_mul++;
> > > +				tst_res(TINFO, "ceiling
> > > LTP_TIMEOUT_MUL to %d",
> > > +						timeout_mul);
> > > +			}

> > Huh, why are we ceiling the timeout multiplier?
I didn't notice Cyril's comment.
I'm sorry to overlook this. I agree with Cyril to keep float for C.
> Hm, I just understood the discussion about TST_TIMEOUT/LTP_TIMEOUT_MUL
> in that way, that we tried to keep both implementations more or less
> the same.

> So we keep float for LTP_TIMEOUT_MUL in c implementation?
> Maybe a v5 is then needed, pvorel?
Yes please. Can you please document float vs int in LTP_TIMEOUT_MUL
in the last commit.

> thanks
> Clemens


Kind regards,
Petr


More information about the ltp mailing list