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 <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/375807 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
8a9cfbb688
commit
27b5a0318d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user