[LTP] [PATCH 2/2] Avoid zero or negative int results in calculations

Petr Vorel pvorel@suse.cz
Thu Mar 26 21:32:22 CET 2020


Hi,

> > > Define BUF_SIZE smaller than BLOCKSIZE for possitive offset result

> > Reviewed-by: Petr Vorel <pvorel@suse.cz>

> > BTW it significantly prolongs the run, but IMHO ok.

> Longer testruns should be avoided unless there is a good reason for it.
+1. Although the commit message does not describe what it fixes, it obviously
fixes something. It'd be nice to explain it a bit.

Before:
real	0m0,013s
user	0m0,004s
sys	0m0,009s

After (slowed by second commit, not by the rewrite):
real	0m0,402s
user	0m0,042s
sys	0m0,360s

Looks like the smaller buffer the faster it is.
I haven't tested other Martin's fix reported later.

Kind regards,
Petr


More information about the ltp mailing list