test/vhost: Fix test exit when there are NICs without RDMA support
We have separated the process_shm function in order to avoid its call-out in "nvmftestinit" when there are no rdma cards Signed-off-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com> Change-Id: I42d2d3426b71199a248bbfb238ab3811457c68bd Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12394 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
9cdadbea09
commit
dc43293241
@ -396,7 +396,7 @@ function nvmftestinit() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
trap 'process_shm --id $NVMF_APP_SHM_ID || :; nvmftestfini' SIGINT SIGTERM EXIT
|
||||
trap 'nvmftestfini' SIGINT SIGTERM EXIT
|
||||
|
||||
prepare_net_devs
|
||||
|
||||
@ -411,7 +411,7 @@ function nvmftestinit() {
|
||||
NVMF_SECOND_TARGET_IP=$(echo "$RDMA_IP_LIST" | tail -n +2 | head -n 1)
|
||||
if [ -z $NVMF_FIRST_TARGET_IP ]; then
|
||||
echo "no RDMA NIC for nvmf test"
|
||||
exit 0
|
||||
exit 1
|
||||
fi
|
||||
elif [[ "$TEST_TRANSPORT" == "tcp" ]]; then
|
||||
NVMF_TRANSPORT_OPTS="$NVMF_TRANSPORT_OPTS -o"
|
||||
@ -433,6 +433,7 @@ function nvmfappstart() {
|
||||
nvmfpid=$!
|
||||
waitforlisten $nvmfpid
|
||||
timing_exit start_nvmf_tgt
|
||||
trap 'process_shm --id $NVMF_APP_SHM_ID || :; nvmftestfini' SIGINT SIGTERM EXIT
|
||||
}
|
||||
|
||||
function nvmftestfini() {
|
||||
|
Loading…
Reference in New Issue
Block a user