ut/blob: use poll_thread_times()

Making use of recently added utility to poll exact number of times.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I23a9dc702c899285626522ace8ec77a9ba0f7757
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/773
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Tomasz Zawadzki 2020-02-11 07:39:33 -05:00
parent d7aff25df0
commit 248fbf2aec

View File

@ -758,7 +758,6 @@ blob_snapshot(void)
static void static void
blob_snapshot_freeze_io(void) blob_snapshot_freeze_io(void)
{ {
struct spdk_thread *thread;
struct spdk_io_channel *channel; struct spdk_io_channel *channel;
struct spdk_bs_channel *bs_channel; struct spdk_bs_channel *bs_channel;
struct spdk_blob_store *bs; struct spdk_blob_store *bs;
@ -812,10 +811,7 @@ blob_snapshot_freeze_io(void)
/* This is implementation specific. /* This is implementation specific.
* Flag 'frozen_io' is set in _spdk_bs_snapshot_freeze_cpl callback. * Flag 'frozen_io' is set in _spdk_bs_snapshot_freeze_cpl callback.
* Four async I/O operations happen before that. */ * Four async I/O operations happen before that. */
thread = spdk_get_thread(); poll_thread_times(0, 3);
spdk_thread_poll(thread, 1, 0);
spdk_thread_poll(thread, 1, 0);
spdk_thread_poll(thread, 1, 0);
CU_ASSERT(TAILQ_EMPTY(&bs_channel->queued_io)); CU_ASSERT(TAILQ_EMPTY(&bs_channel->queued_io));