]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | #!/usr/bin/env bash |
2 | ||
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 | |
7 | ||
8 | MALLOC_BDEV_SIZE=64 | |
9 | MALLOC_BLOCK_SIZE=512 | |
10 | ||
11 | rpc_py="$rootdir/scripts/rpc.py" | |
12 | ||
13 | set -e | |
14 | ||
9f95a23c | 15 | nvmftestinit |
11fdf7f2 TL |
16 | |
17 | timing_enter bdevperf | |
18 | timing_enter start_nvmf_tgt | |
19 | ||
20 | $NVMF_APP -m 0xF & | |
21 | nvmfpid=$! | |
22 | ||
9f95a23c | 23 | trap "process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1" SIGINT SIGTERM EXIT |
11fdf7f2 TL |
24 | |
25 | waitforlisten $nvmfpid | |
9f95a23c | 26 | $rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192 |
11fdf7f2 TL |
27 | timing_exit start_nvmf_tgt |
28 | ||
9f95a23c | 29 | $rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0 |
11fdf7f2 | 30 | $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 |
9f95a23c TL |
31 | $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc0 |
32 | $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT | |
11fdf7f2 TL |
33 | |
34 | echo "[Nvme]" > $testdir/bdevperf.conf | |
9f95a23c | 35 | echo " 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 |
11fdf7f2 TL |
36 | $rootdir/test/bdev/bdevperf/bdevperf -c $testdir/bdevperf.conf -q 128 -o 4096 -w verify -t 1 |
37 | sync | |
38 | rm -rf $testdir/bdevperf.conf | |
39 | $rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 | |
40 | ||
41 | trap - SIGINT SIGTERM EXIT | |
42 | ||
9f95a23c | 43 | nvmftestfini |
11fdf7f2 | 44 | timing_exit bdevperf |