ut/nvme_ctrlr_cmd: add missing mutex init
Add missing mutex init for ctrlr ctrlr_lock. Signed-off-by: Nick Connolly <nick.connolly@mayadata.io> Change-Id: Ib3d665a28e91a72d1f1f6d09c374583ff731fb6f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7613 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
5354d0c63f
commit
0fdd826a00
@ -899,6 +899,7 @@ test_spdk_nvme_ctrlr_cmd_abort(void)
|
||||
ctrlr.adminq = &admin_qpair;
|
||||
admin_qpair.id = 0;
|
||||
MOCK_SET(nvme_ctrlr_submit_admin_request, 0);
|
||||
CU_ASSERT(pthread_mutex_init(&ctrlr.ctrlr_lock, NULL) == 0);
|
||||
|
||||
rc = spdk_nvme_ctrlr_cmd_abort(&ctrlr, qpair, 2, (void *)0xDEADBEEF, (void *)0xDCADBEEF);
|
||||
CU_ASSERT(rc == 0);
|
||||
@ -914,6 +915,7 @@ test_spdk_nvme_ctrlr_cmd_abort(void)
|
||||
rc = spdk_nvme_ctrlr_cmd_abort(&ctrlr, qpair, 2, (void *)0xDEADBEEF, (void *)0xDCADBEEF);
|
||||
CU_ASSERT(rc == -ENOMEM);
|
||||
MOCK_CLEAR(nvme_ctrlr_submit_admin_request);
|
||||
CU_ASSERT(pthread_mutex_destroy(&ctrlr.ctrlr_lock) == 0);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
Loading…
Reference in New Issue
Block a user