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 8if [ "$TEST_TRANSPORT" != "rdma" ]; then 9 exit 0 10fi 11 12MALLOC_BDEV_SIZE=64 13MALLOC_BLOCK_SIZE=512 14subsystem="0" 15rpc_py="$rootdir/scripts/rpc.py" 16 17nvmftestinit 18nvmfappstart -m 0x3 19 20$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS 21$rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0 22$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode$subsystem -a -s SPDK00000000000001 23$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$subsystem Malloc0 24$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode$subsystem -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT 25 26"$rootdir/test/dma/test_dma/test_dma" -q 16 -o 4096 -w randrw -M 70 -t 5 -m 0xc --json <(gen_nvmf_target_json $subsystem) -b "Nvme${subsystem}n1" 27test_dmapid=$! 28 29wait $test_dmapid 30sync 31 32trap - SIGINT SIGTERM EXIT 33 34nvmftestfini 35