Spdk/test/lib/bdev
Jim Harris f176436b69 test/bdev: wait for nbd device to become ready
Previously, we were waiting to find the target bdev as
registered before proceeding with nbd operations.  But
there can be a delay between when the bdev is registered
and when the nbd device becomes ready for block I/O
operations.  This delay has recently become longer as
lvol now performs I/O on registered bdevs to check for
an existing logical volume store.

So instead, check for the existence of the nbd device
in /proc/partitions output.

While here, also fix a bug in the nbd.c code - it needs
to wait for the poller to be unregistered before calling
spdk_nbd_stop().  Normally I would fix this in a separate
patch but because these issues are causing a lot of
failures in the test pool, I'm expediting this by putting
both fixes in one patch (so we can avoid a bunch of
re-runs).

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

Reviewed-on: https://review.gerrithub.io/385687
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-03 15:28:26 -04:00
..
bdevio bdevio: call shutdown on proper thread 2017-10-23 11:55:59 -04:00
bdevperf bdevperf: use blocks API 2017-09-12 11:16:50 -04:00
nbd test/bdev: wait for nbd device to become ready 2017-11-03 15:28:26 -04:00
bdev.conf.in bdev/aio: allow user to override block size 2017-08-11 19:36:30 -04:00
blockdev.sh bdev: remove bdev_opened_for_write restriction 2017-09-20 14:43:32 -04:00
common.c test/bdev: limit memory size to 1GB 2017-08-14 13:14:47 -04:00
Makefile test/bdev: add nbd test app 2017-06-23 13:01:04 -04:00