test/nvmf: increase waitforserial() initial wait time

Increase waitforserial() function initial wait time.
When testing with 5.16.X kernel version 2 seconds were
not enough and issuing a "disconnect" immediatelly after
"connect" caused keepalive timeout.

Fixes #2467

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ib913be35b2383daf5f5037e258bbdd2477810921
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12587
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Karol Latecki 2022-05-09 11:46:23 +02:00 committed by Tomasz Zawadzki
parent 5e5423de93
commit dacd8ec827

View File

@ -1046,11 +1046,11 @@ function waitforserial() {
nvme_device_counter=$2 nvme_device_counter=$2
fi fi
# Wait initially for min 2s to make sure all devices are ready for use. It seems # Wait initially for min 4s to make sure all devices are ready for use. It seems
# that we may be racing with a kernel where in some cases immediate disconnect may # that we may be racing with a kernel where in some cases immediate disconnect may
# leave dangling subsystem with no-op block devices which can't be used nor removed # leave dangling subsystem with no-op block devices which can't be used nor removed
# (unless kernel is rebooted) and which start to negatively affect all the tests. # (unless kernel is rebooted) and which start to negatively affect all the tests.
sleep 2 sleep 4
while ((i++ <= 15)); do while ((i++ <= 15)); do
nvme_devices=$(lsblk -l -o NAME,SERIAL | grep -c "$1") nvme_devices=$(lsblk -l -o NAME,SERIAL | grep -c "$1")
((nvme_devices == nvme_device_counter)) && return 0 ((nvme_devices == nvme_device_counter)) && return 0