From 7d5ba10581dae32f31d0531e434cdd7f80e3f708 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 16 Jun 2021 04:08:51 -0700 Subject: [PATCH] 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 Change-Id: I7b69bb35199c08a4ccaa9c7ea9429d82b16ac46c Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8394 Tested-by: SPDK CI Jenkins Reviewed-by: Changpeng Liu Reviewed-by: Shuhei Matsumoto --- test/common/autotest_common.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 937597c93d..61970afc14 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -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