From: Shin'ichiro Kawasaki Date: Fri, 9 Aug 2019 03:28:36 +0000 (+0900) Subject: t/zbd: Fix I/O bytes rounding errors X-Git-Tag: fio-3.16~33 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=937ec971236d98089b63217635294c788ea00bce 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 Signed-off-by: Jens Axboe --- diff --git a/t/zbd/test-zbd-support b/t/zbd/test-zbd-support index 10c78e9a..6fb48ef0 100755 --- a/t/zbd/test-zbd-support +++ b/t/zbd/test-zbd-support @@ -85,7 +85,8 @@ run_fio() { fio=$(dirname "$0")/../../fio - opts=("--aux-path=/tmp" "--allow_file_create=0" "$@") + opts=("--aux-path=/tmp" "--allow_file_create=0" \ + "--significant_figures=10" "$@") { echo; echo "fio ${opts[*]}"; echo; } >>"${logfile}.${test_number}" "${dynamic_analyzer[@]}" "$fio" "${opts[@]}"