Commit b118729f authored by Jim Harris's avatar Jim Harris
Browse files

test: add helper function to wait until file is created



Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: Ib706727c680471334b90960148ee1a637561cf64

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452805


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent f5fbac91
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -675,6 +675,22 @@ function waitforblk_disconnect()
	return 0
}

function waitforfile()
{
	local i=0
	while [ ! -f $1 ]; do
		[ $i -lt 200 ] || break
		i=$[$i+1]
		sleep 0.1
	done

	if [ ! -f $1 ]; then
		return 1
	fi

	return 0
}

function fio_config_gen()
{
	local config_file=$1