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>
39 lines
802 B
Bash
Executable File
39 lines
802 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
curdir=$(dirname $(readlink -f "$BASH_SOURCE"))
|
|
rootdir=$(readlink -f $curdir/../../..)
|
|
plugindir=$rootdir/examples/bdev/fio_plugin
|
|
|
|
source $rootdir/test/common/autotest_common.sh
|
|
|
|
function fio_verify(){
|
|
fio_bdev $curdir/test.fio --aux-path=/tmp/ --ioengine=spdk_bdev $@
|
|
}
|
|
|
|
function cleanup(){
|
|
rm -f $curdir/modes.conf
|
|
}
|
|
|
|
trap "cleanup; exit 1" SIGINT SIGTERM EXIT
|
|
|
|
nvme_cfg=$($rootdir/scripts/gen_nvme.sh)
|
|
|
|
config="
|
|
$nvme_cfg
|
|
|
|
[Split]
|
|
Split Nvme0n1 8 101
|
|
|
|
[OCF]
|
|
OCF PT_Nvme pt Nvme0n1p0 Nvme0n1p1
|
|
OCF WT_Nvme wt Nvme0n1p2 Nvme0n1p3
|
|
OCF WB_Nvme0 wb Nvme0n1p4 Nvme0n1p5
|
|
OCF WB_Nvme1 wb Nvme0n1p6 Nvme0n1p7
|
|
"
|
|
echo "$config" > $curdir/modes.conf
|
|
|
|
fio_verify --filename=PT_Nvme:WT_Nvme:WB_Nvme0:WB_Nvme1 --spdk_conf=$curdir/modes.conf
|
|
|
|
trap - SIGINT SIGTERM EXIT
|
|
cleanup
|