Commit 83af29b4 authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Ben Walker
Browse files

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: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459616


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarWojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarMateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
parent 17da389e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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