Commit 51ce4dd2 authored by Seth Howell's avatar Seth Howell Committed by Jim Harris
Browse files

test/unit: fix newly introduced scan-build errors



The type of malloc used in some of the NVMe functions changed and has
re-introduced some scan-build failures.

Change-Id: I2055260c256429a1a2c6404a6d87605807d4170e
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/424573


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 avatarJim Harris <james.r.harris@intel.com>
parent 311e0005
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -691,8 +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)
	MOCK_CLEAR(spdk_malloc)
	MOCK_CLEAR(spdk_zmalloc)
	req = nvme_allocate_request_user_copy(&qpair, buffer, payload_size, cb_fn,
					      cb_arg, host_to_controller);
	SPDK_CU_ASSERT_FATAL(req != NULL);
+2 −0
Original line number Diff line number Diff line
@@ -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_malloc)
	MOCK_CLEAR(spdk_zmalloc)
	MOCK_CLEAR(spdk_dma_malloc)
	MOCK_CLEAR(spdk_dma_zmalloc)
	ret = nvme_ctrlr_set_doorbell_buffer_config(&ctrlr);