Commit 8ef7818a authored by Jim Harris's avatar Jim Harris
Browse files

test/bdev: properly cleanup bdev layer in bdev_io_wait_test



A new unit test in an upcoming patch will initialize the bdev
layer separately, so modify the existing tests now so that
they properly cleanup the bdev layer after the unit test
that initialized it is complete.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: Ie00837a90391ca4d0dd578e978fb26483fe5c0cf

Reviewed-on: https://review.gerrithub.io/423023


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 9f2dd0c4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -158,6 +158,7 @@ bdev_ut_module_init(void)
static void
bdev_ut_module_fini(void)
{
	spdk_io_device_unregister(&g_bdev_ut_io_device, NULL);
}

struct spdk_bdev_module bdev_ut_if = {
@@ -595,6 +596,11 @@ bdev_init_cb(void *arg, int rc)
	CU_ASSERT(rc == 0);
}

static void
bdev_fini_cb(void *arg)
{
}

struct bdev_ut_io_wait_entry {
	struct spdk_bdev_io_wait_entry	entry;
	struct spdk_io_channel		*io_ch;
@@ -685,6 +691,7 @@ bdev_io_wait_test(void)
	spdk_put_io_channel(io_ch);
	spdk_bdev_close(desc);
	free_bdev(bdev);
	spdk_bdev_finish(bdev_fini_cb, NULL);
}

int