Spdk/test/unit/lib
Shuhei Matsumoto cb8aa8abc5 bdev/nvme: Not try freeing qpair when it is NULL, and add test scenario
The API spdk_nvme_ctrlr_free_io_qpair() returns immediately if the
passed qpair is NULL, but calling spdk_nvme_ctrlr_free_io_qpair()
with NULL should be avoided.

This patch cleans up the code to ensure that nvme_ch->qpair is NULL if
disconnected and spdk_nvme_ctrlr_free_io_qpair() is called only if
nvme_ch->qpair is not NULL.

Then add a test scenario that two reset requests were submitted
simultaneously and the first reset request failed and then the second
reset request also failed. This verifies the refactoring done in the
next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iae461f7f826b0e1a4607a17e528c04a642242d6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7041
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-30 11:43:24 +00:00
..
accel test/accel: add UT for _get_task() 2021-02-22 10:03:35 +00:00
bdev bdev/nvme: Not try freeing qpair when it is NULL, and add test scenario 2021-03-30 11:43:24 +00:00
blob test/blob: Use CFLAGS when checking CUnit version 2021-02-04 08:44:30 +00:00
blobfs remove unneeded spdk_internal/thread.h includes 2020-12-10 14:38:04 +00:00
event event: Add return code to spdk_rpc_initialize 2021-03-12 08:38:10 +00:00
ftl remove unneeded spdk_internal/thread.h includes 2020-12-10 14:38:04 +00:00
idxd test/idxd: fix allocation issue with unit test 2021-03-26 08:22:41 +00:00
ioat ut: make use of CUnit macro to reduce duplications 2020-04-02 14:50:12 +00:00
iscsi lib/iscsi: return immediately from iscsi_parse_params if len is 0 2021-03-01 14:13:48 +00:00
json json: add spdk_json_free_object() 2020-10-19 10:02:10 +00:00
jsonrpc lib/jsonrpc: remove spdk_ prefix from internal functions. 2020-05-11 12:29:07 +00:00
log log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
lvol blob: Make the ABI compatibility of spdk_blob_open_opts structure. 2020-12-29 07:55:22 +00:00
notify ut: make use of CUnit macro to reduce duplications 2020-04-02 14:50:12 +00:00
nvme nvme/quirk: add MDTS excludes interleaved metadata quirk 2021-03-29 07:38:37 +00:00
nvmf nvmf/rdma: Use RDMA provider API to post recv WRs 2021-03-01 10:17:13 +00:00
reduce test: add generic unlink wrapper 2020-05-06 12:43:57 +00:00
scsi test/unit/lib/scsi: Add unit test stubs 2020-11-19 09:47:06 +00:00
sock sock: introduce SO_INCOMING_CPU to get placement_id 2021-03-09 08:53:52 +00:00
thread lib/thread: Defer exiting thread if thread is unregistering io_device 2021-01-13 10:07:51 +00:00
util test/string.c: remove hardcoded limit values 2021-02-11 08:40:09 +00:00
vhost lib/vhost: force cpumask to be subset of application's CPU mask 2021-02-04 08:35:08 +00:00
json_mock.c ut/json_mock: Add spdk_json_write_string_fmt() 2021-02-09 11:29:53 +00:00
Makefile test/accel: add first UT for accel framework 2021-02-22 10:03:35 +00:00