diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 14:31:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 14:31:56 (GMT) |
commit | 7a44581a84778a1346a2fd5b6cca7d9db905a321 (patch) | |
tree | 44ea9c2d1b471eb227698abe8499c34cfa6d47d2 /testpar/t_cache.c | |
parent | 622fcbd13881fbc58bbeaed3062583b759f5e864 (diff) | |
download | hdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.zip hdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.tar.gz hdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.tar.bz2 |
Rename HDassert() to assert() (#3191)
* Change HDassert to assert
* Fix bin/make_err
Diffstat (limited to 'testpar/t_cache.c')
-rw-r--r-- | testpar/t_cache.c | 426 |
1 files changed, 213 insertions, 213 deletions
diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 2507c7e..a9486a4 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -747,8 +747,8 @@ init_data(void) haddr_t addr = BASE_ADDR; /* this must hold so moves don't change entry size. */ - HDassert((NUM_DATA_ENTRIES / 2) % 20 == 0); - HDassert((virt_num_data_entries / 2) % 20 == 0); + assert((NUM_DATA_ENTRIES / 2) % 20 == 0); + assert((virt_num_data_entries / 2) % 20 == 0); for (i = 0; i < NUM_DATA_ENTRIES; i++) { data[i].base_addr = addr; @@ -770,7 +770,7 @@ init_data(void) data_index[i] = i; addr += addr_offsets[j]; - HDassert(addr > data[i].base_addr); + assert(addr > data[i].base_addr); j = (j + 1) % num_addr_offsets; } @@ -2134,20 +2134,20 @@ datum_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr) int idx; struct datum *entry_ptr; - HDassert(udata_ptr); - HDassert(image_len_ptr); + assert(udata_ptr); + assert(image_len_ptr); idx = addr_to_datum_index(addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(addr == entry_ptr->base_addr); - HDassert(!entry_ptr->global_pinned); - HDassert(!entry_ptr->local_pinned); + assert(addr == entry_ptr->base_addr); + assert(!entry_ptr->global_pinned); + assert(!entry_ptr->local_pinned); if (callbacks_verbose) { @@ -2183,21 +2183,21 @@ datum_deserialize(const void H5_ATTR_NDEBUG_UNUSED *image_ptr, H5_ATTR_UNUSED si int idx; struct datum *entry_ptr = NULL; - HDassert(image_ptr != NULL); + assert(image_ptr != NULL); idx = addr_to_datum_index(addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(addr == entry_ptr->base_addr); - HDassert(!entry_ptr->global_pinned); - HDassert(!entry_ptr->local_pinned); + assert(addr == entry_ptr->base_addr); + assert(!entry_ptr->global_pinned); + assert(!entry_ptr->local_pinned); - HDassert(dirty_ptr); + assert(dirty_ptr); if (callbacks_verbose) { @@ -2238,19 +2238,19 @@ datum_image_len(const void *thing, size_t *image_len) int idx; const struct datum *entry_ptr; - HDassert(thing); - HDassert(image_len); + assert(thing); + assert(image_len); entry_ptr = (const struct datum *)thing; idx = addr_to_datum_index(entry_ptr->base_addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); - HDassert(&(data[idx]) == entry_ptr); - HDassert(entry_ptr->local_len > 0); - HDassert(entry_ptr->local_len <= entry_ptr->len); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); + assert(&(data[idx]) == entry_ptr); + assert(entry_ptr->local_len > 0); + assert(entry_ptr->local_len <= entry_ptr->len); if (callbacks_verbose) { HDfprintf(stdout, "%d: image_len() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx, @@ -2258,7 +2258,7 @@ datum_image_len(const void *thing, size_t *image_len) fflush(stdout); } - HDassert(entry_ptr->header.addr == entry_ptr->base_addr); + assert(entry_ptr->header.addr == entry_ptr->base_addr); *image_len = entry_ptr->local_len; @@ -2285,28 +2285,28 @@ datum_serialize(const H5F_t *f, void H5_ATTR_NDEBUG_UNUSED *image_ptr, size_t le struct datum *entry_ptr; struct H5AC_aux_t *aux_ptr; - HDassert(thing_ptr); - HDassert(image_ptr); + assert(thing_ptr); + assert(image_ptr); entry_ptr = (struct datum *)thing_ptr; - HDassert(f); - HDassert(f->shared); - HDassert(f->shared->cache); - HDassert(f->shared->cache->aux_ptr); + assert(f); + assert(f->shared); + assert(f->shared->cache); + assert(f->shared->cache->aux_ptr); aux_ptr = (H5AC_aux_t *)(f->shared->cache->aux_ptr); - HDassert(aux_ptr); + assert(aux_ptr); entry_ptr->aux_ptr = aux_ptr; idx = addr_to_datum_index(entry_ptr->base_addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); - HDassert(&(data[idx]) == entry_ptr); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); + assert(&(data[idx]) == entry_ptr); if (callbacks_verbose) { @@ -2315,17 +2315,17 @@ datum_serialize(const H5F_t *f, void H5_ATTR_NDEBUG_UNUSED *image_ptr, size_t le fflush(stdout); } - HDassert(entry_ptr->header.addr == entry_ptr->base_addr); - HDassert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len)); + assert(entry_ptr->header.addr == entry_ptr->base_addr); + assert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len)); - HDassert(entry_ptr->header.is_dirty == entry_ptr->dirty); + assert(entry_ptr->header.is_dirty == entry_ptr->dirty); datum_flushes++; if (entry_ptr->header.is_pinned) { datum_pinned_flushes++; - HDassert(entry_ptr->global_pinned || entry_ptr->local_pinned); + assert(entry_ptr->global_pinned || entry_ptr->local_pinned); } return (ret_value); @@ -2355,16 +2355,16 @@ datum_notify(H5C_notify_action_t action, void *thing) struct mssg_t mssg; int idx; - HDassert(thing); + assert(thing); entry_ptr = (struct datum *)thing; idx = addr_to_datum_index(entry_ptr->base_addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); - HDassert(&(data[idx]) == entry_ptr); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); + assert(&(data[idx]) == entry_ptr); if (callbacks_verbose) { @@ -2373,14 +2373,14 @@ datum_notify(H5C_notify_action_t action, void *thing) fflush(stdout); } - HDassert(entry_ptr->header.addr == entry_ptr->base_addr); + assert(entry_ptr->header.addr == entry_ptr->base_addr); /* Skip this check when the entry is being dirtied, since the resize * operation sends the message before the len/local_len is updated * (after the resize operation completes successfully) (QAK - 2016/10/19) */ if (H5AC_NOTIFY_ACTION_ENTRY_DIRTIED != action) - HDassert((entry_ptr->header.size == entry_ptr->len) || - (entry_ptr->header.size == entry_ptr->local_len)); + assert((entry_ptr->header.size == entry_ptr->len) || + (entry_ptr->header.size == entry_ptr->local_len)); switch (action) { case H5AC_NOTIFY_ACTION_AFTER_INSERT: @@ -2523,11 +2523,11 @@ datum_notify(H5C_notify_action_t action, void *thing) fflush(stdout); } - HDassert(entry_ptr->aux_ptr); + assert(entry_ptr->aux_ptr); aux_ptr = entry_ptr->aux_ptr; entry_ptr->aux_ptr = NULL; - HDassert(entry_ptr->header.is_dirty); /* JRM */ + assert(entry_ptr->header.is_dirty); /* JRM */ if ((file_mpi_rank != 0) && (entry_ptr->dirty) && (aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY)) { @@ -2603,7 +2603,7 @@ datum_notify(H5C_notify_action_t action, void *thing) if (entry_ptr->header.is_pinned) { datum_pinned_flushes++; - HDassert(entry_ptr->global_pinned || entry_ptr->local_pinned); + assert(entry_ptr->global_pinned || entry_ptr->local_pinned); } break; @@ -2644,7 +2644,7 @@ datum_notify(H5C_notify_action_t action, void *thing) if (entry_ptr->header.is_pinned) { datum_pinned_clears++; - HDassert(entry_ptr->global_pinned || entry_ptr->local_pinned); + assert(entry_ptr->global_pinned || entry_ptr->local_pinned); } /* end if */ break; @@ -2728,16 +2728,16 @@ datum_free_icr(void *thing) int idx; struct datum *entry_ptr; - HDassert(thing); + assert(thing); entry_ptr = (struct datum *)thing; idx = addr_to_datum_index(entry_ptr->base_addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); - HDassert(&(data[idx]) == entry_ptr); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); + assert(&(data[idx]) == entry_ptr); if (callbacks_verbose) { @@ -2746,13 +2746,13 @@ datum_free_icr(void *thing) fflush(stdout); } - HDassert(entry_ptr->header.addr == entry_ptr->base_addr); - HDassert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len)); + assert(entry_ptr->header.addr == entry_ptr->base_addr); + assert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len)); - HDassert(!(entry_ptr->header.is_dirty)); - HDassert(!(entry_ptr->global_pinned)); - HDassert(!(entry_ptr->local_pinned)); - HDassert(!(entry_ptr->header.is_pinned)); + assert(!(entry_ptr->header.is_dirty)); + assert(!(entry_ptr->global_pinned)); + assert(!(entry_ptr->local_pinned)); + assert(!(entry_ptr->header.is_pinned)); datum_destroys++; @@ -2784,15 +2784,15 @@ expunge_entry(H5F_t *file_ptr, int32_t idx) herr_t result; struct datum *entry_ptr; - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(!(entry_ptr->locked)); - HDassert(!(entry_ptr->global_pinned)); - HDassert(!(entry_ptr->local_pinned)); + assert(!(entry_ptr->locked)); + assert(!(entry_ptr->global_pinned)); + assert(!(entry_ptr->local_pinned)); entry_ptr->dirty = FALSE; @@ -2808,8 +2808,8 @@ expunge_entry(H5F_t *file_ptr, int32_t idx) } } - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); - HDassert(!((entry_ptr->header).is_dirty)); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(!((entry_ptr->header).is_dirty)); result = H5C_get_entry_status(file_ptr, entry_ptr->base_addr, NULL, &in_cache, NULL, NULL, NULL, NULL, NULL, NULL, NULL); @@ -2855,14 +2855,14 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags) herr_t result; struct datum *entry_ptr; - HDassert(cache_ptr); - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(cache_ptr); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(!(entry_ptr->locked)); + assert(!(entry_ptr->locked)); insert_pinned = ((flags & H5C__PIN_ENTRY_FLAG) != 0); @@ -2907,18 +2907,18 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags) if (insert_pinned) { - HDassert(entry_ptr->header.is_pinned); + assert(entry_ptr->header.is_pinned); entry_ptr->global_pinned = TRUE; global_pins++; } else { - HDassert(!(entry_ptr->header.is_pinned)); + assert(!(entry_ptr->header.is_pinned)); entry_ptr->global_pinned = FALSE; } - /* HDassert( entry_ptr->header.is_dirty ); */ - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + /* assert( entry_ptr->header.is_dirty ); */ + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); } return; @@ -2950,18 +2950,18 @@ local_pin_and_unpin_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, in int i; int idx; - HDassert(file_ptr); - HDassert(0 <= min_idx); - HDassert(min_idx < max_idx); - HDassert(max_idx < NUM_DATA_ENTRIES); - HDassert(max_idx < virt_num_data_entries); - HDassert(0 <= min_count); - HDassert(min_count < max_count); + assert(file_ptr); + assert(0 <= min_idx); + assert(min_idx < max_idx); + assert(max_idx < NUM_DATA_ENTRIES); + assert(max_idx < virt_num_data_entries); + assert(0 <= min_count); + assert(min_count < max_count); count = (HDrand() % (max_count - min_count)) + min_count; - HDassert(min_count <= count); - HDassert(count <= max_count); + assert(min_count <= count); + assert(count <= max_count); for (i = 0; i < count; i++) { local_pin_random_entry(file_ptr, min_idx, max_idx); @@ -2969,8 +2969,8 @@ local_pin_and_unpin_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, in count = (HDrand() % (max_count - min_count)) + min_count; - HDassert(min_count <= count); - HDassert(count <= max_count); + assert(min_count <= count); + assert(count <= max_count); i = 0; idx = 0; @@ -3009,16 +3009,16 @@ local_pin_random_entry(H5F_t *file_ptr, int min_idx, int max_idx) if (nerrors == 0) { - HDassert(file_ptr); - HDassert(0 <= min_idx); - HDassert(min_idx < max_idx); - HDassert(max_idx < NUM_DATA_ENTRIES); - HDassert(max_idx < virt_num_data_entries); + assert(file_ptr); + assert(0 <= min_idx); + assert(min_idx < max_idx); + assert(max_idx < NUM_DATA_ENTRIES); + assert(max_idx < virt_num_data_entries); do { idx = (HDrand() % (max_idx - min_idx)) + min_idx; - HDassert(min_idx <= idx); - HDassert(idx <= max_idx); + assert(min_idx <= idx); + assert(idx <= max_idx); } while (data[idx].global_pinned || data[idx].local_pinned); pin_entry(file_ptr, idx, FALSE, FALSE); @@ -3049,7 +3049,7 @@ local_unpin_all_entries(H5F_t *file_ptr, hbool_t via_unprotect) int idx; - HDassert(file_ptr); + assert(file_ptr); idx = 0; @@ -3086,10 +3086,10 @@ local_unpin_next_pinned_entry(H5F_t *file_ptr, int start_idx, hbool_t via_unprot if (nerrors == 0) { - HDassert(file_ptr); - HDassert(0 <= start_idx); - HDassert(start_idx < NUM_DATA_ENTRIES); - HDassert(start_idx < virt_num_data_entries); + assert(file_ptr); + assert(0 <= start_idx); + assert(start_idx < NUM_DATA_ENTRIES); + assert(start_idx < virt_num_data_entries); idx = start_idx; @@ -3138,14 +3138,14 @@ lock_and_unlock_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, int mi if (nerrors == 0) { - HDassert(file_ptr); - HDassert(0 <= min_count); - HDassert(min_count < max_count); + assert(file_ptr); + assert(0 <= min_count); + assert(min_count < max_count); count = (HDrand() % (max_count - min_count)) + min_count; - HDassert(min_count <= count); - HDassert(count <= max_count); + assert(min_count <= count); + assert(count <= max_count); for (i = 0; i < count; i++) { lock_and_unlock_random_entry(file_ptr, min_idx, max_idx); @@ -3177,16 +3177,16 @@ lock_and_unlock_random_entry(H5F_t *file_ptr, int min_idx, int max_idx) if (nerrors == 0) { - HDassert(file_ptr); - HDassert(0 <= min_idx); - HDassert(min_idx < max_idx); - HDassert(max_idx < NUM_DATA_ENTRIES); - HDassert(max_idx < virt_num_data_entries); + assert(file_ptr); + assert(0 <= min_idx); + assert(min_idx < max_idx); + assert(max_idx < NUM_DATA_ENTRIES); + assert(max_idx < virt_num_data_entries); idx = (HDrand() % (max_idx - min_idx)) + min_idx; - HDassert(min_idx <= idx); - HDassert(idx <= max_idx); + assert(min_idx <= idx); + assert(idx <= max_idx); lock_entry(file_ptr, idx); unlock_entry(file_ptr, idx, H5AC__NO_FLAGS_SET); @@ -3217,12 +3217,12 @@ lock_entry(H5F_t *file_ptr, int32_t idx) if (nerrors == 0) { - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(!(entry_ptr->locked)); + assert(!(entry_ptr->locked)); cache_entry_ptr = (H5C_cache_entry_t *)H5AC_protect(file_ptr, &(types[0]), entry_ptr->base_addr, &entry_ptr->base_addr, H5AC__NO_FLAGS_SET); @@ -3242,7 +3242,7 @@ lock_entry(H5F_t *file_ptr, int32_t idx) entry_ptr->locked = TRUE; } - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); } return; @@ -3270,13 +3270,13 @@ mark_entry_dirty(int32_t idx) if (nerrors == 0) { - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(entry_ptr->locked || entry_ptr->global_pinned); - HDassert(!(entry_ptr->local_pinned)); + assert(entry_ptr->locked || entry_ptr->global_pinned); + assert(!(entry_ptr->local_pinned)); (entry_ptr->ver)++; entry_ptr->dirty = TRUE; @@ -3320,15 +3320,15 @@ pin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty) if (nerrors == 0) { - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(!(entry_ptr->global_pinned)); - HDassert(!(entry_ptr->local_pinned)); - HDassert(!(dirty && (!global))); + assert(!(entry_ptr->global_pinned)); + assert(!(entry_ptr->local_pinned)); + assert(!(dirty && (!global))); lock_entry(file_ptr, idx); @@ -3339,8 +3339,8 @@ pin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty) unlock_entry(file_ptr, idx, flags); - HDassert((entry_ptr->header).is_pinned); - HDassert((!dirty) || ((entry_ptr->header).is_dirty)); + assert((entry_ptr->header).is_pinned); + assert((!dirty) || ((entry_ptr->header).is_dirty)); if (global) { @@ -3380,12 +3380,12 @@ pin_protected_entry(int32_t idx, hbool_t global) herr_t result; struct datum *entry_ptr; - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(entry_ptr->locked); + assert(entry_ptr->locked); if (nerrors == 0) { @@ -3415,7 +3415,7 @@ pin_protected_entry(int32_t idx, hbool_t global) local_pins++; } - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); } return; @@ -3451,19 +3451,19 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx) if ((nerrors == 0) && (old_idx != new_idx)) { - HDassert(file_ptr); - HDassert((0 <= old_idx) && (old_idx < NUM_DATA_ENTRIES)); - HDassert(old_idx < virt_num_data_entries); - HDassert((0 <= new_idx) && (new_idx < NUM_DATA_ENTRIES)); - HDassert(new_idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= old_idx) && (old_idx < NUM_DATA_ENTRIES)); + assert(old_idx < virt_num_data_entries); + assert((0 <= new_idx) && (new_idx < NUM_DATA_ENTRIES)); + assert(new_idx < virt_num_data_entries); old_entry_ptr = &(data[old_idx]); new_entry_ptr = &(data[new_idx]); - HDassert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); - HDassert(!(old_entry_ptr->header.is_protected)); - HDassert(!(old_entry_ptr->locked)); - HDassert(old_entry_ptr->len == new_entry_ptr->len); + assert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(!(old_entry_ptr->header.is_protected)); + assert(!(old_entry_ptr->locked)); + assert(old_entry_ptr->len == new_entry_ptr->len); old_addr = old_entry_ptr->base_addr; new_addr = new_entry_ptr->base_addr; @@ -3507,7 +3507,7 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx) } else { - HDassert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); if (!(old_entry_ptr->header.is_dirty)) { @@ -3532,7 +3532,7 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx) } else { - HDassert(old_entry_ptr->header.is_dirty); + assert(old_entry_ptr->header.is_dirty); } } } @@ -3632,18 +3632,18 @@ resize_entry(int32_t idx, size_t new_size) if (nerrors == 0) { - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); - HDassert(!(entry_ptr->locked)); - HDassert((entry_ptr->global_pinned) && (!entry_ptr->local_pinned)); - HDassert((entry_ptr->header.size == entry_ptr->len) || - (entry_ptr->header.size == entry_ptr->local_len)); - HDassert(new_size > 0); - HDassert(new_size <= entry_ptr->len); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(!(entry_ptr->locked)); + assert((entry_ptr->global_pinned) && (!entry_ptr->local_pinned)); + assert((entry_ptr->header.size == entry_ptr->len) || + (entry_ptr->header.size == entry_ptr->local_len)); + assert(new_size > 0); + assert(new_size <= entry_ptr->len); result = H5AC_resize_entry((void *)entry_ptr, new_size); @@ -3656,9 +3656,9 @@ resize_entry(int32_t idx, size_t new_size) } else { - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); - HDassert(entry_ptr->header.is_dirty); - HDassert(entry_ptr->header.size == new_size); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(entry_ptr->header.is_dirty); + assert(entry_ptr->header.size == new_size); entry_ptr->dirty = TRUE; entry_ptr->local_len = new_size; @@ -3704,9 +3704,9 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr H5C_t *cache_ptr = NULL; haddr_t actual_base_addr; - HDassert(fid_ptr != NULL); - HDassert(file_ptr_ptr != NULL); - HDassert(cache_ptr_ptr != NULL); + assert(fid_ptr != NULL); + assert(file_ptr_ptr != NULL); + assert(cache_ptr_ptr != NULL); fid = H5Fcreate(filenames[0], H5F_ACC_TRUNC, H5P_DEFAULT, fapl); @@ -3937,8 +3937,8 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl) hbool_t proceed = TRUE; unsigned u = 0; - HDassert(world_mpi_rank != world_server_mpi_rank); - HDassert((num_writes == 0) || (written_entries_tbl != NULL)); + assert(world_mpi_rank != world_server_mpi_rank); + assert((num_writes == 0) || (written_entries_tbl != NULL)); /* barrier to ensure that all other processes are ready to leave * the sync point as well. @@ -4043,8 +4043,8 @@ setup_rand(void) if ((use_predefined_seeds) && (world_mpi_size == num_predefined_seeds)) { - HDassert(world_mpi_rank >= 0); - HDassert(world_mpi_rank < world_mpi_size); + assert(world_mpi_rank >= 0); + assert(world_mpi_rank < world_mpi_size); seed = predefined_seeds[world_mpi_rank]; HDfprintf(stdout, "%d:%s: predefined_seed = %d.\n", world_mpi_rank, __func__, seed); @@ -4564,13 +4564,13 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags) if (nerrors == 0) { - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(entry_ptr->locked); + assert(entry_ptr->locked); dirtied = ((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG); @@ -4598,13 +4598,13 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags) entry_ptr->locked = FALSE; } - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); if (((flags & H5AC__DIRTIED_FLAG) != 0) && ((flags & H5C__DELETED_FLAG) == 0) && (!(((world_mpi_rank == 0) && (entry_ptr->flushed)) || ((world_mpi_rank != 0) && (entry_ptr->cleared))))) { - HDassert(entry_ptr->header.is_dirty); - HDassert(entry_ptr->dirty); + assert(entry_ptr->header.is_dirty); + assert(entry_ptr->dirty); } } @@ -4634,16 +4634,16 @@ unpin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty, hbool_t if (nerrors == 0) { - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert((entry_ptr->header).is_pinned); - HDassert(!(entry_ptr->global_pinned && entry_ptr->local_pinned)); - HDassert((global && entry_ptr->global_pinned) || (!global && entry_ptr->local_pinned)); - HDassert(!(dirty && (!global))); + assert((entry_ptr->header).is_pinned); + assert(!(entry_ptr->global_pinned && entry_ptr->local_pinned)); + assert((global && entry_ptr->global_pinned) || (!global && entry_ptr->local_pinned)); + assert(!(dirty && (!global))); if (via_unprotect) { @@ -4674,7 +4674,7 @@ unpin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty, hbool_t } } - HDassert(!((entry_ptr->header).is_pinned)); + assert(!((entry_ptr->header).is_pinned)); if (global) { @@ -5132,8 +5132,8 @@ smoke_check_1(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -5330,8 +5330,8 @@ smoke_check_2(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -5491,10 +5491,10 @@ smoke_check_3(int metadata_write_strategy) pin_entry(file_ptr, i, TRUE, dirty); - HDassert(!dirty || data[i].header.is_dirty); - HDassert(data[i].header.is_pinned); - HDassert(data[i].global_pinned); - HDassert(!data[i].local_pinned); + assert(!dirty || data[i].header.is_dirty); + assert(data[i].header.is_pinned); + assert(data[i].global_pinned); + assert(!data[i].local_pinned); } if (i > 100) { @@ -5529,8 +5529,8 @@ smoke_check_3(int metadata_write_strategy) hbool_t via_unprotect = ((((unsigned)i) & 0x02) == 0); hbool_t dirty = ((((unsigned)i) & 0x04) == 0); - HDassert(data[i].global_pinned); - HDassert(!data[i].local_pinned); + assert(data[i].global_pinned); + assert(!data[i].local_pinned); unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect); } @@ -5615,8 +5615,8 @@ smoke_check_3(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -5788,10 +5788,10 @@ smoke_check_4(int metadata_write_strategy) pin_entry(file_ptr, i, TRUE, dirty); - HDassert(!dirty || data[i].header.is_dirty); - HDassert(data[i].header.is_pinned); - HDassert(data[i].global_pinned); - HDassert(!data[i].local_pinned); + assert(!dirty || data[i].header.is_dirty); + assert(data[i].header.is_pinned); + assert(data[i].global_pinned); + assert(!data[i].local_pinned); } if (i > 100) { @@ -5822,8 +5822,8 @@ smoke_check_4(int metadata_write_strategy) hbool_t via_unprotect = ((((unsigned)i) & 0x02) == 0); hbool_t dirty = ((((unsigned)i) & 0x04) == 0); - HDassert(data[i].global_pinned); - HDassert(!data[i].local_pinned); + assert(data[i].global_pinned); + assert(!data[i].local_pinned); unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect); } @@ -5899,8 +5899,8 @@ smoke_check_4(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -6091,8 +6091,8 @@ smoke_check_5(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -6395,8 +6395,8 @@ trace_file_check(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -6639,7 +6639,7 @@ smoke_check_6(int metadata_write_strategy) /* Make sure coll entries do not cross the 80% threshold */ H5_CHECK_OVERFLOW(cache_ptr->max_cache_size, size_t, double); - HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); + assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); } /* Restore collective metadata reads state */ H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag); @@ -6663,7 +6663,7 @@ smoke_check_6(int metadata_write_strategy) } /* Make sure coll entries do not cross the 80% threshold */ - HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); + assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); } /* Restore collective metadata reads state */ H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag); @@ -6695,7 +6695,7 @@ smoke_check_6(int metadata_write_strategy) } /* Make sure coll entries do not cross the 80% threshold */ - HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); + assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); } /* Restore collective metadata reads state */ H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag); @@ -6719,7 +6719,7 @@ smoke_check_6(int metadata_write_strategy) } /* Make sure coll entries do not cross the 80% threshold */ - HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); + assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); } /* Restore collective metadata reads state */ H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag); @@ -6744,8 +6744,8 @@ smoke_check_6(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ |