test: Make nvmf target filesystem test more robust

Change-Id: Id35254c1cdc4c8fa938e0322d5455bdab825efa8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482004
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Ben Walker 2020-01-17 10:10:43 -07:00 committed by Tomasz Zawadzki
parent f84c916c41
commit a02207d778

View File

@ -29,7 +29,21 @@ function nvmf_filesystem_create {
sync
rm /mnt/device/aaa
sync
umount /mnt/device
while ! umount /mnt/device; do
[ $i -lt 15 ] || break
i=$((i+1))
sleep 1
done
# Make sure the target did not crash
kill -0 $nvmfpid
# Make sure the device is still present
lsblk -l -o NAME | grep -q -w "${nvme_name}"
# Make sure the partition is still present
lsblk -l -o NAME | grep -q -w "${nvme_name}p1"
}
function nvmf_filesystem_part {