Commit 3a2a1d80 authored by Liu Xiaodong's avatar Liu Xiaodong Committed by Jim Harris
Browse files

test: fix nbd test typo and add check



Change-Id: I5120baff8d2de3ef639d7b3c66d51002838c3f3c
Signed-off-by: default avatarLiu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8439


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent bbf52bd3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -153,7 +153,11 @@ function nbd_function_test() {
		local conf=$1
		local nbd_all=($(ls /dev/nbd* | grep -v p))
		local bdev_all=($bdevs_name)
		local nbd_num=${#bdevs_all[@]}
		local nbd_num=${#bdev_all[@]}
		if ((nbd_num < 1)); then
			# There should be at least one bdev and one valid nbd device
			return 1
		fi
		if [ ${#nbd_all[@]} -le $nbd_num ]; then
			nbd_num=${#nbd_all[@]}
		fi