Commit c85a3d10 authored by Ben Walker's avatar Ben Walker Committed by Tomasz Zawadzki
Browse files

test/nvmf: In filesystem.sh, wait for partition to be unused



The network operations are now asynchronous, so wait for the kernel
to stop using the NVMe partition after unmounting the filesystem.
The kernel is presumably checking for partition tables or unmapping.

Change-Id: Ibefe8e072823a230a896ecfd0adcd9d5fff2723f
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482926


Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarAlexey Marchuk <alexeymar@mellanox.com>
parent 8818ace2
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -22,7 +22,12 @@ function nvmf_filesystem_create {
		force=-f
	fi

	mkfs.${fstype} $force /dev/${nvme_name}p1
	local i=0
	while ! mkfs.${fstype} $force /dev/${nvme_name}p1; do
		[ $i -lt 15 ] || break
		i=$((i+1))
		sleep 1
	done

	mount /dev/${nvme_name}p1 /mnt/device
	touch /mnt/device/aaa
@@ -30,6 +35,7 @@ function nvmf_filesystem_create {
	rm /mnt/device/aaa
	sync

	i=0
	while ! umount /mnt/device; do
		[ $i -lt 15 ] || break
		i=$((i+1))