Spdk/test/unit/lib/bdev
Shuhei Matsumoto 67a03bc73a ut/bdev_nvme: spdk_nvme_detach() stub calls ut_detach_ctrlr() if ctrlr is attached by ut_attach_ctrlr()
bdev_nvme_delete() calls spdk_nvme_detach() in the end. However,
previously spdk_nvme_detach() stub did nothing and ut_detach_ctrlr()
was called separately if ctrlr wass attached by ut_detach_ctrlr().

This was to differentiate the two cases, ctrlr is statically assigned
or dynamically attached by ut_detach_ctrlr().

This might be a little confusing. Hence by adding a flag, attached,
to ctrlr, merge ut_detach_ctrlr() into spdk_nvme_detach(), and remove
ut_detach_ctrlr() calls.

Besides, change one SPDK_CU_ASSERT_FATAL to return NULL because the
other cases do that and the callers for ut_attach_ctrlr() already have
SPDK_CU_ASSERT_FATAL.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2a73f57c6031819d3ae441a6874127ff5d53fc04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7311
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-12 09:51:03 +00:00
..
bdev_zone.c bdev/zone: add support for max zone append size 2021-03-29 10:17:45 +00:00
bdev.c lib/bdev: move to spdk_bdev_open_ext() 2021-03-05 08:33:45 +00:00
compress.c modules/crypto/compress: changes to support DPDK mbuf changes 2021-01-15 08:30:01 +00:00
crypto.c modules/crypto/compress: changes to support DPDK mbuf changes 2021-01-15 08:30:01 +00:00
gpt module/bdev_gpt: remove spdk prefix from static/internal functions. 2020-05-15 07:58:03 +00:00
mt test: add some missing stubs 2020-11-02 11:23:21 +00:00
nvme ut/bdev_nvme: spdk_nvme_detach() stub calls ut_detach_ctrlr() if ctrlr is attached by ut_attach_ctrlr() 2021-04-12 09:51:03 +00:00
part.c lib/bdev: move to spdk_bdev_part_base_construct_ext() 2021-03-09 08:54:53 +00:00
pmem remove unneeded spdk_internal/thread.h includes 2020-12-10 14:38:04 +00:00
raid test: Use PRId64 for portability 2020-11-19 09:53:05 +00:00
scsi_nvme.c ut: make use of CUnit macro to reduce duplications 2020-04-02 14:50:12 +00:00
vbdev_lvol.c bdev/lvol: Pass bdev name instead of bdev pointer to vbdev_lvs_create 2020-10-20 08:52:29 +00:00
vbdev_zone_block.c test: Use PRId64 for portability 2020-11-19 09:53:05 +00:00
Makefile ut/bdev_ocssd: Move bdev_ocssd_ut from bdev directory to bdev/nvme directory 2021-02-09 11:29:53 +00:00