1#!/usr/bin/env bash 2 3testdir=$(readlink -f $(dirname $0)) 4rootdir=$(readlink -f $testdir/../../..) 5source $rootdir/test/common/autotest_common.sh 6source $rootdir/test/nvmf/common.sh 7 8MALLOC_BDEV_SIZE=64 9MALLOC_BLOCK_SIZE=512 10 11rpc_py="$rootdir/scripts/rpc.py" 12 13nvmftestinit 14 15timing_enter bdevperf 16timing_enter start_nvmf_tgt 17 18$NVMF_APP -m 0xF & 19nvmfpid=$! 20 21trap 'process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1' SIGINT SIGTERM EXIT 22 23waitforlisten $nvmfpid 24$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192 25timing_exit start_nvmf_tgt 26 27$rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0 28$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 29$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc0 30$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT 31 32echo "[Nvme]" > $testdir/bdevperf.conf 33echo " TransportID \"trtype:$TEST_TRANSPORT adrfam:IPv4 subnqn:nqn.2016-06.io.spdk:cnode1 traddr:$NVMF_FIRST_TARGET_IP trsvcid:$NVMF_PORT\" Nvme0" >> $testdir/bdevperf.conf 34$rootdir/test/bdev/bdevperf/bdevperf -c $testdir/bdevperf.conf -q 128 -o 4096 -w verify -t 1 35sync 36rm -rf $testdir/bdevperf.conf 37$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 38 39trap - SIGINT SIGTERM EXIT 40 41nvmftestfini 42timing_exit bdevperf 43