3 testdir
=$
(readlink
-f $
(dirname $0))
4 rootdir
=$
(readlink
-f $testdir/..
/..
/..
)
5 source $rootdir/test
/common
/autotest_common.sh
6 source $rootdir/test
/nvmf
/common.sh
11 rpc_py
="$rootdir/scripts/rpc.py"
16 echo "nvme command not found; skipping create transport test"
24 # Use nvmf_create_transport call to create transport
25 $rpc_py nvmf_create_transport
-t $TEST_TRANSPORT -u 8192
27 null_bdevs
="$($rpc_py construct_null_bdev Null0 $NULL_BDEV_SIZE $NULL_BLOCK_SIZE) "
28 null_bdevs
+="$($rpc_py construct_null_bdev Null1 $NULL_BDEV_SIZE $NULL_BLOCK_SIZE)"
30 $rpc_py nvmf_subsystem_create nqn
.2016-06.io.spdk
:cnode1
-a -s SPDK00000000000001
31 for null_bdev
in $null_bdevs; do
32 $rpc_py nvmf_subsystem_add_ns nqn
.2016-06.io.spdk
:cnode1
$null_bdev
34 $rpc_py nvmf_subsystem_add_listener nqn
.2016-06.io.spdk
:cnode1
-t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
36 nvme discover
-t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
38 echo "Perform nvmf subsystem discovery via RPC"
39 $rpc_py get_nvmf_subsystems
41 $rpc_py delete_nvmf_subsystem nqn
.2016-06.io.spdk
:cnode1
43 for null_bdev
in $null_bdevs; do
44 $rpc_py delete_null_bdev
$null_bdev
47 check_bdevs
=$
($rpc_py get_bdevs | jq
-r '.[].name')
48 if [ -n "$check_bdevs" ]; then
53 trap - SIGINT SIGTERM EXIT