Commit 72e058bb authored by Amir Haroush's avatar Amir Haroush Committed by Konrad Sztyber
Browse files

test/setup: Fix dm_mount test for slow hosts



on some hosts, it might take 1 or 2 seconds for the
mapper device to appear on /dev
in this case, the test will fail
because we check if the device exists immediately.
by giving it chance to get up the test will pass.

Signed-off-by: default avatarAmir Haroush <amir.haroush@huawei.com>
Signed-off-by: default avatarShai Fultheim <shai.fultheim@huawei.com>
Change-Id: I996d84861333d29d5c9370a2c5a471e7962d91b1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17912


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 6828ed18
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -160,6 +160,10 @@ dm_mount() {
		1048576 1048576 linear /dev/$pv1 0
	DM_TABLE

	for t in {1..5}; do
		if [[ -e /dev/mapper/$dm_name ]]; then break; fi
		sleep 1
	done
	[[ -e /dev/mapper/$dm_name ]]
	dm=$(readlink -f "/dev/mapper/$dm_name")
	dm=${dm##*/}