diff --git a/test/common/skipped_tests.txt b/test/common/skipped_tests.txt index 411a31b6b..0d4836aa0 100644 --- a/test/common/skipped_tests.txt +++ b/test/common/skipped_tests.txt @@ -4,6 +4,7 @@ ftl_dirty_shutdown ftl_fio_basic ftl_fio_extended +ftl_fio_nightly ftl_restore_nv_cache ftl_bdevperf ftl_bdevperf_append diff --git a/test/ftl/bdevperf.sh b/test/ftl/bdevperf.sh new file mode 100755 index 000000000..22893a07d --- /dev/null +++ b/test/ftl/bdevperf.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +testdir=$(readlink -f $(dirname $0)) +rootdir=$(readlink -f $testdir/../..) +source $rootdir/test/common/autotest_common.sh +source $testdir/common.sh + +tests=('-q 1 -w randwrite -t 4 -o 69632' '-q 128 -w randwrite -t 4 -o 4096' '-q 128 -w verify -t 4 -o 4096') +device=$1 +cache_device=$2 +use_append=$3 +rpc_py=$rootdir/scripts/rpc.py +timeout=240 + +for ((i = 0; i < ${#tests[@]}; i++)); do + timing_enter "${tests[$i]}" + "$rootdir/test/bdev/bdevperf/bdevperf" -z -T ftl0 ${tests[$i]} & + bdevperf_pid=$! + + trap 'killprocess $bdevperf_pid; exit 1' SIGINT SIGTERM EXIT + waitforlisten $bdevperf_pid + split_bdev=$(create_base_bdev nvme0 $device $((1024 * 101))) + nv_cache=$(create_nv_cache_bdev nvc0 $cache_device $split_bdev) + + $rpc_py -t $timeout bdev_ftl_create -b ftl0 -d $split_bdev $use_append -c $nv_cache + + $rootdir/test/bdev/bdevperf/bdevperf.py perform_tests + $rpc_py bdev_ftl_delete -b ftl0 + + $rpc_py bdev_nvme_detach_controller nvme0 + killprocess $bdevperf_pid + trap - SIGINT SIGTERM EXIT + timing_exit "${tests[$i]}" +done diff --git a/test/ftl/config/fio/drive-prep.fio b/test/ftl/config/fio/drive-prep.fio new file mode 100644 index 000000000..347f771fd --- /dev/null +++ b/test/ftl/config/fio/drive-prep.fio @@ -0,0 +1,15 @@ +[drive_prep] +ioengine=spdk_bdev +spdk_json_conf=${FTL_JSON_CONF} +filename=${FTL_BDEV_NAME} +thread=1 + +direct=1 +buffered=0 +size=100% +randrepeat=0 +norandommap +bs=128k +iodepth=128 +numjobs=1 +rw=write diff --git a/test/ftl/config/fio/randrw.fio b/test/ftl/config/fio/randrw.fio new file mode 100644 index 000000000..fdce9a477 --- /dev/null +++ b/test/ftl/config/fio/randrw.fio @@ -0,0 +1,20 @@ +[global] +ioengine=spdk_bdev +spdk_json_conf=${FTL_JSON_CONF} +filename=${FTL_BDEV_NAME} +direct=1 +thread=1 +buffered=0 +size=100% +randrepeat=0 +time_based +norandommap + +[test] +stonewall +bs=4k +numjobs=4 +rw=randrw +rwmixread=70 +iodepth=32 +runtime=1200 diff --git a/test/ftl/config/fio/randw-verify-qd128-ext.fio b/test/ftl/config/fio/randw-verify-qd128-ext.fio new file mode 100644 index 000000000..f22b1f2ec --- /dev/null +++ b/test/ftl/config/fio/randw-verify-qd128-ext.fio @@ -0,0 +1,20 @@ +[global] +ioengine=spdk_bdev +spdk_json_conf=${FTL_JSON_CONF} +filename=${FTL_BDEV_NAME} +thread=1 +direct=1 +iodepth=128 +rw=randwrite +verify=crc32c +do_verify=1 +verify_dump=0 +verify_state_save=0 +verify_fatal=1 +bs=4k +random_distribution=normal +serialize_overlap=1 + +[test] +io_size=64G +numjobs=1 diff --git a/test/ftl/config/fio/randw-verify-qd256-nght.fio b/test/ftl/config/fio/randw-verify-qd256-nght.fio new file mode 100644 index 000000000..f78bd6adb --- /dev/null +++ b/test/ftl/config/fio/randw-verify-qd256-nght.fio @@ -0,0 +1,21 @@ +[global] +ioengine=spdk_bdev +spdk_json_conf=${FTL_JSON_CONF} +filename=${FTL_BDEV_NAME} +thread=1 +direct=1 +iodepth=256 +rw=randwrite +verify=crc32c +do_verify=1 +verify_dump=0 +verify_state_save=0 +verify_fatal=1 +bs=4k +random_distribution=normal +serialize_overlap=1 +size=100% + +[test] +io_size=1000GiB +numjobs=1 diff --git a/test/ftl/config/fio/randw.fio b/test/ftl/config/fio/randw.fio new file mode 100644 index 000000000..f5b20b124 --- /dev/null +++ b/test/ftl/config/fio/randw.fio @@ -0,0 +1,18 @@ +[global] +ioengine=spdk_bdev +spdk_json_conf=${FTL_JSON_CONF} +filename=${FTL_BDEV_NAME} +direct=1 +thread=1 +buffered=0 +size=100% +randrepeat=0 +time_based +norandommap + +[test] +bs=4k +numjobs=1 +rw=randwrite +iodepth=64 +runtime=1200 diff --git a/test/ftl/fio.sh b/test/ftl/fio.sh index 878cc0223..8924e4be0 100755 --- a/test/ftl/fio.sh +++ b/test/ftl/fio.sh @@ -7,7 +7,8 @@ source $testdir/common.sh declare -A suite suite['basic']='randw-verify randw-verify-j2 randw-verify-depth128' -suite['extended']='randw-verify-qd2048-ext randr' +suite['extended']='drive-prep randw-verify-qd128-ext randw-verify-qd2048-ext randw randr randrw' +suite['nightly']='drive-prep randw-verify-qd256-nght randw-verify-qd256-nght randw-verify-qd256-nght' rpc_py=$rootdir/scripts/rpc.py diff --git a/test/ftl/ftl.sh b/test/ftl/ftl.sh index 1a5e88895..4cb745515 100755 --- a/test/ftl/ftl.sh +++ b/test/ftl/ftl.sh @@ -68,8 +68,13 @@ fi if [[ -z $SPDK_TEST_FTL_NIGHTLY ]]; then run_test "ftl_fio_basic" $testdir/fio.sh $device $nv_cache basic + run_test "ftl_bdevperf" $testdir/bdevperf.sh $device $nv_cache fi if [ $SPDK_TEST_FTL_EXTENDED -eq 1 ]; then run_test "ftl_fio_extended" $testdir/fio.sh $device $nv_cache extended fi + +if [ $SPDK_TEST_FTL_NIGHTLY -eq 1 ]; then + run_test "ftl_fio_nightly" $testdir/fio.sh $device $nv_cache nightly +fi