From 3d1bbb273b865c29cce91f759567d06bbc27b2b2 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Mon, 1 Jun 2020 11:12:23 +0900 Subject: [PATCH] ut/nvme_pcie: Fix a few assert conditions which had used not == but = A compiler got warning for these mistakes. Signed-off-by: Shuhei Matsumoto Change-Id: Ie9772910b6a3cc9d6e45cfae1c19048179d16189 (cherry picked from commit 7641283387e9ed237bbb0824f2a114ad65684172) Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5527 Tested-by: Tomasz Zawadzki Tested-by: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk --- test/unit/lib/nvme/nvme_pcie.c/nvme_pcie_ut.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/lib/nvme/nvme_pcie.c/nvme_pcie_ut.c b/test/unit/lib/nvme/nvme_pcie.c/nvme_pcie_ut.c index 3532fa9ec4..fb9997afe4 100644 --- a/test/unit/lib/nvme/nvme_pcie.c/nvme_pcie_ut.c +++ b/test/unit/lib/nvme/nvme_pcie.c/nvme_pcie_ut.c @@ -462,11 +462,11 @@ test_build_contig_hw_sgl_request(void) CU_ASSERT(req.cmd.dptr.sgl1.address == tr.prp_sgl_bus_addr); CU_ASSERT(req.cmd.dptr.sgl1.unkeyed.length == 2 * sizeof(struct spdk_nvme_sgl_descriptor)); CU_ASSERT(tr.u.sgl[0].unkeyed.type == SPDK_NVME_SGL_TYPE_DATA_BLOCK); - CU_ASSERT(tr.u.sgl[0].unkeyed.length = 60); - CU_ASSERT(tr.u.sgl[0].address = 0xDEADBEEF); + CU_ASSERT(tr.u.sgl[0].unkeyed.length == 60); + CU_ASSERT(tr.u.sgl[0].address == 0xDEADBEEF); CU_ASSERT(tr.u.sgl[1].unkeyed.type == SPDK_NVME_SGL_TYPE_DATA_BLOCK); - CU_ASSERT(tr.u.sgl[1].unkeyed.length = 40); - CU_ASSERT(tr.u.sgl[1].address = 0xDEADBEEF); + CU_ASSERT(tr.u.sgl[1].unkeyed.length == 40); + CU_ASSERT(tr.u.sgl[1].address == 0xDEADBEEF); MOCK_CLEAR(spdk_vtophys); g_vtophys_size = 0;