Commit 27b5a031 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

autotest: simplify waitforbdev with new get_bdevs option



Rather than grepping through the get_bdevs output for a specific bdev's
name, use the new optional get_bdevs name parameter to check if the
specific bdev we want is available.

Change-Id: I14d82c81321d968c5553205af32d12c62533fb1c
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/375807


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 8a9cfbb6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ function waitforbdev() {
	rpc_py=$2

	for ((i=1; i<=10; i++)); do
		if [ ! -z "`$rpc_py get_bdevs | grep $bdev_name`" ]; then
		if $rpc_py get_bdevs -b "$bdev_name" &>/dev/null; then
			return 0
		else
			sleep 0.1