From 27b5a0318d5366a088bcff8caf88adfd85c85b8d Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Fri, 25 Aug 2017 09:59:56 -0700 Subject: [PATCH] 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: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/375807 Tested-by: SPDK Automated Test System Reviewed-by: Ben Walker --- scripts/autotest_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/autotest_common.sh b/scripts/autotest_common.sh index 821fd7d7b..dfd285781 100755 --- a/scripts/autotest_common.sh +++ b/scripts/autotest_common.sh @@ -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