nvme/compliance: rename existing test cases
With more test cases added, we may not know exactly how many tests cases are covered by the compliance test tool, so here we use `Command Type` + `Command` + `Test Case` as the function name of each test case. Change-Id: I9d1f90c2463d15657133043fdf70d8124ef3fd87 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10152 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This commit is contained in:
parent
b769dcd4fd
commit
5f061fe939
@ -97,7 +97,7 @@ test_cb(void *ctx, const struct spdk_nvme_cpl *cpl)
|
||||
|
||||
/* Test that target correctly handles various IDENTIFY CNS=1 requests. */
|
||||
static void
|
||||
identify_ctrlr(void)
|
||||
admin_identify_ctrlr_verify_dptr(void)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_cmd cmd;
|
||||
@ -155,7 +155,7 @@ identify_ctrlr(void)
|
||||
|
||||
/* Test that target correctly fails admin commands with fuse != 0 */
|
||||
static void
|
||||
admin_fused(void)
|
||||
admin_identify_ctrlr_verify_fused(void)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_cmd cmd;
|
||||
@ -204,7 +204,7 @@ admin_fused(void)
|
||||
* Associated with issue #2172.
|
||||
*/
|
||||
static void
|
||||
delete_admin_queue(void)
|
||||
admin_delete_io_sq_use_admin_qid(void)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_cmd cmd;
|
||||
@ -229,6 +229,21 @@ delete_admin_queue(void)
|
||||
CU_ASSERT(s.cpl.status.sct == SPDK_NVME_SCT_COMMAND_SPECIFIC);
|
||||
CU_ASSERT(s.cpl.status.sc == SPDK_NVME_SC_INVALID_QUEUE_IDENTIFIER);
|
||||
|
||||
spdk_nvme_detach(ctrlr);
|
||||
}
|
||||
|
||||
static void
|
||||
admin_delete_io_cq_use_admin_qid(void)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_cmd cmd;
|
||||
struct status s;
|
||||
int rc;
|
||||
|
||||
SPDK_CU_ASSERT_FATAL(spdk_nvme_transport_id_parse(&g_trid, g_trid_str) == 0);
|
||||
ctrlr = spdk_nvme_connect(&g_trid, NULL, 0);
|
||||
SPDK_CU_ASSERT_FATAL(ctrlr);
|
||||
|
||||
/* Try deleting CQ for QID 0 (admin queue). This is invalid. */
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
cmd.opc = SPDK_NVME_OPC_DELETE_IO_CQ;
|
||||
@ -247,7 +262,7 @@ delete_admin_queue(void)
|
||||
}
|
||||
|
||||
static void
|
||||
delete_io_sq_twice(void)
|
||||
admin_delete_io_sq_delete_sq_twice(void)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_io_qpair_opts opts;
|
||||
@ -314,7 +329,7 @@ delete_io_sq_twice(void)
|
||||
}
|
||||
|
||||
static void
|
||||
delete_create_io_sq(void)
|
||||
admin_create_io_sq_verify_qsize_cqid(void)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_io_qpair_opts opts;
|
||||
@ -458,7 +473,7 @@ delete_create_io_sq(void)
|
||||
}
|
||||
|
||||
static void
|
||||
delete_io_cq(void)
|
||||
admin_delete_io_cq_delete_cq_first(void)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_io_qpair_opts opts;
|
||||
@ -542,7 +557,7 @@ delete_io_cq(void)
|
||||
}
|
||||
|
||||
static void
|
||||
create_io_cq(void)
|
||||
admin_create_io_cq_verify_iv_pc(void)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_cmd cmd;
|
||||
@ -626,7 +641,7 @@ out:
|
||||
}
|
||||
|
||||
static void
|
||||
property_get(void)
|
||||
fabric_property_get(void)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvmf_fabric_prop_set_cmd cmd;
|
||||
@ -682,7 +697,7 @@ parse_args(int argc, char **argv, struct spdk_env_opts *opts)
|
||||
}
|
||||
|
||||
static void
|
||||
set_features_number_of_queues(void)
|
||||
admin_set_features_number_of_queues(void)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_io_qpair_opts opts;
|
||||
@ -743,7 +758,7 @@ set_features_number_of_queues(void)
|
||||
* 16h Host Behavior Support.
|
||||
*/
|
||||
static void
|
||||
get_features(void)
|
||||
admin_get_features_mandatory_features(void)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_cmd cmd;
|
||||
@ -898,7 +913,7 @@ get_features(void)
|
||||
}
|
||||
|
||||
static void
|
||||
create_max_io_qpairs(void)
|
||||
admin_create_io_qp_max_qps(void)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_cmd cmd;
|
||||
@ -946,7 +961,7 @@ create_max_io_qpairs(void)
|
||||
}
|
||||
|
||||
static void
|
||||
identify_ns(void)
|
||||
admin_identify_ns(void)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_cmd cmd;
|
||||
@ -1057,7 +1072,7 @@ identify_ns(void)
|
||||
* 03h Firmware Slot Information
|
||||
*/
|
||||
static void
|
||||
mandatory_get_log_page(void)
|
||||
admin_get_log_page_mandatory_logs(void)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_cmd cmd;
|
||||
@ -1153,19 +1168,20 @@ int main(int argc, char **argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
CU_ADD_TEST(suite, identify_ctrlr);
|
||||
CU_ADD_TEST(suite, admin_fused);
|
||||
CU_ADD_TEST(suite, delete_admin_queue);
|
||||
CU_ADD_TEST(suite, delete_io_sq_twice);
|
||||
CU_ADD_TEST(suite, delete_create_io_sq);
|
||||
CU_ADD_TEST(suite, delete_io_cq);
|
||||
CU_ADD_TEST(suite, create_io_cq);
|
||||
CU_ADD_TEST(suite, get_features);
|
||||
CU_ADD_TEST(suite, set_features_number_of_queues);
|
||||
CU_ADD_TEST(suite, property_get);
|
||||
CU_ADD_TEST(suite, create_max_io_qpairs);
|
||||
CU_ADD_TEST(suite, identify_ns);
|
||||
CU_ADD_TEST(suite, mandatory_get_log_page);
|
||||
CU_ADD_TEST(suite, admin_identify_ctrlr_verify_dptr);
|
||||
CU_ADD_TEST(suite, admin_identify_ctrlr_verify_fused);
|
||||
CU_ADD_TEST(suite, admin_identify_ns);
|
||||
CU_ADD_TEST(suite, admin_get_features_mandatory_features);
|
||||
CU_ADD_TEST(suite, admin_set_features_number_of_queues);
|
||||
CU_ADD_TEST(suite, admin_get_log_page_mandatory_logs);
|
||||
CU_ADD_TEST(suite, fabric_property_get);
|
||||
CU_ADD_TEST(suite, admin_delete_io_sq_use_admin_qid);
|
||||
CU_ADD_TEST(suite, admin_delete_io_sq_delete_sq_twice);
|
||||
CU_ADD_TEST(suite, admin_delete_io_cq_use_admin_qid);
|
||||
CU_ADD_TEST(suite, admin_delete_io_cq_delete_cq_first);
|
||||
CU_ADD_TEST(suite, admin_create_io_cq_verify_iv_pc);
|
||||
CU_ADD_TEST(suite, admin_create_io_sq_verify_qsize_cqid);
|
||||
CU_ADD_TEST(suite, admin_create_io_qp_max_qps);
|
||||
|
||||
CU_basic_set_mode(CU_BRM_VERBOSE);
|
||||
CU_basic_run_tests();
|
||||
|
Loading…
Reference in New Issue
Block a user