From 736e1c1be1bdb6933f741653696f6162f0ab2226 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 28 Mar 2023 11:58:44 +0000 Subject: [PATCH] test/unit/nvmf: fix qid too large test We need to be checking whether the specified qid is too large or not - the current test says it is doing that in the comments but is really just checking the duplicate QID path (which following test already covers). Signed-off-by: Jim Harris Change-Id: I21dac3c7ec83a5c8e31fac77481708d54cb40e9e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17368 Reviewed-by: Ben Walker Community-CI: Mellanox Build Bot Reviewed-by: Shuhei Matsumoto Tested-by: SPDK CI Jenkins --- test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c b/test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c index 4807f9bfb..98b875063 100644 --- a/test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c +++ b/test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c @@ -792,11 +792,9 @@ test_connect(void) CU_ASSERT(sgroups[subsystem.id].mgmt_io_outstanding == 0); ctrlr.vcprop.cc.bits.iocqes = 4; - /* I/O connect with too many existing qpairs */ + /* I/O connect with qid that is too large */ memset(&rsp, 0, sizeof(rsp)); - spdk_bit_array_set(ctrlr.qpair_mask, 0); - spdk_bit_array_set(ctrlr.qpair_mask, 1); - spdk_bit_array_set(ctrlr.qpair_mask, 2); + cmd.connect_cmd.qid = 3; sgroups[subsystem.id].mgmt_io_outstanding++; TAILQ_INSERT_TAIL(&qpair.outstanding, &req, link); rc = nvmf_ctrlr_cmd_connect(&req); @@ -806,9 +804,6 @@ test_connect(void) CU_ASSERT(rsp.nvme_cpl.status.sc == SPDK_NVME_SC_INVALID_QUEUE_IDENTIFIER); CU_ASSERT(qpair.ctrlr == NULL); CU_ASSERT(sgroups[subsystem.id].mgmt_io_outstanding == 0); - spdk_bit_array_clear(ctrlr.qpair_mask, 0); - spdk_bit_array_clear(ctrlr.qpair_mask, 1); - spdk_bit_array_clear(ctrlr.qpair_mask, 2); /* I/O connect with duplicate queue ID */ memset(&rsp, 0, sizeof(rsp));