]> git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/test/nvmf/host/aer.sh
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / spdk / test / nvmf / host / aer.sh
1 #!/usr/bin/env bash
2
3 testdir=$(readlink -f $(dirname $0))
4 rootdir=$(readlink -f $testdir/../../..)
5 source $rootdir/scripts/autotest_common.sh
6 source $rootdir/test/nvmf/common.sh
7
8 rpc_py="python $rootdir/scripts/rpc.py"
9
10 set -e
11
12 if ! rdma_nic_available; then
13 echo "no NIC for nvmf test"
14 exit 0
15 fi
16
17 timing_enter aer
18
19 # Start up the NVMf target in another process
20 $rootdir/app/nvmf_tgt/nvmf_tgt -c $testdir/../nvmf.conf -m 0x2 -p 1 -s 512 &
21 nvmfpid=$!
22
23 trap "killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT
24
25 waitforlisten $nvmfpid ${RPC_PORT}
26
27 $rpc_py construct_nvmf_subsystem Direct nqn.2016-06.io.spdk:cnode1 'transport:RDMA traddr:192.168.100.8 trsvcid:4420' '' -p "*"
28
29 $rootdir/test/lib/nvme/aer/aer -r "\
30 trtype:RDMA \
31 adrfam:IPv4 \
32 traddr:$NVMF_FIRST_TARGET_IP \
33 trsvcid:$NVMF_PORT \
34 subnqn:nqn.2014-08.org.nvmexpress.discovery"
35 sync
36 $rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode1
37
38 trap - SIGINT SIGTERM EXIT
39
40 killprocess $nvmfpid
41 timing_exit aer