test: add bdev_wait_for_examine in waitforbdev

This helps ensure that not only is the bdev available,
but that it has been fully examined by any upper
layer bdev modules before returning from this
waitforbdev function.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7b69bb35199c08a4ccaa9c7ea9429d82b16ac46c

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8394
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Jim Harris 2021-06-16 04:08:51 -07:00 committed by Tomasz Zawadzki
parent adc2942ada
commit 7d5ba10581

View File

@ -775,6 +775,8 @@ function waitforbdev() {
local bdev_name=$1
local i
$rpc_py bdev_wait_for_examine
for ((i = 1; i <= 20; i++)); do
if $rpc_py bdev_get_bdevs | jq -r '.[] .name' | grep -qw $bdev_name; then
return 0