Commit dacd8ec8 authored by Karol Latecki's avatar Karol Latecki Committed by Tomasz Zawadzki
Browse files

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: default avatarKarol Latecki <karol.latecki@intel.com>
Change-Id: Ib913be35b2383daf5f5037e258bbdd2477810921
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12587


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarPawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarKamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: default avatarKrzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 5e5423de
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1046,11 +1046,11 @@ function waitforserial() {
		nvme_device_counter=$2
	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
	# 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.
	sleep 2
	sleep 4
	while ((i++ <= 15)); do
		nvme_devices=$(lsblk -l -o NAME,SERIAL | grep -c "$1")
		((nvme_devices == nvme_device_counter)) && return 0