t/zbd: Fix I/O bytes rounding errors
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fri, 9 Aug 2019 03:28:36 +0000 (12:28 +0900)
committerJens Axboe <axboe@kernel.dk>
Fri, 9 Aug 2019 03:36:32 +0000 (21:36 -0600)
commit937ec971236d98089b63217635294c788ea00bce
treebb3ca05a58523d940593c74d160c86f9b39522c4
parentc1f6f32ea74316df1e8707eba4fb95ab14fae6f7
t/zbd: Fix I/O bytes rounding errors

When fio reports write bytes or read bytes, it rounds the number with
units MiB or KiB to fit the number within limited number of digits.
This results in rounding errors of the reported bytes and sometimes
causes test failures for test case #17 in test-zbd-support
which reports incorrect total I/O bytes in case both of write bytes
and read bytes are rounded up.

To avoid the rounding error, increase the number of digits from default
value 4 to 10 to keep precision. For example, a number "256MiB" will be
reported as "267911168B" with this change.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/zbd/test-zbd-support