test/lvol: Add function for calculating ceiling integers

This is meant to reassemble python's math.ceil() that was used
throughout the test_cases.py in couple of places.

Change-Id: I0d7d13ffd1121b12d58f00fb6ca59d76a237802e
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/933
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Michal Berger 2020-03-31 12:13:25 +02:00 committed by Tomasz Zawadzki
parent e5497fd293
commit 75b782be4f

View File

@ -47,3 +47,7 @@ function run_fio_test() {
fio_template="fio --name=fio_test --filename=$file --offset=$offset --size=$size --rw=$rw --direct=1 $extra_params $pattern_template" fio_template="fio --name=fio_test --filename=$file --offset=$offset --size=$size --rw=$rw --direct=1 $extra_params $pattern_template"
$fio_template $fio_template
} }
function calc() {
bc -l <<< "define ceil(x) { scale=0; return(x + (x % 1 > 0))/1 } $1"
}