test/ftl: wait till nbd is ready when loading JSON config
When creating the nbd, we wait until it's ready, but we didn't do that when loading the configuration from JSON, which resulted in sporadic IO failures, as the device hasn't been initialized yet. This patch adds waitfornbd after each load_config call. Change-Id: Id350ae7b1afab11f5f3fbd131d938dbd65a8cb15 Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459616 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
17da389ecc
commit
83af29b4eb
@ -77,6 +77,7 @@ waitforlisten $svcpid
|
||||
|
||||
# Ftl should recover, though with a loss of data (-o config option)
|
||||
$rpc_py load_config < $testdir/config/ftl.json
|
||||
waitfornbd nbd0
|
||||
|
||||
# Write extra data after restore
|
||||
dd if=/dev/urandom of=/dev/nbd0 bs=4K count=$chunk_size seek=$offset oflag=dsync
|
||||
|
@ -60,6 +60,7 @@ $rootdir/test/app/bdev_svc/bdev_svc & svcpid=$!
|
||||
waitforlisten $svcpid
|
||||
|
||||
$rpc_py load_config < $testdir/config/ftl.json
|
||||
waitfornbd nbd0
|
||||
|
||||
mount /dev/nbd0 $mount_dir
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user