test: fix typos in the test directory

Change-Id: I362077d578e6b0e0e2ac5ae38e49488c4b64d417
Signed-off-by: xuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/423496
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
xuhuagen 2018-08-27 16:24:40 +08:00 committed by Jim Harris
parent 1f813ec3da
commit 785f602541
10 changed files with 28 additions and 28 deletions

View File

@ -1000,7 +1000,7 @@ main(int argc, char **argv)
} }
if (g_io_size > SPDK_BDEV_LARGE_BUF_MAX_SIZE) { if (g_io_size > SPDK_BDEV_LARGE_BUF_MAX_SIZE) {
printf("I/O size of %d is greather than zero copy threshold (%d).\n", printf("I/O size of %d is greater than zero copy threshold (%d).\n",
g_io_size, SPDK_BDEV_LARGE_BUF_MAX_SIZE); g_io_size, SPDK_BDEV_LARGE_BUF_MAX_SIZE);
printf("Zero copy mechanism will not be used.\n"); printf("Zero copy mechanism will not be used.\n");
g_zcopy = false; g_zcopy = false;

View File

@ -195,7 +195,7 @@ get_changed_ns_log_page_completion(void *cb_arg, const struct spdk_nvme_cpl *cpl
} }
if (!found) { if (!found) {
printf("%s: Error: Cann't find expected NSID %u\n", dev->name, expected_ns_test); printf("%s: Error: Can't find expected NSID %u\n", dev->name, expected_ns_test);
failed = 1; failed = 1;
} }

View File

@ -253,7 +253,7 @@ static void build_io_request_9(struct io_request *req)
{ {
/* /*
* Check if mixed PRP complaint and not complaint requests are handled * Check if mixed PRP complaint and not complaint requests are handled
* properly by spliting them into subrequests. * properly by splitting them into subrequests.
* Construct buffers with following theme: * Construct buffers with following theme:
*/ */
const size_t req_len[] = { 2048, 4096, 2048, 4096, 2048, 1024 }; const size_t req_len[] = { 2048, 4096, 2048, 4096, 2048, 1024 };

View File

@ -154,7 +154,7 @@ test_read_partitions(void)
memset(a, 'a', sizeof(a)); memset(a, 'a', sizeof(a));
gpt->buf = &a[0]; gpt->buf = &a[0];
/* Set num_partition_entries exceeds Max vaule of entries GPT supported */ /* Set num_partition_entries exceeds Max value of entries GPT supported */
gpt->sector_size = 512; gpt->sector_size = 512;
head = (struct spdk_gpt_header *)(gpt->buf + GPT_PRIMARY_PARTITION_TABLE_LBA * gpt->sector_size); head = (struct spdk_gpt_header *)(gpt->buf + GPT_PRIMARY_PARTITION_TABLE_LBA * gpt->sector_size);
gpt->header = head; gpt->header = head;
@ -162,7 +162,7 @@ test_read_partitions(void)
re = spdk_gpt_read_partitions(gpt); re = spdk_gpt_read_partitions(gpt);
CU_ASSERT(re == -1); CU_ASSERT(re == -1);
/* Set num_partition_entries within Max vaule, size_of_partition_entry mismatch */ /* Set num_partition_entries within Max value, size_of_partition_entry mismatch */
to_le32(&head->header_crc32, 0x573857BE); to_le32(&head->header_crc32, 0x573857BE);
to_le32(&head->num_partition_entries, 0x40); to_le32(&head->num_partition_entries, 0x40);
to_le32(&head->size_of_partition_entry, 0x0); to_le32(&head->size_of_partition_entry, 0x0);

View File

@ -522,7 +522,7 @@ ut_pmem_write_read(void)
CU_ASSERT_EQUAL(rc, SPDK_BDEV_IO_STATUS_FAILED); CU_ASSERT_EQUAL(rc, SPDK_BDEV_IO_STATUS_FAILED);
/* /*
* Write with insuficient IOV buffers length. * Write with insufficient IOV buffers length.
*/ */
rc = bdev_submit_request(bdev, SPDK_BDEV_IO_TYPE_WRITE, 0, g_pool_ok.nblock, &iov[0], 2); rc = bdev_submit_request(bdev, SPDK_BDEV_IO_TYPE_WRITE, 0, g_pool_ok.nblock, &iov[0], 2);
CU_ASSERT_EQUAL(rc, SPDK_BDEV_IO_STATUS_FAILED); CU_ASSERT_EQUAL(rc, SPDK_BDEV_IO_STATUS_FAILED);
@ -588,7 +588,7 @@ ut_pmem_write_read(void)
CU_ASSERT_EQUAL(rc, SPDK_BDEV_IO_STATUS_FAILED); CU_ASSERT_EQUAL(rc, SPDK_BDEV_IO_STATUS_FAILED);
/* /*
* Read with insuficient IOV buffers length. * Read with insufficient IOV buffers length.
*/ */
rc = bdev_submit_request(bdev, SPDK_BDEV_IO_TYPE_READ, 0, g_pool_ok.nblock, &iov[0], 2); rc = bdev_submit_request(bdev, SPDK_BDEV_IO_TYPE_READ, 0, g_pool_ok.nblock, &iov[0], 2);
CU_ASSERT_EQUAL(rc, SPDK_BDEV_IO_STATUS_FAILED); CU_ASSERT_EQUAL(rc, SPDK_BDEV_IO_STATUS_FAILED);

View File

@ -689,7 +689,7 @@ ut_lvs_destroy(void)
int sz = 10; int sz = 10;
struct spdk_lvol_store *lvs; struct spdk_lvol_store *lvs;
/* Lvol store is succesfully created */ /* Lvol store is successfully created */
rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL); rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL);
CU_ASSERT(rc == 0); CU_ASSERT(rc == 0);
CU_ASSERT(g_lvserrno == 0); CU_ASSERT(g_lvserrno == 0);
@ -701,7 +701,7 @@ ut_lvs_destroy(void)
spdk_uuid_generate(&lvs->uuid); spdk_uuid_generate(&lvs->uuid);
/* Suuccessfully create lvol, which should be unloaded with lvs later */ /* Successfully create lvol, which should be unloaded with lvs later */
g_lvolerrno = -1; g_lvolerrno = -1;
rc = vbdev_lvol_create(lvs, "lvol", sz, false, vbdev_lvol_create_complete, NULL); rc = vbdev_lvol_create(lvs, "lvol", sz, false, vbdev_lvol_create_complete, NULL);
CU_ASSERT(rc == 0); CU_ASSERT(rc == 0);
@ -721,7 +721,7 @@ ut_lvol_init(void)
int sz = 10; int sz = 10;
int rc; int rc;
/* Lvol store is succesfully created */ /* Lvol store is successfully created */
rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL); rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL);
CU_ASSERT(rc == 0); CU_ASSERT(rc == 0);
CU_ASSERT(g_lvserrno == 0); CU_ASSERT(g_lvserrno == 0);
@ -754,7 +754,7 @@ ut_lvol_snapshot(void)
int rc; int rc;
struct spdk_lvol *lvol = NULL; struct spdk_lvol *lvol = NULL;
/* Lvol store is succesfully created */ /* Lvol store is successfully created */
rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL); rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL);
CU_ASSERT(rc == 0); CU_ASSERT(rc == 0);
CU_ASSERT(g_lvserrno == 0); CU_ASSERT(g_lvserrno == 0);
@ -802,7 +802,7 @@ ut_lvol_clone(void)
struct spdk_lvol *snap = NULL; struct spdk_lvol *snap = NULL;
struct spdk_lvol *clone = NULL; struct spdk_lvol *clone = NULL;
/* Lvol store is succesfully created */ /* Lvol store is successfully created */
rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL); rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL);
CU_ASSERT(rc == 0); CU_ASSERT(rc == 0);
CU_ASSERT(g_lvserrno == 0); CU_ASSERT(g_lvserrno == 0);
@ -866,7 +866,7 @@ ut_lvol_hotremove(void)
lvol_store_initialize_cb_fail = false; lvol_store_initialize_cb_fail = false;
lvol_already_opened = false; lvol_already_opened = false;
/* Lvol store is succesfully created */ /* Lvol store is successfully created */
rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL); rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL);
CU_ASSERT(rc == 0); CU_ASSERT(rc == 0);
CU_ASSERT(g_lvserrno == 0); CU_ASSERT(g_lvserrno == 0);
@ -921,7 +921,7 @@ ut_lvol_examine(void)
vbdev_lvs_examine(&g_bdev); vbdev_lvs_examine(&g_bdev);
ut_lvs_examine_check(false); ut_lvs_examine_check(false);
/* Examine succesfully /* Examine successfully
* - one lvol fails to load * - one lvol fails to load
* - lvs is loaded with no lvols present */ * - lvs is loaded with no lvols present */
g_lvserrno = 0; g_lvserrno = 0;
@ -937,7 +937,7 @@ ut_lvol_examine(void)
CU_ASSERT(g_lvserrno == 0); CU_ASSERT(g_lvserrno == 0);
CU_ASSERT(g_lvol_store == NULL); CU_ASSERT(g_lvol_store == NULL);
/* Examine succesfully */ /* Examine successfully */
g_lvserrno = 0; g_lvserrno = 0;
g_lvolerrno = 0; g_lvolerrno = 0;
g_registered_bdevs = 0; g_registered_bdevs = 0;
@ -959,7 +959,7 @@ ut_lvol_rename(void)
int sz = 10; int sz = 10;
int rc; int rc;
/* Lvol store is succesfully created */ /* Lvol store is successfully created */
rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL); rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL);
CU_ASSERT(rc == 0); CU_ASSERT(rc == 0);
CU_ASSERT(g_lvserrno == 0); CU_ASSERT(g_lvserrno == 0);
@ -1021,7 +1021,7 @@ ut_lvol_destroy(void)
int sz = 10; int sz = 10;
int rc; int rc;
/* Lvol store is succesfully created */ /* Lvol store is successfully created */
rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL); rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL);
CU_ASSERT(rc == 0); CU_ASSERT(rc == 0);
CU_ASSERT(g_lvserrno == 0); CU_ASSERT(g_lvserrno == 0);
@ -1073,7 +1073,7 @@ ut_lvol_resize(void)
int sz = 10; int sz = 10;
int rc = 0; int rc = 0;
/* Lvol store is succesfully created */ /* Lvol store is successfully created */
rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL); rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL);
CU_ASSERT(rc == 0); CU_ASSERT(rc == 0);
CU_ASSERT(g_lvserrno == 0); CU_ASSERT(g_lvserrno == 0);
@ -1116,7 +1116,7 @@ ut_lvs_unload(void)
int sz = 10; int sz = 10;
struct spdk_lvol_store *lvs; struct spdk_lvol_store *lvs;
/* Lvol store is succesfully created */ /* Lvol store is successfully created */
rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL); rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL);
CU_ASSERT(rc == 0); CU_ASSERT(rc == 0);
CU_ASSERT(g_lvserrno == 0); CU_ASSERT(g_lvserrno == 0);
@ -1128,7 +1128,7 @@ ut_lvs_unload(void)
spdk_uuid_generate(&lvs->uuid); spdk_uuid_generate(&lvs->uuid);
/* Suuccessfully create lvol, which should be destroyed with lvs later */ /* Successfully create lvol, which should be destroyed with lvs later */
g_lvolerrno = -1; g_lvolerrno = -1;
rc = vbdev_lvol_create(lvs, "lvol", sz, false, vbdev_lvol_create_complete, NULL); rc = vbdev_lvol_create(lvs, "lvol", sz, false, vbdev_lvol_create_complete, NULL);
CU_ASSERT(rc == 0); CU_ASSERT(rc == 0);
@ -1168,7 +1168,7 @@ ut_lvs_init(void)
lvol_store_initialize_cb_fail = false; lvol_store_initialize_cb_fail = false;
/* Lvol store is succesfully created */ /* Lvol store is successfully created */
rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL); rc = vbdev_lvs_create(&g_bdev, "lvs", 0, lvol_store_op_with_handle_complete, NULL);
CU_ASSERT(rc == 0); CU_ASSERT(rc == 0);
CU_ASSERT(g_lvserrno == 0); CU_ASSERT(g_lvserrno == 0);
@ -1313,7 +1313,7 @@ ut_lvs_rename(void)
int sz = 10; int sz = 10;
struct spdk_lvol_store *lvs; struct spdk_lvol_store *lvs;
/* Lvol store is succesfully created */ /* Lvol store is successfully created */
rc = vbdev_lvs_create(&g_bdev, "old_lvs_name", 0, lvol_store_op_with_handle_complete, NULL); rc = vbdev_lvs_create(&g_bdev, "old_lvs_name", 0, lvol_store_op_with_handle_complete, NULL);
CU_ASSERT(rc == 0); CU_ASSERT(rc == 0);
CU_ASSERT(g_lvserrno == 0); CU_ASSERT(g_lvserrno == 0);

