diff --git a/test/env/memory/memory_ut.c b/test/env/memory/memory_ut.c index 80ec2ef09f..f3559fb72a 100644 --- a/test/env/memory/memory_ut.c +++ b/test/env/memory/memory_ut.c @@ -237,7 +237,7 @@ test_mem_map_translation(void) mapping_length = VALUE_2MB * 3; addr = spdk_mem_map_translate(map, 0, &mapping_length); CU_ASSERT(addr == 0); - CU_ASSERT(mapping_length == VALUE_2MB * 3) + CU_ASSERT(mapping_length == VALUE_2MB * 3); /* Translate an unaligned address */ mapping_length = VALUE_2MB * 3; @@ -257,13 +257,13 @@ test_mem_map_translation(void) mapping_length = VALUE_2MB * 3; addr = spdk_mem_map_translate(map, 0, &mapping_length); CU_ASSERT(addr == 0); - CU_ASSERT(mapping_length == VALUE_2MB) + CU_ASSERT(mapping_length == VALUE_2MB); /* Get translation for an unallocated block. Make sure size is 0 */ mapping_length = VALUE_2MB * 3; addr = spdk_mem_map_translate(map, VALUE_2MB, &mapping_length); CU_ASSERT(addr == default_translation); - CU_ASSERT(mapping_length == VALUE_2MB) + CU_ASSERT(mapping_length == VALUE_2MB); /* Verify translation for 2nd page is the default */ addr = spdk_mem_map_translate(map, VALUE_2MB, NULL); @@ -343,7 +343,7 @@ test_mem_map_translation(void) mapping_length = VALUE_2MB * 3; addr = spdk_mem_map_translate(map, 0, &mapping_length); CU_ASSERT(addr == 0); - CU_ASSERT(mapping_length == VALUE_2MB) + CU_ASSERT(mapping_length == VALUE_2MB); /* Translate only a subset of a 2MB page */ mapping_length = 543; diff --git a/test/env/vtophys/vtophys.c b/test/env/vtophys/vtophys.c index 75d2dae508..e0d4d7992e 100644 --- a/test/env/vtophys/vtophys.c +++ b/test/env/vtophys/vtophys.c @@ -67,7 +67,7 @@ vtophys_malloc_test(void) /* Test addresses that are not in the valid x86-64 usermode range */ paddr = spdk_vtophys((void *)0x0000800000000000ULL, NULL); - CU_ASSERT(paddr == SPDK_VTOPHYS_ERROR) + CU_ASSERT(paddr == SPDK_VTOPHYS_ERROR); } static void diff --git a/test/unit/lib/blob/blob.c/blob_ut.c b/test/unit/lib/blob/blob.c/blob_ut.c index 1516174abe..65ae151f9f 100644 --- a/test/unit/lib/blob/blob.c/blob_ut.c +++ b/test/unit/lib/blob/blob.c/blob_ut.c @@ -86,7 +86,7 @@ _get_xattr_value(void *arg, const char *name, SPDK_CU_ASSERT_FATAL(value_len != NULL); SPDK_CU_ASSERT_FATAL(value != NULL); - CU_ASSERT(arg == &g_ctx) + CU_ASSERT(arg == &g_ctx); for (i = 0; i < sizeof(g_xattr_names); i++) { if (!strcmp(name, g_xattr_names[i])) { @@ -103,7 +103,7 @@ _get_xattr_value_null(void *arg, const char *name, { SPDK_CU_ASSERT_FATAL(value_len != NULL); SPDK_CU_ASSERT_FATAL(value != NULL); - CU_ASSERT(arg == NULL) + CU_ASSERT(arg == NULL); *value_len = 0; *value = NULL; @@ -329,7 +329,7 @@ blob_create(void) CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); blob = g_blob; - CU_ASSERT(spdk_blob_get_num_clusters(blob) == 10) + CU_ASSERT(spdk_blob_get_num_clusters(blob) == 10); spdk_blob_close(blob, blob_op_complete, NULL); poll_threads(); @@ -351,7 +351,7 @@ blob_create(void) CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); blob = g_blob; - CU_ASSERT(spdk_blob_get_num_clusters(blob) == 0) + CU_ASSERT(spdk_blob_get_num_clusters(blob) == 0); spdk_blob_close(blob, blob_op_complete, NULL); poll_threads(); @@ -370,7 +370,7 @@ blob_create(void) CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); blob = g_blob; - CU_ASSERT(spdk_blob_get_num_clusters(blob) == 0) + CU_ASSERT(spdk_blob_get_num_clusters(blob) == 0); spdk_blob_close(blob, blob_op_complete, NULL); poll_threads(); @@ -608,7 +608,7 @@ blob_snapshot(void) CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); blob = g_blob; - CU_ASSERT(spdk_blob_get_num_clusters(blob) == 10) + CU_ASSERT(spdk_blob_get_num_clusters(blob) == 10); /* Create snapshot from blob */ CU_ASSERT_EQUAL(_get_snapshots_count(bs), 0); @@ -624,11 +624,11 @@ blob_snapshot(void) CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); snapshot = g_blob; - CU_ASSERT(snapshot->data_ro == true) - CU_ASSERT(snapshot->md_ro == true) - CU_ASSERT(spdk_blob_get_num_clusters(snapshot) == 10) + CU_ASSERT(snapshot->data_ro == true); + CU_ASSERT(snapshot->md_ro == true); + CU_ASSERT(spdk_blob_get_num_clusters(snapshot) == 10); - CU_ASSERT(spdk_blob_get_num_clusters(blob) == 10) + CU_ASSERT(spdk_blob_get_num_clusters(blob) == 10); CU_ASSERT(blob->invalid_flags & SPDK_BLOB_THIN_PROV); CU_ASSERT(spdk_mem_all_zero(blob->active.clusters, blob->active.num_clusters * sizeof(blob->active.clusters[0]))); @@ -649,9 +649,9 @@ blob_snapshot(void) CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); snapshot2 = g_blob; - CU_ASSERT(snapshot2->data_ro == true) - CU_ASSERT(snapshot2->md_ro == true) - CU_ASSERT(spdk_blob_get_num_clusters(snapshot2) == 10) + CU_ASSERT(snapshot2->data_ro == true); + CU_ASSERT(snapshot2->md_ro == true); + CU_ASSERT(spdk_blob_get_num_clusters(snapshot2) == 10); /* Confirm that blob is backed by snapshot2 and snapshot2 is backed by snapshot */ CU_ASSERT(snapshot->back_bs_dev == NULL); @@ -863,7 +863,7 @@ blob_clone(void) CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); blob = g_blob; - CU_ASSERT(spdk_blob_get_num_clusters(blob) == 10) + CU_ASSERT(spdk_blob_get_num_clusters(blob) == 10); /* Create snapshot */ spdk_bs_create_snapshot(bs, blobid, NULL, blob_op_with_id_complete, NULL); @@ -877,8 +877,8 @@ blob_clone(void) CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); snapshot = g_blob; - CU_ASSERT(snapshot->data_ro == true) - CU_ASSERT(snapshot->md_ro == true) + CU_ASSERT(snapshot->data_ro == true); + CU_ASSERT(snapshot->md_ro == true); CU_ASSERT(spdk_blob_get_num_clusters(snapshot) == 10); spdk_blob_close(snapshot, blob_op_complete, NULL); @@ -902,8 +902,8 @@ blob_clone(void) CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); clone = g_blob; - CU_ASSERT(clone->data_ro == false) - CU_ASSERT(clone->md_ro == false) + CU_ASSERT(clone->data_ro == false); + CU_ASSERT(clone->md_ro == false); CU_ASSERT(spdk_blob_get_num_clusters(clone) == 10); rc = spdk_blob_get_xattr_value(clone, g_xattr_names[0], &value, &value_len); @@ -953,8 +953,8 @@ blob_clone(void) CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); clone = g_blob; - CU_ASSERT(clone->data_ro == false) - CU_ASSERT(clone->md_ro == false) + CU_ASSERT(clone->data_ro == false); + CU_ASSERT(clone->md_ro == false); CU_ASSERT(spdk_blob_get_num_clusters(clone) == 10); spdk_blob_close(clone, blob_op_complete, NULL); @@ -1012,7 +1012,7 @@ _blob_inflate(bool decouple_parent) SPDK_CU_ASSERT_FATAL(g_blob != NULL); blob = g_blob; - CU_ASSERT(spdk_blob_get_num_clusters(blob) == 10) + CU_ASSERT(spdk_blob_get_num_clusters(blob) == 10); CU_ASSERT(spdk_blob_is_thin_provisioned(blob) == true); /* 1) Blob with no parent */ @@ -1036,15 +1036,15 @@ _blob_inflate(bool decouple_parent) snapshotid = g_blobid; CU_ASSERT(spdk_blob_is_thin_provisioned(blob) == true); - CU_ASSERT(spdk_blob_get_num_clusters(blob) == 10) + CU_ASSERT(spdk_blob_get_num_clusters(blob) == 10); spdk_bs_open_blob(bs, snapshotid, blob_op_with_handle_complete, NULL); poll_threads(); CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); snapshot = g_blob; - CU_ASSERT(snapshot->data_ro == true) - CU_ASSERT(snapshot->md_ro == true) + CU_ASSERT(snapshot->data_ro == true); + CU_ASSERT(snapshot->md_ro == true); CU_ASSERT(spdk_blob_get_num_clusters(snapshot) == 10); spdk_blob_close(snapshot, blob_op_complete, NULL); @@ -1075,7 +1075,7 @@ _blob_inflate(bool decouple_parent) poll_threads(); CU_ASSERT(g_bserrno == 0); - CU_ASSERT(spdk_blob_get_num_clusters(blob) == 10) + CU_ASSERT(spdk_blob_get_num_clusters(blob) == 10); CU_ASSERT(spdk_blob_is_thin_provisioned(blob) == decouple_parent); spdk_blob_close(blob, blob_op_complete, NULL); @@ -2488,7 +2488,7 @@ blob_xattr(void) CU_ASSERT(rc != 0); /* Check if SPDK_BLOB_INTERNAL_XATTR is set */ CU_ASSERT((blob->invalid_flags & SPDK_BLOB_INTERNAL_XATTR) == - SPDK_BLOB_INTERNAL_XATTR) + SPDK_BLOB_INTERNAL_XATTR); spdk_blob_close(blob, blob_op_complete, NULL); poll_threads(); @@ -4981,10 +4981,10 @@ blob_snapshot_rw(void) CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); snapshot = g_blob; - CU_ASSERT(snapshot->data_ro == true) - CU_ASSERT(snapshot->md_ro == true) + CU_ASSERT(snapshot->data_ro == true); + CU_ASSERT(snapshot->md_ro == true); - CU_ASSERT(spdk_blob_get_num_clusters(snapshot) == 5) + CU_ASSERT(spdk_blob_get_num_clusters(snapshot) == 5); write_bytes = g_dev_write_bytes; read_bytes = g_dev_read_bytes; @@ -5100,8 +5100,8 @@ blob_snapshot_rw_iov(void) CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); snapshot = g_blob; - CU_ASSERT(snapshot->data_ro == true) - CU_ASSERT(snapshot->md_ro == true) + CU_ASSERT(snapshot->data_ro == true); + CU_ASSERT(snapshot->md_ro == true); CU_ASSERT(spdk_blob_get_num_clusters(snapshot) == 5); /* Payload should be all zeros from unallocated clusters */ @@ -5295,10 +5295,10 @@ _blob_inflate_rw(bool decouple_parent) CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); snapshot = g_blob; - CU_ASSERT(snapshot->data_ro == true) - CU_ASSERT(snapshot->md_ro == true) + CU_ASSERT(snapshot->data_ro == true); + CU_ASSERT(snapshot->md_ro == true); - CU_ASSERT(spdk_blob_get_num_clusters(snapshot) == 5) + CU_ASSERT(spdk_blob_get_num_clusters(snapshot) == 5); /* Write every second cluster with a pattern. * @@ -5345,10 +5345,10 @@ _blob_inflate_rw(bool decouple_parent) CU_ASSERT(g_bserrno == 0); SPDK_CU_ASSERT_FATAL(g_blob != NULL); snapshot2 = g_blob; - CU_ASSERT(snapshot2->data_ro == true) - CU_ASSERT(snapshot2->md_ro == true) + CU_ASSERT(snapshot2->data_ro == true); + CU_ASSERT(snapshot2->md_ro == true); - CU_ASSERT(spdk_blob_get_num_clusters(snapshot2) == 5) + CU_ASSERT(spdk_blob_get_num_clusters(snapshot2) == 5); CU_ASSERT(snapshot2->parent_id == snapshotid); diff --git a/test/unit/lib/json/json_util.c/json_util_ut.c b/test/unit/lib/json/json_util.c/json_util_ut.c index 203b744e55..b95e5e7f49 100644 --- a/test/unit/lib/json/json_util.c/json_util_ut.c +++ b/test/unit/lib/json/json_util.c/json_util_ut.c @@ -355,7 +355,7 @@ test_decode_int32(void) v.len = 2; i = 0; CU_ASSERT(spdk_json_decode_int32(&v, &i) == 0); - CU_ASSERT(i == 33) + CU_ASSERT(i == 33); /* correct type and invalid value (float) */ v.start = "32.45"; @@ -423,7 +423,7 @@ test_decode_int32(void) v.len = 7; i = 0; CU_ASSERT(spdk_json_decode_int32(&v, &i) == 0); - CU_ASSERT(i == -4) + CU_ASSERT(i == -4); /* invalid exponent (overflow) */ v.start = "-2e32"; @@ -436,7 +436,7 @@ test_decode_int32(void) v.len = 6; i = 0; CU_ASSERT(spdk_json_decode_int32(&v, &i) == 0); - CU_ASSERT(i == 213) + CU_ASSERT(i == 213); /* invalid exponent with decimal */ v.start = "2.134e2"; @@ -627,7 +627,7 @@ test_decode_uint32(void) v.len = 5; i = 0; CU_ASSERT(spdk_json_decode_uint32(&v, &i) == 0); - CU_ASSERT(i == 1) + CU_ASSERT(i == 1); } static void @@ -716,7 +716,7 @@ test_decode_uint64(void) v.len = 6; i = 0; CU_ASSERT(spdk_json_decode_uint64(&v, &i) == 0); - CU_ASSERT(i == 4) + CU_ASSERT(i == 4); } static void @@ -798,7 +798,7 @@ test_find(void) CU_ASSERT(rc == 0); CU_ASSERT(key != NULL && spdk_json_strequal(key, "string") == true); - CU_ASSERT(val != NULL && spdk_json_strequal(val, "Some string data") == true) + CU_ASSERT(val != NULL && spdk_json_strequal(val, "Some string data") == true); key = val = NULL; rc = spdk_json_find(values, "object", &key, &val, SPDK_JSON_VAL_OBJECT_BEGIN); diff --git a/test/unit/lib/nvmf/ctrlr_bdev.c/ctrlr_bdev_ut.c b/test/unit/lib/nvmf/ctrlr_bdev.c/ctrlr_bdev_ut.c index b1ce154f37..48a6995655 100644 --- a/test/unit/lib/nvmf/ctrlr_bdev.c/ctrlr_bdev_ut.c +++ b/test/unit/lib/nvmf/ctrlr_bdev.c/ctrlr_bdev_ut.c @@ -219,7 +219,7 @@ test_lba_in_range(void) /* Overflow edge cases */ CU_ASSERT(nvmf_bdev_ctrlr_lba_in_range(UINT64_MAX, 0, UINT64_MAX) == true); - CU_ASSERT(nvmf_bdev_ctrlr_lba_in_range(UINT64_MAX, 1, UINT64_MAX) == false) + CU_ASSERT(nvmf_bdev_ctrlr_lba_in_range(UINT64_MAX, 1, UINT64_MAX) == false); CU_ASSERT(nvmf_bdev_ctrlr_lba_in_range(UINT64_MAX, UINT64_MAX - 1, 1) == true); CU_ASSERT(nvmf_bdev_ctrlr_lba_in_range(UINT64_MAX, UINT64_MAX, 1) == false); } diff --git a/test/unit/lib/vhost/vhost.c/vhost_ut.c b/test/unit/lib/vhost/vhost.c/vhost_ut.c index c5316a7a6a..1716695e5a 100644 --- a/test/unit/lib/vhost/vhost.c/vhost_ut.c +++ b/test/unit/lib/vhost/vhost.c/vhost_ut.c @@ -399,7 +399,7 @@ vq_avail_ring_get_test(void) ret = spdk_vhost_vq_avail_ring_get(&vq, reqs, reqs_len); CU_ASSERT(ret == 5); CU_ASSERT(vq.last_avail_idx == 4); - CU_ASSERT(reqs[0] == vq.vring.avail->ring[31]) + CU_ASSERT(reqs[0] == vq.vring.avail->ring[31]); for (i = 1; i < ret; i++) { CU_ASSERT(reqs[i] == vq.vring.avail->ring[i - 1]); }