autotest_common: add waitforblk_disconnect
This is the functional opposite of waitforblk. Change-Id: I5e9f77c9ea05b83b8dbfbf49bb3baa2ae8cc1086 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/443316 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
63de221bf6
commit
5232a73f38
@ -657,6 +657,22 @@ function waitforblk()
|
||||
return 0
|
||||
}
|
||||
|
||||
function waitforblk_disconnect()
|
||||
{
|
||||
local i=0
|
||||
while lsblk -l -o NAME | grep -q -w $1; do
|
||||
[ $i -lt 15 ] || break
|
||||
i=$[$i+1]
|
||||
sleep 1
|
||||
done
|
||||
|
||||
if lsblk -l -o NAME | grep -q -w $1; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function fio_config_gen()
|
||||
{
|
||||
local config_file=$1
|
||||
|
Loading…
Reference in New Issue
Block a user