Hi Tim, Petr, On Wed, Dec 15, 2021 at 2:54 AM Petr Vorel wrote: > > > Would it be useful to add a bit of code to tst_test.sh to handle > > floating point? The shell construct of '$((timeout * LTP_TIMEOUT_MUL))' > > can't handle floating point, but floating point could be done pretty > easily > > with a callout to awk or bc. > > > I'm willing to look at this and submit a patch. But does the shell > > test system try to avoid dependencies on other utility programs (like > awk or bc)? > > > Maybe rounding timeouts up is preferred behavior anyway, so > > this is not needed. What do you think? > > [ Cc Joerg, Li and Cyril, who were involved in shell timeout ] > We spent quite a lot of time before we end-up with ceiling, I'd have to > search > for the reasons. We also didn't think that it's a big problem to not being > precise on shell. But feel free to improve things. Just, generally we > prefer to > Yeah, I agree with this. To be honest, I personally have no thoughts to make the shell to handle float point, and by now I don't see any person request that, for most situations we just use an round up number to satisfy ourselves. But anyway, I have no objection to improving that. Feel free to submit a patch :). > wrote small C code instead adding new dependencies (bc etc) or trying to > make > shell portable. Actually writing C parser would be few lines of code. > +1 For patch itself: Reviewed-by: Li Wang -- Regards, Li Wang