2016-06-07 15:49:44 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
testdir=$(readlink -f $(dirname $0))
|
2016-07-06 16:56:03 +00:00
|
|
|
rootdir=$(readlink -f $testdir/../../..)
|
2016-06-07 15:49:44 +00:00
|
|
|
source $rootdir/scripts/autotest_common.sh
|
2016-06-08 01:47:02 +00:00
|
|
|
source $rootdir/test/nvmf/common.sh
|
2016-06-07 15:49:44 +00:00
|
|
|
|
2016-07-08 21:06:26 +00:00
|
|
|
set -e
|
|
|
|
|
2016-07-08 21:19:11 +00:00
|
|
|
if ! rdma_nic_available; then
|
|
|
|
echo "no NIC for nvmf test"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2016-06-07 15:49:44 +00:00
|
|
|
timing_enter fio
|
|
|
|
|
|
|
|
# Start up the NVMf target in another process
|
|
|
|
$rootdir/app/nvmf_tgt/nvmf_tgt -c $testdir/../nvmf.conf -t nvmf -t rdma &
|
|
|
|
nvmfpid=$!
|
|
|
|
|
|
|
|
trap "process_core; killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT
|
|
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
|
|
modprobe -v nvme-rdma
|
|
|
|
|
|
|
|
if [ -e "/dev/nvme-fabrics" ]; then
|
|
|
|
chmod a+rw /dev/nvme-fabrics
|
|
|
|
fi
|
|
|
|
|
2016-06-28 20:25:41 +00:00
|
|
|
echo 'traddr='$NVMF_FIRST_TARGET_IP',transport=rdma,nr_io_queues=1,trsvcid='$NVMF_PORT',nqn=nqn.2016-06.io.spdk:cnode1' > /dev/nvme-fabrics
|
2016-06-07 15:49:44 +00:00
|
|
|
|
|
|
|
$testdir/nvmf_fio.py 4096 1 rw 1 verify
|
|
|
|
$testdir/nvmf_fio.py 4096 1 randrw 1 verify
|
|
|
|
$testdir/nvmf_fio.py 4096 128 rw 1 verify
|
|
|
|
$testdir/nvmf_fio.py 4096 128 randrw 1 verify
|
|
|
|
|
|
|
|
rm -f ./local-job0-0-verify.state
|
|
|
|
|
|
|
|
trap - SIGINT SIGTERM EXIT
|
|
|
|
|
|
|
|
nvmfcleanup
|
|
|
|
killprocess $nvmfpid
|
|
|
|
timing_exit fio
|