nvme: subnqn is case sensitive and update the unit test

Change-Id: I43337b4a51cb2008737ed9a9691707a9bfb04c5c
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/367146
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
GangCao 2017-06-26 18:07:51 -04:00 committed by Daniel Verkamp
parent 908ecf9cc4
commit 5066e52d63

View File

@ -312,6 +312,18 @@ test_trid_parse_and_compare(void)
ret = spdk_nvme_transport_id_compare(&trid1, &trid2);
CU_ASSERT(ret < 0);
memset_trid(&trid1, &trid2);
snprintf(trid1.subnqn, sizeof(trid1.subnqn), "subnqn:nqn.2016-08.org.nvmexpress.discovery");
snprintf(trid2.subnqn, sizeof(trid2.subnqn), "subnqn:nqn.2016-08.org.nvmexpress.discovery");
ret = spdk_nvme_transport_id_compare(&trid1, &trid2);
CU_ASSERT(ret == 0);
memset_trid(&trid1, &trid2);
snprintf(trid1.subnqn, sizeof(trid1.subnqn), "subnqn:nqn.2016-08.org.nvmexpress.discovery");
snprintf(trid2.subnqn, sizeof(trid2.subnqn), "subnqn:nqn.2016-08.org.Nvmexpress.discovery");
ret = spdk_nvme_transport_id_compare(&trid1, &trid2);
CU_ASSERT(ret > 0);
memset_trid(&trid1, &trid2);
ret = spdk_nvme_transport_id_compare(&trid1, &trid2);
CU_ASSERT(ret == 0);