autotest:Add fio_plugin with nvmf lvol backend(Porting from DTS)
To cover fio_plugin as host with nvmf lvol backend. Change-Id: I5c602d95421f1ab6d2dde660c1833c953c2e5c75 Signed-off-by: wenzhong wu <wenzhongx.wu@intel.com> Reviewed-on: https://review.gerrithub.io/390381 Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
29be88fab6
commit
52c773ce64
@ -3,6 +3,7 @@
|
||||
testdir=$(readlink -f $(dirname $0))
|
||||
rootdir=$(readlink -f $testdir/../../..)
|
||||
source $rootdir/scripts/autotest_common.sh
|
||||
source $rootdir/scripts/common.sh
|
||||
source $rootdir/test/nvmf/common.sh
|
||||
|
||||
rpc_py="python $rootdir/scripts/rpc.py"
|
||||
@ -37,12 +38,41 @@ $rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 "trtype:RDMA traddr:
|
||||
|
||||
PLUGIN_DIR=$rootdir/examples/nvme/fio_plugin
|
||||
|
||||
LD_PRELOAD=$PLUGIN_DIR/fio_plugin /usr/src/fio/fio $PLUGIN_DIR/example_config.fio --filename="trtype=RDMA adrfam=IPv4 traddr=$NVMF_FIRST_TARGET_IP trsvcid=4420 ns=1"
|
||||
|
||||
sync
|
||||
|
||||
# Test fio_plugin as host with malloc backend
|
||||
LD_PRELOAD=$PLUGIN_DIR/fio_plugin /usr/src/fio/fio $PLUGIN_DIR/example_config.fio --filename="trtype=RDMA adrfam=IPv4 \
|
||||
traddr=$NVMF_FIRST_TARGET_IP trsvcid=4420 ns=1"
|
||||
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode1
|
||||
|
||||
if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
# Test fio_plugin as host with nvme lvol backend
|
||||
bdfs=$(iter_pci_class_code 01 08 02)
|
||||
$rpc_py construct_nvme_bdev -b Nvme0 -t PCIe -a $(echo $bdfs | awk '{ print $1 }')
|
||||
ls_guid=$($rpc_py construct_lvol_store Nvme0n1 lvs_0)
|
||||
get_lvs_free_mb $ls_guid
|
||||
lb_guid=$($rpc_py construct_lvol_bdev -u $ls_guid lbd_0 $free_mb)
|
||||
$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode2 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420" "" -a -s SPDK00000000000002 -n "$lb_guid"
|
||||
LD_PRELOAD=$PLUGIN_DIR/fio_plugin /usr/src/fio/fio $PLUGIN_DIR/example_config.fio --filename="trtype=RDMA adrfam=IPv4 \
|
||||
traddr=$NVMF_FIRST_TARGET_IP trsvcid=4420 ns=1"
|
||||
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode2
|
||||
|
||||
# Test fio_plugin as host with nvme lvol nested backend
|
||||
ls_nested_guid=$($rpc_py construct_lvol_store $lb_guid lvs_n_0)
|
||||
get_lvs_free_mb $ls_nested_guid
|
||||
lb_nested_guid=$($rpc_py construct_lvol_bdev -u $ls_nested_guid lbd_nest_0 $free_mb)
|
||||
$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode3 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420" "" -a -s SPDK00000000000003 -n "$lb_nested_guid"
|
||||
LD_PRELOAD=$PLUGIN_DIR/fio_plugin /usr/src/fio/fio $PLUGIN_DIR/example_config.fio --filename="trtype=RDMA adrfam=IPv4 \
|
||||
traddr=$NVMF_FIRST_TARGET_IP trsvcid=4420 ns=1"
|
||||
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode3
|
||||
|
||||
sync
|
||||
# Delete lvol_bdev and destroy lvol_store.
|
||||
$rpc_py delete_bdev "$lb_nested_guid"
|
||||
$rpc_py destroy_lvol_store -l lvs_n_0
|
||||
$rpc_py delete_bdev "$lb_guid"
|
||||
$rpc_py destroy_lvol_store -l lvs_0
|
||||
$rpc_py delete_bdev "Nvme0n1"
|
||||
fi
|
||||
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
|
||||
killprocess $nvmfpid
|
||||
|
Loading…
x
Reference in New Issue
Block a user