1#!/usr/bin/env bash 2# SPDX-License-Identifier: BSD-3-Clause 3# Copyright (C) 2022 Intel Corporation 4# All rights reserved. 5# 6 7# Test for if we can allocate a request for the FABRICS_CONNECT when all requests objects are consumed by the queued I/O 8 9testdir=$(readlink -f $(dirname $0)) 10rootdir=$(readlink -f $testdir/../../..) 11source $rootdir/test/common/autotest_common.sh 12source $rootdir/test/nvmf/common.sh 13 14MALLOC_BDEV_SIZE=64 15MALLOC_BLOCK_SIZE=512 16 17bdevperf_rpc_sock=/var/tmp/bdevperf.sock 18 19nvmftestinit 20 21nvmfappstart -m 0x2 22 23$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192 24$rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0 25$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 26$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc0 27$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT 28 29$rootdir/build/examples/bdevperf -z -r $bdevperf_rpc_sock -q 1024 -o 4096 -w verify -t 10 & 30bdevperf_pid=$! 31 32trap 'process_shm --id $NVMF_APP_SHM_ID; killprocess $bdevperf_pid; nvmftestfini; exit 1' SIGINT SIGTERM EXIT 33waitforlisten $bdevperf_pid $bdevperf_rpc_sock 34$rpc_py -s $bdevperf_rpc_sock bdev_nvme_attach_controller -b NVMe0 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT -f ipv4 -n nqn.2016-06.io.spdk:cnode1 35$rootdir/examples/bdev/bdevperf/bdevperf.py -s $bdevperf_rpc_sock perform_tests 36 37# if this test fails it means we didn't fail over to the second 38 39killprocess $bdevperf_pid 40 41trap - SIGINT SIGTERM EXIT 42 43nvmftestfini 44