View File

@ -1881,7 +1881,7 @@ blob_unmap(void)
spdk_blob_sync_md(blob, blob_op_complete, NULL); spdk_blob_sync_md(blob, blob_op_complete, NULL);
CU_ASSERT(g_bserrno == 0); CU_ASSERT(g_bserrno == 0);
/* Confirm that only 'allocated' clusters were unmaped */ /* Confirm that only 'allocated' clusters were unmapped */
for (i = 1; i < 11; i++) { for (i = 1; i < 11; i++) {
switch (i) { switch (i) {
case 2: case 2:

View File

@ -133,7 +133,7 @@ op_login_check_target_test(void)
struct spdk_iscsi_tgt_node *target; struct spdk_iscsi_tgt_node *target;
int rc; int rc;
/* expect sucess */ /* expect success */
snprintf(conn.initiator_name, sizeof(conn.initiator_name), snprintf(conn.initiator_name, sizeof(conn.initiator_name),
"%s", UT_INITIATOR_NAME1); "%s", UT_INITIATOR_NAME1);
@ -216,7 +216,7 @@ maxburstlength_test(void)
SPDK_CU_ASSERT_FATAL(response_pdu != NULL); SPDK_CU_ASSERT_FATAL(response_pdu != NULL);
/* /*
* Confirm that a correct R2T reply was sent in reponse to the * Confirm that a correct R2T reply was sent in response to the
* SCSI request. * SCSI request.
*/ */
TAILQ_REMOVE(&g_write_pdu_list, response_pdu, tailq); TAILQ_REMOVE(&g_write_pdu_list, response_pdu, tailq);

View File

@ -378,7 +378,7 @@ main(int argc, char **argv)
if ( if (
CU_add_test(suite, "param negotiation test", CU_add_test(suite, "param negotiation test",
param_negotiation_test) == NULL || param_negotiation_test) == NULL ||
CU_add_test(suite, "list negotation test", CU_add_test(suite, "list negotiation test",
list_negotiation_test) == NULL || list_negotiation_test) == NULL ||
CU_add_test(suite, "parse valid test", CU_add_test(suite, "parse valid test",
parse_valid_test) == NULL || parse_valid_test) == NULL ||

View File

@ -396,7 +396,7 @@ test_nvme_driver_init(void)
rc = nvme_driver_init(); rc = nvme_driver_init();
CU_ASSERT(rc == 0); CU_ASSERT(rc == 0);
/* process is not primary, mem is reserved but not intiialized */ /* process is not primary, mem is reserved but not initialized */
/* and times out */ /* and times out */
MOCK_SET(spdk_process_is_primary, false); MOCK_SET(spdk_process_is_primary, false);
MOCK_SET(spdk_memzone_reserve, (void *)&dummy); MOCK_SET(spdk_memzone_reserve, (void *)&dummy);
@ -453,7 +453,7 @@ test_spdk_nvme_detach(void)
* Controllers are ref counted so mock the function that returns * Controllers are ref counted so mock the function that returns
* the ref count so that detach will actually call the destruct * the ref count so that detach will actually call the destruct
* function which we've mocked simply to verify that it gets * function which we've mocked simply to verify that it gets
* called (we aren't testing what the real destuct function does * called (we aren't testing what the real destruct function does
* here.) * here.)
*/ */
MOCK_SET(nvme_ctrlr_get_ref_count, 0); MOCK_SET(nvme_ctrlr_get_ref_count, 0);