This patch adds functions in autotest_common.sh, fio_bdev() and fio_nvme() for their respective plugins. It simplifies its usage throughout the scripts. Additionally will help with expanding the fio cmd line with nessecary changes only in single place. This will be used in next patch in series to LD_PRELOAD ASAN before fio_plugin. Note: Did not implement changes for perf scripts, since they are usualy run separately and didn't want to affect those. Similarly didn't change vhost initiator tests, because the exported directories do not work for inside the VM. Will need to think of a way to change it there as well. Change-Id: Idf750ee7aa9d5e30efc0ce430d15fa45ceccb203 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456314 Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
44 lines
894 B
Bash
Executable File
44 lines
894 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
testdir=$(readlink -f $(dirname $0))
|
|
rootdir=$(readlink -f $testdir/../..)
|
|
|
|
source $rootdir/test/common/autotest_common.sh
|
|
|
|
declare -A suite
|
|
suite['basic']='randw-verify randw-verify-j2 randw-verify-depth128'
|
|
suite['extended']='drive-prep randw-verify-qd128-ext randw randr randrw'
|
|
|
|
device=$1
|
|
tests=${suite[$2]}
|
|
uuid=$3
|
|
|
|
if [ ! -d /usr/src/fio ]; then
|
|
echo "FIO not available"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z "$tests" ]; then
|
|
echo "Invalid test suite '$2'"
|
|
exit 1
|
|
fi
|
|
|
|
export FTL_BDEV_CONF=$testdir/config/ftl.conf
|
|
export FTL_BDEV_NAME=nvme0
|
|
|
|
if [ -z "$uuid" ]; then
|
|
$rootdir/scripts/gen_ftl.sh -a $device -n nvme0 -l 0-3 > $FTL_BDEV_CONF
|
|
else
|
|
$rootdir/scripts/gen_ftl.sh -a $device -n nvme0 -l 0-3 -u $uuid > $FTL_BDEV_CONF
|
|
fi
|
|
|
|
for test in ${tests[@]}; do
|
|
timing_enter $test
|
|
fio_bdev $testdir/config/fio/$test.fio
|
|
timing_exit $test
|
|
done
|
|
|
|
report_test_completion ftl_fio
|