diff --git a/scripts/autotest_common.sh b/scripts/autotest_common.sh index 821fd7d7bb..dfd285781a 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