test/bdev: convert fio test to run_test semantics
Change-Id: I842491321a8797cadca973caba499251a91dfa2f Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477491 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
d6379a8833
commit
c4d4abcf64
@ -18,17 +18,6 @@ function bdev_bounds() {
|
|||||||
trap - SIGINT SIGTERM EXIT
|
trap - SIGINT SIGTERM EXIT
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_fio()
|
|
||||||
{
|
|
||||||
if [ $RUN_NIGHTLY -eq 0 ]; then
|
|
||||||
fio_bdev --ioengine=spdk_bdev --iodepth=8 --bs=4k --runtime=10 $testdir/bdev.fio "$@"
|
|
||||||
elif [ $RUN_NIGHTLY_FAILING -eq 1 ]; then
|
|
||||||
# Use size 192KB which both exceeds typical 128KB max NVMe I/O
|
|
||||||
# size and will cross 128KB Intel DC P3700 stripe boundaries.
|
|
||||||
fio_bdev --ioengine=spdk_bdev --iodepth=128 --bs=192k --runtime=100 $testdir/bdev.fio "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function nbd_function_test() {
|
function nbd_function_test() {
|
||||||
if [ $(uname -s) = Linux ] && modprobe -n nbd; then
|
if [ $(uname -s) = Linux ] && modprobe -n nbd; then
|
||||||
local rpc_server=/var/tmp/spdk-nbd.sock
|
local rpc_server=/var/tmp/spdk-nbd.sock
|
||||||
@ -62,6 +51,45 @@ function nbd_function_test() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fio_test_suite() {
|
||||||
|
# Generate the fio config file given the list of all unclaimed bdevs
|
||||||
|
fio_config_gen $testdir/bdev.fio verify AIO
|
||||||
|
for b in $(echo $bdevs | jq -r '.name'); do
|
||||||
|
fio_config_add_job $testdir/bdev.fio $b
|
||||||
|
done
|
||||||
|
|
||||||
|
local fio_params="--ioengine=spdk_bdev --iodepth=8 --bs=4k --runtime=10 $testdir/bdev.fio --spdk_conf=./test/bdev/bdev.conf"
|
||||||
|
local fio_ext_params="--ioengine=spdk_bdev --iodepth=128 --bs=192k --runtime=100 $testdir/bdev.fio --spdk_conf=./test/bdev/bdev.conf"
|
||||||
|
|
||||||
|
if [ $RUN_NIGHTLY -eq 0 ]; then
|
||||||
|
run_test "case" "bdev_fio_rw_verify" fio_bdev $fio_params --spdk_mem=$PRE_RESERVED_MEM \
|
||||||
|
--output=$output_dir/blockdev_fio_verify.txt
|
||||||
|
elif [ $RUN_NIGHTLY_FAILING -eq 1 ]; then
|
||||||
|
# Use size 192KB which both exceeds typical 128KB max NVMe I/O
|
||||||
|
# size and will cross 128KB Intel DC P3700 stripe boundaries.
|
||||||
|
run_test "case" "bdev_fio_rw_verify_ext" fio_bdev $fio_ext_params --spdk_mem=$PRE_RESERVED_MEM \
|
||||||
|
--output=$output_dir/blockdev_fio_verify.txt
|
||||||
|
fi
|
||||||
|
rm -f ./*.state
|
||||||
|
rm -f $testdir/bdev.fio
|
||||||
|
|
||||||
|
# Generate the fio config file given the list of all unclaimed bdevs that support unmap
|
||||||
|
fio_config_gen $testdir/bdev.fio trim
|
||||||
|
for b in $(echo $bdevs | jq -r 'select(.supported_io_types.unmap == true) | .name'); do
|
||||||
|
fio_config_add_job $testdir/bdev.fio $b
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $RUN_NIGHTLY -eq 0 ]; then
|
||||||
|
run_test "case" "bdev_fio_trim" fio_bdev $fio_params --output=$output_dir/blockdev_trim.txt
|
||||||
|
elif [ $RUN_NIGHTLY_FAILING -eq 1 ]; then
|
||||||
|
run_test "case" "bdev_fio_trim_ext" fio_bdev $fio_ext_params --output=$output_dir/blockdev_trim.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f ./*.state
|
||||||
|
rm -f $testdir/bdev.fio
|
||||||
|
report_test_completion "bdev_fio"
|
||||||
|
}
|
||||||
|
|
||||||
function get_io_result() {
|
function get_io_result() {
|
||||||
local limit_type=$1
|
local limit_type=$1
|
||||||
local qos_dev=$2
|
local qos_dev=$2
|
||||||
@ -242,37 +270,8 @@ fi
|
|||||||
|
|
||||||
run_test "case" "bdev_bounds" bdev_bounds
|
run_test "case" "bdev_bounds" bdev_bounds
|
||||||
run_test "case" "bdev_nbd" nbd_function_test $testdir/bdev.conf "$bdevs_name"
|
run_test "case" "bdev_nbd" nbd_function_test $testdir/bdev.conf "$bdevs_name"
|
||||||
|
|
||||||
if [ -d /usr/src/fio ]; then
|
if [ -d /usr/src/fio ]; then
|
||||||
timing_enter fio
|
run_test "suite" "bdev_fio" fio_test_suite
|
||||||
|
|
||||||
timing_enter fio_rw_verify
|
|
||||||
# Generate the fio config file given the list of all unclaimed bdevs
|
|
||||||
fio_config_gen $testdir/bdev.fio verify AIO
|
|
||||||
for b in $(echo $bdevs | jq -r '.name'); do
|
|
||||||
fio_config_add_job $testdir/bdev.fio $b
|
|
||||||
done
|
|
||||||
|
|
||||||
run_fio --spdk_conf=./test/bdev/bdev.conf --spdk_mem=$PRE_RESERVED_MEM --output=$output_dir/blockdev_fio_verify.txt
|
|
||||||
|
|
||||||
rm -f ./*.state
|
|
||||||
rm -f $testdir/bdev.fio
|
|
||||||
timing_exit fio_rw_verify
|
|
||||||
|
|
||||||
timing_enter fio_trim
|
|
||||||
# Generate the fio config file given the list of all unclaimed bdevs that support unmap
|
|
||||||
fio_config_gen $testdir/bdev.fio trim
|
|
||||||
for b in $(echo $bdevs | jq -r 'select(.supported_io_types.unmap == true) | .name'); do
|
|
||||||
fio_config_add_job $testdir/bdev.fio $b
|
|
||||||
done
|
|
||||||
|
|
||||||
run_fio --spdk_conf=./test/bdev/bdev.conf --output=$output_dir/blockdev_trim.txt
|
|
||||||
|
|
||||||
rm -f ./*.state
|
|
||||||
rm -f $testdir/bdev.fio
|
|
||||||
timing_exit fio_trim
|
|
||||||
report_test_completion "bdev_fio"
|
|
||||||
timing_exit fio
|
|
||||||
else
|
else
|
||||||
echo "FIO not available"
|
echo "FIO not available"
|
||||||
exit 1
|
exit 1
|
||||||
@ -289,6 +288,8 @@ run_test "suite" "bdev_qos" qos_test_suite
|
|||||||
# report_test_completion "nightly_bdev_reset"
|
# report_test_completion "nightly_bdev_reset"
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
|
# Bdev and configuration cleanup below this line
|
||||||
|
#-----------------------------------------------------
|
||||||
if grep -q Nvme0 $testdir/bdev.conf; then
|
if grep -q Nvme0 $testdir/bdev.conf; then
|
||||||
part_dev_by_gpt $testdir/bdev.conf Nvme0n1 $rootdir reset
|
part_dev_by_gpt $testdir/bdev.conf Nvme0n1 $rootdir reset
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user