test/unit: fix scanbuild errors in the nvme tests.

Change-Id: I20366711f5543ac506e3a5c98c21d256b26143f0
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/424121
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Seth Howell 2018-08-30 10:28:27 -07:00 committed by Jim Harris
parent 84009795c5
commit 95d97eb965
2 changed files with 4 additions and 0 deletions

View File

@ -691,6 +691,8 @@ test_nvme_allocate_request_user_copy(void)
/* put a dummy on the queue */
STAILQ_INSERT_HEAD(&qpair.free_req, &dummy_req, stailq);
MOCK_CLEAR(spdk_dma_malloc)
MOCK_CLEAR(spdk_dma_zmalloc)
req = nvme_allocate_request_user_copy(&qpair, buffer, payload_size, cb_fn,
cb_arg, host_to_controller);
SPDK_CU_ASSERT_FATAL(req != NULL);

View File

@ -1610,6 +1610,8 @@ test_spdk_nvme_ctrlr_doorbell_buffer_config(void)
ctrlr.cdata.oacs.doorbell_buffer_config = 1;
ctrlr.trid.trtype = SPDK_NVME_TRANSPORT_PCIE;
ctrlr.page_size = 0x1000;
MOCK_CLEAR(spdk_dma_malloc)
MOCK_CLEAR(spdk_dma_zmalloc)
ret = nvme_ctrlr_set_doorbell_buffer_config(&ctrlr);
CU_ASSERT(ret == 0);
nvme_ctrlr_free_doorbell_buffer(&ctrlr);